REAL_TO_STRING (Real to String)
Converts a floating-point number (REAL) into a STRING representation and stores it in the target variable.
Description
REAL_TO_STRING formats the floating-point value in src (IN) as a decimal string (for example, 3.5 -> "3.5") and writes it to the target STRING variable.
Syntax
- variable_name: Target
STRINGvariable - qualifier: Typically
ActionQualifier.P(Pulse) - instruction:
ActionInstruction.REAL_TO_STRING - src (
IN): SourceREALvariable or literal
Sequence Visual Editor
- Select an action on a step or transition and hold Alt (or right-click -> Edit Qualifier & Instruction).
- Select Conversions -> REAL_TO_STRING and choose the P qualifier.
- Fill in the target
STRINGvariable and the sourceREALoperand (IN).
Python
from automation_machine import ActionQualifier, ActionInstruction
step.add_action("pressure_text", "Format pressure reading", qualifier=ActionQualifier.P, instruction=ActionInstruction.REAL_TO_STRING, src="clamp_pressure")