xPCI-3501 API
xPCI-3501 Analog outputs functions

Functions

_INT_ i_PCI3501_Write1AnalogOutput (HANDLE h_DeviceHandle, BYTE b_Channel, BYTE b_Polarity, WORD w_Value)
 
_INT_ i_PCI3501_WriteMoreAnalogOutputs (HANDLE h_DeviceHandle, BYTE b_ChannelNbr, PBYTE pb_Channels, PBYTE pb_Polarity, PWORD pw_Value)
 

Detailed Description

Function Documentation

_INT_ i_PCI3501_Write1AnalogOutput ( HANDLE  h_DeviceHandle,
BYTE  b_Channel,
BYTE  b_Polarity,
WORD  w_Value 
)

Write the value of one analog output of the board
In unipolar mode, output voltage range is 0V to 10V
In bipolar mode, output voltage range is -10V to 10V
Analog output values are 0x0 to 0x1FFF in unipolar mode, 0x0 to 0x3FFF in bipolar mode

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ChannelChannel to write (0 to 3)
[in]b_PolarityPolarity of the channel (PCI3501_OUTPUT_MODE_UNIPOLAR or PCI3501_OUTPUT_MODE_BIPOLAR)
[in]w_ValueValue to write to the output
Return values
0: No Error
-1: The device handle parameter is wrong
-3: Invalid channel
-4: Invalid polarity
-5: Invalid value in bipolar mode
-6: Invalid value in unipolar mode
-7: Error while calling IOCTL function (wrong handle ?)
_INT_ i_PCI3501_WriteMoreAnalogOutputs ( HANDLE  h_DeviceHandle,
BYTE  b_ChannelNbr,
PBYTE  pb_Channels,
PBYTE  pb_Polarity,
PWORD  pw_Value 
)

Write values of several analog outputs
In unipolar mode, output voltage range is 0V to 10V
In bipolar mode, output voltage range is -10V to 10V
Analog output values are 0x0 to 0x1FFF in unipolar mode, 0x0 to 0x3FFF in bipolar mode

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ChannelNbrNumber of channels to write (1 to 4)
[in]pb_ChannelsChannels to write (0 to 3)
[in]pb_PolarityPolarity of the channel (PCI3501_OUTPUT_MODE_UNIPOLAR or PCI3501_OUTPUT_MODE_BIPOLAR)
[in]pw_ValueValue to write to the output
Return values
0: No Error
-1: The device handle parameter is wrong
-2: b_ChannelNbr is invalid
-3: Invalid channel
-4: Invalid polarity
-5: Invalid value in bipolar mode
-6: Invalid value in unipolar mode
-7: Error while calling IOCTL function (wrong handle ?)