Repository navigation
v0.4.0
User-defined functions and function blocks in projects with several POUs, with VAR_IN_OUT, VAR_TEMP, CONSTANT and timers and counters that adapt to their preset type. Contains breaking changes to accepted Structured Text; see Changed.
Added
-
Motor starters example with two independent instances of a user-defined
function block, nested TON start delays, a shared interlock function,
START/STOP and overload controls, status lamps and virtual-time traces. -
Overloaded
TON,TOF,TP,CTU,CTDandCTUDselect timer/counter
variants from typedPT/PVbindings in their declaring POU, including user
function blocks. Monitor rows and editor hovers show resolved types; PLCopen XML
preserves the declared names and selects again on open. Failed selection reports
the incompatible preset types without misleading default-variant narrowing errors. -
VAR CONSTANTin programs, functions and function blocks: typed compile-time
values with default initializers, earlier-constant references and wrapping
arithmetic. Constants work in initializers, CASE labels, bit indices and FOR
bounds/step, with no runtime storage or monitor entries; writes are rejected. -
PLCopen XML constant sections, including canonical imports and initializer
validation in the context of earlier constants in each POU. -
VAR_IN_OUTparameters on functions and function blocks, passed as exact-type
caller variable aliases on every formal call. Writes are visible immediately,
aliases can be passed on, and monitoring and forces use the actual variable's ID.
In-out declaration initializers are rejected because values belong to the caller. -
Save and open in-out sections as PLCopen XML
inOutVars, including canonical
imports without preserved source. -
User-defined function blocks with independent persistent instances, nested user
and standard blocks, per-call VAR_TEMP, and PROGRAM VAR_TEMP per scan. -
Named
=>output bindings on user and standard function block calls, with
implicit assignment widening. -
Dotted monitor members with writes and forces, instance paths in runtime faults,
and PROGRAM inline output values for user function block calls. -
Add function blocks from the POU list and preserve block POUs, nested instances
and temporary sections in PLCopen XML. -
Manage project POUs beside the ST editor: add and delete functions, switch texts,
navigate project-wide diagnostics, and preserve all drafts in browser autosave
with migration from 0.3.0 single-program work. -
Save and open an ordered collection of programs and functions in PLCopen TC6
XML, preserving each POU's exact editor text, input/output declarations and
optional function result type. Existing 0.3.0 project files remain readable. -
Save and reopen parseable projects with semantic errors, including missing
functions, duplicate names and zero or several programs. Initializer range
errors still block exchange. The web editor retains the other imported POUs. -
Compile a project from several POU sources with user-defined functions, formal
input defaults, output bindings, nested calls and fresh local storage per call.
The web editor shows one POU at a time. -
Compiler and runtime diagnostics identify the source POU; the editor displays
that name alongside the location. -
ADR 0014 documents the accepted design for user-defined POUs, calls, instance
memory, project exchange and monitoring for Milestone 4.
Changed
- POU names share a case-insensitive namespace with standard functions, function
blocks and elementary types. Variables cannot reuse a POU name, including the
PROGRAM name. PROGRAM parameters and function recursion are compile errors.
Fixed
- Saving imported PLCopen projects stamps the company, product name and version
together as benchtop-plc's writer identity and removes imported company URLs and
product release strings. Creation time, content description and the content
header are preserved. A foreign product name or company URL is no longer paired
with benchtop-plc's version.