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

  • 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 181
!!&$#"
Appendix B

B-51
Gets a 3-digit BCD value from a byte array.
Important: This function only examines the low-order 12 bits of the
buffer containing the BCD value. Data in the high-order 4 bits are ignored
when converting to binary format.
C Syntax
#include <copro.h>
unsigned DTL_GET_3BCD (in_buf,out_val)
unsigned char *in_buf
unsigned *out_val
Parameters
in_buf
Use to specify an array of two bytes that contains the 3-digit BCD
value. It is assumed the data were read from a data item with a control-
coprocessor data type that is raw.
out_val
Contains the binary value.
Returns
Status Symbolic Name Meaning
  !# "$""$
  # %!" !!!
Description
Use the DTL_GET_3BCD to convert a programmable-controller
3-digit BCD value, stored in a 2-byte array, to a control-coprocessor
unsigned value.
C Example
unsigned status;
unsigned char thumbwheel_data [2];
unsigned thumbwheel_binary;
.
.
.
status = DTL_GET_3BCD (thumbwheel_data,&thumbwheel_binary);
DTL_GET_3BCD
Vue de la page 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 311 312

Commentaires sur ces manuels

Pas de commentaire