How-to Guide

Everything you need to go from a blank project to a running PLC program: building ladder logic, simulating the scan, forcing I/O, and connecting a virtual or real machine.

Last updated

Getting started

Visual PLC Studio is a PLC programming environment that runs entirely in your browser. You write logic, a simulated controller scans it continuously, and you can watch and force every signal, with no software to install for simulation.

  1. Click Get started in the top-right corner of this site.
  2. Either click Continue with Google, or enter your email and a password of at least 8 characters (name is optional) and click Sign up.
  3. You're signed in and taken to Your projects. Returning later, use Sign in with the same method.

Managing projects

  • New project creates a project called “Untitled Project” and opens it in Logic Studio, pre-loaded with a small example rung.
  • Click any row in the project list to open it. The list is sorted by Last updated, newest first.
  • Use the ⋯ menu at the end of a row to Rename or Delete a project. Deleting can't be undone.

A tour of the workspace

Every project opens in the same workspace:

AreaWhat it does
FileSave, export and open project files.
Save statusShows whether your latest edits are saved to your account (Saving… / Saved).
Engine selectorWebScan Engine runs your program in the browser; Connected hardware runs it through the local Gateway agent.
Run / Step / ResetStart or pause the scan, execute a single scan, or stop and clear memory and forces.
ForcesHow many signals are currently forced.
Power-Flow (⚡)Highlights energized rails, wires and elements while the program runs.
Account menuYour email, links to this guide, and Sign out.

Below the top bar, the module tabs switch between the four areas of a project: Logic Studio (your program), Tags (variables and data types), I/O Devices (3D scene and device bindings) and Hardware & Gateways (live gateway monitoring).

The status bar along the bottom shows the scan cycle time, how many scans have run, memory use, whether the project passes the IEC 61131-10 schema check, and the Gateway bridge status.

Saving, importing and exporting

Automatic saving

Every change is saved to your account about a second and a half after you stop editing, and again when you leave the page. Watch the save status in the top bar: Saving… then Saved. If it shows Save failed, check your connection before closing the tab.

Project files

Projects are stored in the vendor-neutral IEC 61131-10 (PLCopen XML) format, so you can keep a copy on your own computer:

  • File ▸ Save (Ctrl/⌘ + S) writes the project to an .xml file. In Chrome and Edge it asks where to save once, then updates the same file each time. Other browsers download a new copy. A dot on the File menu means that file is out of date.
  • File ▸ Export IEC 61131-10 XML always downloads a fresh copy.
  • File ▸ Open project… loads an .xml project file.

Building ladder logic

What is ladder logic?

Ladder logic, called Ladder Diagram (LD) in the IEC 61131-3 standard, is a graphical PLC programming language modelled on the relay wiring diagrams that electricians used before programmable controllers existed. A program is a stack of rungs drawn between two vertical rails. Power flows from the left rail to the right rail through contacts, which test the state of a tag. When a complete path exists, the coil at the end of the rung turns on and writes its tag. The PLC evaluates every rung, top to bottom, on each scan, many times a second, so outputs always reflect the latest inputs. Ladder logic is the most widely used PLC language for discrete control such as interlocks, start/stop circuits and sequencing, because maintenance technicians can read it like a circuit. For arithmetic, loops and data handling, Structured Text is usually the better choice, and Visual PLC Studio shows both views of the same program.

StartButton%IX0.0MotorRunStopButton%IX0.1MotorRun%QX0.0
The example rung in every new project: a classic start/stop seal-in circuit.

Pressing StartButton energizes the MotorRun coil. The parallel MotorRun contact then keeps the rung energized after the button is released. Pressing StopButton (a normally-closed contact) breaks the path and the motor stops.

The instruction palette

InstructionMeaning
XICNormally-open contact: passes power when its tag is TRUE.
XIONormally-closed contact: passes power when its tag is FALSE.
OTEOutput coil: its tag follows the rung, TRUE when energized and FALSE when not.
OTLLatch coil: sets its tag TRUE when energized and leaves it set.
OTUUnlatch coil: resets its tag to FALSE when energized.

