English (United States)
Call us! 512-349-0334 or (877) INDUSOFT

InduSoft Web Studio Forums

Find additional forum posts in in the Forum Archives. For assistance view the Forum Frequently Asked Questions.

How to configure a 10 Second timer
Last Post 29 Mar 2019 05:42 PM by ericmatschke. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Tim TrotterUser is Offline
Basic Member
Basic Member
Posts:27


--
23 Nov 2016 01:39 PM

    The following Scheduler configuration will set Output1 to the on state when you set TagA to 1 momentarily with the push button. Output 1 will remain on for 10 seconds, while Timer counts from 1 to 10. When Timer reaches 10, Output 1 is reset to 0. The rectangle’s caption will show ON or OFF, based on the state of Output1.

     

     

     

    Another method is to use the following script, such that when you set the value of Timer2 to 1, Output2 gets written to a 1 until Timer 2 reaches the value 10 and is reset:

     

    _BryanUser is Offline
    New Member
    New Member
    Posts:7


    --
    04 Jan 2018 11:24 AM
    Thanks for this post it was exactly what I was looking to do.

    I was able to get the first Timer example to work as expected and modified it for my use. But the Timer2 Script example is not working as I would expect it to.

    I made a copy of the TagA button from the scheduler example and changed the On Down script to $Timer2=1 and removed the code from the On Up. When I press the new button Timer2 does count up to 10 and the output turns on and off as expected. The issue is that it counts to 10 in about 2 seconds, not the 10 seconds I would expect. I am guessing it has something to do with the Second tag used for execution of the script.

    I just did some testing and using the Second tag is the reason why the script is not working as I expected. Because the Second tag is considered to be true for 59 seconds out of every minute. So the script will run as fast as it can until the second tag gets back to zero, be false for 1 second and the be true for another 59 seconds.

    How can the script be written to work as I would expect it to?

    ericmatschkeUser is Offline
    New Member
    New Member
    Posts:1


    --
    29 Mar 2019 05:42 PM
    Second should be Second->B0
    The Second tag is an integer and the zero bit of the integer is 1 for 1 second, then zero for 1 second
    You are not authorized to post a reply.