Omron Zen counter loop

wijden

Member
Join Date
Jun 2010
Location
DUBAI
Posts
3
Hi there.

I'm stuck trying to loop three outputs on a Omron Zen controller. Basically, i need to have the following:

M1->M2->M3->M1->M2 etc.

Each transition is simply triggered by a push button connected to I0

I tried the following:
Zen Loop.png
but can't get better than M1->M2->M3->NO OUTPUT->M1->M2 etc.

Any help would be much appreciated as i'm really new to this controller..
View attachment Zen Loop.zip
 
Attached file gives you M1 immediately, then each press of I0 gives advance to next M, (M2), then to next M, (M3), then back to the 1st M, (M1), and so on. Basically, it works like this. C1 and C2 Counters Not Done is the 1st condition. C1 Counter Done and C2 Counter Not Done is the 2nd condition. C1 Counter Done and C2 Counter Done is the 3rd condition. C3 Counter Done "Resets" the counters.

Note: When testing this program in Simulator mode, be sure to hold down the Input button at least a couple of seconds for each transition. The Simulator can give false reactions if pressed and released too quickly.
 
Last edited:
Wijden,

Do you really need 3 counters? Unless you are using the counters elswehere, one will work just as well, and much simpler. The ZEN does have the comparison instructions.

Wijden's Step Program with M1, M2, M3.jpg
 
Last edited:
Many Thanks guys, both solutions are indeed fine.
My first idea was actually to compare the current value of a single counter to a preset value and to activate a flag accordingly, but i could'nt find where to get that value and thought that the Zen counters doesn't offer such feature.
Many many thanks again, you saved me few hours of googling..
 
In the ZenSoft software instructions for P Comparator devices I only saw >= and <=, no = only. The counters reset to 0 instead of 1 as in the LogixPro software. I have re-written the program based on Lancie1's concept of using 1 counter and P Comparator instructions.
 
Lancie1, how to get those function blocks in the zen soft?
Wijden, it is not difficult. You can set up "P" contact comparison instructions for Counter C0. Use the "<=" and >=" in series AND logic to get equivalent "=" logic, as shown in the attached picture.

You can experiment with different values. For example, as JRW pointed out, in the LogixPro version, when the Counter = 4, it is reset to 0, but the Start Pushbutton I0 is still ON, so it immediately advances to "1" and turns on M1. The ZEN version may work the same way, or not. If not, you may have to make a change in the logic. You could set P0 to be "<= 0" if it is needed.

Also for Rung 004, note that you really only need the first Comparator P contact, P6 >= 4. Anytime the Counter is 4 or more, you want to reset it to 0.

I see that you need a "NO OUTPUT" after M3. How could you easily add one more step to get that function?

You may want to add a STOP button to turn off all outputs and reset the counter to 0. Right now, one of the M relays is going to be ON as long as the ZEN is running.

Wijden's ZEN Counter Comparison R0.JPG
 
Last edited:
Here is a tested and working version. The ZEN simulator was on Step 3 when the picture was made.

Wijden's ZEN Counter Comparison R1.jpg
 
Last edited:
Thanks Lancie,

It was very helpful for me too, as I also kind of had some related problem with an Omron device.
 
And now in reverse

hello all,

Thanks a lot for the input. I do have a question about these counters as well.
I would love to have a counter with 8 different steps which will count up wit I0 and down with I1, once in mode up 7 is reached it should restart at 0 and once 0 is reached redirect to 8.

On top of that all 7 steps should have a different memory, but I'm running out of P possibilities..
 
Because there are only 8 "P" comparison bits, you have to use most of them 2 times. Remember that each one can also be used as a Normally Closed bit that says "NOT the condition". For example, on Rung 2, the Normally Closed P2 says "C0 is NOT >= 2".

Here are the first 4 rungs of the working ZEN version of what you described. Does that give you some idea of how to proceed with the remaining rungs?

Up to 7 then Down to 0- bos06.jpg
 

Similar Topics

Hello all, new on here, and relatively new to plc programming. I am trying to write a program which counts as it receives a cycle end input, and...
Replies
4
Views
1,887
A simple task but beyond me. How do I set a counter in a ZEN controller to decrement? I'm using the Zen Support Software and the manual clearly...
Replies
19
Views
6,181
I am having problems with a program I am trying to write. I am not very familiar with the ZEN. I want to; 1 Start a motor 2 Count its revolutions...
Replies
9
Views
4,910
I am new to programming and have struggled with setting up a counter. I want to start a small motor driving a wheel. A prox switch is set up to...
Replies
4
Views
2,860
I am very new so I will try to give as much information as possible. I cannot get a Prolific PL-2303TA USB to RS232 to connect to an Omron ZEN...
Replies
1
Views
1,586
Back
Top Bottom