Configures the polarity of all Digital IO reads and writes.
- Parameters
-
[in] | handle | Valid handle returned by SM_Open(). |
[in] | activeLow | Use active-low polarity instead of typical active-high. |
- Return values
-
0 | Success. |
-1 | Invalid SeaMAX handle. |
-2 | No module detected. |
Calling this modifier will cause all read and write Digital IO requests to be mutated to use the indicated polarity. Set the boolean value FALSE to use typical active-high logic states i.e. a logic high is representative of a physical high signal. Likewise set the boolean value TRUE to use the reverse logic i.e. a logic low is representative of a physical low or grounded signal.
When using Form C relays this will have the effect of reversing the NC and NO contacts.
- Note
- If a different device is selected at a future time, it is possible that the polarity could change again depending on the configuration of the selected device. Therefore, it is necessary to re-issue this call whenever selecting a new device to ensure consistency.
References SM_GetConfig().