Im trying to create a simple form to Read Scale Data through a serial port and move to a text Box
The trick is that the scale transmits continuously so I need to make code wait for a <stx> character (02) before storing
Scale data is transmited in the Following format
<stx>,<pol>,<wwwwwww>,<unit>,<g n="">,,<termination>
Where
<stx> = ascii 02
<pol> = <space> for Positive, <_> for negative
<wwwwwww> = weight data 7 digits with decimal point
<unit> = <l> for lbs, <k> for Kilograms
<g n=""> = <g> for gross, <n> for net
= Status <space> for valid, <m> for motion, <o> for over/under range
<term> = <cr><lf> Ascii 13,10
Ultimatly only want to modify incoming <pol> to change "_" to "-" but baby steps, first is to wait for the STX before storing
What I have tried:
Ive tried moving Characters into a new string using mystring.char(x) but have no clue how to wait for the STX