Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Uživatelský manuál Strana 153

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 312
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 152

Appendix B

B-22
C Example
unsigned status, mach1, iostat;
unsigned short part1;
char err_txt[80];
.
.
.
status = DTL_READ_W (mach1, &part1, &iostat);
if (status != DTL_SUCCESS || iostat != DTL_SUCCESS)
{
CC_ERRSTR (status, err_text);
printf (“Read error %d: %s\n”, status, err_text);
CC_ERRSTR (iostat, err_text);
printf (“I/O status %d: %s\n”, iostat, err_text);
}
else
printf (“Read: SUCCESS!\n”);
BASIC Example
The BASIC function code is 101.
DIM buffer : STRING[81]
DIM status : INTEGER
DIM iostat : INTEGER
.
.
.
rem * CC_ERRSTR - Get the string for the iostat value - display on terminal
RUN AB_BAS (101,status,iostat,ADDR(buffer))
print buffer
.
.
.
References
CC_ERROR();
Zobrazit stránku 152
1 2 ... 148 149 150 151 152 153 154 155 156 157 158 ... 311 312

Komentáře k této Příručce

Žádné komentáře