I have set up a schedule which should trigger a tag which is used to run a script. On the screen I have placed a flag so that I can see when the tag has been triggered. This never happens.
(All)
Calendar 16:53:00 Time_To_Set_The_Clocks 1
Calendar 16:54:00 Time_To_Set_The_Clocks 0
What I did next was to create a button to toggle this tag Time_To_Set_The_Clocks. This works OK but I now find that the script which was meant to be triggered is not triggered.
Description:
SetTheClocks
Execution:
Time_To_Set_The_Clocks
Variables available only for this group can be declared here.
Dim CurrentTime, CurrentDate
CurrentTime = $Hour*10000+$Minute*100+$Second
CurrentDate = $Num($StrRight($Str($Year),2))*1000000+$Month*10000+$Day*100+$Weekday
'The code configured here is executed while the condition configured in the Execution field is TRUE.
ConvertTemp()
//This is the clock on the DL06 Gas Boiler
$Gas_Boiler_PLC_Time = CurrentTime
$Gas_Boiler_PLC_Date = CurrentDate
$Gas_Boiler.Set__The__Clock = 1
I Am not getting any warning message but I felt that there must be something wrong with my bit of code which prevented the script from running. I then copied the code and pasted it into the Main Procedures as a sub routine. When I call the sub with a button the code does work properly.
My problem basically, how do you get a schedule to run, and then how to you get it to run a script.