AutomationView Documentation

BOOL_TO_STRING (Boolean to String)

Converts a boolean (BOOL) value into "TRUE" or "FALSE" and writes the result to the target STRING variable.


Description

BOOL_TO_STRING evaluates the boolean operand src (IN) and writes "TRUE" or "FALSE" to the target STRING variable for diagnostic logging or HMI status text.


Syntax

Sequence Visual Editor

  1. Select an action on a step or transition and hold Alt (or right-click -> Edit Qualifier & Instruction).
  2. Select Conversions -> BOOL_TO_STRING and choose the P qualifier.
  3. Fill in the target STRING variable and the source BOOL operand (IN).

Python

from automation_machine import ActionQualifier, ActionInstruction

step.add_action("safety_status_str", "Format safety state as text", qualifier=ActionQualifier.P, instruction=ActionInstruction.BOOL_TO_STRING, src="safety_ok")

See Also