A/B slc 503 and bsr command

donnacha

Member
Join Date
Dec 2009
Location
Ireland
Posts
53
Hello,
I currently have an application where i need to reject poor quality product which is inspected using a vision system. The product travels on a conveyor. I set up some logic that used the fail signal from the camera to load a bit into a shift register which would trigger a reject pusher further down the conveyor. This worked fine except i used the next product present signal under the camera to shift the bit through the register(BSR logix 500), hence when i get any gap between the follow on products i fail to trigger the reject. Could i use an encoder to control the rejects. If so does anyone know how. Thanks for any help in advance.
 
use that same signal to signal your counter to activate. the counter is counting some device such as a photeye or prox counting teeth on the sprocket for example or a fly wheel. If you have an ecoder then it'll be the number of pulses from that. I've attached a similar operation this one would reject based on a bad scan from a barcode scanner and would keep track of multiple rejects in staggered patterns. the measuring device was a fly wheel. It had 8 lanes one assigned to reject the others for the various products which had a Computer interface for lane assignments via product number.
 
Last edited:
I took a quick look through the tracking logic. Should i continue to use the BSR and use so many encoder counts to shift the fail bit through each position or abandon the BSR and just move it through using the encoder count, passing the values with move commands? I am a little unsure how i would handle the resetting of the encoder values as i try to track numerous bad products along the conveyor.
 
You should use the "pass" bit to indicate a good part, and let that part continue thru the operation. Using the fail bit could lead to problems if the camera system has any issues during running (I have a system configured with a Controllogix using 2 Cognex 5100), using an encoder and FIFO stacks, and i have had issues with things like lens (aperture, filters)adjustments coming loose, and causing problems. You should program it to fail all parts without a "pass" signal.

$.02

🍻
 
one question though do yuo have a photoeye to detect the arival of a part at the reject lane?
this could simplify things rather than rely on an encoder counter when a product arrives at the photoeye look up on the FIFO stack whether it is a good part or a bad part.
also is there another lane for the good parts?
now you can certainly do this problem without lane photeyes but the use of them will make things a little more reliable which has been my experience with different sortation conveyer systems. Ones that had lane photoeyes tended to be more reliable than ones based on just counting the pulses storing the pulse at the event adding the offset placing that value into the fifo stack then when the counter = the fifo stack value (little bit of indirect addressing probably needed here.
obviously you want the top value on the stack. clear that value from the stack after it equals use that to handle your lane reject timing.
 
now in the case of lane photoeyes I would merely pass the value of good scan bad scan onto the FIFO stack when product reaches the lane photoeye read whether it is ia good or bad from the stack activate the lane timing for the rejector pop that value from the stack. A couple of thngs to consider I'm assuming you have a photoeye that triggers the camera if so use that as the signal to read the count value in the first example. Do not rely on the camera angle for that as camera positions can change throwing off your timing.
 
Apologies for the late reply but i did not return to this job until yesterday. I took your advice and set up a FIFO using the fail signal from the camera to trigger the ffl and load a 1 into the stack. I then set up a sensor at the reject station to unload the stack when a product passes it. If the value is a 1 then it operates the reject cylinder. All the logic looks to be operating fine but i am left with a small problem. When i use the ffl instruction i am loading a 1 into N7:10 using a length of 5. I am using control R6.1. For the unload i am emptying N7:10 into N7:25 using a length of 5 and control R6.1 also. My problem is when i first load a 1 into N7:25 it stays there in N7:25/0 regardless of how many times the ffu triggers afterwards. I can visually see that N7:0 is a value of 0. My interpretation of the ffu was that it would unload N7:0 into N7:25 so if N7:0 =0 then this would also be the value of N7:25?? Is this some basic error i am making as i have never set up a FIFO before? Thanks for all the help.
 
You may need something to handle a case where the FIFO is empty. Check the .EM bit; a FIFO is a set of paired instructions. You should never be unloading it if it hasn't been loaded in the first place, and if the FIFO is tagged as empty by the PLC then I suspect that triggering FFU will do nothing... as you've maybe been noticing. Not sure on that, but it's something to look at.

Check:

- That the FIFO is emptied during PLC initialization
- The FIFO is never unloaded without having first been loaded
- The FIFO is never unloaded if empty - then something is wrong, a part was somehow missed.

BTW, good job in adding the sensor and using a FIFO rather than trying to mess around with pulses and bit shifts. Those have their place, but I've never had any luck with conveyor systems without using a FIFO. Now, I just add the sensors at the beginning of the job. If I have multiple conveyors, I have multiple FIFOs. Makes life a lot more certain!
 
I got this to work fine after. It took a while to get the hang of the FFL and FFU commands but once i did it worked great and i have to agree that the FIFO is the way to go for tracking products on an open conveyor. I loaded a 1 for a fail and 0 for a pass from the camera into the FIFO stack and just unloaded it at the sensor before the reject station. Thanks for all the help from those who gave me guidance. Everyday is a school day!!
 
Reject Station using FIFO

Hi Otrex,
Apologies for the delay in getting back to you but I had to trawl through some old memory sticks to find this file for you. I hope it is helpful for you.

Best Regards,
Donnacha
 

Similar Topics

Probably a silly question and asked a hundred times already, but i tried to do some searching here and couldn't find this question. I have 502's...
Replies
9
Views
2,963
Tried to communicate with the CPU and then replaced the Battery because the battery was dead. Does this mean that because the battery is dead and...
Replies
7
Views
2,301
Hello, I'm a electrician who is furthering my education and learning to be a programer , I have a Dell laptop running windows 7 with rs logics pro...
Replies
22
Views
6,270
Hi everyone. I am new here in this page. This is my first post. I hope to receive the best suggestions and tips wanting also to collaborate...
Replies
7
Views
2,513
Hello everyone, I've been having a problem for the last week and a half with a 503 processor installed on a 10 slot chassis with 7 slot expansion...
Replies
1
Views
1,126
Back
Top Bottom