Timers and counters

The palette also has timer and counter instructions. Like coils, they are outputs, so they sit at the right-hand end of a rung. Each one is drawn as a box showing its tag, its Pre (preset) and its Acc (accumulated value), which updates live while the program runs.

InstructionMeaning
TONTimer on-delay: while the rung is true, Acc counts up in milliseconds to the preset, then the done bit (.DN) turns on.
TOFTimer off-delay: .DN is on while the rung is true. Once the rung goes false, Acc counts up to the preset, then .DN turns off.
CTUCount up: each false-to-true change of the rung adds one to Acc. .DN is on while Acc is at or above the preset.
CTDCount down: each false-to-true change of the rung subtracts one from Acc.
RESReset: while the rung is true, clears the named counter's Acc and status bits.

Select a timer or counter and click ✎ to set its tag, switch its instruction (TON/TOF or CTU/CTD) and set the Preset, in milliseconds for timers. New timers start at 1000 ms and new counters at 10. A CTU and a CTD can share one counter tag to count both ways.

To use a timer or counter elsewhere in your logic, give a contact a status-bit tag such as Timer1.DN. Timers have .DN (done), .TT (timing) and .EN (enabled). Counters have .DN, .CU, .CD, .OV (overflow) and .UN (underflow). The contact's tag field suggests these as you type.

Editing a rung

  1. Click Rung in the palette to add an empty rung at the bottom.
  2. Drag an instruction from the palette onto a rung's wire, or onto an existing element. A blue line shows whether it will land before or after. Outputs (coils, timers, counters and RES) sit against the right-hand rail.
  3. Click an element to select it. Small buttons appear next to it: − removes it, ✎ configures it, and the branch button wraps it in a parallel branch. Press Esc or click empty canvas to deselect.
  4. To build OR logic, select a branch's vertical bars and click + to add another parallel path, then drag instructions onto it. Select a single path to remove just that path, or use the branch's trash button to remove the whole branch.
  5. Drag a placed instruction to another rung to move it. Drop it outside every rung to delete it.
  6. Click a rung's number to select the whole rung, then press Delete or Backspace to delete it. You can also use the trash icon beside the rung. The last rung can't be deleted.

Rungs are checked as you edit. Rung has no logic between the rails means the rung is empty. Rung does not drive any output (no coil) means you still need to add a coil. A warning icon on a parallel path means the path is empty.

Disabling a rung

To take a rung out of the program without deleting it, click the power button beside it. A disabled rung is dimmed, shows no power flow and is skipped on every scan. You can still edit it. Click the button again to enable it.

Tags, timers and counters on a disabled rung still exist and still appear in the force table. They just stop being updated by that rung.

Naming contacts and coils

New instructions get placeholder names like NewTag1. Select one and click ✎ to open Configure contact or Configure coil:

  • Instruction switches between XIC/XIO, or between OTE/OTL/OTU.
  • Tag name suggests existing tags as you type. If the name doesn't exist yet, saving creates it as a new global tag.
  • Address maps the tag to PLC memory (see below), and Data type sets the tag's type.

Addresses

Addresses follow the IEC 61131-3 direct-addressing convention. The first letter decides which memory area a tag lives in:

AddressArea
%IX0.0Input: a button, switch or sensor.
%QX0.0Output: a motor, lamp or valve.
anything else / blankInternal memory (%M): flags and intermediate values.

Structured Text view

The Structured Text tab in Logic Studio shows the same program as text. Edits in either view update the other after a short pause.

MotorRun := (StartButton OR MotorRun) AND NOT StopButton;

Round-trip sync supports Boolean assignments built from AND, OR, XOR and NOT, plus the IF … THEN tag := TRUE; END_IF; form that latch and unlatch coils produce. If you write something the ladder view can't represent, a red Ladder not updated pill appears. Hover it to see why.

