A matter of timers in RSLogix 5000

buhnen

Member
Join Date
May 2008
Location
Somewhereland
Posts
131
Hi mates!

I've got a very easy question here for you....

I need two clock pulse signals as the following scheme shows:


|----|----|----|

every vertical line means a clock each 2 minutes

---|----|----|---

for the second signal, I need the pulse goes true each minute,

I know how to generate the fist pulse with the DTR instruction and the system Clock ( GSV instruction) but I have some difficulties when setting ,as showed above, the pulse pattern for the second signal.

What I get is this, and that's not useful:

|----|----|----|
|----|----|----|

What I want, in the end, is to have two bits going true as I said first , for sampling an analogic input ( A level transmitter)so that I can compare the current read value with the one just inmediately before.

May someone help me please?
 
I would create a periodic task set to run every 60,000 milliseconds. In this task, toggle a bit.
In a continuous task, create a one-shot pulse when the clock bit goes positive and another one-shot pulse when the clock bit goes negative.
 
I would use 2 timers.

One resets/enables the other.

One timer is on time , the other is offtime.

The Timers can then be used to turn on an output that will be on and then off as the timers run and reset each other.
 
Once a minute increment a counter with a one shot. We don't care what the preset of the counter is or what the value the ACC ever becomes. Once a minute when the counter is incremented bit Counter.ACC.0 will change state. Every two minutes bit Counter.ACC.1 will change state.

00000 -> 0 minutes
00001 -> 1 minute
00010 -> 2 minutes
00011 -> 3 minutes
00100 -> 4 minutes
00101 -> 5 minutes
00110 -> 6 minutes
00111 -> 7 minutes
etc.
 
Last edited:
Once a minute increment a counter with a one shot. We don't care what the preset of the counter is or what the value the ACC ever becomes. Once a minute when the counter is incremented bit Counter.ACC.0 will change state. Every two minutes bit Counter.ACC.1 will change state.

00000 -> 0 minutes
00001 -> 1 minute
00010 -> 2 minutes
00011 -> 3 minutes
00100 -> 4 minutes
00101 -> 5 minutes
00110 -> 6 minutes
00111 -> 7 minutes
etc.

I use this idea in my current project.

I have several timer / counters in a FB that make these counts available for other functions.

I have a 10sec , a 1 min, a 10min, a 1hour. They reset at some number higher than I need to count and less than 999.

I did this because I ran into issues using what I thought should work.

I was creating a pulse but then it would stay true for more than one scan and caused multiple measurements where I only wanted one.
 

Similar Topics

HI All.It the matter of losing the JOB. I want to write a script in Archestra or in intouch where i have to perform the Tag validation. I need...
Replies
2
Views
1,379
Good Evening , I'm getting ready to add a few input and output modules to a 1769-L33 rack. The module's I'm going to add are 1769-IR6 ...
Replies
0
Views
1,645
Replies
13
Views
4,015
Hello all FTV 8.0, RSL5K..... Is it possible to connect the visibility of a text box or a multi state indicator to a numeric input on the touch...
Replies
4
Views
2,392
Hello all, First off, I am unsure if this is the correct place to post this, so please excuse my unfamiliarity in advance. I represent an...
Replies
9
Views
3,017
Back
Top Bottom