Hello:
Can the StreamIn instruction capture data in a string literal format in addition to ASCII Hex format? For example if I want someone to send me a "False" string will either of these formats work?
0x460x410x4c0x530x450xa
"FALSE"0x0a
Thx
It just captures BYTEs into a buffer or string. No formatting. If there is any formatting, it must be done by the device SENDING the data (e.g. Modbus has a binary form RTU and an ASCII form, although not many devices send out ASCII any longer).
Regardless, put it in a STRING e.g. SS0 or SL0 if it's long, then utilize STRFIND to find "FALSE" or "TRUE" or "HLO" or whatever and other String functions (e.g. STRSUB to get a substring STR2INT to convert text to its numeric equivalent, e.g. "123" is 123, et. al.
What's best for getting good answers, get the ENTIRE contents of the STREAMIN packet into a String, then post the QUOTED FORMAT contents here, e.g.
"FALSE,1,2$0A$0D" (whatever)
2 or 3 examples will be helpful. OR if there is a .pdf that describes the format of the data from the sending device, that would be best (grammar is one thing, semantics is the other).