Your browser does not allow scripts
Please click here to view a static table of contents without scripts
DS1M12_GetDeviceChannelData
Return to Introduction  Previous page  Next page
This function returns the data values for the DS1M12 channels.

DS_STATUS
DS1M12_GetDeviceChannelData
(DS_HANDLE dsHandle, LPBOOL lpbDualScopeTriggered, PChannelDataValuesBuffer pChannelADataBuffer, PDS_CHANNEL_DATA pChannelAData, PChannelDataValuesBuffer pChannelBDataBuffer, PDS_CHANNEL_DATA pChannelBData)




Parameters
dsHandle
Handle of a DS1M12.
lpbDualScopeTriggered
Pointer to a variable of type BOOLEAN, which returns the triggered state of a specified DS1M12 channel. DS1M12 has triggered (TRUE), DS1M12 has not triggered (FALSE).
pChannelADataBuffer
Buffer that returns the data values read from a DS1M12 channel A during a single scan cycle. Each data value represents a voltage level in mV. Size of buffer should be set to 8192.
pChannelAData
Pointer to the structure that contains the data associated with the data values read back from channel A of a DS1M12.
pChannelBDataBuffer
Buffer that returns the data values read from a DS1M12 channel B during a single scan cycle. Each data value represents a voltage level in mV. Size of buffer should be set to 8192.
pChannelBData
Pointer to the structure that contains the data associated with the data values read back from channel B of a DS1M12.




PDS_CHANNEL_DATA Structure
DWORD
dwMaxNumDataValues
Returns the maximum number of data values that can be returned in a channel data buffer for a DS1M12 channel. The valid maximum number of data values are 8k, 4k, 2k and 1k. A DS1M12 is configured to return a maximum number of data values using a specific FPGA configuration file.
DWORD
dwNumValuesReturned
Returns the actual number of data values read from a DS1M12 channel and returned in a channel data buffer.
BOOL
bMaxValuesClipped
Returns the indication whether the data values returned in a channel data buffer have been clipped. Clipping indicates that a channel was attempting to measure a voltage above its maximum voltage range. Data values clipped (TRUE) or data values not clipped (FALSE).
BOOL
bMinValuesClipped
Returns the indication whether the data values returned in a channel data buffer have been clipped. Clipping indicates that a channel was attempting to measure a voltage below its minimum voltage range. Data values clipped (TRUE), data values not clipped (FALSE).




Return Value
Returns DS_SUCCESS if successful, otherwise the return value will be one of the following error codes:

   DS_INVALID_HANDLE
   DS_DEVICE_NOT_READY
   DS_NULL_CHANNEL_DATA_BUFFER_POINTER
   DS_NULL_CHANNEL_DATA_POINTER
   DS_CHANNEL_A_FUSE_FAILED
   DS_CHANNEL_B_FUSE_FAILED
   DS_EXTERNAL_TRIGGER_FUSE_FAILED
   DS_IO_ERROR



Remarks
DS_DEVICE_NOT_READY error code indicates that the DS1M12 is functioning, but the trigger conditions set using the DS1M12_StartDeviceChannelScan function call have not been meet. This function should be in a loop which should continue until the status code is DS_SUCCESS, indicating that the device has triggered and there is data available. The loop could also terminate if trigger conditions are changed or the user aborts.

The measurements taken for each channel are dependant on the gain specified for each channel. The resolution of each data value is 12 bits. Each data value represents a voltage level in
mV.

The DS1M12 FPGA must be programmed prior to calling this function. To program the DS1M12, call
DS1M12_ProgramDevice.