Vision VTB-101 Podręcznik Użytkownika Strona 47

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 125
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 46
47
VTB USER GUIDE
SER_PUTCHAR
Sends a character to the serial port.
Hardware All
Syntax
SER_PUTCHAR (int CodeChar)
Parameters
CodeChar Code of the character to send
SER_PUTS
Sends a string of characters to the serial port. The string must be ended with the character 0 (NULL).
Hardware All
WARNING: This function can not be used in a BINARY transmision but only with ASCII transmision.
Syntax
SER_PUTS (char *str)
Parameters
*str Pointer to the string
Example
Ser_puts("TEXT MESSAGE") Send the string TEXT MESSAGE
Strcpy(Vect(),"MESSAGE1") Copy the string MESSAGE1 to Vect
Ser_puts(Vect()) Send again the string TEXT MESSAGE
SER_PRINTL
Formatting print of an INTEGER value.
Hardware All
Syntax
SER_PRINTL (const char *Format, long Val)
Parameters
Format String corresponding to the format to be printed
Val Any integer value or expression
Avalaible formats
###### Print a fixed number of characters 23456
###.### Force the print of decimal point 123.456
+#### Force the print of the sign +1234
#0.## Force the print of a ZERO 0.12
X#### Print in HEXADECIMAL format F1A3
B#### Print in BINARY format 1011
Example
var=12345
ser_printl(“###.##”,var) It will be printed: “123.45”
var=2
ser_printl(“###.##”,var) It will be printed: “ . 2”
ser_printl(“###.00”,var) It will be printed: “ .02”
ser_printl(“##0.00”,var) It will be printed: “ 0.02”
Przeglądanie stron 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 124 125

Komentarze do niniejszej Instrukcji

Brak uwag