ASCII Into Something That Makes Sense

afish

Member
Join Date
Sep 2008
Location
OREGON
Posts
9
Hi All,
I am tring to read GPS data into a SLC 5/03 via RS232.
I am getting the data into a string but I am having trouble converting into somthing that makes sense.
This what I am getting in my string:
\80\F8\F8\80\80\E0\E0\80\80\80\F8\80\80\E0\80\80\E0\80\80\80\80\F8\80\80\80\80\80\E0\80\F8\80\80\F8\80\80\80\80\80\E0\F8\E0\80\80\80\80\E0\80\E0\80\80\80\80\E0\80\E0\80\E0\80\80\F8\80\80\80\80\E0\80\80\F8\F8\80\80\E0\80\E0\80\E0\E0\F8\80\E0\80\FE
I have tried the "ACI" instruction (String to Integer), but there is text in the data that I need, so an integer will not work.
I can get the data with HyperTerminal & it seems to work just fine. It automatically converts it into somthing I can make sense of.
This it what I see in HyperTerminal:
$GPRMC,171855,A,4407.9810,N,12310.6126,W,000.0,7,160310,017.1,E*68
How can I convert the string data into something I can use?
Any help is appreciated, thanks in adavance.
 
First, you need useful data in the SLC. The bytes you cited look like the RS-232 port is set for a different baud rate or different number of data bits.

Check carefully your working values for serial framing (number of data bits, number of stop bits, parity, baud rate) in Hyperterminal and make sure the SLC has the same.

Parsing strings in the SLC operating system isn't nearly as easy as doing so in ControlLogix, but it's do-able. I did an interface from an EarthMate GPS five years ago just like what you're doing but don't have access to the project files any longer.
 
Thanks for the reply Ken.

I cant believe I overlooked that, but baud rate was probably the problem.

I was setting the baud rate in the "system tab" for channel 0 instead of the "user tab".
I will have to wait until Monday before I can test.

Thanks again Ken.
 

Similar Topics

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
93
I have an L24ER-QB1B with a 1769-ASCII card in slot number 4. I'm looking to send data to this zebra printer after every completed sequence. I'm a...
Replies
2
Views
442
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 import addresses and symbols from a PanelBuilder32 application into the RSLogix 5 Address/Symbol database - however each time I...
Replies
5
Views
534
Good day! I am working on a project at our campus to integrate fleet vehicle chargers with load management so we don't overwhelm our service. The...
Replies
37
Views
3,813
Back
Top Bottom