Pamux User’s Guide 89
PAMUX APIS
Required API Calls
For many applications, only four Pamux APIs are required. These perform the following functions:
• Open an AC28 to configure the AC28 and get a handle.
• Configure outputs.
• Read and write I/O.
• Close the AC28 when the application is about to end.
Naming Conventions
API names in the Pamux library start with “Pamux.” Example: “PamuxDigPointRead.”
API names follow the object-operation format, with the object first and the operation second. Example:
“PamuxDigPointRead,” where “PamuxDigPoint” (the object) is first and “Read” (the operation) follows.
Utility functions, provided primarily for Visual Basic, start with “PamuxUtil.” Example:
“PamuxUtilBitEqual.”
Banks and Points
Any I/O point can be addressed multiple ways. A 16-channel I/O board has two banks. Point 0, the first
point, is accessed using a bank number of 0 and a point number of 0. Point 8 can be accessed in two
ways:
1. A bank number of 0 and a point number of 8, or
2. A bank number of 1 and a point number of 0.
Common API Parameters and Return Values
int hAc28 Handle to an AC28 card. Handles are acquired using PamuxCardOpen().
int Bank A bank number (0 to 63).
int Point A point or channel number on a rack starting with zero.
OutputMask A “1” bit represents an output. Used to configure outputs.
Return Values
All functions in the Pamux.DLL return an error value unless otherwise noted. A non-zero value
indicates an error has occurred. An example of a function that does not return an error value is
PamuxDigBankReadFast().
PROGRAMING WITH THE PAMUX DRIVER