Nirtec Studio Forum

General Category => EasyPLC v.5 => Topic started by: ShawnTierney on November 21, 2023, 11:44:51 PM

Title: EasyPLC v5 Retentive Timer current value
Post by: ShawnTierney on November 21, 2023, 11:44:51 PM
Good evening,

It's common to use a retentive timer (in A-B it's RTO, in Siemens it's a TONR) to keep track of total machine runtime.

Now I'm very new to EasyPLC, but I don't see how to display the timer's value so I know how long the timer has run? I want to display this in EasyPLC and display it in Machine Simulator

In A-B this would be the ACC value, in Siemens it's the ET value.

But what is it in EasyPLC, and how do I display it?

Shawn
Title: Re: EasyPLC v5 Retentive Timer current value
Post by: EasyPLC_Master on November 22, 2023, 10:33:33 AM
Hi Shawn!

EasyPLC has not implemented a retentive Timer, there are three types of timers: standard, TON and TOF.
Using this three types of timers, you can build others ones.

One possibility could be to create a Funcion that using one timer, memorizes the count and activates the output when the time accumulation is desired.
I attach an example of a possible implementation. I hope it helps you.
Title: Re: EasyPLC v5 Retentive Timer current value
Post by: ShawnTierney on November 29, 2023, 10:50:43 PM
Thank you for your reply and sample code.
 
Reviewing my PLC lesson plans (for A-B, Siemens, etc) I can confirm that not being able to see the current value of a Timer, and not having a Retentive Timer, are roadblocks to recommending EasyPLC to my students, since these missing features are standard on all major PLCs.
 
That said, I'd like to recommend adding the above mentioned features to the suggestion box for future versions, along with clock bits - most PLCs have a .25 second and .5 second system bit which is always toggling (as part of a larger clock bit array.)
 
Thanks again,

Shawn
Title: Re: EasyPLC v5 Retentive Timer current value
Post by: EasyPLC_Master on November 30, 2023, 08:54:54 AM
Hi Shawn!

Thank you very much for your suggestions, helps to improve the product!

The goal of EasyPLC is to simplify the PLC programming, the idea is to avoid the need to learn a large number of different commands, tools, timers, counters, as well as the most used automation software, leaving the basic and essential ones.

EasyPLC already implements the clock bits, that are called Frequency sigals (Project -> Hardware -> Virtual PLC CPU. Page 13 EasyPLC User Manual.pdf).
Also using the function 'TimerValue' is possible to see the timer value.
Here is attached an example where you can see how to see a timer value and how to use the frequency signals.

I will implement the retentive timer for the next version of EsyPLC, I agree that it is quite used, so it will be interesting to have it available without the need for additional coding.