Rockwell-automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User M Instrukcja Użytkownika Strona 192

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 312
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 191
  %#"!
Appendix B

B-61
Puts a 3-digit BCD value into a byte array.
C Syntax
#include <copro.h>
unsigned DTL_PUT_3BCD (in_val, out_buf)
unsigned in_val;
unsigned char *out_buf;
Parameters
in_val
The word value to be encoded into the byte array.
out_buf
Specifies an array of two bytes that will receive the converted
3-digit BCD value.
Returns
Status Symbolic Name Meaning
  " !#!!#
  "&$ !  
Description
Use the DTL_PUT_3BCD to accept a longword integer value in
coprocessor format in the range of 0 to 999. It converts control-
coprocessor unsigned to 2-byte, 3-digit BCD value and places the result in
the specified 2-byte array.
C Example
unsigned status;
unsigned char untyped_data[50];
unsigned word_val;
.
.
.
status = DTL_PUT_3BCD (word_val, &untyped_data[10]);
DTL_PUT_3BCD
Przeglądanie stron 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 311 312

Komentarze do niniejszej Instrukcji

Brak uwag