Transitioning to the New Motor I/O Functions
Why were the Motor I/O functions changed?
As a result of the increased functionality of the MPI and SynqNet nodes in every software release, the number of dedicated inputs has increased beyond 16. The original functions used to access the dedicated inputs (mpiMotorIoGet and mpiMotorIoSet) had to be changed in order to cope with this increased number of inputs. The changes should allow the interface to adapt to future expansions of the I/O capabilities and provide a clearer interface for accessing the motor I/O.
What has changed?
Deprecated Interface (03.01.xx) |
New Interface (03.02.00 and after) |
Functions: mpiMotorIoGet mpiMotorIoSet mpiControlIoBitGet mpiControlIoBitSet |
|
Structures: MPIMotorIo |
|
Enumerations: MPIMotorDedicatedIn MPIMotorDedicatedOut MPIMotorIoMask MPIMotorInput |
The original functions and enumerations are still available and will have the same functionality as they prior to MPI version 03.02.00. See MPI Version Numbering. The original definitions have been moved to mpiDepricated.h.
|
See Also
Introduction to Motor I/O Interface
Dedicated Motor I/O
Motor Digital Output Waits
General Purpose Motor I/O
Sample Code
Example 1:
If the original code to check the current state of the positive hardware limit switch was:
|
The equivalent code using the new interface would be:
|
Example 2:
If the original code to set the first general purpose output was:
|
The equivalent code using the new interface would be:
|
