Omron timers....

Nesstar

Member
Join Date
Oct 2010
Location
Ontario
Posts
9
Okay here is my problem...

I am using a c200h-cpu 21, and I am trying to get it to calculate cycle times... This is starting to get pretty frustrating. I am use to AB and with my limited omron experience I am unable to get the timers to work for my situation.

What I want is whenever this upload cylinder extends a timer starts counting and as soon as the cylinder extends again it sends the current value to a memory address and the timer restarts...

The problem I am experiencing is that I can not get a present value from these timers... It seems the only value I can get from these timers is a done bit...

I am pretty sure there must be a simple solution but for the life of me I can not figure it out.

Any suggestions would be awesome.
 
Okay here is my problem...

I am using a c200h-cpu 21, and I am trying to get it to calculate cycle times... This is starting to get pretty frustrating. I am use to AB and with my limited omron experience I am unable to get the timers to work for my situation.

What I want is whenever this upload cylinder extends a timer starts counting and as soon as the cylinder extends again it sends the current value to a memory address and the timer restarts...

The problem I am experiencing is that I can not get a present value from these timers... It seems the only value I can get from these timers is a done bit...

I am pretty sure there must be a simple solution but for the life of me I can not figure it out.

Any suggestions would be awesome.

Yes Omron does things differently, for one thing the Timers count down. I would suggest you put the Preset for the Timer into a DM Register. Then use a Subtract (SUB) Instruction to Subtract the Timer Present Value from the Preset DM into the desired DM Register when your event triggers.

Stu....
 
Use timer and set to maximum permitted time.
In C200 this is #9999.
Timer starts when input goes OFF.
When input goes ON trigger oneshot rising [DIFU] and subtract timer P[resent] V[alue] from #9999.
Result is Expired Time.
:)

Expired Time Example.jpg
 
If I am working in Online edit and do not send the edit... I can watch the logic go true but when i watch the timer value it stays at 0... Or I do not know how to get the Present value out of it.

I do like how your code flows though B&B so i think i may rewrite mine >.<

Thanks again!
o_O

Thanks for your help!

Nesstar.
 
Last edited:
If you don't send the edit then the instruction will not function, BUT any boolean states will show ON/OFF conditions.

Once a timer instruction is programmed the P[resent] V[alue] of that timer is accessed by simply using T followed by the timer number. In my example the subtract instruction is entered as "SUB #9999 T0 D0". Once entered it will show as TIM0.

Be absolutely sure that the TIM instruction is AFTER the DIFU and SUB rungs, it won't work otherwise.

Note that as the TIM instruction has a 100mSec resolution and the preset is #9999 then max time you can measure is 999.9secs.
If you need higher resolution then use TIMH. This has a resolution of 10mSecs or 99.99secs when set at #9999.

Note from manual when using TIMH.
"If the cycle time is greater than 10 ms, use TC 000 through TC 015.
Description TIMH(15) operates in the same way as TIM except that TIMH measures in units of 0.01 second.
The cycle time affects TIMH(15) accuracy if TC 016 through TC 511 are used. If the cycle time is greater than 10 ms, use TC 000 through TC 015."


:rolleyes:
 

Similar Topics

Hello im new to plc programming with Omron Cx Programmer I have made a program to trigger timers one after the other and repeat the process...
Replies
23
Views
5,655
Hi Guys.. Appreciate you can help me on this...May i know the max value (TIM and CNT) for Omron PLC CPM2A(SYSWIN) ??Can someone explain to me...
Replies
20
Views
6,129
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, I'm trying to convert some Omron code into SLC500 logic. This is from an old Sysmac CQM1 Omron plc. I can understand most of it, except for...
Replies
6
Views
7,413
I have a simple count down timer on an Omron CPU43. I put a set value of #200 and the timer times down for 20 seconds. I now use DM120 for the...
Replies
6
Views
4,057
Back
Top Bottom