Chapter 14 Onboard Programs
© National Instruments Corporation 14-27 NI-Motion User Manual
Figure 14-15. Synchronizing Host Applications with Onboard Programs
For example, consider a host application that reads an onboard variable
that has been updated by an onboard program. Use the algorithm in
Figure 14-16 to synchronize the host application with an onboard program,
and read an onboard variable that has been updated by an onboard program.
Figure 14-16. Synchronization Algorithm
I/O register for
sending commands
and reading data
Read move complete
status function execute
from within host application
Poll the MCS waiting for
bit 13 to be set high
Read the onboard variable
Reset bit 13 to 0
Update the variable
on the device
Set Bit 13 on MCS
Continue execution
of the next function
Host Application Onboard Program