Timers, counters and RES are written as calls on their tag:

Delay(IN := StartButton, PT := 2000);
Parts(CU := PartSensor, PV := 5);
Parts(R := ClearCount);
FullLamp := Parts.DN;

Structured Text doesn't distinguish TON from TOF, so editing a timer's call keeps whichever variant it already has in the ladder view. Use ✎ on the ladder to change it.

Running and debugging

The built-in WebScan Engine compiles your program and runs it in the browser like a real controller. Open Logic Studio first; the scan controls become available once a program is loaded.

  1. Click Run to start continuous scanning. The scan counter in the status bar starts climbing.
  2. Turn on Power-Flow (⚡) to see energized rails, wires and elements highlighted live.
  3. Click Pause and then Step to run exactly one scan at a time.
  4. Reset stops the scan and clears memory and all forces.

Forcing inputs and outputs

The force table beside the ladder lists every tag on the rung with its live value. Click 1 or 0 to force a tag to that value. A Forced chip appears; click its × to release the force. Releasing doesn't change the value. An input with nothing else driving it keeps its last value until you force it again or click Reset. The forces counter in the top bar shows how many are active.

Try it: start and stop the motor

  1. Open a new project, click Run and turn on Power-Flow.
  2. Force StartButton to 1. MotorRun turns on.
  3. Force StartButton to 0, as if the button were let go. MotorRun stays on, held by the seal-in contact.
  4. Force StopButton to 1. The normally-closed contact opens and MotorRun turns off. Click Reset when you're done to clear every force.

Tags and data types

Tags are your program's variables. The Tags module lists them all in one table, which your ladder logic, 3D scene and gateway bindings share.

  1. Click Add Tag. A new BOOL tag is added and opened for editing.
  2. Fill in Identifier, Address, Data Type, Scope and an optional Description, then save the row.
  3. Use the scope tabs (All, Input, Output, Global …) to filter the list.

Available types include BOOL; the integer types SINT, INT, DINT, LINT and their unsigned forms; REAL and LREAL; TIME, DATE, TOD and DT; CHAR, STRING and their wide forms; and BYTE, WORD, DWORD and LWORD.

Struct types

Under Struct Types, click Add Struct, name it and use Add Member to list its fields with their types. Saved structs appear under Struct Types in every tag's data-type picker. Expand a struct-typed tag to see its members.

Simulating with the 3D Custom Floor

The I/O Devices module includes a 3D Custom Floor where you build a small virtual machine and wire it to your tags, with no hardware or extra software.

  1. Expand the Scene Viewport panel.
  2. Drag a Push Button, Proximity Sensor, LED or Cylinder Solenoid from the palette onto the floor. Click a component to select it and drag to move it. Remove it with Remove selected or Delete.
  3. In the binding list below the scene, pick a BOOL tag for each component. Only global BOOL tags can be bound.
  4. Run the scan. Holding the mouse down on a push button drives its tag TRUE, and clicking a proximity sensor toggles its tag. LEDs light and cylinders extend when their tags are TRUE.

Practising with the virtual PLC trainer

If you don't have a physical PLC trainer, you can test your ladder logic against a virtual one. It models a classroom trainer panel with a compact controller, three 16-point input cards, a 32-point LED output card and a 16-point output card for cylinders and motors. Its switches, buttons, lights, cylinders and motors are wired to the same tag names and addresses as the real trainer's I/O handout.

Add the trainer

  1. On I/O Devices, click Add AB Trainer. A project can have one trainer.
  2. The trainer's front panel opens. Every input and output on it is added to your project as a global BOOL tag, with the trainer's address (for example Local:1:I.Data.1) and a description. If you already have a tag with the same name, yours is kept.
  3. Build your rungs in Logic Studio using those tags. The trainer also appears in a collapsible dock under the ladder editor, so you can watch the rungs and the panel side by side.
  4. Click Run. Operate the panel's inputs and watch the outputs respond.

