Jump to content

Recommended Posts

Posted

Hi

I am a newbie to Visilogic and I am really sturggling to reset me TD timers to the preset value after they have counted down (in this case 15 seconds).

I have attached a screen shot of the visilogic screen of my current configuration of the timer.

Please can someone help and tell me what I am doing wrong as I am pulling my hair out!

Thanks

Russ

post-8755-0-59422900-1342790192_thumb.jpg

  • Upvote 1
Posted

Hi Russ,

Some comments, and only meant to be taken constructively.

Never use Set and Reset coils on physical outputs. In fact I recommend avoiding them when possible in most other cases as well. Especially in the beggining when you are learning. It makes for very messy and fragile programs.

You set an ouptut based on an equal comparator. This means that the value has to be EXACTLY equal to your compared value at the the time it scan this. Generally I would expect to see a <=, >=, or a LIM.

Please describe in real world terms what you are trying to achieve so that we know you are taking the right approach.

The way you have written this, even when the timer completes, if the comparator remains equal you will immediately set the Output again before the timer has a chance to reset.

Timers can be reset using and --®-- of that timer number. I don't prefer this method myself, but it is an option.

I will post you an example of a simple self resetting timer that used "sealed in" type logic, as opposed to "latch logic"

Posted

I sealed the timer in with a one-shot off the comparator instead. You'' have to explain your application more for us to know what you really need.

Self Resetting Timer

Posted

Hi Damian

Thank you for your help, it is much appreciated.

Your method does reset the timer but it i need it to operate and reset independant of the "pressure switch".

I will explain what I am trying to achieve:

Process starts with press of a button.

High pressure inflation starts.

When a set pressure is reached, the timer is triggered.

Pressure is held until timer reaches 0 and then the next HMI / routine etc is loaded.

This is working ok, but the problem I have is that when the process has fininshed and the user needs to restart the test on the next item, the timers are still held at 0 and have not reset to 15 seconds.

I hope this is clear. All help and critique is greatly received as I am still learning a lot about Visilogic every day!!

Thanks

Posted

Hi

I am also having troubles with some other parts.

When manually starting my routine to run with the touch of a start button, I can run through the sequence without any problems, I can also get the timers to automatically reset.

I am having troubles getting my outputs to reset to the original values when moving onto a different sub routine. When the program finishes and restarts, I'm having some outputs stuck in their switched state, if that makes sense?,!

  • MVP 2023
Posted

Whatever state coils are in (including outputs) when you leave a subroutine will be preserved. You'll have to write some logic to turn things off when you stop calling a particular subroutine.

I usually put outputs in their own subroutine and control them with bits set elsewhere in the program. It's much cleaner and easier to troubleshoot.

Joe T.

Posted

When is the timer supposed to reset normally?

As Joe mentioned, if you are using conditional subroutines the PLC will leave all of the operands in the last state they were in. Unless you are concerned about scan time it is normal to allow subroutines to scan unconditionally.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.