Jump to content

About timers and preset values


Recommended Posts

This is a question for the most experienced vision series users out there:

 

What's the deal with the timers?

Let me explain: Since using Unitronics timers have been a headache for me.

There is a "proper" way to declare and initialize the timer, right?

 

image.png.15775f5f224fe9a528870bc112e93371.png

 

I am assuming that the check box actually resets the elapsed time and the output bits () and seems to be a true statement.

If we use the same "logic" as the MI power up value, that means that T1 will power up with preset value every single time, correct? well that has not been the case in my experience.

If you override the preset value using online mode and reset the PLC, then it will keep the previous value.

If you a "backup and restore" it also will take the preset value from that backup, even if you reset the PLC.

If you download from Visilogic you may check or uncheck to download preset values, and it will take those instead of the preset value.

still confusing to me but whatever I managed to get used to this using store preset function on power-up bit condition (when I need the timer to behave like that).

However today I was troubleshooting a machine that couldn't be started. That particular machine communicates to another device over MOTBUS TCP/IP and long story short, I have a small "reset" sequence that uses a timer to ensure the clear fault bit has been sent before restarting the interlock sequence ( Don't judge me, sure there is a better and proper way to do it but the easiest and fastest way when I did that program was to wait  1-2 seconds after pressing the "reset fault" button,  there was no documentation about the "reset sequence" of the device and I figured out by manually pressing buttons... ok, maybe there is documentation about it and I didn't search hard enough but I was in a hurry and it's out of the scope of this thread ).

Anyways fast forward some months in, and that sequence was not working properly, I logged in and to my surprise the Preset value was 00:00:00.00 🤷‍♂️,  preset value in the downloaded project was 1s, and last preset value set was 2s, and I am 100% sure because last week I logged in to that machine to check what time value I used, to deploy the exact same settings to another machine.

So, the timer 1 was as follows:

image.png.d23e0f50df2cf237fd254cad616e81b4.png

and TE1 is not being used anywhere else in the project.

image.png.1b7ddbcfa7a5c8a2930be9ba56684bc1.png

I have no explanation on how it was set to 00:00:00.00, I mean there is also not even a vector function that could write directly on timer preset values, right?

 

Banging head on wall

 

Link to comment
Share on other sites

  • MVP 2023

I can only do a quick response,  one thing to remember is that timers can do odd things if their triggering is referred to more than once.

FWIW, I have always disliked Vision's timer arrangements, in that they make some things complex and harder to use.  Yes, you can arrange them to do lots of timings, but they pale when compared to a favourite other brand that has far more innate timer methods available, that do everything needed, and do it by essentially using only one ladder element.  That is why in many Vision "timer" scenarios, I use count based systems instead, which I find are much better anyway for more complex operations.  Counters are a forgotten method these days, it seems.   Timers definitely have their place, Vision works them ok, but the methodology can be a complete pain.  And a PS...by "Counters", I mostly mean roll my own  versions.

I await the rest of the forum giving me a hard time!   🙃

Link to comment
Share on other sites

Over the years, I have written a lot of code using timers, sometimes with favorable results, other times (as you have experienced), the timers can give odd unexplained results.

And I don't believe the Creators are going to put much effort into de-mystifying this in the Vision series.

Like Aus, I favor the Counter/Compare scenario, us "old folk" was programming like this back when dirt was still young & moist...:rolleyes:

Link to comment
Share on other sites

  • MVP 2023

And I've just noticed that the type in your case is a TE.  I personally find this the worst offender for ease of use, and operation as expected. 

That aside, this is perhaps one of the reasons why I always try to do an Init and Reset on any program change, even minor.  I have had instances where some details seem to be retained from a previous project making odd things occur, and an I & R fixes the issue. .......even though it's not meant to........😉    

Link to comment
Share on other sites

@John_R, @Ausman  at least I know I am not the only one that struggles with timers 😅

This Is one of those thinks that I found sketchy when started used Visilogic but I refused to believe, my thoughts were "I must be doing something wrong", but as the years went by, I am just giving up with trying to understand timers on visilogic.

 

 

Link to comment
Share on other sites

 

 

