Add a program

Before you start programming using a PLC language, you need to add a program.

  1. In the Project panel, right-click KINGSTAR Project (your project name) and select Add > New program.
  2. In the New program dialog box, under Language, select the programming language you want to use. We select FBD. In the Name box, enter your program name. We enter "Absolute." Under Task, in the Assign to list, select a task for your program. We select Fast. When you finish editing, click OK.
  3. NOTE:  For more information about Task, see Tasks.

  4. In the Library Tree panel, find Motion Control > Single Axis > MC_MoveAbsolute and click it.
  5. In the Absolute panel, drag MC_MoveAbsolute from Library Tree to the source code editor. In the Function block instance dialog box, in the Instance name box, enter a name for this function block. We enter "MoveAbsolute1."
  6. A function block is added.
  7. NOTE:  If you want to check the task you choose for your program, in the Project panel, expand the Tasks list and expand the Fast task (or other task) to see whether your program is under the task.