▥PLC BenchLogix-style ladder trainerPLC_Sim · v2
Drag to insert · Right-click to favorite
Ladder Diagram
OFFLINE EDITING Drag to insert · Double-click an operand to assign a tag · Right-click for editing options
No instruction selected

Confirm action

Preferences

Settings apply to this browser, across all projects. Preview changes here, then save or cancel.

Appearance
Ladder editor

These display options do not change program execution or Virtual I/O values. Workspace sizes and zoom can be reset from View.

Visible I/O channels

Choose which channels appear in Virtual I/O. Hidden channels still execute in the program; their tags are kept.

Inputs
Outputs

Find / Replace

Select a result to replace it or jump there; double-click a result to jump directly.

0 matches

New tag

Ladder editor quick guide

  1. Debugging tools. Right-click a tag name in Controller Tags, or an instruction operand, to cross-reference, watch, or trend it. Cross-reference results jump to readers/writers. Edit → Find/Replace (Ctrl+F/H) searches tags, instructions, and comments; validate replacements and undo them as a single edit. Watch pins up to 32 scalars/members. Trend plots up to four numeric tags on a shared automatic Y scale, samples scan time, pauses capture, and exports CSV. Pins save with the project; capture history does not. OSR/OSF in Bit use separate storage/output BOOLs and set an output pulse on rising/falling rung edges. Their block passes incoming rung power; read the pulse with XIC on a later rung. File has a step-by-step edge-counting example.
  2. Simulated HMI. The HMI docks above Virtual I/O and can float or pop out independently. Create HMI opens Design mode with an expandable component library offering 61 previewed styles (including industrial pushbuttons and rotary switches), draggable/resizable canvas objects, screen controls, tag bindings, colors, visibility bits, and embedded raster images. Existing objects can change Style in Properties; Use suggested size fills width/height, then Apply object saves it. Operate interacts with the same PLC runtime. Shift-click selects multiple objects; drag a box on empty canvas to select enclosed objects. Drag selections together, or use Properties for alignment and equal-gap distribution. Copy/Cut/Paste works across screens; each operation supports Undo. Ctrl/Command+A selects all, C/X/V copies/cuts/pastes, and Shift+arrow keys nudge 10 pixels. Alarm setup configures BOOL/analog triggers, severity, and deadband while offline. Add Alarm banner or Alarm list from the library; Alarms opens the summary. Monitoring updates on Run/Step scan. Acknowledge records operator response without clearing the condition; history stays in this session. File → Examples → HMI tank alarms demonstrates level and pump-fault alarms. Add Trend chart from the library and use Properties for up to four numeric tags, colors, units, a 5–300 second window, and automatic/fixed Y limits. Matching high/low alarm thresholds can appear as dashed lines. Pause freezes the displayed window while capture continues; Inspect sample selects historical values. Resume returns to live, and Export CSV downloads the displayed window. Trends use simulation time and collect on Run/Step scan. The HMI tank alarms example includes a Trends screen. Process → PID adds the training PID instruction. Double-click its operand to create a PID_LOOP tag, then use Setup loop for saved startup settings. Feed .PV from logic and use .CV as the actuator demand. PID faceplate in the HMI library binds to that loop for SP, Auto/Manual, manual output and live Kp/Ki/Kd tuning. File → Examples → PID heating loop includes a simulated heater, cooling disturbance and response trend. This profile uses independent gains in seconds and is not Allen-Bradley PID/PIDE compatibility. Recipes in the HMI top bar edits named profiles offline. Map BOOL/numeric tags, timer/counter PRE or PID settings; add Recipe selector from the library. Preview compares current/saved/converted values. Apply revalidates the full batch before any write and works offline or in Run. Capture current values saves the selected profile’s mapped tags under a new name while offline. Definitions save with the HMI; applying changes session runtime, not startup settings. The PID heating demo includes three profiles and a Recipes screen. Use Group/Ungroup (Ctrl/Command+G / Shift+G) to keep objects together. Layers lists objects front to back and offers names, locking, editor visibility, and stacking controls. Select a group member in Layers, then Properties, to edit its own tag. Locks protect design edits; editor hiding and locks leave runtime operation unchanged. Multiple screens, groups, and layer settings save with the project. Design requires offline mode. HMI controls write internal tags or simulated inputs; PLC outputs and timer/counter status remain read-only. Run or Step scan executes the logic. File → Examples → HMI motor station demonstrates two screens. A blocked pop-out falls back to floating; keep the main editor open.
  3. Detachable Virtual I/O. The I/O title bar offers Float (move within the editor), Pop out (a separate browser window), and Dock. Drag the floating title bar to move it and its bottom-right corner to resize. Arrow keys move the focused title bar or resize corner. Layout & appearance controls automatic or capped columns, control size, direction filters, addresses, channel settings, internal values, and help notes. Preferences and floating size/position stay in this browser. Pop-out windows share the live simulation; keep the editor open. Closing a pop-out docks it. A blocked pop-up falls back to the floating panel. Channel editing and management dialogs open in the main editor.
  4. I/O visibility and scanning. Use − on an I/O row to hide it, or Manage channels to choose visible channels. Show all restores hidden channels; Show only used selects tags referenced in the routine, including CPT expressions. Hiding does not remove tags or stop their logic. Programs open offline: inputs can change while outputs remain frozen. The I/O status shows when an offline input change needs a scan; press Run for continuous execution or Step scan once.
  5. File and preferences. New, examples, and project import use a visible in-page replacement dialog. Confirming stops Run and loads the program; Cancel keeps the current program. File → Restore previous project recovers the program replaced last. Edit → Preferences offers light/dark/system themes, comments, live operand values, logic highlighting, and Ctrl+wheel zoom. Preview changes, save to keep them, or close/Escape to cancel. Preferences stay in this browser, outside exported programs.
  6. Compare and CPT. Compare has EQU, NEQ, GRT, GEQ, LES, LEQ, and LIM. Insert these in series or branch paths; they pass power only when the numeric test is true. LIM includes both endpoints; reversed limits accept values outside the interval. CPT in Math/Scale evaluates an expression into a REAL/DINT destination. Supports +, −, *, /, **, MOD, parentheses, unary signs, ABS, SQRT, and TRUNC using existing numeric tags. Save expressions with Ctrl+Enter or leave the field, then Verify. File has tank level and temperature/CPT examples. This is a limited expression profile, not the full vendor language.
  7. Rung comments and input contacts. Click a comment above a rung, or the Rung comments tab below the ladder, to write a multiline description (500 characters). Choose a rung, then save or leave the field. Comments save with the project and can be undone. For momentary inputs, choose NO (released 0, pressed 1) or NC (released 1, pressed 0). Input switches show red for FALSE and green for TRUE, including NC at rest. Losing focus or going offline returns momentary inputs to their released state.
  8. Zoom and workspace. Use − / + or the percentage selector above the ladder (50–200%). Ctrl+wheel over the ladder zooms around the pointer; Ctrl/Command +, −, or 0 works when the ladder has focus. Drag the dividers between the organizer, routine, I/O, properties, and toolbar to resize them. Side pane title bars and the empty properties tab bar also resize their pane. Double-click a divider to reset that size, or use View → Reset workspace layout and zoom. Divider arrow keys resize in 10-pixel steps. Sizes and zoom save in this browser independently of project logic.
  9. Right-click tools. Right-click an XIC/XIO and choose Toggle Bit to invert its runtime BOOL. This works offline and in Run; logic may overwrite the value on the next scan. It is not a persistent force. Right-click any placed instruction and choose Instruction Help for operands, execution, examples, and notes; F1 opens help for the selected instruction.
  10. Math, scaling, and one shots. Math/Scale contains MOV, ADD, SUB, MUL, DIV, and SCL. Source fields accept numeric constants or REAL/DINT tags; a new source name creates REAL memory. Double-click the destination to assign or create a numeric tag. SCL is a simulator linear scaling block: input min/max → scaled min/max, with optional clamp. ONS in Bit passes one scan per rising rung condition and needs its own internal BOOL. In Virtual I/O select Discrete or Analog while offline; analog inputs have numeric/slider controls and editable ranges. Changing signal type keeps the tag name; Verify catches any incompatible existing instructions.
  11. Work offline. Choose Favorites, Bit, or Timer/Counter. Drag an instruction from the compact symbol toolbar to an insertion point. You can also select a position, then click an instruction.
  12. Assign an operand. Double-click the operand above a symbol or block. Type a new name to create a matching BOOL, TIMER, or COUNTER tag. RES uses an existing TIMER/COUNTER tag. For contacts, choose a status member such as Delay_Timer.DN.
  13. Timers and counters. TON, TOF, and RTO presets use milliseconds (2000 = 2 seconds). CTU/CTD count false-to-true transitions. RES clears the accumulator and status bits. Edit Preset on the block while offline. Expand structures in Controller Tags to monitor members. Right-click a toolbar instruction to add or remove it from Favorites.
  14. Build branches. Select a contact, the left rail, or an insertion point before a contact, then click Branch or Level to add a parallel path around it. Drag contacts into either path. Drop additional XIC/XIO instructions anywhere on the wire after the branch. Select an existing branch and click Level to add another path. To add parallel outputs, select an output coil, click Branch or Level, then drop another OTE, OTL, or OTU into the new output path.
  15. Edit. Drag existing instructions, including timers, to move them between series positions and output paths. Delete removes the selection and cleans up empty branch paths. Select an empty path and press Delete to remove it. Select a branch and use Remove branch, keep top path to unwrap it. Undo restores deleted items. Use the properties panel or right-click menu to copy, paste, change instructions or delete. Undo and redo are available.
  16. Verify and run. Run checks the routine, then locks editing. Operate the input buttons and watch the highlighted logic. Go offline to edit again.
  17. Save. Changes save in this browser. Save as exports a JSON project; Open imports it. Existing v1 files are converted automatically.
