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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 312
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 179
  &#"!
Appendix B

B-49
Gets a word from a byte array.
C Syntax
#include <copro.h>
short DTL_GET_WORD (in_buf)
unsigned char *in_buf;
Parameters
in_buf
Use to specify an array of two bytes containing programmable-
controller data.
Returns
Variable Value
% $
! "
% $ ! " $#  " &  " "% &"! "  %  "
&"!   !!# " $   " " "   #! "  #
Description
Use the DTL_GET_WORD function to extract two bytes from a byte array
in programmable-controller format (raw) and returns a word (short) value
in control-coprocessor format.
C Example
short word_val;
unsigned char untyped_data[50];
unsigned machine;
unsigned iostat;
.
.
.
DTL_C_DEFINE (&machine, “N7:0,25,RAW,READ”);
if (DTL_READ_W (machine, untyped_data, &iostat)==DTL_SUCCESS)
{
word_val = DTL_GET_WORD (&untyped_data[11]);
}
DTL_GET_WORD
Vista de pagina 179
1 2 ... 175 176 177 178 179 180 181 182 183 184 185 ... 311 312

Comentarios a estos manuales

Sin comentarios