Custom 97 MotionController Firmware

Introduction

Custom97 Firmware is designed and optimized for using a Real-Time Operating System and the Sync Interrupt. It provides more a more efficient means to read and write data which is sent and received by the SynqNet network.


Read Data from SynqNet

At the beginning of each MotionController (SynqNet) sample period, just before the Sync Interuppt is generated, the Custom97 Read feature can copy the values from up to 64 memory locations in the SynqNet buffer into a contiguous block in the Custom97 read buffer.


This feature is configured using MotionController::Custom97ReadPtrSet(). Here you specify the firmware address (what you see in VM3) for the locations in the SynqNet buffer you wish to copy.


After configuring all the addresses, enable the feature using MotionController::Custom97ReadCountSet(). Disable the feature by passing a zero into MotionController::Custom97ReadCountSet();


In your real-time Sync Interrupt handler, use MotionController::Custom97ReadDataGet() to read the contiguous block of data in the Custom97 read buffer. This is much faster than attempting to read each value from the SynqNet buffer directly.

Write Data to SynqNet

At the end of each SynqNet sample period, just before the contents of the SynqNet buffer are DMA'd to the network hardware, the Custom97 Write feature will copy values from the Custom97 write buffer to the SynqNet buffer.


Use MotionController::Custom97WritePtrSet() to configure this feature. It is very similar to configring the read buffer.


To enable or disable the feature, use MotionController::Custom97WriteCountSet().


In the real-time Sync Interrupt handler, use MotionController::Custom97WriteDataSet() to copy the values from your Host PC to the contiguous Custom97 write buffer.

Stretching the length of the HostProcessTime

Use MotionController::Custom97WaitTimeSet() to increase the HostProcessTime for each firmware sample period, in increments of 25 nanoseconds.


This is to allow the maximum available proccesing time for the Host PC after it starts the Sync Interrupt handler. Use MotionController::SyncInterruptHostProcessTimeGet() to see the time (in microseconds) available for host processing.

Sample Code