Ladder logic. Can't get hardwired logic circuit to work.

Thread Starter

AVZ2203

Joined Oct 24, 2018
7
Hello there!
I've been having issues with this automation problem.

HOW THE AUTOMATISM SHOULD WORK
We have a pneumatic cylinder which loads metal rods from one place to another higher (feeding them to a tray, where a robot will take them from). [Check out AACRodFeeder.PNG]
AACRodFeeder.PNG

There are four sensors:
S1 - Rod high level. Inductive sensor. Outputs '1' when there are rods in its detection range.
S2 - Rod low level. Inductive sensor. Outputs '1' when there are rods in its detection range.
S3 - Cylinder end of extension stroke. Outputs '1' when cylinder reaches its highest position.
S4 - Cylinder end of retraction stroke. Outputs '1' when cylinder reaches its lowest position. For now we can assume rods are fed continuously into the lowest end of the machine.

So once ON button (momentary switch) is pressed, if both S1 AND S2 output '0' (i.e. rods level is below S2 and thus below S1) the machine starts lifting rods, one by one, to the higher tray. For now we don't have to consider any tilting mechanism to release rods once S3 is triggered, nor any OFF button.

If neither S1 nor S2 change, the machine lifts N (e.g. 10) rods and resets the counter, waiting for ON to be pressed again.

If S2 is triggered during a Ncycle (i.e. routine of feeding N rods), the machine will keep lifting rods until either S1 level is reached or N rods are lifted. If N rods are lifted and S2 still outputs '1' the counter will still be reset, but no more rods will be lifted until S2 outputs '0' again and ON is pressed. We can say that S2 triggered allows the machine to finish the Ncycle but prevents from starting a new one.

However, if S1 is triggered during a Ncycle (no matter what S2 does), the cylinder must retract after releasing the rod and wait until S1 outputs '0' again, but keeping the counter's value. If the robot at the end of the automatism (not relevant) picks enough rods for S1 to output '0' again, the machine will resume the Ncycle where it was, lifting the remaining rods until the Ncycle is over or S1 is triggered again.

PROPOSED GRAFCET
[Check out AACGrafcet.PNG]
AACGrafcet.PNG


PROPOSED LADDER (with Set-Reset virtual relays for each GRAFCET step)
[Check out AACLadderSR.PNG]
AACLadderSR.PNG


SO WHERE'S THE ISSUE?
Let's say I have to do this on the old-fashioned way (i.e. hardwired relay logic, no bistable relays).
[Check out AACHardwiredLadder.PNG]
AACHardwiredLadder.PNG
If using that diagram, the automatism starts performing a Ncycle even if ON is not pressed at all, which is of course unacceptable. If a Ncycle is finished without any S1-related interruption, it resets the counter and from that point on it works perfect. I press ON, it starts performing a Ncycle and so on. But when I start the simulation, it meets the conditions to start GRAFCET step 1 even without ON pressed. If I add an ON-related condition to start GRAFCET step 1 it will work as a semi automatic machine (i.e. you must press ON for every rod to be lifted).

I've been thinking on several solutions for this:
-Somehow forcing the simulation to start at GRAFCET step 0 (resting position), which would be ideal.
-Somehow forcing the counter to start at 0 so ON being pressed restarts it and get the automatism to work as expected
-Somehow making the simulation able to tell the first Ncycle apart from the other ones, e.g. changing relay-related conditions on the left side from NC switches to falling edge switches (though I'm not sure on how to implement this in Fluidsim).

Ideally I'd love to know about any book about hardwired relay logic, since this technology is nearly obsolete and every book I've found so far is more focused on PLCs and their programming. I want to learn a systematic approach so I can turn my GRAFCETs into flawless hardwired relay logic diagrams, is that possible?. I don't mind if those books are in English, even in French, if they're 60 years old or anything like that (though GRAFCETs are way more recent than that).

Thanks for reading!
Alex
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
I never really got into Grafcet too much and prefer ladder logic.
One fairly decent book is the Mitsubishi FX programmable Logic controllers by John Ridley.
What make of PLC is being used?
Or are you trying to use relay logic based on a PLC program?
Max.
 

Thread Starter

AVZ2203

Joined Oct 24, 2018
7
I never really got into Grafcet too much and prefer ladder logic.
One fairly decent book is the Mitsubishi FX programmable Logic controllers by John Ridley.
What make of PLC is being used?
Or are you trying to use relay logic based on a PLC program?
Max.
Hmmm no exact PLC will be used since my university is not really into investing in order to shape better professionals. So generic ladder logic would be fine, if such thing exists.
I'm especially interested in 'translating' from SR ladder to hardwired relay logic though it could seem obsolete.

I'll try to find that book over here!
Thanks :)
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
Of course the advantage to an actual PLC is that a relay contact can be used however many times as necessary, with a physical relay, it may have to be duplicated/paired if more contacts are needed.
Also there are functions possible in PLC that can be trickier or near impossible in relay logic.
I don't think you will find a book on relay logic, at least I have never come across one.
But the more common PLC version may be used as a translation means to relay circuit.
A world wide source of books is Abe Books Clearing house.
Max.
 

Thread Starter

AVZ2203

Joined Oct 24, 2018
7
Of course the advantage to an actual PLC is that a relay contact can be used however many times as necessary, with a physical relay, it may have to be duplicated/paired if more contacts are needed.
Also there are functions possible in PLC that can be trickier or near impossible in relay logic.
I don't think you will find a book on relay logic, at least I have never come across one.
But the more common PLC version may be used as a translation means to relay circuit.
A world wide source of books is Abe Books Clearing house.
Max.
Hmmm I'm not supposed to make the automatism happen, just to create its logic circuit, since this is an university assignment. The software I'm using demands a hardwired like language, otherwise I'd love using ladder language with flip flops :)

I found that Mitsubishi book on the internet for little money and got it, might be interesting for some stuff :D
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
I'll try to find that book over here!
Thanks :)
Where is 'Over Here'?
BTW, there is a difference in N.A. style of producing a ladder schematic compared with many E.U./IEC countries.
The N.A. style is a vertical progression with the power lines vertical on the left and right, as opposed to the IEC which is a top and bottom horizontal power line with the logic proceeding from top to bottom, rather than left to right.
There is also a difference in symbols used.
Max.
 

Thread Starter

AVZ2203

Joined Oct 24, 2018
7
Where is 'Over Here'?
BTW, there is a difference in N.A. style of producing a ladder schematic compared with many E.U./IEC countries.
The N.A. style is a vertical progression with the power lines vertical on the left and right, as opposed to the IEC which is a top and bottom horizontal power line with the logic proceeding from top to bottom, rather than left to right.
Max.
Sorry, by 'over here' I meant Spain (EU). I didn't know that difference, but that definitely means I've been taught the North American way
I feel way more comfortable with vertical power lines and horizontal logic, I feel it is more straightforward...
 
Top