Converts a given floating point voltage value to an appropriate 16-bit D/A holding register value.
- Deprecated:
- Version 3.0.4
- Parameters
-
| [in] | handle | Valid handle returned by SM_Open(). |
| [in] | value | Floating point desired D/A voltage value. |
| [out] | data | After completion, contains two bytes of data - usefull for calling SM_WriteHoldingRegisters(). |
| [in] | channelRange | D/A channel range. |
- Return values
-
| 0 | Successful completion. |
| -1 | Invalid SeaMAX handle. |
| -2 | Unknown or invalid voltage range. |
This function has been provided to simplify the converstion between a desired voltage output value and an appropriate 16-bit holding register value required by SM_WriteHoldingRegisters().
- Note
- Appropriate ranges are limited to ZERO_TO_TEN and ZERO_TO_FIVE.
- See also
- Channel Range values and SM_GetADDAExtendedConfig()