C example, Basic example, References – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 151
Advertising
API Library of Routines
Appendix B
CC_ERROR
B-20
C Example
unsigned status;
unsigned machine1;
unsigned iostat;
unsigned short parts1;
char *err_stg;
.
.
.
status = DTL_READ_W (machinel, &parts1, &iostat);
if (status != DTL_SUCCESS || iostat !=DTL_SUCCESS)
{
err_str = CC_ERROR (status)
printf (“Error during read : %s - status = %d\n”,err_str,status);
err_str = CC_ERROR (iostat)
printf (“Error during read : %s - iostat = %d\n”, err_str,iostat);
}
.
.
.
BASIC Example
The BASIC function code is 100.
DIM ptr : INTEGER
DIM iostat : INTEGER
.
.
.
rem * CC_ERROR - Get the pointer to the string for the iostat value
RUN AB_BAS (100,ptr,iostat)
print using “h8”,ptr
.
.
.
References
CC_ERRSTR();
Advertising