TRISTATE Property
PLBCMP GUI Only
The TRISTATE property defines an object's ability to have a third grayed state. The property uses the following format:
TRISTATE[={value}]
Note the following:
TRISTATE may be used in CREATE, SETPROP, or GETPROP statements of CHECKBOX and CHECKGRP objects.
The state of the object may be ON, OFF or NEITHER.
When the TRISTATE property is specified, a GETITEM returns a zero (0) for OFF, a one (1) for ON, or a two (2) for NEITHER.
When the TRISTATE property is disabled, the object only has two states of OFF or ON.
The same values as returned by GETITEM may be used in a SETITEM instruction to set it ON, OFF or NEITHER.
If the TRISTATE property is specified without an assignment, the action is the same as if TRISTATE=1 were given.
{value} is a decimal number, a Numeric Variable, an Expression, or a keyword as defined in PLBEQU.INC. The supported values and keywords are:
|
Value |
Keyword |
The third state is ... |
|
0 |
$OFF |
disabled. (default) |
|
1 |
$ON |
enabled. |
|
2 |
$AIUTOTRISTATE |
enabled in auto mode. (9.7A) |
This property is not supported when using the PL/B Web Server
When the AUTO TRISTATE mode is being used, the CHECKBOX object is set to a style which causes the Windows to automatically change that CHECKBOX states to 'checked', 'indeterminate', and 'unchecked' by user click actions. This automatic state change by the Windows always occurs and is reflected before any PLB user event is executed. Therefore, the PLB user program does not have to track and change the CHECKBOX states.
See Also: Object Properties, Object IO Instructions, Object Definitions
![]() |