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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 312
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 187
""'  %$#
Appendix B

B-57
Puts a floating point value into a byte array. You can use this array to write
to a data item whose PLC data type is FLOAT and whose coprocessor data
type is RAW.
C Syntax
#include <copro.h>
unsigned DTL_PUT_FLT (in_val, out_buf)
float in_val;
unsigned char *out_buf;
Parameters
in_val
The control-coprocessor floating-point value.
out_buf
Specifies an array of four bytes that will receive the floating-
point value.
Returns
Status Symbolic Name Meaning
 !"$  #%##%
  $  &"#  "" "  '
Description
Use the DTL_PUT_FLT to convert a control-coprocessor float to a 4-byte
array in IEEE 32-bit binary format and place it into the byte array.
C Example
unsigned status;
unsigned char untyped_data[50];
float flt_val;
.
.
.
status = DTL_PUT_FLT (flt_val, &untyped_data[10]);
DTL_PUT_FLT
Vista de pagina 187
1 2 ... 183 184 185 186 187 188 189 190 191 192 193 ... 311 312

Comentarios a estos manuales

Sin comentarios