Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

SerialIn - Strange Variable Behaviour


bKlippert Aug 2, 2011 03:56 AM

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.


JDavis Aug 4, 2011 07:58 PM

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.

Log in or register to post/reply in the forum.