ASCii Bad string flush

Tlogix

Member
Join Date
Feb 2013
Location
North Dakota
Posts
3
Im wondering if any one has had the privilege of getting in a Ascii string thats to long or corrupted and how to get rid of it or flush it out?
 
ML 1400
This is what the string looks like I get it in and some times the controller will give me a error some times my ladder will stop executing without a error .

,318.5,\CDN\A9\8A^Y1\E9\82j^J$GPGGA,001650,4810.9808,N,09742.1038,W,2,07,1.4,323.2, ,-24.8,M, ,
 
The $GGA sentence normally finishes with a check sum. From what I remember you have to XOR each character in the sentence, then if your calculated checksum doesn't equal the $GGA check sum you can throw away the data. I have done this in C on an embedded Linux computer but not in a PLC. Before that I also checked that the characters received were alphanumeric characters, spaces or punctuation.
 
Groan. Parsing in ladder. I feel sorry for you.

Can you set your termination character to ","
Then try to sort out what's going on with the individual strings.

Good Luck,

(8{)} :) .)
(Yosi)
 
Based on PLC-5 operations I can think of two ways.

  • Create and maintain another string with a value of 82 spaces, or your character of choice. Copy this blank string into the bad one.
  • Set the length parameter of the bad string to zero (CLR ST9:X.LEN). The data still resides in the string but any instructions which reference the string will assume it has no data because of the length parameter.
YMMV
 

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
92
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
437
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,801
Back
Top Bottom