Program help.

Anyone know how to use comparator and timer to set up a pulsing frequency?
I've been using two timers to do this but im trying to cut down on my code.
 
On the first rung, a single timer that resets itself.
On the second rung, a "Less Than" comparison that controls the output pulse. One value in the comparison will be the timer's accumulated value. If you want a square wave pulse, the other comparison value will be half the timer's preset.
 
On the first rung, a single timer that resets itself.
On the second rung, a "Less Than" comparison that controls the output pulse. One value in the comparison will be the timer's accumulated value. If you want a square wave pulse, the other comparison value will be half the timer's preset.

How would I go about doing that? As in ladder logic. Im using Allen Bradley ML 1100. So how do I set up rung one as a reset and rung 2 for the compare. I understand in perpective what you are saying, just don't know how to put them in ladder logic term.
 
The TMR instruction resets when the logic preceding it evaluates as false, so use a normally closed contact addressed to the .DN bit of the timer.
Was this what you meant? I got it to work, but i'm curious if I did it correctly. I know you can do it several ways.

Basically I want it to turn on for 1 second and off for 1 second.

Pulse.jpg
 
I use the ordinary Greater Than (GRT) instruction. The Greater Than or Equal (GEQ) would work as well.

When the .ACC accumulated value is 0 to 100, the output flasher bit is OFF.
When the .ACC accumulated value is 101 to 200, the output flasher bit is ON.

My preference is to have the flasher bits start in the OFF state when the controller goes into RUN mode. It's usually unimportant but it's my standard method.

If you really needed this to be super-accurate, you can use the timed interrupt routine feature of the controller, but for ordinary flashing lights, an ordinary timer is the way to go.
 

Similar Topics

This is my first time seeing this kind of plc and I'm having trouble figuring out what software is used to program it. If anyone has experience...
2
Replies
315
Views
Hello everyone. On my current job, I have to copy the program of an old PLC to a new one, but I only have a transcript of the original program...
9
Replies
510
Views
Hi, I am new to PLC doing a part time job, I have given a task recently to write a PID program to maintain the pressure at a certain value by...
23
Replies
1,394
Views
Hello everyone, I'm an automation engineer without a current rockwell license (left former company) but need a program I previously wrote for a...
3
Replies
353
Views
I've only done a little bit of PLC programming, so I'm looking for some help fixing an operation error with an Eaton ELC-PA10AADR. It is...
9
Replies
498
Views
Top