int __stdcall SM_DtoAConversion ( SM_HANDLE  handle,
double  value,
unsigned char *  data,
int  channelRange 
)

Converts a given floating point voltage value to an appropriate 16-bit D/A holding register value.

Deprecated:
Version 3.0.4
Parameters
[in]handleValid handle returned by SM_Open().
[in]valueFloating point desired D/A voltage value.
[out]dataAfter completion, contains two bytes of data - usefull for calling SM_WriteHoldingRegisters().
[in]channelRangeD/A channel range.
Return values
0Successful completion.
-1Invalid SeaMAX handle.
-2Unknown 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()
 
 
Generated on Mon Nov 26 2018.