CheckBox

CheckBox

A Check Box is a control object used to both display and modify the On (True) or Off (False) state of a Boolean tag.

Unlike buttons, Check Boxes represent a persistent state. When an operator checks this box, it remains checked unless specified otherwise or clicked again by the operator.

Common Use Cases
  • Mode Selection: Activating or deactivating an “Auto Mode” option.
  • Permissions: Setting a security bit like “Allow Maintenance Mode”.
  • Visibility: Toggling whether a panel on the screen is “Visible” or not.
  • Status Indicator: Showing if a device is “Running” (checked) or “Stopped” (unchecked).
Basic Configuration and Operation

The primary function of the CheckBox is established by connecting it to the Tag property located under the Value category in the Properties panel.

  1. Text Setting: The Text property is the label indicating the purpose of the checkbox (e.g., “Filter Active”).
  2. Tag Binding: The Value -> Tag property connects to a BOOL tag that the control will read from and write to.

Properties Panel – Key Properties

Value
  • Tag
    • Function: This is a two-way link connecting the control’s state (Checked / Unchecked) to a BOOL tag.
    • Read (PLC -> Screen): If the connected tag is set to True by the PLC, the CheckBox automatically becomes checked on the screen. If set to False, it unchecks.
    • Write (Screen -> PLC): If the operator clicks the CheckBox to check (or uncheck) it, the value of the connected tag is instantly updated to True (or False).

Advanced Panel – Key Properties

  • Appearance
    • This is perhaps the most important “Advanced” property of the CheckBox.
    • Normal: The default setting. Displays a square box with text next to it.
    • Button: This setting completely changes the appearance of the CheckBox. It no longer looks like a checkbox but acts like a toggle (sticky) button that appears “pressed” or “depressed” when active. This is very useful for creating On/Off switches like “Auto Mode”.
  • CheckAlign
    • Determines where the check mark (box part) sits relative to the Text. For example, you can position it to the right of the text (MiddleRight) or the left (MiddleLeft – default).

Usage Examples

Example 1: Standard Two-Way Property Binding

Used to toggle a system setting on and off.

  1. Go to the Properties panel of the Check Box object on the screen.
  2. Click the empty cell to the right of the Tag row under the Value property.
  3. Select and connect the BOOL tag you want to control.
  4. Change the Text property to “Enable”.

Result: When the operator selects the box, the tag becomes True. If the PLC or another script sets this tag to False, the check mark in the box is automatically removed.

Example 2: “Read-Only” Status Indicator

A Check Box that the operator cannot change, used only to display a status (e.g., “System Ready” bit).

  1. Connect the Value property to the System_Ready_Bit tag as in Example 1.
  2. Go to the Properties -> Enable section.
  3. Set the Default value to False. (Or add a condition via + New and select False as the value).

Result: The Check Box will be checked or unchecked based on the System_Ready_Bit tag, but since Enable = False, the operator cannot change this state by clicking on it.

Example 3: Triggering an Action When Checked

Running a confirmation script simultaneously when the user checks “Emergency Mode”.

  1. Connect the Value property to the Emergency_Mode_Active tag (see Example 1).
  2. Go to the Properties -> Events section.
  3. Click the empty cell next to the Mouse Down event.
  4. Select the Script function from the Function Dialog.
  5. Select the script you want to run (e.g., “EmergencyModeLogScript”).

Result: When the operator clicks the box, the state of the Emergency_Mode_Active tag changes, and the “EmergencyModeLogScript” runs simultaneously.

Leave a Reply