Skip to content

Object ‐ StatusBar

fabienfors edited this page Jun 23, 2025 · 5 revisions

Description of object

The StatusBar object is designed to enhance the monitoring and diagnostic capabilities of machines using the OMAC PackML state model. It offers a centralized way to interpret machine states, display contextual information, and support interface elements such as HMI displays or remote dashboards.

This object is structured into three sub-blocks:

  • StatusBar_Command defines visual and interactive properties such as color.
  • StatusBar_Status manages textual and contextual information to be displayed.
  • StatusBar_Exchange coordinates message priority and state-related classification.

Subcomponents:

- StatusBar_Command

Handles the visual output and interaction commands for the status bar.

  • Color: eColor – Selects the color to represent the current status visually (e.g., green for “Running”, red for “Error”).

- StatusBar_Status

Carries the contextual and actionable data to be shown on the HMI.

  • RessourceName: STRING[50] – The main display string shown to the operator (ex: “Machine prête”, “Arrêt d’urgence”).

  • OrderWaiting: BOOL – Indicates whether a command is pending for this status. This flag allows queuing or prioritizing additional messages without immediately overwriting higher-ranked statuses.

- StatusBar_Exchange

Ensures clean arbitration between multiple status updates through prioritization.

  • Rank: USINT – Current priority level of the status message. Lower values represent higher priority (e.g., 0 = critical error, 255 = minor notice).

  • Value: eStatusBar – Enum defining the specific detailed machine state (e.g., MaintenanceMode, WaitingForProduct, ErrorEStop), allowing more granularity than the generic PackML state.

Key Features:

  • 🧠 Priority-based update logic: The Rank field prevents low-priority messages from overwriting higher-priority ones, ensuring critical messages persist on screen.

  • 🎨 Visual signaling: Through Color, the system can represent states in a user-friendly and intuitive way on HMIs (green = OK, yellow = warning, red = error).

  • 🧾 Dynamic message switching: OrderWaiting enables temporary queuing of messages for user interaction or system feedback without disrupting the status flow.

The StatusBar structure allows a flexible, clear, and maintainable representation of machine state information in industrial systems. Combined with the PackML logic, it improves operator awareness, ensures correct priority messaging, and supports clean HMI design.

Structure

General structure

STATUSBAR  
├── Cmd (OBJ\STATUSBAR_Command)  
│    ├── Color (OBJ\eColor)        - Selects the color to represent the current status visually
├── Sta (OBJ\STATUSBAR_Status)  
│    ├── RessourceName (STRING)    - The main display string shown to the operator
│    ├── OrderWaiting (BOOL)       - Indicates whether a command is pending for this status.
└── Xch (OBJ\STATUSBAR_Exchange)  
     ├── Rank (USINT)              - Current priority level of the status message. 
     ├── Value (eStatusBar)        -  Enum defining the specific detailed machine state

Precautions for Correct Use

To ensure proper operation and durability of the STATUSBAR system, follow these precautions:

  • Only one configuration block should be instantiated per Statusbar.
  • Ensure the correct rank when using StatusBar_Request.
  • When you add a specific state, you will need to add it on the eNum Table.

IAG

Insert image of available IAGs here

Function and Function Blocks (FB)

Function Block Category Description
StatusBar_Config Configuration Configures the statusbar, convert the eNum into a ressource string.
StatusBar_Manager Manager Manage the state of the machine.
StatusBar_Request Request Add a state to the machine with a rank in parameter

StatusBar_Config

The StatusBar_Config logic is responsible for converting an internal enumerated machine state (eStatusBar) into a localized HMI display string. It ensures that the resource name shown on the HMI reflects the most up-to-date status, while avoiding unnecessary updates.

Variables

Name In/Out Data Type Initial Value Comment
ENO Output BOOL False Config used
MyStatusBar In/Out OBJ\STATUSBAR - Object
Enabled Input BOOL False Statusbar is used