In my projects, unlike my colleagues, I always use timers instead of counters.

Reset timer at power-up checkbox means, timer will start over from preset value down to 0 if conditions are met no matter what preset is, if the originally downloaded or any modification you made online or from HMI. This is at least the behaivour I've seen in TD. This scenario is probably differente to TA and TE, due to their inherent retentive operation mode. Rarely I use TA nor TE so I cannot answer it.

About prest value resetting to 0, I experienced the same thing one time, but it was caused of electrical spikes.

 

In my projects I always use timers instead of counters.

Resetting the timer in the power-on checkbox means the timer will start again from the preset as long as the conditions are met, no matter what preset it is, the one you originally downloaded, or any modifications you made online or from the HMI. This is at least the behavior I've seen in TD-like timers. This scenario is probably different from that of TAs and TEs, due to their retentive mode of operation.

I rarely use TA or TE, so I can't answer for sure.

About resetting the value to 0, I experienced the same thing once, but it was caused by electrical spikes.

 

 

Link to comment
Share on other sites

  • MVP 2023

I guess I'm the odd man out. Once I carefully studied these graphs in the Help file and recognized that the Preset get downloaded with the project, I found Unitronics' Timers to be quite intuitive and easy to use.

Fernando does have a point about Timers losing their Presets for unexplained reasons, but I have found that in electrically noisy environments, any PLC memory register can get scrambled and Timers seems to be first on the list to get zapped.

image.png.5c6a3c99168fcfcdf993f9b9a28f1deb.png

Gabriel's post came through while I was typing, but we seem to be in agreement. Also, while I rarely use the TA Timer, I do use the TE Timer very often. I'm sure it was intended just as it says, an Extended Pulse, but I also find it useful when I need to trigger a timer with a pulse instead of a direct contact. You just have to use a negative transition of the output bit instead of positive.

Link to comment
Share on other sites

1 hour ago, Flex727 said:

I guess I'm the odd man out. Once I carefully studied these graphs in the Help file and recognized that the Preset get downloaded with the project, I found Unitronics' Timers to be quite intuitive and easy to use.

Fernando does have a point about Timers losing their Presets for unexplained reasons, but I have found that in electrically noisy environments, any PLC memory register can get scrambled and Timers seems to be first on the list to get zapped.

image.png.5c6a3c99168fcfcdf993f9b9a28f1deb.png

Gabriel's post came through while I was typing, but we seem to be in agreement. Also, while I rarely use the TA Timer, I do use the TE Timer very often. I'm sure it was intended just as it says, an Extended Pulse, but I also find it useful when I need to trigger a timer with a pulse instead of a direct contact. You just have to use a negative transition of the output bit instead of positive.

well, I am not confused about the use cases of the timers and how each one be heaves, I do agree that the documentation is clear in that regard... It gets fuzzy when you start messing with the preset values, and do downloads, backups and restarts as I described.

The electrical spikes, and noise makes sense to me, that other device that I was talking about handles high voltage, and I was informed that it self-shutdown, I am pretty sure there was some overvoltage issue which may cleared that preset value which caused the "clear fault" sequence stop working.

I am also very skeptical about the quality of the "grounding" in that facility. 🙃

 

 

 

  • Upvote 1
Link to comment
Share on other sites

  • MVP 2023
On 6/3/2023 at 12:45 AM, Flex727 said:

You just have to use a negative transition

That's part of the headache I once created for myself using TEs .  I have mentioned elsewhere on the forum that I always try to use the same type of action throughout a program, and mostly it is close on condition met.  So the actions needed for the correct TE operation were opposite to what I was doing elsewhere, and it tied things up in knots with incorrect operations/logic issues.  I know it was all fundamentally of my own doing and methods...but it influenced my thinking and approach.

It is a personal type thing.  The timing maps clearly show how to use them, but I still hate the way the things have to implemented using a coil and then boolean.  When I first started using Vision ages ago this was a "what?" moment, as I had been spoiled with ease of use up to then....like this:

I----[whatever type of input you want ]-----[00125  (timer type)  Txxx]---------(whatever type of output you want)---I     with 125 being 1.25s.  All done in that one element.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...