Virtuino Forum

Full Version: OFF timer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Having problems setting up the timer variables in Logo so I decide to try with internal Virtuino Timer. 
How can I use this function?
Anyone can explain how to use an internal Virtuino Timer to send a signal to plc once the desired time is elapsed?
Need to manually input the time value onto a text box and after that time to switch OFF an output.
Hi,
I think it is not easy.
The easier way to do this is to use a "Counter".
But you don't describe to us how the variable will be on.
Add a switch to enable the variable V2. let's say this is the ON-OFF variable you want to send to PLC

1. Open the "Select Widget" window. Add a "Pop-Up Value Editor". Select the variable Emulator V0 

2. Add a widget "Button". 
On the button settings select the type "Button". 
You don't need to select a Variable. 
Add the "Action": "Show PopUp window". Select the "Value editor".
Now every time you click on the button the "Value editor" will be displayed.
Using the  "Value editor" you can send a value to the Variable V0.
You can see this variable if you add a "Value Display"

3. Add a "Counter" 
Input: V0
True if input >0
Time Variable: V1  

4. Go to "Script add tools". Add the script "If Then"
if V1>V0 then Send the value 0 to Emulator V0
This function will reset the counter.

5. Go to "Script add tools". Add the script "If Then"
if V1>V0 then Send the value 0 to V2 (PLC)
This function will disable the your output

You don't describe to us how the variable will be off. Click the button to enable the output

or you can do this if you want to enable it every time you insert a new time:

6. Go to "Script add tools". Add the script "If Then"
if V0>0 then Send the value 1 to V2 (PLC)

Please check this tutorial.
https://virtuino.com/downloads/videos/auto_off.mov