Download Single-Slot PC Interface Module (PCIM) User`s Manual
Transcript
4 Return Value (Status) GetCir will return SUCCESS if the target device is present on the given IMnum. If the target device is not present, or is out of range, GetCir will return FAIL. If SUCCESS is returned, then the character pointed to by State will contain the value of the circuit requested. The following FAIL indications will be returned: BADIMNUM IMnum is out of range (a count of 64 or greater). BADSBA Specified Devicenum is not in the range for Genius bus devices (0 –31 decimal), or is that of the PCIM. NOINIT Indicated PCIM has not been initialized (InitIM). IMFAIL The indicated PCIM has failed (PCIM OK = 0). OFFLINE The device requested is currently not on the bus, and data is NOT transferred. OVERFLOW The Offset specified is greater than the devices InputLength in circuits. UNDERFLOW The Offset is specified as zero (0). Coding Example Get the State value of circuit 2 of device #8 on PCIM #1. #include <pcim.h> int status; char State; status = GetCir (1, 8, 2, &State); GFK-0881 Chapter 4 C Programming for the PCIM 4-39