. |
Controller Digital I/O FunctionsWhy the change?In the previous 03.02.00 MPI release, a new set of functions were introduced to access dedicated and general purpose I/O. In order to ensure a consistent interface when accessing all I/O, changes were made to the MPI. The following set of functions have been added to the 03.03.00 MPI release for accessing the digital I/O directly attached to a controller. What has Changed?
The original functions and enumerations are still available and will have the same functionality as they did prior to 03.03.00 MPI release. See MPI Version Numbering. The original definitions have been moved to mpiDepricated.h. NOTE: An existing application can still use the deprecated interface without any source code changes. However, new or existing applications that want to use the extended functions should use the new interface. See Also: Controller Digital I/O Overview Sample CodeThe following sample code examples show how to modify existing code to the new interface. Example 1If the original code to read the current state of controller input 3 was:
The equivalent code using the new interface would be:
Example 2If the original code to clear controller output 2 was:
The equivalent code using the new interface would be:
|
| | Copyright © 2001-2021 Motion Engineering |