What's on the panel

TagsDevice
TS_1 – TS_10Toggle switches. Click to flip.
SS_11 – SS_16Two three-position selector switches (SS_11–13 and SS_14–16, one tag per position). Click the left or right side of the knob to turn it.
PB_1 – PB_17Push buttons, including lit buttons. Hold the mouse down to press; Shift-click to latch one pressed.
LED_1 – LED_32Indicator lights, on while their tag is TRUE.
C1_EXT_SOL, C1_RET_SOL …Cylinder solenoids. Cylinders 1–5 are double-acting (extend and return solenoids); cylinder 6 is single-acting and springs back.
C1_EXT_PRX, C1_RET_LSW …Each cylinder's extended proximity sensor and retracted limit switch, driven by the cylinder's simulated position.
MOT_1 – MOT_3, M1_LSW, M3_LSWMotors, and the cam limit switches on motors 1 and 3 that close once per turn.

Hover any device on the panel to see its tag and address. A status strip shows the controller's RUN and FORCE lights and each card's I/O indicators, like the real rack.

The trainer's analog card is shown but not simulated yet. Removing the trainer device keeps the tags it added.

Simulators and real hardware

To drive a 3D simulation scene or real equipment, the browser talks to a small Gateway agent that runs on your own computer. The agent translates between your running program and industrial protocols.

Browser IDEscan engineGateway agentws://127.0.0.1:87653D I/O simulatorModbus TCPSCADA / HMIModbus TCP · OPC UAUSB-serial deviceModbus RTUWebSocketruns on your computer
The Gateway agent bridges the browser to Modbus TCP, Modbus RTU and OPC UA.

Set up a device

  1. On I/O Devices, click Add Device, give it a name and scene, and click Add.
  2. With the Gateway agent running, click the plug button to Connect to bridge. The bridge status turns to connected.
  3. In Gateway Connection Settings, enable the adapters you need (see the table below). Text fields apply when you press Enter or click away.
  4. Under the OPC UA Server or Modbus TCP tab, click Add Binding. Choose a BOOL tag, a direction (Logic Out → Hardware In or Hardware Out → Logic In) and an OPC UA NodeId (e.g. s=MotorRun) or a Modbus coil address.
  5. Switch the top-bar engine selector to Connected hardware.
AdapterUse it for
Modbus TCP ClientPolling an outbound device such as a 3D I/O simulator. Set host, port (default 502) and poll interval.
Modbus TCP ServerLetting a SCADA or HMI read your program (default port 5020).
OPC UA ServerExposing tags to OPC UA clients (default port 4840).
USB Bridge (Modbus RTU)USB-serial hardware. Set device path (e.g. COM3 or /dev/tty.usbserial-…), baud rate, unit ID and poll interval.

Monitoring

The Hardware & Gateways module is a read-only monitoring view. It shows your devices, a Live Tag Dictionary of each device's bindings, a Live Gateway Packet Feed of traffic, and the IEC 61131-10 (PLCopen XML) Native Inspector, which shows your project's XML and any schema issues.

Keyboard shortcuts

ShortcutAction
Ctrl/⌘ + SSave the project file (File ▸ Save).
EscDeselect the ladder element or rung, or close the open dialog or drawer.
Delete / BackspaceDelete the selected rung in Logic Studio, or remove the selected component on the 3D Custom Floor.
EnterApply a Gateway Connection Settings field.

Troubleshooting

Run, Step and Reset are greyed out

The scan loads once you've opened Logic Studio. Open it, then try again.

The status bar says “schema issues”

Open the XML inspector on Hardware & Gateways to see each issue and where it is in the project.

The bridge stays on “connecting” or shows an error

Make sure the Gateway agent is running on the same computer as your browser, then click Connect to bridge again.

Still stuck?

Send us a message and tell us what you were trying to do.

Ready to try it?

Create an account and build your first rung in a few minutes.