xPCI-3120 API

Functions

_INT_ i_PCI3120_SetDigitalOutputMemoryOn (HANDLE h_DeviceHandle)
 
_INT_ i_PCI3120_SetDigitalOutputMemoryOff (HANDLE h_DeviceHandle)
 
_INT_ i_PCI3120_Read1DigitalInput (HANDLE h_DeviceHandle, BYTE b_Channel, PBYTE pb_Value)
 
_INT_ i_PCI3120_Read4DigitalInputs (HANDLE h_DeviceHandle, PBYTE pb_Value)
 
_INT_ i_PCI3120_Set1DigitalOutputOn (HANDLE h_DeviceHandle, BYTE b_Channel)
 
_INT_ i_PCI3120_Set1DigitalOutputOff (HANDLE h_DeviceHandle, BYTE b_Channel)
 
_INT_ i_PCI3120_Set4DigitalOutputsOn (HANDLE h_DeviceHandle, BYTE b_Mask)
 
_INT_ i_PCI3120_Set4DigitalOutputsOff (HANDLE h_DeviceHandle, BYTE b_Mask)
 
_INT_ i_PCI3120_Get1DigitalOutputStatus (HANDLE h_DeviceHandle, BYTE b_Channel, PBYTE pb_OutputsStatus)
 
_INT_ i_PCI3120_Get4DigitalOutputsStatus (HANDLE h_DeviceHandle, PBYTE pb_OutputsStatus)
 

Detailed Description

Function Documentation

◆ i_PCI3120_SetDigitalOutputMemoryOn()

_INT_ i_PCI3120_SetDigitalOutputMemoryOn ( HANDLE  h_DeviceHandle)

Enable the digital output memory
When digital output memory is enabled, the active channels stay active until you set them to unactive.
When digital output memory is disabled, the active channels are reset each time you activate another channel (with set 1 digital output on for example)
.

Parameters
[in]h_DeviceHandleHandle of the board
Returns
0 : No Error

-1 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_SetDigitalOutputMemoryOff()

_INT_ i_PCI3120_SetDigitalOutputMemoryOff ( HANDLE  h_DeviceHandle)

Disable the digital output memory
When digital output memory is enabled, the active channels stay active until you set them to unactive.
When digital output memory is disabled, the active channels are reset each time you activate another channel (with set 1 digital output on for example)
.

Parameters
[in]h_DeviceHandleHandle of the board
Returns
0 : No Error

-1 : -65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Read1DigitalInput()

_INT_ i_PCI3120_Read1DigitalInput ( HANDLE  h_DeviceHandle,
BYTE  b_Channel,
PBYTE  pb_Value 
)

Read 1 digital input of the board

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ChannelChannel to read (0 to 3)
[out]pb_ValueStatus of the digital input
Returns
0 : No Error

-1 : Invalid channel

-2 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Read4DigitalInputs()

_INT_ i_PCI3120_Read4DigitalInputs ( HANDLE  h_DeviceHandle,
PBYTE  pb_Value 
)

Read the 4 digital inputs of the board

Parameters
[in]h_DeviceHandleHandle of the board
[out]pb_ValueStatus of the digital inputs
Returns
0 : No Error

-1 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Set1DigitalOutputOn()

_INT_ i_PCI3120_Set1DigitalOutputOn ( HANDLE  h_DeviceHandle,
BYTE  b_Channel 
)

Set 1 digital output of the board to HIGH

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ChannelChannel to set (0 to 3)
Returns
0 : No Error

-1 : Wrong channel

-3 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Set1DigitalOutputOff()

_INT_ i_PCI3120_Set1DigitalOutputOff ( HANDLE  h_DeviceHandle,
BYTE  b_Channel 
)

Set 1 digital output of the board to LOW

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ChannelChannel to reset (0 to 3)
Returns
0 : No Error

-1 : Wrong channel

-3 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Set4DigitalOutputsOn()

_INT_ i_PCI3120_Set4DigitalOutputsOn ( HANDLE  h_DeviceHandle,
BYTE  b_Mask 
)

Set the digital outputs set in the mask to HIGH

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_MaskChannels to set (0x0 to 0xF)
Returns
0 : No Error

-1 : Wrong mask

-3 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Set4DigitalOutputsOff()

_INT_ i_PCI3120_Set4DigitalOutputsOff ( HANDLE  h_DeviceHandle,
BYTE  b_Mask 
)

Set the digital outputs set in the mask to LOW

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_MaskChannels to reset (0x0 to 0xF)
Returns
0 : No Error

-1 : Wrong mask

-3 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Get1DigitalOutputStatus()

_INT_ i_PCI3120_Get1DigitalOutputStatus ( HANDLE  h_DeviceHandle,
BYTE  b_Channel,
PBYTE  pb_OutputsStatus 
)

Get the status of 1 digital output of the board

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ChannelChannel to get (0 to 3)
[out]pb_OutputsStatusStatus of the digital output
Returns
0 : No Error

-1 : Wrong channel
-2 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)

◆ i_PCI3120_Get4DigitalOutputsStatus()

_INT_ i_PCI3120_Get4DigitalOutputsStatus ( HANDLE  h_DeviceHandle,
PBYTE  pb_OutputsStatus 
)

Get the status of all the digital outputs of the board

Parameters
[in]h_DeviceHandleHandle of the board
[out]pb_OutputsStatusStatus of the digital output
Returns
0 : No Error

-1 : Error while calling IOCTL function (wrong handle ?)
-65535 : Error function doesn't exist in the DLL (if PCIe3121 DLL wrapper is used)