Versions Compared

Key

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

(blue star)

This section explains the basics of the feature. Please utilize the feature according to your site environment.

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

a) Create three digital tags named ‘VENDING’, ‘LIGHT’, and ‘WASHER’.

...

  • Title: Vending machine power ON

  • Time Setting: Check ‘Repeat Settings’ and specify the time as 6:30, daily.

  • Task Setting: Select the ‘Command’ option and enter the operation as ‘VENDING = 1’.

...

  • Title: Activate washer

  • Time Setting: Check ‘Repeat Settings’ and specify the time as 6:31, daily.

  • Task Setting: Select the ‘Command’ option and enter the operation as ‘WASHER = 1’.

...

  • Title: Light ON

  • Time Setting: Check ‘Repeat Settings’ and specify the time as 18:30, daily.

  • Task Setting: Select the ‘Command’ option and enter the operation as ‘LIGHT = 1’.

...

  • Title: Vending machine power / light OFF

  • Time Setting: Check ‘Repeat Settings’ and specify the time as 23:30, daily.

  • Task Setting: Select the ‘Write Tag Value’ option and add ‘VENDING’ and ‘LIGHT’ to the list.

...

Enter each tag name and value into the text field, then press [Add] to register the tag, as shown below.

...

    d) There should be four schedules in the ‘Schedule List’ dialog box as shown below. Press [Save and Close] to saves the schedules.

...

Function

Touch

Action

Command Expression

Command

ScheduleConfig();

...

f) Launch the project in Xpanel. Each function of the vending machine activates at the designated time according to the schedule settings. Every day, the power is turned on at 6:30, and the washer operates at 6:31. The light turns on at 18:30, and both the power and light are turned off at 23:30. You can change the time data of the schedule by pressing the touch object.

...