Math (output instruction)

NEG instruction

Writes A with its sign flipped.

NEG(number, a, real)

Arguments

NameWhat it isAcceptsDefault
destinationWhat the instruction acts ona registerrequired
aSourcea number or a tag0
realFloating pointtrue or falsefalse

Arguments are positional and this table is generated from the simulator's own instruction registry, so it always matches what the engine accepts.

Related instructions

All ladder logic instructions