How to receive and parse a string.
Dave Matthews
Posts: 93
in Propeller 1
I am very confused about how to receive a string from a PLC ASCII module into the Propeller, and then separate out the pertinent embedded variables. In this case the ASCII string from the PLC is something like this:
"1A3000B200"
The first character, the number 1, is to be stored as variable C. The number 3000 is to be stored as variable A, and the number 200 is to be stored as variable B.
I have looked through the forum and obex and studied what I can that seemed relevant, but nothing has clicked yet. A number of promising leads point to missing pages, links not working.
I have seen references to '[noparse][[/noparse]', and I can't seem to discover where that originated.
I would appreciate links to active tutorial pages if any exist, and active objects that I could learn from.
Any code snippets would be appreciated as well!
Dave
Comments
Dave
Edit: if string parsing and conversion is the primary concern, then use http://obex.parallax.com/object/582 (for the parsing) and http://obex.parallax.com/object/435 (for the conversion).
Thanks for those links. And indeed the PLC module is not the issue, just trying to get the string into the propeller and operate on it.
Dave