Function

  • Change Detection: The current machine status value (Xch.Value) is compared to a backup (BackUpValue). This ensures the string is only regenerated when the status has actually changed, preventing redundant HMI updates.

  • 🔤 Dynamic Text Binding: If a change is detected, the code dynamically assembles the HMI string tag by concatenating a prefix (LE_StatusBar_Txt_) with the numeric value of the enum (eStatusBar). For example, if Xch.Value = eStatusBar.Warning, and EnumToNum(eStatusBar.Warning) = 4, then the final string would be: LE_StatusBar_Txt_4.

  • 💾 State Memory: The new value is stored in BackUpValue for future comparisons, maintaining consistency across cycles.

Precautions for Correct Use

  • Ensure that only one instance of StatusBar_Config is used per vibrator.

StatusBar_Manager

The StatusBar_Manager block is responsible for managing and updating the current status displayed on the status bar, based on priority, status codes, and color configuration. It allows multiple calls (requests) to be made and ensures only the most important status is kept and shown to the HMI.

Variables

Name In/Out Data Type Comment
ENO Output BOOL Block executed successfully
MyGeneral In/Out GENERAL Reference to the Genaral Machine
MyStatusBar In/Out OBJ\STATUSBAR Reference to the StatusBar object
Enabled Input BOOL Enable or disable the buzzer

Function

Each call to the StatusBar_Request block represents a request to raise a particular status with an associated rank and color.

Precautions for Correct Use

  • Ensure that only one instance of StatusBar_Manager is used per vibrator.
  • Only requests with higher priority (lower rank number) than the current one will overwrite the active status.

StatusBar_Request

The StatusBar_Request block is used to raise a specific machine status notification to the shared StatusBar structure. It handles priority-based filtering, status updates, and optional sound/color effects.

This block can be called by multiple conditions (e.g., emergency, safety, air fault), and only the highest-priority active status is kept.

Variables

Name In/Out Data Type Initial Value Comment
ENO Output BOOL False Config used
MyStatusBar In/Out OBJ\STATUSBAR - Object
Active Input BOOL False Request is added is used
eNum Input OBJ\eStatusBar - Enumaraton
Rank Input USINT - Rank order
Color Input OBJ\eColor - Color of the IAG

Function

The StatusBar_Request block is used to send a new message request to the status bar system with a defined priority, color, and enumeration value.

When the input Active is TRUE, the block compares the input Rank with the current priority in MyStatusBar.Xch.Rank. If the new rank is higher priority (numerically lower or equal), the request is accepted.

If accepted:

  • The block sets the new rank into MyStatusBar.Xch.Rank.
  • It updates the Xch.Value field with the requested eNum.
  • It updates the Cmd.Color field with the requested Color.

Once Active goes FALSE, the request is considered finished, and the internal Rank is reset to 255, allowing new requests to take over the status bar.

Precautions for Correct Use

  • The rank system ensures critical faults override minor warnings.
  • Use one instance of StatusBar_Request per status condition for clarity and reuse.
  • Ensure all status requests write to the same StatusBar instance, so priorities are respected globally.

Sample

Enum Description
LE_SB_0 PLC not running
LE_SB_3 Starting
LE_SB_4 Ready to start
LE_SB_5 Pause - Intervention not possible
LE_SB_6 Running
LE_SB_7 In the process of stopping
LE_SB_10 Preparing to be helded
LE_SB_11 Held - Intervention possible
LE_SB_12 Exiting held - will start soon
LE_SB_13 Preparing to be paused
LE_SB_14 Exiting pause - will start soon
LE_SB_15 Resetting
LE_SB_16 Finishing the job
LE_SB_17 Job finished
LE_SB_22 Emergency State, no air in the machine
LE_SB_23 Safety need to be reset
LE_SB_24 Machine not selected - Click on the button top left
LE_SB_25 Stopped, door(s) open, can't initialize
LE_SB_26 Stopped, initialization possible
LE_SB_27 Stopped, door(s) open, pneumatic deactivated, can't initialize
LE_SB_28 Stopped, door(s) open, no air and pneumatic activated, can't initialize
LE_SB_29 Ready to start, first 20 clips will be skipped to analyze the next 20
LE_SB_30 Ready to start when door closed or bypass activated
LE_SB_31 Running in semi-automatic
LE_SB_32 Running in semi-automatic and waiting to activate next step
LE_SB_34 Emergency State
Clone this wiki locally