Onboard Subroutines

NI-Motion

Onboard Subroutines

Note  This section applies only to NI 73xx motion controllers.

You can create subroutines to run as onboard programs and execute them from within an onboard program.

Onboard Subroutine Algorithm

The following figure shows an onboard program algorithm that checks the I/O line state to determine which onboard subroutine to execute applicable to both C/C++ and LabVIEW code.

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 counterclockwise.