Program help.

XxLinkxX

Member
Join Date
Oct 2015
Location
Hyrule
Posts
86
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

Hi all, hope you are having a great day, I am in need of your help to create a AOI or program that does this kind of job: I have a IO Link...
Replies
0
Views
33
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
166
I am completely stuck on building a ladder program that requires a start button to be pressed 3 times to turn on motor 1. Then motor 2 starts...
Replies
20
Views
575
Hi all, I’m new to programming and want to write a simple routine. Push start button, turns on sensor. 2 second delay before anymore logic read...
Replies
1
Views
330
Hi! I need help converting an old MicroLogix 1100 project to Micro 820. Project Details I have an old MicroLogix 1100 program that has been in...
Replies
0
Views
472
Back
Top Bottom