String files filing up with garbage????

rdugan

Member
Join Date
Jun 2007
Location
TN
Posts
4
I am currently working with a Compactlogix and I am trying to get a barcode scan into a string file to be compared by another barcode scan later in the same process.
I have 19 "index" locations and I am having no troubles getting the [10]data into one of the locations HOWEVER, somewhere, somehow I am getting "Garbage" into these indexes that has nothing to do with the ASCII or anything else within the code. It sometimes shows up to 87 characters.
I am doing this by receiving the barcode through a ******* device (serial to ethernet) as a SINT then COP this to an ASCII file then MOV [10] into a temporary file.
I then have a save routine that CTU 19 and then RES @19. this enters the string into a location in the INDEX. with this I am MOV bits that I received from ALTA (seperate parts picking software/computer)for color and sonic welding.
If I start to fill up the index, the "garbage" will travel down the INDEX in unison (INDEX 11 is now 12, INDEX 12 is now 13 etc.) and when the CTU RES occurs, the "garbage" circles back around to the top (INDEX 1) and erases the true data in that location.
Any suggestions??? I have tried SEVERAL different methods and have either the same type of issue or others like the data just diaapearing on it's own.
Any help would be greatly appreciated.
 
It sounds like sometimes when they scan the barcode, you are getting bad data. What you could do is check the length of the data coming in first before passing it on to your array.

Len of IncomingStringData > 20 = Bad Data.
 
can you put something between the serial to ethernet converter and teh PLC to confirm that the data from the scanner is correct ? I have seen issues where one of the comm parameters was incorrect, not baud rate but parity etc. and this lead to incorrect interpretation of data. How does the scanner indicate the end of string ? is it a fixed length or does it send a control character ? Can you temporarily connect scanner to a pc to confirm it's operation ?
 
I'm curious as to what sort of serial to ethernet device you're using and how it communicates with the CompactLogix. Does it respond to MSG instructions like a PLC5 or SLC or does it function like I/O?
 
The "garbage" you are talking about could well be transmitted from the BCR deliberately. There will normally be some sort of string which is sent if you get a bad read and there could also be diagnostic information from the BCR. Some Sick scanners have two seperate ports and one of these is for diagnostics/programming. In this case you will get the symptoms you describe if you connect the wrong port to your PLC.
Andybr.
 
Mark, I am only receiving 10 into my "write-to" address.

Consys, I can watch the "write-to" address fill up with the correct barcode letter/number combination.

Gerry, I am using a device master by ******* that writes to a tag file in the logic.

Andybr, I am going into the Compactlogix via a serial/ethernet adapter so I am using the ethernet connection only.

The "Garbage" that I am getting is something like this...
F<>Port Id= "1" Type="Compact" Addr="0" UPS="Fals$00$00$00$00 and so on for a total of 82 characters

Thanks guys, It's pretty sad when I can get responses back from this forum long before I get a response from Rockwell AND these all make sense.

If there is any other questions anybody needs for clarification, just let me know and I'll fire away.
Thanks again, Rob
 
Can you give us a link to the serial - ethernet device and to the bar code reader. The string you are receiving looks like diagnostic/setup information for one of the devices. The question may be - what's triggering it? it looks like the device name is being blanked by the site filter. Maybe spelling it with intervening spaces or dashes may help. The problem is probably not Rockwell's unless the devices are from them.
 
Bernie, the ethernet adapter is a C*O*M*T*R*O*L* device master U P
and the scanner is a S*Y*M*B*O*L MS-3204. I agree that it could be something similar to your reply but what I cannot put my finger on is how this could get into the indexes as I am receiving the 10 characters correctly then copying them into the indexes so, it is not a "straight" shot into the index. The example of the garbage I shared is the only one that makes any logical sense, the other 18 index locations either have the proper barcode (hit or miss - usually miss) info or complete jibberish such as the correct barcode data followed by garbage - XPF1671927$00$00$00$00$00$07$00$00$80$00$00$80$BC$1C$F3 for 82 characters total.
Thanks, Rob
 
I can't help with either of those. But my experience with one serial-ethernet adapter may help. It would write a received string into a string tag in my CompactLogix system. In order for it to write to a string it would have to be empty (LEN = 0). It then wrote the string information. I occasionally received screwed up strings. All I could figure out is that the LEN was written first then the characters. Due to the asynchronous nature of the Logix I/O I thought that i was trying to read the string (triggered by LEN > 0) before the string characters were fully written. I added a delay after the detection of LEN > 0 before reading the string. That solved my problem. I have no idea if this relates to what you are seeing at all.
 

Similar Topics

Hello all, i am using ab micrologix 1400 plc. I want to store the string which is scanned by barcode scanner(zebra ds108) .how...
Replies
1
Views
1,344
What is the differance between an integer file and a string file? I know that a string can hold letters, but is there any other differance? If I...
Replies
5
Views
7,828
I am creating a global object in FTView SE 13. I want to have a string read from the PLC and display (in this case the tagname). So lets say...
Replies
4
Views
165
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
127
Back
Top Bottom