Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Manual de usuario Pagina 200

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 312
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 199

Appendix B

B-69
C Example
unsigned machine;
unsigned short parts[10];
unsigned iostat;
DTL_C_DEFINE (&machine, “N20:0, 1, WORD, MODIFY”);
DTL_READ_W_IDX (machine, &parts[3], &iostat, 3) /* read element N20:3 */
DTL_READ_W_IDX (machine, &parts[8], &iostat, 8) /* read element N20:8 */
BASIC Example
The BASIC function code is 20.
procedure COPRO
DIM status : INTEGER
DIM id : INTEGER
DIM iostat : INTEGER
DIM val3 : INTEGER
DIM val8 : INTEGER
.
.
.
rem * Define the data file
RUN AB_BAS (2, status, ADDR(id), “N10:0, 1, LONG, MODIFY”)
rem * Read N10:3 to val3
RUN AB_BAS (20, status, id, ADDR(val3), ADDR(iostat), 3)
rem * Read N10:8 to val8
RUN AB_BAS (20, status, id, ADDR(val8), ADDR(iostat), 8)
.
.
.
References
DTL_C_DEFINE(); DTL_WRITE_W_IDX();
Vista de pagina 199
1 2 ... 195 196 197 198 199 200 201 202 203 204 205 ... 311 312

Comentarios a estos manuales

Sin comentarios