Conditions
For an introduction to the DSL vocabulary, see Core Concepts.
Everything that goes inside Rung(...). All forms can be mixed freely.
Fault tag is truthy
~Fault tag is falsy
MotorTemp > 100 comparison (== != < <= > >=)
Fault, Pump comma = implicit AND
Fault, MotorTemp > 100 implicit AND with comparison
And(Fault, Pump, Valve) explicit AND (same as commas)
Or(Low, High, Emergency) explicit OR
Or(Start, And(Auto, Ready)) nested AND inside OR
Normally open (examine-on)
Normally closed (examine-off)
Rising and falling edge
with Rung(rise(Button)): # True for ONE scan on False→True transition
latch(Motor)
with Rung(fall(Button)): # True for ONE scan on True→False transition
reset(Motor)
Multiple conditions (AND)
# Comma syntax — all must be True
with Rung(Button, ~Fault, AutoMode):
out(Motor)
# And() — explicit AND
with Rung(And(Button, ~Fault, AutoMode)):
out(Motor)
OR conditions
Nested AND/OR
Comparisons
with Rung(Step == 0):
out(InitDone)
with Rung(Temperature >= 100.0):
latch(OverTempFault)
with Rung(Counter != 5):
out(NotAtTarget)
INT truthiness
INT tags are True when non-zero:
Inline expressions
Inline expressions work in simulation. The Click dialect validator will flag them if targeting Click hardware — rewrite as calc() instructions instead.