Motor Digital Output Waits
The mpiMotorGeneralOutSet function has a Boolean argument wait. SynqNet is a cyclic network and each new state (after a call to an output function) can only be transmitted over SynqNet at the SynqNet rate. The wait argument determines what happens if two output functions are called in short succession.
When an output function is first called, the new output state is held on the controller and the function will return immediately releasing the host application to continue with other tasks. The new output state will wait on the controller until the next cycle before being transmitted over SynqNet and being applied to the physical pin on the node.
If an output function is called again for the same node before this data has been transmitted, then the wait argument selects between two choices, either wait for the previous output state to be transmitted before continuing to apply the new state or overwrite the existing held state in the controller and immediately exit.
The maximum wait is one SynqNet cycle. The wait decision is independent for each motor on each node.
The following MPI code with wait = TRUE will ensure that the physical pin will definitely generate a short pulse.
The following MPI code shows the use of not introducing a wait. The code is updating two bits on the same node. Both calls will immediately exit and since the timing of these two bits (in this application) are not related, this code can execute faster.
|| | Copyright © 2001-2010 Motion Engineering|