Virtual PLCs / Documents / LADV-CS

Statement · LADV-CS

IEC 61131-3 compliance statement

Which parts of IEC 61131-3 Structured Text LADV implements, and the implementation-dependent parameters: overflow, rounding, time, tasks, restarts and limits.

Download PDFDownload WordRevision 1.0, 1 November 2026

The parts of IEC 61131-3 the LADV Structured Text compiler and runtime implement, and the values of the parameters the standard leaves to the implementer.

DocumentIEC 61131-3 compliance statement
CodeLADV-CS
Revision1.0, 1 November 2026
FirmwareV1.0.0
Issued byWartens, makers of LADX

This is a statement by Wartens of what LADV implements. It is not a certification by PLCopen or by any test body.

1. Languages

LanguageStatus
Structured Text (ST)Implemented, as described below
Ladder Diagram (LD)The LADX ladder dialect: contacts, coils, latches, one-shots, timers, counters, compares, math, JSR
Function Block Diagram (FBD)Not implemented
Sequential Function Chart (SFC)Not implemented
Instruction List (IL)Not implemented; deprecated in the third edition

2. Structured Text features

FeatureStatus
Elementary types: BOOL, SINT to ULINT, BYTE to LWORD, REAL, LREAL, TIME, LTIME, DATE, TOD, DT, STRING, WSTRING, CHAR, WCHARImplemented
Typed, based and duration literalsImplemented
Enumerations, subranges, arrays (multi-dimensional), structures, nested initialisationImplemented
Variable sections VAR, VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR_TEMP, VAR_GLOBALImplemented
RETAIN, NON_RETAIN, CONSTANT, AT with direct addressesImplemented
FUNCTION, FUNCTION_BLOCK, PROGRAM; formal and informal calls; output assignment with =>Implemented
IF, CASE with lists and ranges, FOR, WHILE, REPEAT, EXIT, CONTINUE, RETURNImplemented
Bit access, x.3Implemented
CONFIGURATION, RESOURCE, TASK with INTERVAL, SINGLE and PRIORITY; PROGRAM WITHImplemented
Standard functions and function blocksImplemented; listed in LADV-IR-ST
Classes, methods, interfaces, propertiesNot implemented
REF_TO and dereferencingNot implemented
NamespacesNot implemented
Actions and SFC elements in ST sourceNot implemented

3. Implementation-dependent parameters

ParameterLADV
Maximum identifier length64 characters, case-insensitive
Default and maximum STRING length80 characters by default, STRING[n] up to 1024
Integer overflowWraps, two's complement, at the width of the type (INT 32767 + 1 = -32768)
LINT, ULINT and LWORD rangeExact to 53 bits (plus or minus 9,007,199,254,740,991), saturating beyond
REAL and LREALIEC 60559 single and double precision
REAL to integer conversionRounds half to even (IEC 60559 default); TRUNC truncates
Integer divisionTruncates toward zero; MOD takes the sign of the dividend
Integer division by zeroFaults the controller with code F310 and the line number; outputs go off
REAL division by zeroGives infinity or NaN as IEC 60559 defines; no fault
Array index out of rangeFaults the controller with code F311 and the line number
TIME and LTIMETIME: signed 32-bit milliseconds. LTIME: milliseconds with fractions to 1 ns
DATE, TOD, DTMilliseconds since 1970-01-01 (UTC); TOD to 1 ms
Timer resolutionThe interval of the task that calls the timer
Task schedulingNon-preemptive. At each tick the due tasks run in priority order (0 is highest), then declaration order
Default taskOne cyclic task at the program's scan time, 100 ms unless set
Warm restart (STOP to RUN)RETAIN variables keep their values on retentive CPUs; all others take their initial values
Cold restartEvery variable, RETAIN included, takes its initial value
WatchdogA tick that takes longer than the CPU's watchdog time faults the controller (F300)
Loop protectionChecked against the watchdog every 1,024 statements, so an endless loop faults rather than hangs
Maximum array size65,536 elements
Direct addresses%IXb.n and %QXb.n are digital channel 8b+n; %IWn and %QWn are analog channel n; %M is internal memory
Analog range0 to 1000 is 0.0 to 100.0 percent across the LADV line

4. Checks at compile time

Undeclared names, with the nearest declared name suggested; type mismatches, with the conversion to use; literals out of range for their type; assignments to constants and inputs; unknown functions and block inputs; recursion; EXIT and CONTINUE outside a loop; two variables at one address.