ASCII Reading help..

AmazingTrans

Member
Join Date
Nov 2005
Location
Illinois
Posts
38
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.
 
I'm not a guru but a beginner, however, I did a small ascii project not too long ago. Not sure of your equipment but with a slc processor I used an aex command. ascii extract. Source is the existing string, index is the position you want to start with from 1 to 82 Number is the number of charactors you want 1 to 82 and distination is where you want to store the extraction.

Hope this helps.
 

Similar Topics

I'm reading barcode info from a keyence reader. I have all the barcode info in my program, I can view it in decimal or ASCII and it is correct...
Replies
11
Views
3,513
Hi to everybody. I need to read the first 12 characters of the message that a barcode reader sends to the ascii card (1734-rs232 ascii) and I...
Replies
8
Views
725
I am trying to build an inventory management system that receives part numbers(Format, 123-45:67) from a bar code scanner and uses Allen...
Replies
1
Views
1,495
can any body send me the ladder diagram for sending and reading e.g N7:0 TO N7:5 from serial port of plc5/30 to a visual basic programme using mscomm.
Replies
1
Views
4,412
Hi, We couldn’t find anything specific, so am starting a new thread. I’m trying to migrate a config from a ML1400 to a micro820 & am experiencing...
Replies
1
Views
92
Back
Top Bottom