int __stdcall SM_SetPolarity ( SM_HANDLE  handle,
bool  activeLow 
)

Configures the polarity of all Digital IO reads and writes.

Parameters
[in]handleValid handle returned by SM_Open().
[in]activeLowUse active-low polarity instead of typical active-high.
Return values
0Success.
-1Invalid SeaMAX handle.
-2No 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().

 
 
Generated on Mon Nov 26 2018.