Using a Variant Variable to Store USINT Data in a Logic Program

This example demonstrates how a Variant Variable might be used to store USINT (Unsigned Short Integer) data in a Logic program.

Example:

A Variant Variable is used as an output in a Function Block Diagram. Its value is determined by the greatest of several inputs. Both the inputs and the Variant Variable have Unsigned Short Integer (USINT) values.

The Add Direct Variable window, which is displayed when the Variant Variable is added to the Function Block Diagram, is used to specify the Variable’s settings, including the fact that its value is USINT.

Once the Logic program’s configuration is complete, the program is saved.

When the Logic program executes, the Variant’s value is determined by whichever is the greatest of four inputs:

Further Information

Working with Logic Programs: see the Geo SCADA Expert Guide to Logic.

The MAX function is one of several ‘Selection’ built-in functions that can be used in Logic programs: see Selection in the Geo SCADA Expert Guide to Logic.


Disclaimer

Geo SCADA Expert 2022