Onboard Subroutines; Algorithm - National Instruments NI-Motion User Manual

Motion control
Table of Contents

Advertisement

Chapter 14
Onboard Programs

Onboard Subroutines

Algorithm

Main onboard
program
Check I/O
line state
Start program 3
Wait for program 3
to complete
NI-Motion User Manual
You can create subroutines to run as onboard programs and execute them
from within an onboard program.
Figure 14-19 shows an onboard program algorithm that checks the I/O line
state to determine which onboard subroutine to execute.
Start program 2
Figure 14-19. Onboard Subroutine Algorithm
If the I/O line is active, the main onboard program calls an onboard
subroutine that rotates the motor clockwise. If the I/O line is inactive, the
main onboard program calls an onboard subroutine that rotates the motor
to counter clockwise.
14-34
Wait for program 2
to complete
ni.com

Advertisement

Table of Contents
loading

Table of Contents