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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 312
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 134

Appendix B

B-4
The only bits available for use by the application program are the upper 8
bits (10-17). The lower 8 bits (0-7) are reserved for block transfer, even if
there are no block transfers programmed to the control coprocessor.
C Example
unsigned short output_img;
unsigned short input_img;
int mode = MODIFY
.
.
.
input_img = 0xF800; /* bit pattern to PLC-5
controller input word */
output_img = BPI_DISCRETE (MODE, input_img); /* send to inpt image,
get from output image*/
if (output_img & 0x0100)
do_bit_0_true_function ( );.
.
.
.
BASIC Example
The BASIC function code is 32.
Important: For BASIC, the data type for the
input_img and
output_img parameters is INTEGER.
DIM inputimg,outputimg : INTEGER
.
.
.
inputimg=256
.
.
RUN AB_BAS(32,outputimg,1,inputimg)
.
.
.
References
BPI_READ(); BPI_WRITE();
Vista de pagina 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 311 312

Comentarios a estos manuales

Sin comentarios