Siemens Shift Registers

exiled

Member
Join Date
Jun 2002
Location
England
Posts
131
Hi folks, this is for you Shift Register guys.

Can anyone see anything fundamentally wrong with the attached code? i've used this bit of code dozens of times with no real issue other than what position in the SR the cap gate solenoid is energised.

Basically tracks whether a bottle is present in pockets on a rotating carousel and energises a solenoid to release a cap.

The problem i've got on my latest headache is Two caps are released yet there is only one bit true in the register (just testing one at a time at the moment).
Pneumatically every thing is perfect, the gate just seems to take ages to shut, as are all the sensors etc.

Doing my Plank in at the moment. Running on TIA V15

Cheers Guys

Two Caps Released.JPG
 
My best guess would be that your "Bottle Present" sensor is coming on just before your "Capper Pulse" input. So, "Bottle Present" comes on, puts a 1 in M10:7. A few scans later, you get your "Capper Pulse" so your SHR shifts everything along, meaning M11:0 is now 1 (and M10:7 reverts to 0). Then because your "Bottle Present" sensor is still on, it sets M10:7 back to 1. Hey presto, two consecutive 1 bits in your shift register!


Edit: just re-read and saw that you say there's only one true bit in your shift register. That changes things. When you say "two caps are released", are they released onto two separate bottle positions, or does the gate just stay open for too long, allowing two caps to fall out over the initial (correct) bottle location? If the latter, you might have to limit the on time of the solenoid based on either a preset time or a sensor that can detect the first cap being dispatched.
 
Last edited:
ASF

Your edit is spot on. The gate/release mech just stays open allowing two caps to be dispensed onto the correct position. As you've said I might look at limiting the time the solenoid is open, although not sure how long will be the max as the process is 10 to 600 BPM

like I said I've used this probably 50 times with no double caps :confused:

Cheers guys
 
If I read your code right, the gate won't close until the machine indexes again. If this has worked before, then obviously there's a difference at the physical/mechanical level which gives you that outcome. Best option, of course, is to fix it at the physical/mechanical level.

If that's not possible, next best is to develop some way of sensing when a cap has been dispensed, and use that to close the gate.

If that's not possible, the next least worst option is to have the PLC do a calculation on how long the gate should remain open based on the current speed of the machine. At that point you're in for a lot of guesswork and trial and error, but once you get it working, it *should* be reasonably reliable. Until something changes again at the physical/mechanical level and then you're right back where you started!
 

Similar Topics

Good morning (EST), I am trying to implement the code below in on an S7-1200. It's barely half a dozen instructions, but I am stuck; I have not...
Replies
26
Views
5,648
Hi everyone I am completely new to using shift registers and am a bit stuck, my shift register works as should, it is for an overhead conveyor...
Replies
55
Views
15,578
Good morning everybody. Sirs, I have a problem when converting a shift logic from a AB ML processor to a Siemens S7-300. The program is based...
Replies
11
Views
4,333
Hi Guys, I am installing a vision system on a conveyor to inspect fill volumes and cap defects on an Eye drop bottling line. The idea is to...
Replies
12
Views
7,718
I am having some difficulty understanding some code written by Italian contractors to track product along a conveyor via a shift register. There...
Replies
12
Views
7,763
Back
Top Bottom