|
_INT_ | i_PCI3116_Write1AnalogOutput (HANDLE h_DeviceHandle, BYTE b_Channel, BYTE b_Polarity, WORD w_Value) |
|
_INT_ | i_PCI3116_WriteMoreAnalogOutputs (HANDLE h_DeviceHandle, BYTE b_ChannelNbr, PBYTE pb_Channels, PBYTE pb_Polarity, PWORD pw_Value) |
|
_INT_ | i_PCI3116_SetAnalogInputMode (HANDLE h_DeviceHandle, BYTE b_InputMode) |
|
_INT_ | i_PCI3116_GetAnalogInputMode (HANDLE h_DeviceHandle, PBYTE pb_InputMode) |
|
_INT_ | i_PCI3116_InitAndStartAnalogInputSequence (HANDLE h_DeviceHandle, DWORD dw_SequenceCount, DWORD dw_SequenceBeforeInterrupt, BYTE b_ChannelCount, PBYTE pb_Channel, PBYTE pb_Gain, PBYTE pb_Polarity, DWORD dw_ConvertingTime, DWORD dw_DelayTime, BYTE b_SoftTriggerMode, BYTE b_ExtTriggerMode, DWORD dw_SequenceTriggerCount) |
|
_INT_ | i_PCI3116_ReadMoreAnalogInputs (HANDLE h_DeviceHandle, BYTE b_ChannelCount, PBYTE pb_Channel, PBYTE pb_Gain, PBYTE pb_Polarity, DWORD dw_ConvertingTime, BYTE b_InterruptFlag, BYTE b_SoftTriggerMode, BYTE b_ExtTriggerMode, PWORD pw_ChannelValue) |
|
_INT_ | i_PCI3116_Read1AnalogInput (HANDLE h_DeviceHandle, BYTE b_Channel, BYTE b_Gain, BYTE b_Polarity, DWORD dw_ConvertingTime, BYTE b_InterruptFlag, BYTE b_SoftTriggerMode, BYTE b_ExtTriggerMode, PWORD pw_ChannelValue) |
|
_INT_ | i_PCI3116_InitAndStartAutoRefreshAcquisition (HANDLE h_DeviceHandle, BYTE b_ChannelCount, PBYTE pb_Channel, PBYTE pb_Gain, PBYTE pb_Polarity, DWORD dw_ConvertingTime, PDWORD *ppdw_Channels) |
|
_INT_ | i_PCI3116_StopAnalogAcquisition (HANDLE h_DeviceHandle) |
|
_INT_ | i_PCI3116_TriggerAnalogAcquisition (HANDLE h_DeviceHandle) |
|
_INT_ | i_PCI3116_GetAnalogInputChannelsNbr (HANDLE h_DeviceHandle, PBYTE pb_NumberOfInputChannels) |
|
_INT_ | i_PCI3116_GetAnalogInputResolution (HANDLE h_DeviceHandle, PBYTE pb_Resolution) |
|
_LONG_ | l_PCI3116_ReadSequenceData (HANDLE h_DeviceHandle, DWORD dw_Size, PVOID pv_Data) |
|
_INT_ | i_PCI3116_ReadPotis (HANDLE h_DeviceHandle, BYTE b_PotisId, PDWORD pdw_Value) |
|
_INT_ | i_PCI3116_WritePotis (HANDLE h_DeviceHandle, BYTE b_PotisId, DWORD dw_Value) |
|
_INT_ | i_PCI3116_SavePotis (HANDLE h_DeviceHandle) |
|
_INT_ i_PCI3116_InitAndStartAnalogInputSequence |
( |
HANDLE |
h_DeviceHandle, |
|
|
DWORD |
dw_SequenceCount, |
|
|
DWORD |
dw_SequenceBeforeInterrupt, |
|
|
BYTE |
b_ChannelCount, |
|
|
PBYTE |
pb_Channel, |
|
|
PBYTE |
pb_Gain, |
|
|
PBYTE |
pb_Polarity, |
|
|
DWORD |
dw_ConvertingTime, |
|
|
DWORD |
dw_DelayTime, |
|
|
BYTE |
b_SoftTriggerMode, |
|
|
BYTE |
b_ExtTriggerMode, |
|
|
DWORD |
dw_SequenceTriggerCount |
|
) |
| |
Initialize and starts an analog acquisition
To use this function you must set an interrupt routine where you will handle the data, and you must also define the input mode.
Gain acts as a multiplier for the input voltage. Possible gain values are :
-
PCI3116_GAIN_1 : Input range is between -10V and 10V (bipolar)
-
PCI3116_GAIN_2 : Input range is between -5V and 5V (bipolar)
-
PCI3116_GAIN_5 : Input range is between -2V and 2V (bipolar)
-
PCI3116_GAIN_10 : Input range is between -1V and 1V (bipolar)
The converting time stands for the time spent to acquire one channel. The time to acquire a sequence is dw_ConvertingTime * b_ChannelCount
The software trigger is a combination of 2 parameters
-
The first one enables or disabled the trigger
-
PCI3116_SOFT_TRIGGER_ENABLED : The trigger is enabled
-
PCI3116_SOFT_TRIGGER_DISABLED : The trigger is disabled
-
The trigger type is selected with one of the following parameters
-
PCI3116_TRIGGER_ONE_SHOT : The acquisition starts when the trigger is set
-
PCI3116_TRIGGER_SEQUENCE_TRIGGER : A pre-defined number of sequence is acquired : dw_SequenceTriggerCount
-
PCI3116_TRIGGER_SINGLE_SEQUENCE : One whole sequence is read for each trigger
The external trigger is a combination of the following parameters :
-
The first one defines the trigger edge
-
PCI3116_EXT_TRIGGER_DISABLED : Trigger is disabled
-
PCI3116_EXT_TRIGGER_ENABLED_LOW : Triggers on low edge
-
PCI3116_EXT_TRIGGER_ENABLED_HIGH : Triggers on high edge
-
PCI3116_EXT_TRIGGER_ENABLED_BOTH : Triggers on both edges
-
The second one defines the trigger type
-
PCI3116_TRIGGER_ONE_SHOT : The acquisition starts when the trigger is set
-
PCI3116_TRIGGER_SEQUENCE_TRIGGER : A pre-defined number of sequence is acquired : dw_SequenceTriggerCount
-
PCI3116_TRIGGER_SINGLE_SEQUENCE : One whole sequence is read for each trigger
- Parameters
-
[in] | h_DeviceHandle | Handle of the board |
[in] | dw_SequenceCount | The total number of sequence to acquire. Set it to 0 if you want to use continuous acquisition (i.e. infinite acquisition) |
[in] | dw_SequenceBeforeInterrupt | Specify the number of sequence to wait before generating an interruption. For high frequency, set a high number (512 if using maximum frequency for example). |
[in] | b_ChannelCount | The number of channels in one sequence. Rule: (b_ChannelCount * dw_SequenceBeforeInterrupt) must be a multiple of 2 |
[in] | pb_Channel | Define the channels in the sequence (single ended : 0 to 15, differential : 0 to 7). Depending on your board, this number may be different. |
[in] | pb_Gain | Define the gain for each channel |
[in] | pb_Polarity | Define the polarity for each channel (PCI3116_OUTPUT_MODE_UNIPOLAR or PCI3116_OUTPUT_MODE_BIPOLAR) |
[in] | dw_ConvertingTime | Define the time between two channels acquisition (5us to 65 535 000us). If you choose 16 channels with a conversion time of 5us, an entire sequence will be acquired in 16 * 5 = 80us |
[in] | dw_DelayTime | Define the time between two sequences acquisition (5us to 65 535 000us). |
[in] | b_SoftTriggerMode | Defines the software trigger |
[in] | b_ExtTriggerMode | Defines the external trigger |
[in] | dw_SequenceTriggerCount | If you choose a trigger with mode PCI3116_TRIGGER_SEQUENCE_TRIGGER, it defines the number of sequence to acquire when a trigger occurs (1 to 0xFFFFFFFF). If not use, give 0. |
- Return values
-
0 | : success |
-1 | : The device handle parameter is wrong |
-2 | : The sequence size is wrong |
-3 | : The input mode has not been set |
-4 | : A channel index is invalid (single-ended mode) |
-5 | : A gain value is wrong |
-6 | : A polarity value is wrong |
-7 | : The converting time is invalid |
-8 | : The delay time is invalid |
-9 | : The interrupt routine is not installed |
-10 | : dw_SequenceBeforeInterrupt is not valid |
-11 | : (b_ChannelCount * dw_SequenceBeforeInterrupt) is not a multiple of 2 |
-12 | : both software and hardware trigger are enabled. In that case, they must have the same type (one shot, sequence trigger or single sequence) |
-13 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3116_ReadMoreAnalogInputs |
( |
HANDLE |
h_DeviceHandle, |
|
|
BYTE |
b_ChannelCount, |
|
|
PBYTE |
pb_Channel, |
|
|
PBYTE |
pb_Gain, |
|
|
PBYTE |
pb_Polarity, |
|
|
DWORD |
dw_ConvertingTime, |
|
|
BYTE |
b_InterruptFlag, |
|
|
BYTE |
b_SoftTriggerMode, |
|
|
BYTE |
b_ExtTriggerMode, |
|
|
PWORD |
pw_ChannelValue |
|
) |
| |
Read analog inputs from the board
You must call the set analog input mode function before calling this function.
Gain acts as a multiplier for the input voltage. Possible gain values are :
-
PCI3116_GAIN_1 : Input range is between -10V and 10V (bipolar)
-
PCI3116_GAIN_2 : Input range is between -5V and 5V (bipolar)
-
PCI3116_GAIN_5 : Input range is between -2V and 2V (bipolar)
-
PCI3116_GAIN_10 : Input range is between -1V and 1V (bipolar)
The converting time stands for the time spent to acquire one channel. The time to acquire a sequence is ul_ConvertingTime * uc_ChannelCount
The software trigger is a combination of 2 parameters
-
The first one enables or disabled the trigger
-
PCI3116_SOFT_TRIGGER_ENABLED : The trigger is enabled
-
PCI3116_SOFT_TRIGGER_DISABLED : The trigger is disabled
-
The trigger type is selected with one of the following parameters
-
PCI3116_TRIGGER_ONE_SHOT : The acquisition starts when the trigger is set
The external trigger is a combination of the following parameters :
-
The first one defines the trigger edge
-
PCI3116_EXT_TRIGGER_DISABLED : Trigger is disabled
-
PCI3116_EXT_TRIGGER_ENABLED_LOW : Triggers on low edge
-
PCI3116_EXT_TRIGGER_ENABLED_HIGH : Triggers on high edge
-
PCI3116_EXT_TRIGGER_ENABLED_BOTH : Triggers on both edges
-
The second one defines the trigger type
-
PCI3116_TRIGGER_ONE_SHOT : The acquisition starts when the trigger is set
If the interrupts are enabled, the function returns, and the value can be read in the interrupt routine once available.
If the interrupts are disabled, the function waits for the results and return the values in the pus_ChannelValue parameter.
- Parameters
-
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ChannelCount | Set the number of channels in a sequence (1 to 16) |
[in] | pb_Channel | Define the channels in the sequence (single ended : 0 to 15, differential : 0 to 7) |
[in] | pb_Gain | Define the gain for each channel |
[in] | pb_Polarity | Define the polarity for each channel (PCI3116_OUTPUT_MODE_UNIPOLAR or PCI3116_OUTPUT_MODE_BIPOLAR) |
[in] | dw_ConvertingTime | Define the tine between two channels acquisition (5us to 65 535 000us) |
[in] | b_InterruptFlag | Enable the interrupts |
[in] | b_SoftTriggerMode | Defines the software trigger |
[in] | b_ExtTriggerMode | Defines the external trigger |
[out] | pw_ChannelValue | Value of the sequence, if interrupts are disabled |
- Return values
-
0 | : No Error |
-1 | : The device handle parameter is wrong |
-2 | : The sequence size is wrong |
-3 | : The input mode has not been set |
-4 | : A channel index is invalid (single-ended mode) |
-5 | : A channel index is invalid (differential mode) |
-6 | : A gain value is wrong |
-7 | : A polarity value is wrong |
-8 | : The converting time is invalid |
-9 | : The interrupt routine is not installed |
-10 | : The software trigger is invalid |
-11 | : The external trigger is invalid |
-12 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3116_Read1AnalogInput |
( |
HANDLE |
h_DeviceHandle, |
|
|
BYTE |
b_Channel, |
|
|
BYTE |
b_Gain, |
|
|
BYTE |
b_Polarity, |
|
|
DWORD |
dw_ConvertingTime, |
|
|
BYTE |
b_InterruptFlag, |
|
|
BYTE |
b_SoftTriggerMode, |
|
|
BYTE |
b_ExtTriggerMode, |
|
|
PWORD |
pw_ChannelValue |
|
) |
| |
Read one analog input from the board
You must call the set analog input mode function before calling this function.
Gain acts as a multiplier for the input voltage. Possible gain values are :
-
PCI3116_GAIN_1 : Input range is between -10V and 10V (bipolar)
-
PCI3116_GAIN_2 : Input range is between -5V and 5V (bipolar)
-
PCI3116_GAIN_5 : Input range is between -2V and 2V (bipolar)
-
PCI3116_GAIN_10 : Input range is between -1V and 1V (bipolar)
The converting time stands for the time spent to acquire one channel. The time to acquire a sequence is ul_ConvertingTime * uc_ChannelCount
The software trigger is a combination of 2 parameters
-
The first one enables or disabled the trigger
-
PCI3116_SOFT_TRIGGER_ENABLED : The trigger is enabled
-
PCI3116_SOFT_TRIGGER_DISABLED : The trigger is disabled
-
The trigger type is selected with one of the following parameters
-
PCI3116_TRIGGER_ONE_SHOT : The acquisition starts when the trigger is set
The external trigger is a combination of the following parameters :
-
The first one defines the trigger edge
-
PCI3116_EXT_TRIGGER_DISABLED : Trigger is disabled
-
PCI3116_EXT_TRIGGER_ENABLED_LOW : Triggers on low edge
-
PCI3116_EXT_TRIGGER_ENABLED_HIGH : Triggers on high edge
-
PCI3116_EXT_TRIGGER_ENABLED_BOTH : Triggers on both edges
-
The second one defines the trigger type
-
PCI3116_TRIGGER_ONE_SHOT : The acquisition starts when the trigger is set
If the interrupts are enabled, the function returns, and the value can be read in the interrupt routine once available.
If the interrupts are disabled, the function waits for the results and return the values in the pus_ChannelValue parameter.
- Parameters
-
[in] | h_DeviceHandle | Handle of the board |
[in] | b_Channel | Define the channel to acquire (single ended : 0 to 15, differential : 0 to 7) |
[in] | b_Gain | Define the gain for the channel |
[in] | b_Polarity | Define the polarity for the channel (PCI3116_OUTPUT_MODE_UNIPOLAR or PCI3116_OUTPUT_MODE_BIPOLAR) |
[in] | dw_ConvertingTime | Define the time needed to acquire the channel (5us to 65 535 000us) |
[in] | b_InterruptFlag | Enable the interrupts |
[in] | b_SoftTriggerMode | Defines the software trigger |
[in] | b_ExtTriggerMode | Defines the external trigger |
[out] | pw_ChannelValue | Value of the channel, if interrupts are disabled |
- Return values
-
0 | : No Error |
-1 | : The device handle parameter is wrong |
-3 | : The input mode has not been set |
-4 | : A channel index is invalid (single-ended mode) |
-5 | : A channel index is invalid (differential mode) |
-6 | : A gain value is wrong |
-7 | : A polarity value is wrong |
-8 | : The converting time is invalid |
-9 | : The interrupt routine is not installed |
-10 | : The software trigger is invalid |
-11 | : The external trigger is invalid |
-12 | : Error while calling IOCTL function (wrong handle ?) |
_INT_ i_PCI3116_InitAndStartAutoRefreshAcquisition |
( |
HANDLE |
h_DeviceHandle, |
|
|
BYTE |
b_ChannelCount, |
|
|
PBYTE |
pb_Channel, |
|
|
PBYTE |
pb_Gain, |
|
|
PBYTE |
pb_Polarity, |
|
|
DWORD |
dw_ConvertingTime, |
|
|
PDWORD * |
ppdw_Channels |
|
) |
| |
Starts an auto-refresh acquisition
You must call the set analog input mode function before calling this function.
Auto-refresh mode is started once, and returns an array of values, each one corresponding to a channel.
These values are automatically refreshed after each conversion cycle, so the values in this array are always the latest ones.
Gain acts as a multiplier for the input voltage. Possible gain values are :
-
PCI3116_GAIN_1 : Input range is between -10V and 10V (bipolar)
-
PCI3116_GAIN_2 : Input range is between -5V and 5V (bipolar)
-
PCI3116_GAIN_5 : Input range is between -2V and 2V (bipolar)
-
PCI3116_GAIN_10 : Input range is between -1V and 1V (bipolar)
The converting time stands for the time spent to acquire one channel. The time to acquire a sequence is dw_ConvertingTime * b_ChannelCount
- Parameters
-
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ChannelCount | Set the number of channels in a sequence (1 to 16) |
[in] | pb_Channel | Define the channels in the sequence (single ended : 0 to 15, differential : 0 to 7) |
[in] | pb_Gain | Define the gain for each channel |
[in] | pb_Polarity | Define the polarity for each channel (PCI3116_OUTPUT_MODE_UNIPOLAR or PCI3116_OUTPUT_MODE_BIPOLAR) |
[in] | dw_ConvertingTime | Define the tine between two channels acquisition (5us to 65 535 000us) |
[out] | ppdw_Channels | Pointer to an array that contains the value of each channels |
- Return values
-
0 | : No Error |
-1 | : The device handle parameter is wrong |
-2 | : The sequence size is wrong |
-3 | : The input mode has not been set |
-4 | : A channel index is invalid (single-ended mode) |
-5 | : A channel index is invalid (differential mode) |
-6 | : A gain value is wrong |
-7 | : A polarity value is wrong |
-8 | : The converting time is invalid |
-9 | : Error while calling IOCTL function (wrong handle ?) |
-20 | : Error while calling IOCTL function (wrong handle ?) |