20 minute timer on GX developer

Mark Goldman

Member
Join Date
Mar 2016
Location
Western Kentucky
Posts
21
Hi all
I'm trying to program a 20 minute timer on an older Mitsubishi PLC with GX developer but the register does not allow it. For instances, T1 K1200000.
Will it allow 1.2e+6 or must I use some other means to obtain the 20 minutes I want?
Thanks in advance!
 
I'm only guessing since I am not familiar with this software or plc. You may have already considered this. I would suggest just cascading some more timers using additional rungs in the logic unless the timing period is critical. If you need Retentive timing, use a 1 second self-resetting timer driving a couple of counters in cascading rungs.
 
Last edited:
Yeah, I have considered this as an option. Timing is not that critical. However, I was hoping for an easier solution, like the 1.2e+6 or something.
If I cascade timers to make up a 20 minute timer, I believe I'll also have to use a counter, correct?
 
Yeah, I have considered this as an option. Timing is not that critical. However, I was hoping for an easier solution, like the 1.2e+6 or something.
If I cascade timers to make up a 20 minute timer, I believe I'll also have to use a counter, correct?
Unless you need it to be Retentive you won't need counters. Just use the Done or output of the 1st timer to start a 2nd timer, etc. Use the output of the last timer to reset all after using it to perform whatever action you needed the timer for in the 1st place.

Edit:
Also see my post numbered #2 for I made a couple of edits.
 
Use the 1 second heartbeat (M8013) to increment a data register (32 bit)
and do a compare (DCMP)

-!M8013!------[INCP D10]

.....------------[DCMP D10 K1200000 M10]
 
Hang on a minute - or 12

Your maths is wrong..............

1 minute is K600

10 minutes is k6000

20 minutes is k 12000 - not k1200000

1k is 1 10th of a second
 
It will (of course) depend on the time base of the timer you are using.
From my old training manual -
T - Timers
T devices are timer devices by default timers are either 100msec time
increments, 10msec time increments, or 1msec time increments
depending on the timer address. Most timers, depending on their address,
are non-retentive, meaning they do not hold their current value if the input
conditions stop conducting. In the FX2N, FX, FX2NC, timers with
addresses T246 and above are retentive. This means the timer hold its
value until it is reset. Retentive timers have a time base of either 100msec
or 1msec, depending on the address.
When a timer reaches the associated preset value the T device coil is
energized, the corresponding T device contact becomes active also. All
timers are 16 bit, meaning the maximum preset is +32767. Valid presets
are K values and D data registers. For a 100msec timer the maximum
time is 3276.7 seconds.
In GX-Developer, it is possible to assign a range of timers to be batterybacked.
This means the timers will hold their accumulated value in the
event of a power loss – provided the logic that drives the rung is batterybacked
as well. Otherwise the timer will be reset.

20 mins = 1200 seconds so use a timer with 100mSec time base with a value of K 12000
 
Last edited:
It will (of course) depend on the time base of the timer you are using.
From my old training manual -
T - Timers
T devices are timer devices by default timers are either 100msec time
increments, 10msec time increments, or 1msec time increments
depending on the timer address. Most timers, depending on their address,
are non-retentive, meaning they do not hold their current value if the input
conditions stop conducting. In the FX2N, FX, FX2NC, timers with
addresses T246 and above are retentive. This means the timer hold its
value until it is reset. Retentive timers have a time base of either 100msec
or 1msec, depending on the address.
When a timer reaches the associated preset value the T device coil is
energized, the corresponding T device contact becomes active also. All
timers are 16 bit, meaning the maximum preset is +32767. Valid presets
are K values and D data registers. For a 100msec timer the maximum
time is 3276.7 seconds.
In GX-Developer, it is possible to assign a range of timers to be batterybacked.
This means the timers will hold their accumulated value in the
event of a power loss – provided the logic that drives the rung is batterybacked
as well. Otherwise the timer will be reset.

20 mins = 1200 seconds so use a timer with 100mSec time base with a value of K 12000

So, is it the "K" that determines whether the function is for 100 msec or is this something that is unique to the particular PLC that is unchangeable and, if the former, how do I address it to use 1 millisecond rather than 100 millisecond?
 
Actually a 0.01 time base timer would be K6000 for 1 minute and K120,000 for 20 minutes - which exceeds the 16 bit signed integer value.

The simplest way to do this would be set a timer at K6000 for 1 minute and have it count up a counter to 20, resetting the timer each count. When the count reaches 20 perform the needed task & reset the counter.

The 'K' simply tells the PLC it is a value to use and not an address to look at.
 
So -
K12000 using a 100ms timer =12000 * 0.1 = 1200 seconds
1200 seconds / 60 = 20minutes

Make sure you are using the correct timer number - check the range of timers for the PLC model you are using

The fact that you have entered K12000 and it times out after 2 mins indicates that you have used a a 10msec time base timer
ie 12000 * 0.01 =120. 120/60 = 2 mins
 
Last edited:

Similar Topics

L
Anyone know how to write a looping 1 minute timer routine? where it counts to one minute and reset and counts to 1 minutes over and over again? TIA!
Replies
11
Views
17,875
I have a machine that pulls vines into it and they hit a limit switch to count them. I also would like to figure out how many vines per hour are...
Replies
15
Views
5,491
Hello, I am going to use an HMI for a 4 digit military rime entry. I want to compare this value against the curr_hour and curr_minute in the...
Replies
7
Views
1,929
Hey Guys I have several scripts to write in Wonderware & I was concerned about the limit of lines in a script. I have been placing them under in...
Replies
3
Views
1,586
Good Afternoon , I'm upgrading a machine , and all the conveyor speeds are in Foot Per Minute. That is what the operator will select on...
Replies
8
Views
2,186
Back
Top Bottom