1. Home
  2. Docs
  3. SmartConfig2.1
  4. 5.1 User defined
  5. 5.1.4 Creating your first program

5.1.4 Creating your first program

This first program waits for 30 seconds and then ends. It demonstrates how to add, configure, and connect actions on the canvas.

  1. Open the Visual Programmer. A new program begins with the Start block.
  2. In the Blocks tab, find F3 – Delay and drag it onto the canvas below the Start block.
  3. The configuration window opens automatically. Under Wait for, enter or select 30 seconds. Leave Program section set to Main program (no P value). A comment can be entered to describe the purpose of the action. Select Apply to add the configured action.
Configuring a Delay action
  1. Drag F1 – End program from the Blocks tab onto the canvas below the Delay block. Retain the main-program setting and apply the action.
  2. To connect the blocks, drag from the lower connection point of Start to the upper connection point of Delay.
  3. Connect the lower connection point of Delay to the upper connection point of End program.
  4. The arrows show the order in which the actions will be executed.
A first visual program that waits for 30 seconds and then ends
  1. Open the Code menu and select Export flowchart to code. This generates the program code from the visual workflow.
Generating program code from the visual workflow
  1. Open the Validation tab and confirm that the program contains no errors.
  2. Select Apply code to SmartConfig to generate the program code and return it to SmartConfig2.1.

How can we help?