View Full Version : My latest project
simplewireman
June 6th, 2002, 02:37 PM
I would'nt mind having some critique on this program.
Any advice regarding will be welcomed. My problem is I wish I knew how to reset my counter after the 5 cycles without hiting the stop button, eventhough the whole works had gone through it's cycle.
Rick Densing
June 6th, 2002, 02:47 PM
use
B3:0/0
]/[
to reset the counter.
If you want to keep ths count if the stop button is pushed mid cycle, use the C5:0/DN bit to reset the counter. You would have to place it above the CTU rung to get it to reset B3:0/0.
Allen Nelson
June 6th, 2002, 02:55 PM
Très bien. Il marche, non?
Which pretty much pushes my French abilities to their limits. I used to be almost fluent, but use it or lose it.... C'est dommage.
One suggested improvement. Even though, with the code you have, the forward and reverse outputs won't come on at the same time, you want to make sure that absolutely nothing can go wrong and have them both be on simultaneously.
Therefore, add a -|/|- of the other output to the rung of the other. Comme ça:
MOTOR_REV MOTOR_FWD
O;2/1 O:2:0
Rung 2: . . . ---|/|-----( )
MOTOR_FWR MOTOR_REV
O;2/0 O:2:1
Rung 5: . . . ---|/|-----( )
It works better if you have the AUX contact as an input, but this is better than nothing.
simplewireman
June 6th, 2002, 02:58 PM
Thanks, it works!
I'm learnin'.....great support :) beerchug
gbradley
June 6th, 2002, 03:05 PM
Thanks Allen.
It's good to here that others do this.
If I have a reverse direction output I put a put a |/| condition on the forward output on the same rung like you did.
Back when memory was scarce, I think that the extra instruction was superfluous. Today, I figure what the heck. Better to be safe than sorry.
simplewireman
June 6th, 2002, 03:35 PM
Mesieurs,gentlemen it works like "un charme"
Allen, where did you learn French?
I left Montréal in 1980 where I use to drive a cab...a million years ago.
This is what I do. I copy ALL comments and suggestions to a word processor-print it out-go into my sanctuary (the garage) look at it. Compare it to my code then pencil it in my code printout and look at some more then smile! Why? Just simply put, it's logical.:nodi:
simplewireman
June 7th, 2002, 11:18 PM
I took your suggestions in put the ]/[ were they belong...added safety. My question to you Allen you mentioned
[QUOTE]
MOTOR_REV MOTOR_FWD
O;2/1 O:2:0
Rung 2: . . . ---|/|-----( )
MOTOR_FWR MOTOR_REV
O;2/0 O:2:1
Rung 5: . . . ---|/|-----( )
It works better if you have the AUX contact as an input, but this is better than nothing.
Yes, I want to make it work better. Please, can you explain where they would go and how would it improve it.
Alan Case
June 8th, 2002, 07:24 AM
What was meant was that most motor contactors have an additional normally open contact in addition to the 3 line contacts. If you use this auxillary contact as an input and call it something like "contactor confirm" then you can use this bit as an absolute check that the contactor is energised. It just adds a bit more safety to the circuit because a lot of smoke can come out if both contactors are in together. Regards Alan Case
simplewireman
June 8th, 2002, 07:59 AM
OK?
Let's see if I understand this!
If I'm thinking right,(hardwiring speaking) that I would run a set of control wires from the AUX back to the PLC and conect them to a input then I would have "contactor confirm" once the motor was energized.
If it's correct....(which I'm hoping it is) where would I put it {what rung(s)}?
Alan Case
June 8th, 2002, 08:11 AM
That is correct. If it is a normally open contact that closes on energisation of the contactor then put the not bit of the forward contactor in series with the output of the reverse contactor and vice versa |/|-------()
This means that say when the forward contactor is in for any reason (including someone holding it in with a screw driver) it is impossible for the program to pull in the reverse contactor. Also use the contactor confirm bit elsewhere in the program to indicate the state of the contactor as it is areal indication of the state of the said contactor. Using the output bit to indicate the state of the contactor only gives you the state what the program thinks the contactor is in. Ie a blown coil will stop the contactor energising but the program will think it has. Regards Alan Case
simplewireman
June 8th, 2002, 08:24 AM
Modifications DN
.