STRING_TO_REAL (String to Real)
Parses a numeric string (STRING) and writes the resulting floating-point value to the target REAL variable.
Description
STRING_TO_REAL converts a decimal string in src (IN, for example "12.5") into a REAL floating-point value and stores it in the target variable.
Syntax
- variable_name: Target
REALvariable - qualifier: Typically
ActionQualifier.P(Pulse) - instruction:
ActionInstruction.STRING_TO_REAL - src (
IN): SourceSTRINGvariable or literal
Sequence Visual Editor
- Select an action on a step or transition and hold Alt (or right-click -> Edit Qualifier & Instruction).
- Select Conversions -> STRING_TO_REAL and choose the P qualifier.
- Fill in the target
REALvariable and the sourceSTRINGoperand (IN).
Python
from automation_machine import ActionQualifier, ActionInstruction
step.add_action("setpoint_bar", "Parse pressure setpoint", qualifier=ActionQualifier.P, instruction=ActionInstruction.STRING_TO_REAL, src="recipe_pressure_str")