Skip to content

Your first project

In this tutorial you will program the classic motor start/stop with seal-in (self-holding) and thermal protection, and test it in the simulator. It takes about 10 minutes.

Signal Type Address Purpose
Marcha BOOL %IX0.0 Start push button (normally open)
Paro BOOL %IX0.1 Stop push button (normally closed: TRUE at rest)
Termico BOOL %IX0.2 Thermal overload relay tripped
Motor BOOL %QX0.0 Motor contactor
LuzMarcha BOOL %QX0.1 Green lamp: motor running
LuzFalla BOOL %QX0.2 Red lamp: thermal fault

The logic:

  • Pressing Marcha (start) starts the motor, which stays on after the button is released.
  • It stops when Paro (stop) is pressed or when the thermal relay trips.
  • One lamp shows the motor running and another one the fault.
  1. On the home screen press New project.

  2. Enter MotorStart as the title and press Create.

    New project dialog

  1. Press Home → New file, choose Variable Table, name it IO and press Create.

  2. In the table, press the add row button in the toolbar and fill in each variable: Name, Type, Address and, optionally, a Comment.

  3. Repeat until you have the six variables above.

    Completed IO variable table

  1. Press Home → New file, choose Program, name it Motor, language Ladder and task Main_Task. Press Create.

  2. The editor opens with an empty rung. Click its header and type a comment, e.g. Seal-in.

  3. Add the elements of rung 1 from left to right. You can drag them from the Library tab of the right panel or use the toolbar buttons:

    • A NO contact (Shift+F2) with IO.Marcha.
    • A NO contact with IO.Paro (the physical button is NC, so it reads TRUE at rest).
    • An NC contact (Shift+F3) with IO.Termico.
    • A coil (Shift+F7) with IO.Motor.
  4. For the seal-in, select the IO.Marcha contact and open a parallel branch (Shift+F8). Place a NO contact with IO.Motor in the new branch.

  5. To assign each element’s variable, select it and type it in Properties → Variable. Autocomplete suggests variables of a compatible type; you can also press … to pick it from the table.

    Contact inspector

  6. Add a new rung (Ctrl+R) with an IO.Motor contact and an IO.LuzMarcha coil.

  7. Add a third rung with an IO.Termico contact and an IO.LuzFalla coil.

The finished program:

Finished Ladder program

Open Tools → Tasks. The Motor program must be listed under Main_Task. If it is not, add it with Add program.

Tasks editor

Go to the Simulation tab and press Compile. The status bar should show Build succeeded. If there are errors, they are listed in the console with the file and element that caused them.

  1. Press Play. The project becomes read-only while simulating.

  2. Turn on View states to colour the diagram: green = TRUE / energised, red = FALSE / not energised.

  3. Open Watch to see every variable. Since Paro is an NC push button, set it to TRUE with the Set value switch.

    Watch table

  4. Press Marcha (set it to TRUE, then back to FALSE). The motor starts and stays on thanks to the seal-in branch.

    Motor running and sealed in

  5. Simulate a fault: right-click the IO.Termico contact and choose Force to 1. The motor stops and LuzFalla turns on.

    Force menu

    Thermal fault: the motor stops

  6. Release the force with right-click → Remove force and press Stop to edit again.

This is the full sequence (start, seal-in, thermal fault, restart and stop):

Press Ctrl+Shift+S (Save all). Done! Your first PLC program is up and running.