Download USB4 Manual - US Digital
Transcript
8.4.49 USB4_GetTriggerOnRollunder
Description:
This function retrieves a boolean value that indicates whether a trigger signal is generated when
the specified encoder counter rolls under from 0 to N-1 in modulo-N mode.
C Language Function Prototype:
int _stdcall USB4_GetTriggerOnRollunder(short iDeviceNo, short iEncoder, BOOL
*pbVal);
Returns:
Result code as an integer: See error code section for values other than zero. Zero implies
function call is successful.
Parameters:
iDeviceNo:
iEncoder:
pbVal:
identifies the USB4 device (zero based).
identifies the encoder channel (zero based, 0-3).
TRUE = enable trigger generation when rollunder detected.
FALSE = disable trigger generation when rollunder detected.
Example C Usage:
int iResult = USB4_SUCCESS;
short iDeviceNo = 0;
short iEncoder = 0;
BOOL bVal = False;
iResult = USB4_GetTriggerOnRollunder(iDeviceNo, iEncoder, &bVal);
if ( iResult != USB4_SUCCESS ){ // Handle error... }
VB Language Function Declaration:
Public Declare Function USB4_GetTriggerOnRollunder Lib "USB4.dll" (ByVal iDeviceNo As
Integer, ByVal iEncoder As Integer, ByRef pbVal As Long) As Long
Example VB Usage:
Dim
Dim
Dim
Dim
errCode As Long
iDeviceNo As Integer
iEncoder As Integer
bVal As Long
iDeviceNo = 0
iEncoder = 0
errCode = USB4_GetTriggerOnRollunder(iDeviceNo, iEncoder, bVal)
If errCode <> USB4_SUCCESS then
‘ Handle error…
End If
97