Junolane MotionPLC中文

Set Variable

SET_VAR · V4.23

Assign, add to or subtract from V0 to V18; system_count adds system counts.

Hexadecimal notation is used for IDs, indexes, modes and sentinel values where applicable. Physical quantities (such as pulses, milliseconds and pulse/s) remain in their native units. Macro names are shown only when defined by the firmware.

Input parameters

ParameterInitial valueMeaning
Variable IDvariable_index0x00UTasks can write V0 to V18 or select system_count to add system counts. V19 is task-read-only motion mode and cannot be written by SET_VAR. MTGM_OP_VARIABLE_MOTION_MODE = 0x13U; MTGM_OP_VARIABLE_SYSTEM_COUNT = 0xFFU.
Assignment modeassign_mode=For ordinary variables, = assigns, + adds and - subtracts. system_count always adds; it does not assign or subtract.
Valuevalue0Numeric assignment/comparison value within the current validation range.

Initial values are editor defaults for a newly inserted instruction; configure them for the actual machine.

Firmware macro definitions

Hexadecimal equivalents of the firmware definitions; numeric values are unchanged.

#define MTGM_OP_VARIABLE_MOTION_MODE 0x13U
#define MTGM_OP_VARIABLE_SYSTEM_COUNT 0xFFU

Execution and usage

← Back to instruction treeFull user manual (PDF)