AmazingTrans
Member
Gurus,
This is my first time working on serial motor interface through RS232. I have a 3rd party control which sends me a set of ASCII commands. I'm trying to seperate these sets of ASCII commands into 4 section, but I'm not sure how do I do that. Below is an example of commands that I will be receiving.
Unit#_Section_Amount_Direction "_" represents a space
(1-8) (U or L)(1-100)(LAG/LAO/CRT)
For the unit# it receives 1 or 2 or 3 till 8
Section U or L
Amount can be either number from 1 to 100
Direction can be LAG or LAO or CRT
Eg: 2 U 6 LAG
It means Unit 2 Upper move lateral gear
I hope someone out there knows how can I do this. Thank you.
This is my first time working on serial motor interface through RS232. I have a 3rd party control which sends me a set of ASCII commands. I'm trying to seperate these sets of ASCII commands into 4 section, but I'm not sure how do I do that. Below is an example of commands that I will be receiving.
Unit#_Section_Amount_Direction "_" represents a space
(1-8) (U or L)(1-100)(LAG/LAO/CRT)
For the unit# it receives 1 or 2 or 3 till 8
Section U or L
Amount can be either number from 1 to 100
Direction can be LAG or LAO or CRT
Eg: 2 U 6 LAG
It means Unit 2 Upper move lateral gear
I hope someone out there knows how can I do this. Thank you.