16.3 Exercise
Exercise: Setting the function of a vending machine with the Scheduler feature
Create three BOOL tags named βWasherβ, βLightβ, and βVendingβ.
Tag EditorΒ
Create 3 different action lists by clicking Tools > Script Editorβ¦ > click + icon > Create New Commands > name the first action list βActivate Vendingβ > click Add New Command, then assign the value βtrueβ to the βVendingβ tag > click OK.
Repeat this step for the second and third action list called βActivate Washerβ and βActivate Lightβ. Make sure to assign a corresponding tag in the Parameters section
Command EditorΒ
Create 3 different schedules by clicking Tools > Schedule Editorβ¦ > click + icon. Each Schedule Title will be βActivate Vendingβ, βActivate Washerβ, and βActivate Lightβ.
Configure the schedule setup based on the information provided below and make sure to assign a corresponding action in the Action section.
Activate Vending: Start on 2023-03-01 at 07:30 military time and repeat every 1 day.
Activate Washer: Start on 2023-03-22 at 07:45 military time and repeat once a week every Wednesday.
Activate Light: Start on 2023-03-01 at 18:00 military time and repeat once every first day of the month.
Schedule ConfigurationΒ
Create three different text boxes and bind the βVendingβ, βWasherβ, and βLightβ tags to the Text property of their respective text boxes.
Text PropertyΒ
Β
To observe the operation of the scheduler, adjust the scheduled start date to occur the current date and start times to occur within the next 5 minutes, then run the simulator. At the scheduled start time of their respective schedule, the tag values should display β1β.
Canvas Simulator
Β