I've got a SerialIn instruction grabbing serial data from an SBD modem. The string I am sending TO the modem (remotely) is modeled like this "--------#". Where "-" can be either 0, 1 or 2.
``SerialIn(InString,SBDComPort,1000,35,12)''
However my problem is that there are two junk characters (non printable) in front of my string which I cannot seem to get rid of.
My InString variable is declared like this:
``Public InString As String * 8''
I do not know why the two characters exist, but I have worked "around" it by chopping the first two and then parsing the actual string. I do not like this approach. Is it better to use a different command, like SerialInRecord?
Any help is appreciated.
With SerialInRecord, you can leave BeginWord as 0, set NBytes to 8, and EndWord to 35.
That will reliably give you only the 8 bytes which proceed the '#' symbol.