Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Manuel d'utilisateur Page 153

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 312
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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();
Vue de la page 152
1 2 ... 148 149 150 151 152 153 154 155 156 157 158 ... 311 312

Commentaires sur ces manuels

Pas de commentaire