IMDHMIControls LibraryShop main store

Explainer

How SoapBox Snap runs ladder logic with USB I/O

PLC programming Published 6 min read

Short answer

SoapBox Snap is a GPL-v3 Windows application that edits and executes ladder logic on the PC. It has no I/O of its own: every physical channel comes from a loaded driver, and the described release documents two — Phidgets USB devices and a Twitter web service. Commission the device path first with no load connected, and keep machine safety hardwired.

On this page
  1. What you are actually running
  2. Every channel is a driver
  3. Commission the device before the rung
  4. What the Arduino report proves, and what it does not
  5. Where the timing breaks
  6. When to use something else
  7. Questions asked

SoapBox Snap runs ladder logic on a Windows PC and reaches physical I/O only through a driver layer. The release its author announced documents two drivers — Phidgets USB I/O devices and a Twitter web service — and every other device needs an add-in you write or obtain. The name expands to "Snap is Not a PLC", and that is the honest engineering summary: no onboard I/O, no documented scan guarantee, and no safety assessment anywhere in the stack. Treat it as a soft-logic workbench for bench and hobby automation: commission the device path before any load connects, and keep hardwired interlocks around anything that moves or heats.

What you are actually running #

SoapBox Snap is a Windows application built on the .NET framework: a ladder editor plus a runtime that executes the logic you write. The original demonstration shows ladder logic executing in the runtime and driving an output on a Phidgets board. The application is released under GPL version 3. The communication and file-format module, SoapBox Protocol, is dual-licensed under GPL and CDDL and uses XML for data representation and SSL for communications, so a proprietary product could speak its protocol while the editor itself cannot be made proprietary.

The stated direction matters as much as the license. The author built it for hobbyists who want a little automation without being traditional programmers, and the stated goal is inexpensive off-the-shelf PC peripherals and web services rather than industrial fieldbus. The architecture is pluggable — instructions, runtimes, language modules and drivers — which is a development capability, not a list of supported devices.

Every channel is a driver #

There is no I/O terminal block. An input travels device, USB, driver, runtime, rung, and an output command makes the reverse trip. A device can be physically connected and visible to Windows and still be unusable, because the matching add-in is missing or configured for the wrong interface. Before selecting hardware, work from the documented paths:

Path Status in the described release Decision
Phidgets USB I/O Driver included Check your exact device against the driver's supported hardware
Twitter web service Driver included Service integration, not field I/O
Arduino Mega 2560 R3 Public report of a working setup; driver and firmware not identified Reproduce device-first before trusting it
Arduino with Firmata Suggested general-purpose I/O protocol Integration proposal, not a shipped driver
Modbus/TCP Described as possible future support No documented driver
Modbus RTU Suggested route to serial I/O modules No documented driver

Modbus deserves its own sentence because it decides purchases: Modbus/TCP was answered as something the author could see supporting one day, and Modbus RTU was suggested by a reader with inexpensive serial modules in mind. Neither is a driver in the described release, so buying Modbus hardware against this software is a mistake.

Commission the device before the rung #

Bring the path up lowest layer first:

  1. Install from the publisher's legitimate distribution channel, and match the Windows and .NET versions the build documents.
  2. Connect the I/O device alone, with a harmless test signal on the input and a bench indicator on the output, and confirm the host sees it with the device maker's own diagnostic.
  3. Open the editor, write a two-rung test, and confirm the runtime executes it and the project survives a save-and-reopen cycle.
  4. Map exactly one input and one output through the driver — the same discipline as mapping physical I/O channels in CODESYS V3.5 — and record each channel's name, direction and electrical meaning. Toggle the input and watch the runtime value; command the output and watch the indicator.
  5. Only then wire a real load, protected by hardware that does not depend on the PC.

Emergency stops, guards and protective stops stay hardwired with their own contactors: nothing in this stack is assessed for functional safety, and with no documented output fault behavior you assume the outputs hold their last commanded state if the application or the USB link stops.

What the Arduino report proves, and what it does not #

A public build report describes an Arduino Mega 2560 R3 with an 8-relay output card used as the controller for an RF amplifier: blinking outputs, a PWM output and analog voltage measurement, all working. The report does not identify the driver or the board firmware, so it proves that someone made that path work once, not that the path is supported. If you reproduce it, expect to spend your effort on the driver side, not the ladder side — the editor and runtime are the stable half of the pair.

Where the timing breaks #

Logic on a general-purpose operating system, with USB between the rung and the world, has no scan guarantee worth the name. The numbers below are illustrative inputs, not measurements; your own numbers come from your driver and your PC.

