Permits to initialize the event logic of the board APCI-1500
The event logic enables you to receive interrupt when a certain state is reached by the board.
You can also use this function to receive interruption when a short-circuit occurs, or when there is no more supply voltage.
To detect short-circuit and lost of supply voltage, use the event of port 1. If you do not want to listen to the input of port 1, just give the event mask "xxxxxx".
- Parameters
-
[in] | b_BoardHandle | Handle of the board |
[in] | b_PortNbr | Port number to initialize (1 or 2) |
[in] | b_Logik | Event logic mode. Values are APCI1500_AND or APCI1500_OR APCI1500_OR_PRIORITY is not valid. Port 1 only supports OR logic. |
[in] | pc_EventMask | An 8-character string for port 0, or 6-character string for port 1, to set the mask of the event.
Each character gives the state of the input channels and can have one of the following values :
- "X" or "x" : This input is not used for event
- "0" : This input must be low
- "1" : This input must be high
- "2" : This input reacts to a falling edge
- "3" : This input reacts to a rising edge
- "4" : This input reacts to both edges
Port 0 : from the left to the right, the first digit of the character string is input 7 and the last digit is input 0.
Port 1 : from the left to the right, the first digit of the character string is input 13 and the last digit is input 8.
IMPORTANT : If you use the AND logic, only one input can use the edge event.
|
- Return values
-
0 | : No Error
|
-1 | : The handle parameter of the board is wrong
|
-2 | : Port number is not 1 or 2
|
-3 | : Logic parameter error
|
-4 | : Event mask parameter error
|
-5 | : Interrupt routine not installed
|
-6 | : More than 1 edge event declared for an AND logic
|
-104 | : AND logic is not available on port 1
|
-110 | : Error while calling IOCTL function (wrong handle ?)
|