< Back to blog

PLC Controller Programming: Ladder, Simulink, Node-RED and C

Published on: November 23rd, 2026  ·  Author: Jaap Terhaard

PLC controller programming skills carry over from ladder logic, FBD, Structured Text and SFC to Moduline development, but the programs do not transfer unchanged. GOcontroll Moduline does not run ladder logic or an IEC 61131-3 runtime; its alternative workflows include MATLAB Simulink, Node-RED and C.

PLC programming languages: what carries over?

For engineers comparing IEC 61131-3 programming with embedded development, the useful question is which engineering habits transfer—not which diagrams look similar. The IEC 61131-3:2025 standard is the standards reference; the comparison here maps workflows rather than claiming language compatibility.

Ladder logic uses contacts to test conditions and coils to represent Boolean results. Contacts in series express AND; parallel branches express OR. This relay-style notation makes simple switching conditions visible, but a familiar-looking diagram does not establish identical behavior on another target.

PLC controller programming: the language map

These are conceptual counterparts, not automatic translation routes. The Node-RED entries refer to the documented workflow on Moduline Linux controllers.

PLC language or notationClosest Moduline workflowWhat carries overWhat must change or be checked
Ladder Diagram (LD)MATLAB Simulink blocks or Node-RED flowsBreaking conditions into visible logic pathsContacts and coils become a different implementation; execution behavior needs validation
Function Block Diagram (FBD)MATLAB Simulink blocks; Node-RED flows where appropriateDecomposing an application into connected functionsBlock definitions, connections and execution behavior
Structured Text (ST)CText-based conditions, calculations and structured logicSyntax, interfaces, target settings and build process
Sequential Function Chart (SFC)Stateflow within the Simulink workflowThinking in states, transitions and sequencesChart implementation and sequence behavior

The practical distinction is between transferring a control concept and transferring executable software. A sequence can remain recognizable while its implementation, hardware mapping and tests change.

Model-based development on Moduline

The documented MATLAB Simulink workflow for GOcontroll Moduline M1, GOcontroll Moduline L4 and GOcontroll Moduline HMI1 has three defining parameters:

  • Operating system: Linux.
  • Model starting point: the GOcontroll Linux template.
  • Build route: Embedded Coder.

The required toolchain comprises MATLAB Simulink, MATLAB Coder, Simulink Coder, Embedded Coder, Stateflow and the GOcontroll Simulink Toolbox. This supports model reuse, simulation and code generation, rather than execution of an existing ladder program.

Simulation predicts modeled behavior. Agreement with the physical machine depends on the mechanical and electrical models and on hardware validation; a successful simulation does not replace testing the configured controller.

Node-RED: graphical programming without ladder

GOcontroll Node-RED nodes interface with Moduline hardware. A documented starting flow connects a module node to a debug node, showing acquired input data at the selected sample time. The Node-RED programmable industrial controller article introduces this graphical development route.

On GOcontroll Moduline L4, Node-RED can read Simulink signals and write exposed parameters. Persistent saving and uninterrupted application behavior require implementation and testing.

Do not use Moduline modules in Node-RED and Simulink at the same time. Sharing exposed Simulink signals and parameters is different from giving both environments access to the modules.

C: reuse logic, then rebuild and test

The Moduline Linux controllers support C. GOcontroll Moduline S1 runs FreeRTOS and also supports C and MATLAB Simulink. Choosing C therefore provides a text-based route across both operating-system families, but it does not make compiled applications interchangeable.

Control logic can be reused across suitable Moduline configurations. Check hardware-specific mappings and target settings, then rebuild and test the application for the selected configuration.

AI illustration of a wired actuator and push buttons on a machine-control validation bench.

Language choice is only one selection criterion. The Moduline versus standard PLC comparison and ECU–PLC comparison address the wider controller decision.

Frequently asked questions

What is ladder logic?

Ladder logic is a graphical way to express control conditions using contacts, coils and connected rungs. Its relay-style structure represents Boolean conditions and their results.

How to read a PLC ladder diagram?

Follow each rung from left to right. Identify the contact conditions, trace series and parallel paths, and determine the resulting coil state. Then check rung order and any state retained between evaluations.

Is ladder logic difficult?

Basic contact-and-coil logic is a practical starting point for engineers familiar with relay circuits. Interacting conditions and sequences require more careful tracing; switching to another graphical tool does not remove the need to test behavior.

Key takeaways

  • Moduline does not execute ladder logic or provide an IEC 61131-3 runtime.
  • Simulink, Node-RED, Stateflow and C offer conceptual counterparts—not identical language semantics.
  • The documented Linux-controller Simulink workflow starts from the GOcontroll Linux template and builds through Embedded Coder.
  • Reused logic still requires hardware mapping checks, rebuilding and testing; do not access modules from Node-RED and Simulink simultaneously.

Latest blog