Skip to main content
Skip table of contents

GP Logic

GP Logic blocks allow a pin to be controlled directly by the combination of up to 4 input parameters, according to an Expression and the resulting Status value. The expression has a 40-character limit.

  • If no pin is selected (Output Pin is set to None), then the Status of the GP Logic block may be used in other GP Logic, GP Function or Math Blocks to create more complex functions.

The standard "Math Block Expression Syntax" as found in the Link G4x, is used to connect the parameters. For example:

  • a results in logic parameter A being returned in the Status output

  • a&b results in the combination of logic parameters A AND B being returned in the Status output

  • a|b results in the combination of logic parameters A OR B being returned in the Status output

  • a&!b results in the combination of logic parameters A AND (NOT B) being returned in the Status output

  • (a&b)|(c&d) results in the combination of logic parameters (A AND B) OR (C AND D) being returned in the Status output

GP Logic Configuration

Output Pin

Choose which pin to control. If not set, the GP Logic block may be used via its Status output.

Status

Shows the Status of the Expression

Expression

An Expression Math Block Expression Syntax. The value of parameters below may be referenced via the variables a, b, c and d

Parameter A

Evaluates the selected parameter, operator and value, resulting in a True/False value stored in variable a

Parameter B

Evaluates the selected parameter, operator and value, resulting in a True/False value stored in variable b

Parameter C

Evaluates the selected parameter, operator and value, resulting in a True/False value stored in variable c

Parameter D

Evaluates the selected parameter, operator and value, resulting in a True/False value stored in variable d

GP Logic Editor

Any GP Logic Expression can be edited directly using the expression box or by using this text-based editor.

The editor can be opened by clicking the button to the left of the Expression input listed above.

Expression

A Logic Block Expression Syntax. The value of parameters below may be referenced via the variables a, b, c and d. Uses the same logical syntax as a Math Block.

+

Add a new operator after the selected location

-

Remove the selected operator from the expression

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.