AutomationView Documentation

STRING_TO_INT (String to Integer)

Parses a decimal string (STRING) and writes the resulting 16-bit integer to the target INT variable.


Description

STRING_TO_INT converts the numeric characters in src (IN) into an INT value. Combine it with MID to parse numeric parameters embedded inside command or barcode strings (for example, extracting slot number "2" from "ODCU1DOUC2").


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 -> STRING_TO_INT and choose the P qualifier.
  3. Fill in the target INT variable and the source STRING operand (IN).

Python

from automation_machine import ActionQualifier, ActionInstruction

step.add_action("target_slot", "Parse slot index from string", qualifier=ActionQualifier.P, instruction=ActionInstruction.STRING_TO_INT, src="slot_char")

See Also