Worked example: assume the driver refreshes input states every 20 ms and the ladder scan repeats every 5 ms.

  • Worst-case latency from a contact closing to a rung evaluating it true: 20 ms for one refresh plus 5 ms for one scan equals 25 ms.
  • A 30 ms pulse is always caught. The longest possible gap between refreshes is 20 ms, and 30 ms is greater than 20 ms, so at least one refresh lands inside the pulse — but the rung then sees it true for one or two refresh periods, an apparent on-time of 20 ms to 40 ms instead of the real 30 ms.
  • A 15 ms pulse can vanish. 15 ms is less than 20 ms, so it can fall entirely between two refreshes and never appear.

The decisions from those inputs: any event shorter than one refresh period may never appear, and any output that must react within a hard few milliseconds does not belong on this path. Measure your real numbers by driving a spare output from a test rung and scoping the input-to-output delay, and give fast events a hardware counter in the device or a PLC input card.

The other hazard is not arithmetic. Operating-system updates, sleep settings and application crashes stop the control path, and whatever must stop when the PC stops needs its own hardware means of removing energy.

When to use something else #

If the goal is standard IEC 61131-3 languages on commodity hardware, OpenPLC is a free, open-source IDE for Windows, macOS, Linux and the browser that programs in Ladder, ST, FBD and IL; it is the closer tool when the target is conventional control rather than PC-peripheral integration. Executing control logic on a PC rather than a dedicated controller is also the idea behind connecting Factory I/O to a local CODESYS soft PLC over OPC UA, and the same rule holds there: prove the runtime and the I/O path separately before trusting either. For repeatable machine control, deterministic I/O or anything safety-related, use a certified PLC. Where a PC genuinely belongs — beside the controller as a gateway, historian or SCADA client — an industrial mini PC is the class of host that fits that job.

Questions asked

Is SoapBox Snap an actual PLC?

No, and the name says so: it stands for Snap is Not a PLC. It is a Windows ladder logic editor and runtime with no I/O of its own, and every physical channel arrives through a loaded driver. Use it for bench and hobby automation, not as a substitute for a certified controller on machinery.

Which physical I/O can it use out of the box?

The announced release documents two drivers: Phidgets USB I/O devices and a Twitter web service. Anything else, including Modbus or an Arduino, requires an add-in you write or obtain separately. The add-in architecture makes extension possible; it does not make any additional device supported.

Can it control an Arduino?

One public report describes an Arduino Mega 2560 R3 with an 8-relay output card running blinking outputs, a PWM output and analog voltage measurement, but it does not identify the driver or firmware used. Firmata has been suggested as a general-purpose I/O protocol for Arduino; treat that as an integration proposal, not a shipped driver. Before wiring any load, verify which add-in your copy actually loads and toggle each relay from a test rung with the outputs disconnected.

Does SoapBox Snap speak Modbus?

Not in the described release. Modbus/TCP was described by the author as something he could see supporting one day because drivers plug in easily, and Modbus RTU was suggested by a reader as a route to serial I/O modules. Neither is a documented driver, so do not select Modbus hardware expecting it to work.

Can safety functions run in this software?

No. Nothing in a general-purpose PC running soft logic over USB is assessed for functional safety, and there is no documented output fault behavior if the application or link stops, so assume outputs hold their last commanded state. Emergency stops, guards and protective stops stay hardwired, with their own contactors and overloads.

Keep reading

  • Explainer

    How Q series PLC addressing works for I/O and analog modules

    A Q series point's address comes from the I/O assignment: 16-point hex blocks numbered in mounting order through one sequence shared by X and Y, so two 32-point input cards then two output cards land at X0000, X0020, Y0040 and Y0060. Analog values never appear in X/Y space; they sit in the module's buffer memory, read with FROM or TO through a head number equal to the Start XY with its last hex digit dropped.

    PLC programming

  • How-to

    How to learn Siemens ladder logic programming step by step

    Learn Siemens ladder logic as two skills, not one tutorial: read LAD contacts, coils and boxes through the PLC scan cycle, and turn the controlled process into an I/O list plus a stopped, running and faulted operating table before writing networks. Practice each skill one instruction at a time in a simulator or on an isolated training PLC, with manuals for the exact controller and STEP 7 you run.

    PLC programming

  • How-to

    How to program a sealed motor starter rung in STEP 7 ladder

    Program the rung as Q0.0 = I0.1 AND I0.2 AND (I0.0 OR Q0.0): Start I0.0 in parallel with a seal-in contact on the output, Stop I0.1 and overload I0.2 in series, both normally closed field contacts sitting at logic 1. The seal-in contact holds Q0.0 on from the scan after Start is released; pressing Stop drops I0.1 to 0 and de-energizes the coil.

    PLC programming