Winford Engineering Portal API Reference
Functions:
we_OpenCard
we_ConfigureCard
we_InputValue
we_OutputValue
we_ReadBack
we_CloseCard
we_CloseAllCards
Error Codes: (These are defined in the header file for
C/C++ and the module file for Visual Basic)
-
WECRD_SUCCESS = 0: No error occurred
-
WECRD_GENERAL_ERROR = -1: Miscellaneous error
-
WECRD_IO_ERROR = -10: unable to read or write a port. In Linux, this may
result from improper permissions on /dev/port
-
WECRD_INVALID_HANDLE = -101: No card is currently open with that handle
-
WECRD_INVALID_MODEL = -102: Model was invalid (doesn't exist)
-
WECRD_INVALID_ADDRESS = -103: Address invalid for the specified model
-
WECRD_INVALID_PORT = -104: Port specified is invalid for the card model
-
WECRD_INVALID_PORTMODE = -105: There is no such mode for that port, or
that mode is currently unavailable
-
WECRD_INVALID_PORTVALUE = -106: Value passed is out of valid range
-
WECRD_ADDRESS_CONFLICT = -114: Desired address conflicts with an opened
card (Card may have been previously opened and never closed)
-
WECRD_CARD_NOTFOUND = -115: Card doesn't seem to exist at that address
-
WECRD_WRONG_PORTMODE = -150: Card is not in the correct mode. (such as
calling we_OutputValue when the port is in input mode)
Card Model Constants: (These are the valid values that may
be passed to we_OpenCard for ModelID)
-
WECRD_155B = 10: Model CRD155B - 3 port programmable I/O card
Other Constants:
-
WECRD_INPUT = 1: Configures a port to be in input mode. WECRD_INPUT
and WECRD_OUTPUT are used for the Mode parameter in the we_ConfigureCard
function.
-
WECRD_OUTPUT = 2: Configures a port to be in output mode.
Copyright 2004 Winford Engineering.