ASR or MEQ or What?

Brian

Member
Join Date
Aug 2002
Location
Lancaster SC
Posts
10
SLC505 Processor. On a packing line we are using scanners to read a content SKU label on one side of the carton and another scanner to read the box code on the back side. This is collected and entered into ST:9 with a length of 22.

To count the number of cartons packed, we use a photo eye on the conveyor that is triggered when the carton passes, and we tie this into a plc counter and overhead digital display where the operators can monitor their production. In our logic, we are using the ASR to compare the scanned STRING information for changes. When the SKU information changed we wanted to automatically reset the display to zero.

Problem is how to deal with NO READ situations. We have discovered that if the scanners send a NO READ for the SKU or Box Code, then the PLC treats the no read as a new product and zero's the counters.

I'm reading into the manual (but new to this) and am drawn to the MEQ instruction. Can I use this to look for the NOR input? Can it even be used in a string? I see a lot of references to hex put don't but see it in the string file.
 
Brian,

Question: Is the no-read value a contstant? Or is it random garbage picked up from the scanner? My firts impression is that you need to first check the read value and test it to assure its a legal value before initatiing the rest of your code.
 
Barcode Data

Why not use more than one ASR and conditioning rungs?

I usually have to to track the parcels to a specific destination. I set the barcode scanner parameters to fill the data field with all zeros when a No-Read is encountered. Since none of the valid barcodes will be all zeros this parcel will be directed to a manual handling divert lane. We also have to look for parcels with more than one label so the Duplicate Parameter (same number of characters different data) is set to fill the data field with "exclamation points". This will also direct the parcel to the manual handling divert lane.

Thanx Dan
 
The scanner will send the NO Read when it fails to read the barcode on the carton label or the box code. This will occur when the barcode is damaged or lightly printed.

When a No Read is received the scanner outputs to a relay and stops the conveyor to allow the operator to fix the label. When fixed the operator starts the conveyor and resumes packing. A no read should not be treated like a new product.
 
The MEQ is for comparing bits in words, the ASR, and most of the other Axx instructions deal with strings or the ASCII buffer, excluding the ones like ADD.

You probably know what the NOREAD string looks like. Define an unused string as a constant consisting of your NOREAD value, then do an ASR on the incoming data against this 'no read' string first. If it matches, it's a NOREAD and you can now take a decision to ignore it or, if it's a good read, go ahead and update your files/counters.
 
The MEQ instruction only works on 16-bit values so you won't be able to use it directly in this case.
Depending on how fast you have data coming at you, you could use the ASC (ASCII String Search) instruction and look for the NOR occurance and condition execution of the ASR based on the result of the ASC.
If the NOR occurances are always in the same spot in the string you could also copy (COP) the string to a group of integers and use the MEQ on specific integers. This would be faster than the ASC implenmentation but relies on the NOR strings being in the same place every time.
The next trick will be making sure you compare the right two values if you do get a NOR response. It's not real difficult, you just need to remember to do it.

Keith
 
Brian

We do something similar on one of our lines. We set the scanner up to output a constant value for every "No Read" and when the PLC sees this value in the string we can use it to trigger a divert for special handling. If your scanner can be set up like this, you can compare the value in the string and if it equals a no read, do not allow the counter to reset.
 
Rube,

Our scanners output "NOR" for a no read of the 3-digit box code and "NOREADDD" for the SKU. Can the String be looked at to see if it contains the letters "NOR"? If this can be done, then we would be there. Any ideas?
 
Our Scanner sends us ASCI data, alpha AND numeric, that I have to use to select which divert lane to send the case to. The scanner sends two characters and I truncate that to only one, using the ARL and AEX instructions. You appear to be matching strings longer than that but if your sting is equal to "NOR", you can use whatever bit you use to stop the line in its opposite state to prevent the zeroing of the counter. IOW if B3/0 XIC stops the line when true, use an XIO B3/0 in the counter reset rung to prevent the counter from reseting.
 
Scanner No-Read Relay Contact:

Brian,
Does your scanner No-Read relay contact connect to the PLC to control the conveyor? If it does you could use this signal to block the reseting of your counter.

Thanx Dan
 
Dan,
We'll probably have to go that route. The problem with the noread will still exist and we will still need to establish the end and start of a production run.

Thanx!
 
Rube,

Please amplify your thoughts at post 9.

---What is the "IOW"?

---"....but if your sting is equal to "NOR"," How can I determine if the string is equal to "NOR"?

It sounds like you are approaching the angle we need to take. Can you provide further guidance?

Thank you.
 
Brian,

I'm not an AB man but I'll put in my 2 cents.
Purly from a logical perspective.

Can you place another photo-eye on your conveyer? The second eye would detect the presents of an object during the scanner cycle (While the object is infront of the scanner).

If NO READ AND YES OBJECT = condition 1 (no reset)
IF NO READ AND NO OBJECT = condition 2 (???)
IF READ AND OBJECT = condition 3 (count)

I guess what I'm trying to say is you can use condition 1,2,or 3 to decide weather or not to initate your counter reset. For instance condition 1 would block the counter reset. It seems that your scanner should be reading only when you can detect the box infront of it.

???

Mike.
 
Brian-
If you use the ASC instruction it will return an integer telling you where the first character of your reference string is located. If it can't find it the ASC instruction returns zero.
Create a string variable with 'NOR' in it. Use this as your source in the ASC instruction. Use the zero/nor zero return comparison to deside if you want to compare the new string or not.

Keith
 
Keith,
Need help with what you are saying....It must be pretty basic to you and I appologize for being a dip, but I'm not having any success creating a string with NOR in it. I've tried typing it into the data table without it sticking. What am I missing? My ST9:11 is the existing string. I tried to "create" a string to compare in ST9:80 by typing in the NOR. No luck. Can you draw pictures...:)

SOR ASC ST9:80 22 ST9:11 ? EOR
 

Similar Topics

Let's say I have a physical axis fault, such as the axis went out of its hardware limit. Which order should I reset it? My current setup is...
Replies
4
Views
1,945
One of my coworkers just shot this question my way, and I have limited (basically no) experience with servo control. The operators are complaining...
Replies
8
Views
5,058
Hi guys, Long time lurker, first time poster. As a little info, I have a background in industrial controls and electronics for over 5 years now...
Replies
4
Views
2,917
In ControlLogix motion, when would you use MASR instead of MAFR? Say from a power up or an alarm condition.
Replies
0
Views
1,590
Oops :eek: I was asked to change a user password on a machine. The password is entered via touch screen (panelview) and I thought it was...
Replies
3
Views
2,341
Back
Top Bottom