Replaces L characters in IN1 starting at 1-based position P with substring IN2, writing the updated string to the target STRING variable.
REPLACE removes length (L) characters from src1 (IN1) starting at 1-based index pos (P), inserts src2 (IN2) at that position, and stores the resulting string in the target variable.
STRING variable, original string (IN1), replacement string (IN2), length (L), and position (P).from automation_machine import ActionQualifier, ActionInstruction
step.add_action("status_code", "Update station status char", qualifier=ActionQualifier.P, instruction=ActionInstruction.REPLACE, src1="status_code", src2='"R"', length="1", pos="3")
STRING variableActionQualifier.P (Pulse)ActionInstruction.REPLACEIN1) — Original STRING variable or literalIN2) — Replacement STRING variable or literalL) — Number of characters to replace (INT variable or literal)P) — 1-based starting character position (INT variable or literal)