Prosoft-technology MVI56E-LDM Instrukcja Użytkownika Strona 202

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 264
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 201
CIP API Functions ControlLogix Platform "C" Programmable
Developer's Manual Linux Application Development Module
Page 196 of 264 ProSoft Technology, Inc.
March 12, 2014
OCXcip_GetSwitchPosition
Syntax
int OCXcip_GetSwitchPosition (OCXHANDLE apihandle,
int * sw_pos);
Parameters
apihandle
handle returned by previous call to OCXcip_Open
sw_pos
Pointer to integer to receive switch state
Description
OCXcip_GetSwitchPosition retrieves the state of the 3-position switch on the front
panel of the module. The information is returned in the integer pointed to by
sw_pos.
apihandle must be a valid handle returned from OCXcip_Open.
If OCX_SUCCESS is returned, the integer pointed to by sw_pos is set to indicate the
state of the jumper in bit 0. A 1 indicates that the jumper is not installed, and a 0
indicates that the jumper is installed.
Return Value
OCX_SUCCESS
The jumper information was read successfully
OCX_ERR_NOACCESS
apihandle does not have access
Example
OCXHANDLE apiHandle;
int swpos;
/* Check switch position */
OCXcip_GetSwitchPosition (apiHandle, &swpos);
if (swpos & 0x01)
printf ("Setup Jumper is NOT installed\n");
else
printf ("Setup Jumper is installed\n");
Przeglądanie stron 201
1 2 ... 197 198 199 200 201 202 203 204 205 206 207 ... 263 264

Komentarze do niniejszej Instrukcji

Brak uwag