Prosoft-technology MVI56E-LDM Manuale Utente Pagina 202

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 264
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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");
Vedere la pagina 201
1 2 ... 197 198 199 200 201 202 203 204 205 206 207 ... 263 264

Commenti su questo manuale

Nessun commento