RIGHT (Right Substring)
Extracts the last L characters from the end of string IN and writes the result to the target STRING variable.
Description
RIGHT returns the rightmost length (L) characters of src (IN). Use it to extract serial number suffixes, checksums, or trailing command codes.
Syntax
- variable_name: Target
STRINGvariable - qualifier: Typically
ActionQualifier.P(Pulse) - instruction:
ActionInstruction.RIGHT - src (
IN): SourceSTRINGvariable or literal - length (
L): Number of characters to extract (INTvariable or literal)
Sequence Visual Editor
- Select an action on a step or transition and hold Alt (or right-click -> Edit Qualifier & Instruction).
- Select Strings -> RIGHT and choose the P qualifier.
- Fill in the target
STRINGvariable, source string (IN), and character count (L).
Python
from automation_machine import ActionQualifier, ActionInstruction
step.add_action("serial_suffix", "Extract 4-char suffix", qualifier=ActionQualifier.P, instruction=ActionInstruction.RIGHT, src="barcode", length="4")