Prosoft-technology MVI56E-LDM Manual de usuario Pagina 152

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 151
CIP API Functions ControlLogix Platform "C" Programmable
Developer's Manual Linux Application Development Module
Page 146 of 264 ProSoft Technology, Inc.
March 12, 2014
OCX_ID_STATUS_DEBUG_MODE: Debug mode if controller is in Run Mode
timeout is used to specify the amount of time in milliseconds the application
should wait for a response from the device.
Return Value
OCX_SUCCESS
ID object was retrieved successfully
OCX_ERR_NOACCESS
apihandle does not have access
OCX_ERR_MEMALLOC
returned if not enough memory is available
OCX_ERR_BADPARAM
returned if path was incorrect
Example
OCXCIPHANDLE apihandle;
WORD status;
BYTE Path[]="p:1,s:0";
// Read ID status from ControlLogix in slot 0
OCXcip_GetDeviceIdStatus(apihandle, &Path, &status, 5000);
printf("\n\r");
switch (Status & OCX_ID_STATUS_DEVICE_STATUS_MASK)
{
case OCX_ID_STATUS_FLASHUPDATE: // Flash update in progress
printf("Status: Flash Update in Progress");
break;
case OCX_ID_STATUS_FLASHBAD: //Flash is bad
printf("Status: Flash is bad");
break;
case OCX_ID_STATUS_FAULTED: //Faulted
printf("Status: Faulted");
break;
case OCX_ID_STATUS_RUN: //Run mode
printf ("Status: Run mode");
break;
case OCX_ID_STATUS: //Program mode
printf ("Status: Program mode");
break;
default:
printf ("ERROR: Bad Status Mode");
break;
}
printf ("\n\r");
switch (Status & OCX_ID_STATUS_KEY_SWITCH_MASK)
{
case OCX_ID_STATUS_KEY_RUN: //Key switch in run
printf ("Key switch position: Run");
break;
case OCX_ID_STATUS_KEY_PROGRAM: //Key switch in program
printf ("Key switch position: Program");
break;
case OCX_ID_STATUS_KEY_REMOTE: //Key switch in remote
printf ("Key switch position: Remote");
Vista de pagina 151
1 2 ... 147 148 149 150 151 152 153 154 155 156 157 ... 263 264

Comentarios a estos manuales

Sin comentarios