Prosoft-technology MVI69-ADM Manual de usuario Pagina 328

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 342
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 327
Side-Connect API Library Functions MVI-ADM 'C' Programmable
Developer's Guide 'C' Programmable Application Development Module
Page 328 of 342 ProSoft Technology, Inc.
February 20, 2013
MVIsc_GetLastPcccError
Syntax
int MVIsc_GetLastPcccError(HANDLE handle, BYTE *status, BYTE *extstatus);
Parameters
handle
Handle returned by previous call to MVIsc_Open
status
Pointer to byte to receive PCCC status code
extstatus
Pointer to byte to receive PCCC extended status code
Description
MVIsc_GetLastPcccError retrieves the status and extended status from the last
PCCC error response received from the PLC-5. This function should only be
called after a previous function call has returned MVISC_ERR_PCCCFAIL.
If status is equal to 0xF0, then extstatus contains an extended error code.
Return Value
MVISC_SUCCESS
status and extstatus have been retrieved
MVISC_ERR_NOACCESS
handle does not have access
Example
HANDLE Handle;
int rc;
BYTE status, extstatus;
/* assume rc is set to the return code from a function such */
/* as MVIsc_PLCBTRead */
if (rc == MVISC_ERR_PCCCFAIL) /* debug the PCCC failure */
{
MVIsc_GetLastPcccError(Handle, &status, &extstatus);
printf("\nStatus: %x Extended Status: %x\n", status, extstatus);
}
Vista de pagina 327
1 2 ... 323 324 325 326 327 328 329 330 331 332 333 ... 341 342

Comentarios a estos manuales

Sin comentarios