Red Lion Data station, Micrologix 1200 & barcode scanner

Bob73

Member
Join Date
Jan 2015
Location
Indiana
Posts
30
I'm working with the combination of a Micrologix 1200, a Data Station DSPSX000 and a Keyence SR-1000 scanner. My code in the data station is essentially lifted from a red lion example. Everything works except I'm getting a bunch of extra characters in the PLC. Within the data station, I'm attempting to write the data from the barcode scanner to ST101:1. The data is 30 characters.... What I wind up with is the 30 characters, + 50 spaces, + 80 spaces in ST101:2 and some spaces and garbage in ST101:3. I could work around this easily enough but it seems like I must have missed something. I've tried combinations of a read character limit in the data station along with setting a prefix and suffix in the reader and trying to use those in the portinput command in the data station. Everything I try yields roughly the same result. Some combinations remove the characters in ST101:3 but leave the spaces.

red lion program-1.jpg micrologix_data-1.jpg
 
I'm working with the combination of a Micrologix 1200, a Data Station DSPSX000 and a Keyence SR-1000 scanner. My code in the data station is essentially lifted from a red lion example. Everything works except I'm getting a bunch of extra characters in the PLC. Within the data station, I'm attempting to write the data from the barcode scanner to ST101:1. The data is 30 characters.... What I wind up with is the 30 characters, + 50 spaces, + 80 spaces in ST101:2 and some spaces and garbage in ST101:3. I could work around this easily enough but it seems like I must have missed something. I've tried combinations of a read character limit in the data station along with setting a prefix and suffix in the reader and trying to use those in the portinput command in the data station. Everything I try yields roughly the same result. Some combinations remove the characters in ST101:3 but leave the spaces.

If you know that the data will always be 30 characters, why not use
Left(STRING,30) in your send logic? You may need to play with the number of characters, and you may need to insert an appropriate string ending character for your PLC (I can't say) but that is pretty easy.

If that doesn't solve your problem, you may want to check with Redlion to see if there is an issue with a particular version of Crimson that allows the driver to send junk along with the data.
 
Yes, I'll probably do that. I realize this is easy to work around. I was mainly curious to see if anyone had seen this / knew the source of the garbage.
 

Similar Topics

I`m looking into using Red Lion Data Station, do someone have experience with limitation on number of tags and performance?
Replies
11
Views
1,734
Hi I have been using Red Lion products for some time, I had a thought over the bank holiday weekend, As you do. It would be nice if whenever a...
Replies
4
Views
1,024
Hi, I'm trying to get values from 8 encoders using a 2-wire bus RS485 connection to a Red Lion Data Station. These will ultimately write values to...
Replies
10
Views
2,373
Hey everyone! Pretty new to Red Lion, and am setting up a data logger on my HMI application. My boss is logging data on another HMI and I've...
Replies
7
Views
2,351
Hi All, I am hoping someone can help. I have setup a Red Lion Data Station (DA30D, Crimson 3.1 Build 3112) to log data from several Allen...
Replies
18
Views
7,363
Back
Top Bottom