Conditionally Executing Onboard Programs
Note This section applies only to NI 73xx motion controllers. |
You can set conditions that affect the execution of the onboard programs. For example, you may want the onboard program to wait until a specific event occurs, and then continue executing.
The Wait on Condition VI or the Wait on Event function allows you to create onboard programs that wait for events, such as move complete and blend complete. These onboard programs can send functions to start moves and wait for moves to complete. The onboard program uses almost no processor time while waiting for an event such as move complete. When the move is complete, the trajectory generator enables the I/O reaction task, which causes the onboard program to continue executing the next function in its sequence, as shown in the following figure.
Onboard Program Conditional Execution Algorithm
The following figure shows the basic algorithm for conditionally executing an onboard program applicable to both C/C++ and LabVIEW code.