XIC —| |—True when the tag is 1
XIO —|/|—True when the tag is 0
OTE —( )—Writes the rung state every scan
OTL —(L)—Sets the tag on a true rung; false leaves it unchanged
OTU —(U)—Clears the tag on a true rung; false leaves it unchanged

Quick keys: X = XIC · F = XIO · E = OTE · L = OTL · U = OTU · R = rung · B = branch · N = branch level. Ctrl+C/X/V and Ctrl+Z/Y edit your selection.

This version supports BOOL, TIMER, and COUNTER tags, parallel output instructions, and contact branches up to five levels deep. Output paths share the incoming rung condition. Timer/counter instructions may also be inserted in series before later contacts or coils. Their rung-condition-out follows rung-condition-in; use an explicit .DN contact if later logic should wait for completion. Offline values freeze; Run clears OTE operands in a prescan, while latch, counter accumulators, and RTO accumulated values remain. Counter prescan suppresses a startup count when an input is already true. Step scan advances 20 ms; Run uses measured browser elapsed time. Clear values resets all bits. Runtime values are not saved. This is an independent trainer, not Rockwell software or an ACD/L5X editor. Online edits and edit/test/download are planned for later.

Instruction Help

Add ladder subroutine

Subroutines execute only when called by JSR. They share controller tags. Reaching the end returns automatically; RET allows an early return.

Analog channel configuration

The electrical range maps linearly to the engineering range. Ladder logic reads or writes engineering values. Virtual I/O supplies the electrical input and displays the equivalent output signal.

Ideal signal simulation. 4–20 mA is a scaling span within the current range. Out-of-range output signals saturate at the configured endpoints; the ladder tag retains its computed value.

New data type

Member nameData typeDefault valueDescription

New Add-On Instruction

Define scalar Input, Output and private Local values. EnableIn/EnableOut are automatic. Existing names/types/usage stay fixed; add fields or create a new definition for a new interface.

NameUsageTypeDefaultDescription

Feedback / Report a bug

Found a problem or have an idea? Send it directly to the PLC Bench developer.