xPCI-1500 API
APCI-1500 event logic functions

Functions

_INT_ i_APCI1500_SetInputEventMask (BYTE_ b_BoardHandle, BYTE_ b_PortNbr, BYTE_ b_Logik, PCHAR_ pc_EventMask)
 
_INT_ i_APCI1500_StartInputEvent (BYTE_ b_BoardHandle, BYTE_ b_PortNbr)
 
_INT_ i_APCI1500_StopInputEvent (BYTE_ b_BoardHandle, BYTE_ b_PortNbr)
 

Detailed Description

Function Documentation

_INT_ i_APCI1500_SetInputEventMask ( BYTE_  b_BoardHandle,
BYTE_  b_PortNbr,
BYTE_  b_Logik,
PCHAR_  pc_EventMask 
)

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_BoardHandleHandle of the board
[in]b_PortNbrPort number to initialize (1 or 2)
[in]b_LogikEvent logic mode. Values are APCI1500_AND or APCI1500_OR APCI1500_OR_PRIORITY is not valid. Port 1 only supports OR logic.
[in]pc_EventMaskAn 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 ?)
_INT_ i_APCI1500_StartInputEvent ( BYTE_  b_BoardHandle,
BYTE_  b_PortNbr 
)

Starts the event logic of the board APCI-1500
You must call the function i_PCI1500_InitEventLogic before calling this function

Parameters
[in]b_BoardHandleHandle of the board
[in]b_PortNbrPort number (1 or 2)
Return values
0: No Error
-1: The handle parameter of the board is wrong
-2: The port number parameter is wrong
-103: The interrupt routine is not installed
-104: The handle parameter of the board is wrong
_INT_ i_APCI1500_StopInputEvent ( BYTE_  b_BoardHandle,
BYTE_  b_PortNbr 
)

Stops the event logic of the board APCI-1500

Parameters
[in]b_BoardHandleHandle of the board
[in]b_PortNbrPort number (1 or 2)
Return values
0: No Error
-1: The handle parameter of the board is wrong
-2: Port number parameter error
-103: Error while calling IOCTL function (wrong handle ?)