If you want a function to be done by a time interval, do the following.
1. Create a server project with Timer command.
2. Create a cliet project on the basis of a server project.
3. Create graphical items.
4. Next:

  • 1. Drag a command to a graphical item
  • 2. Select Send Number
  • 3. Input value in seconds.
5. Open JS window and write timer logics.


function SecondsStart(in_Type, in_Name, in_Value)
{
    IR.Log("Value = "+in_Value);
    var mstosec = in_Value*1000;
    IR.SetInterval(mstosec, SecondsFin)
}
function SecondsFin()
{
    IR.Log("Do it command")
}



6. Then fill in script field in a server project. Select SecondStart function as the one to be done for the command.



7. Update server driver in a panel project



Next upload the server project onto your server with the help of Transfer. Then connect a panel project to the server and work.



To work with Delay, do the same steps described above. But write the following logics:


function startdelay()
{
    IR.Log("Start command delay");
    IR.SetTimeOut(5000, enddelay)
}
function enddelay()
{
    IR.Log("End command delay")
}


1. Create a command on the server
2. Enter startdelay function iт the script field of a command.
3. Update a driver in a panel project.
4. Drag a command onto a graphic item.
5. Test the work.



To study deeper download the project.Timer.rar





This article was helpful for 2 people. Is this article helpful for you?