Toggle

Returns the toggled value from the contents of numValue tag.

Function Group Execution Windows Embedded Thin Client
Toggle Logical Synchronous Supported Supported Supported

Syntax

Toggle( numValue )
numValue
Boolean tag containing the value to be toggled.

Returned value

Numerical result (0 or 1) of the value to be toggled.

Notes

This function does not actually change the value of the tag, but it can be used in a command or operation that does.

Examples

Tag Name Expression
Tag Toggle( MyBoolTag ) // Returned value = 1 if MyBoolTag value equals 0, or 0 if MyBoolTag value equals 1
Tag Toggle( numValue ) // Returned value = toggled value of the number in the numValue tag