Omron - Long timer

alekbeck

Member
Join Date
Mar 2009
Location
Tønsberg
Posts
40
I need a timer that count at least 30-40 min. I know that it is possible to put 2-3 timers after each other, but i want to be able to see the remaining time (PV value?). I have found the TIML function, but i doent understand exactely how it works. Could enyone give me an example ?

One more question. Is is possible to see the remaining time of a normal timer (TIM), if so how ?
 
Depending on your CPU, you may have a P_1min bit; use that to increment a counter.

Where do you want to view the timer - on an HMI, through the programming software?

In the ladder editor, you can just look at the TIM instruction; it will show you the PV.

If you MOV TIMxx DM xx, you can view it there, as well.
 
Last edited:
I need a timer that count at least 30-40 min. I know that it is possible to put 2-3 timers after each other, but i want to be able to see the remaining time (PV value?). I have found the TIML function, but i doent understand exactely how it works. Could enyone give me an example ?

One more question. Is is possible to see the remaining time of a normal timer (TIM), if so how ?
If it has an RTC you may use it as well instead of a timer.
(Real Time Clock)
 
What kind of timer resolution are you after? 40 minutes is 2400 seconds, 24000 tenths of a second. That's well within range of a 16-bit timer function.

To get the time remaining simply subtract the timer's accumulated value from the preset.
 
I'm not that familiar with Omron. Didn't realize they used BCD for timer accumulator.

Set up a timer with a preset of 0.6 seconds. When it reaches its preset, increment a counter and reset the timer. The counter's accumulated value will be in hundredths of a minute. That will let you track up to 99.99 minutes. It's not perfectly accurate because you lose one PLC scan duration each time you reset the timer.
 
I liked what you said about subtracting the timer's accumulated value from the preset. If i use 3 timers, add there values values, and then substract this value from the start value, i will end up with the present value !

How do i get this value in minutes ? I want to devide the answer with 60, and then round it up, so that i can show the minutes remaining Is this possible ?
 
I'm not that familiar with Omron. Didn't realize they used BCD for timer accumulator.

You can select either BCD or BINARY in the PLC properties setup.

Attached examples show two possible methods.
1.Use the PLC 1 Minute flag.
2. Use a timer.

👨🏻‍🏫

Note:- Change file extension of attached document from .doc to .cxp to view.
 
You can select either BCD or BINARY in the PLC properties setup.
That is definately the easiest way. The newer PLCs default to BCD for backward compatability to make life REALLY easy for us all when converting programs from older PLCs to the newer ones as all the old stuff was basically BCD based.
The CJ1, CS1 and CP1 are all decimal (binary) based these days and it is very easy to change all the timers and counters over to decimal by the above method.
You then use TIMX (binary timer) for your instruction.
Good help is easy to find for all functions in the latest version of CX-P. Set up a function on the screen, use AltE and pull up instruction help - it is all there.
Timer preset and current values are shown in the timer block when online.
By the way, for BCD timers the correct input for the preset value is #1234, for decimal/binary timers it is &1234. If you use #1234 for decimal timers the value will be interperetd as HEX and you will not get the value you desire as the HEX value will be automatically converted by the instruction to decimal.
You can also change the preset and current values online by highlighting the block, mouse cursaor over the value you wish to change, right mouse click and enter new value. Changing these values does not require going into online programming mode.
Hope this helps.
 

Similar Topics

Replies
1
Views
1,415
Hey guys, I can't find an example of the long-timer instruction. I tried implementing one today and the first word was flipping between two values...
Replies
3
Views
3,043
Hi all, I need help on converting a long to float. Also I find the below misleading. Is long and double the same? Pls advice. Thanks.
Replies
1
Views
2,370
Hi All. I would welcome suggestions as to the error of my ways regarding the following: I'm trying to display a 4-digit (1 dec. place) number on...
Replies
4
Views
3,360
Has anyone done SMS messaging from an Omron CJ2J-CPU31 PLC? If so could you help please. Omron here in Oz have not had any experience doing this...
Replies
5
Views
109
Back
Top Bottom