Using Onboard Programs with NI 73xx Motion Controllers
You can use the real-time operating system on the NI 73xx motion controller to run custom programs. This functionality allows you to offload tasks from the host processor and onto the motion controller. Using onboard variables, which are global data on the device, arithmetic and loop operations, and efficient wait functions, you can write onboard programs to execute parts of the motion application with almost no host interaction. You can execute up to 10 onboard programs simultaneously.
Onboard programs have the least priority in a preemptive multitasking environment running on the embedded microprocessor because the primary function of the embedded processor is supervisory control and I/O reaction. Instead, the onboard programs run in a time-sliced manner at the lowest priority. Each onboard program gets a default time slice of two milliseconds, after which it relinquishes control of the processor to the next onboard program or housekeeping task.
The host communication and I/O reaction tasks take higher priority than the onboard programs and housekeeping tasks, as shown in the following figure. The onboard programs and housekeeping tasks are time-sliced among themselves.
For greater control and determinism for the motion control system, National Instruments offers the LabVIEW Real-Time (RT) module motion control system, which consists of a PXI chassis, PXI motion controller or controllers, LabVIEW RT, and NI-Motion driver software.
Note If you continuously poll data from the host, the onboard program gets preempted and has less time to run. To keep this from happening, insert a small delay in the polling loops on the host. Refer to Timing Loops for information about programming delays in the loops. |