[Gambas-user] separate each ASCII serial port return caracters

PICCORO McKAY Lenz mckaygerhard at ...626...
Thu Dec 10 18:33:26 CET 2015


i made a program for printers on some countries, thast only works by
serial rs232 port computer or USB special converter

but i have a problem reading data.. that returns ASCII ooutput control
caracters or some numbers in specific positions

taking https://web.archive.org/web/20091028133103/http://geocities.com/dtmcbride//tech/charsets/ascii.html#cntrl
as references for

how can i store EACH result and not the complete string

i use the code in the example of serial port:

PUBLIC Sport_Read()
  Dim s as String
  Read #Sport, s, Lof(Sport)
  Print "Out: " & s & " - " & Asc(s)
END

The problem its that the result are not only one ascii, the result
buffer return a complete string that have more than one ascii
symbol/string so i must separate aech caracter string, but i could'n
split either by "^" or print until "ACK" due in firts case can obtain
some garbage and in second case can obtain a "NOK"

ANY HELP?

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com




More information about the User mailing list