DINT_TO_STRING (Double Integer to String)
Converts a 32-bit integer (DINT) into a STRING representation and stores it in the target variable.
Description
DINT_TO_STRING formats the 32-bit integer value in src (IN) as a decimal string and writes it to the target STRING variable. Use it for large production totals, encoder positions, or batch identifiers.
Syntax
- variable_name: Target
STRINGvariable - qualifier: Typically
ActionQualifier.P(Pulse) - instruction:
ActionInstruction.DINT_TO_STRING - src (
IN): SourceDINTvariable or literal
Sequence Visual Editor
- Select an action on a step or transition and hold Alt (or right-click -> Edit Qualifier & Instruction).
- Select Conversions -> DINT_TO_STRING and choose the P qualifier.
- Fill in the target
STRINGvariable and the sourceDINToperand (IN).
Python
from automation_machine import ActionQualifier, ActionInstruction
step.add_action("total_text", "Format lifetime counter", qualifier=ActionQualifier.P, instruction=ActionInstruction.DINT_TO_STRING, src="lifetime_parts")