Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Exercise: Setting the function of a vending machine with the Scheduler feature

...

  1. Create three

...

  1. BOOL

...

  1. tags named

...

  1. “Washer”,

...

  1. “Light”,

...

  1. and “Vending”.

...

b) Click [Tools] - [Script Editor], then press the (blue star) icon and select [Create New Action List]. The user will need to create three action lists that write a value of '1' to the previously created tags.

...

c) Click [Tools] - [Scheduler] to open the [Scheduler] window.

d) Add a new schedule by pressing the (blue star) icon. The user will need to create three schedules. The configuration for each schedule can be found below. If the user would like to observe the operation

...

  1. Image Added

  2. 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.

  3. 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

    Image Added

  4. Create 3 different schedules by clicking Tools > Schedule Editor… > click + icon. Each Schedule Title will be “Activate Vending”, “Activate Washer”, and “Activate Light”.

  5. Configure the schedule setup based on the information provided below and make sure to assign a corresponding action in the Action section.

    1. Activate Vending: Start on 2023-03-01 at 07:30 military time and repeat every 1 day.

    2. Activate Washer: Start on 2023-03-22 at 07:45 military time and repeat once a week every Wednesday.

    3. Activate Light: Start on 2023-03-01 at 18:00 military time and repeat once every first day of the month.

      Image Added

  6. Create three different text boxes and bind the “Vending”, “Washer”, and “Light” tags to the Text property of their respective text boxes.

...

  1. Image Added

...

  1. 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

...

  1. , then run the simulator.

...

  1. At the scheduled start time of their respective schedule, the tag values should

...

  1. display “1”.

...

  1. Image Added