Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

Motion Control Quick Start (15-2) | Motion Buffer Related Commands

(1) MOVE_OP -- Output in Buffer

Grammar: MOVE_OP (output No., output state)

This command enters the motion buffer together with other motion commands, and only operates the OP output when it is taken out of the motion buffer for execution. It can control an output port to output signals individually, or output them in batches, without interrupting the continuity of interpolation motion.

12.png

In this example, the motion instructions in lines 11-15 are stored in the motion buffer in sequence, and executed in the order of first-in-first-out. After MOVE (100) is finished, MOVE_OP operates OUT0 to output, and continues to execute the second MOVE (100), and then use MOVE_OP to close OUT0, the last control OUT1-3 to output in batch.

13.jpg


(2) MOVE_OP2 -- Output in Buffer 2

Grammar: MOVE_OP2 (output No., output status, invert after output n ms)

The BASE axis motion buffer adds an output operation, and after the specified time, the output state is reversed.

Also, this command enters the motion buffer together with other motion commands, and the OP output is operated only when it is taken out of the motion buffer for execution, and the output is turned off after a certain period of time.

A single axis only supports one pulse output at a time, and the second MOVE_OP2 command will automatically turn off the pulse of the previous command. The continuity of the interpolated movement is not interrupted.

14.png

15.jpg


(3) MOVE_DELAY -- Delay in Buffer

Grammar: MOVE_DELAY (delay n ms)

A delay is added to the BASE axis motion buffer.

This command does not perform any movement during buffer execution, but only delays for a specified time.

The delay will automatically reduce the speed to 0 when the previous motion command ends, which will interrupt the continuity of the interpolation motion.   

16.png

17.jpg


(4) MOVE_AOUT -- Output Analog in Buffer

Grammar: MOVE_AOUT(DA number, output value)

Add an AOUT command to the BASE axis motion buffer.

This command buffer does not perform any movement during execution, only modifies the AOUT value, and will not interrupt the continuity of the interpolation movement.

18.png

19.jpg


(5) MOVE_PAUSE -- Pause the Motion

Pause axis motion, it is only valid for single axis or multi-axis interpolation motion. When in multi-axis linkage, pause all together.

When the axis has paused or is not in motion, there will be a "warning"when calling this command, but it will not affect the program running.

Actually, some motions do not support pause, such as VMOVE, synchronous motion instructions, etc. AXISSTATUS can be used to check whether there is a pause. When in pause, the IDLE state of the axis is 0.

Grammar: MOVE_PAUSE(mode value)

20.png

Example for Mode 0: MOVE_PAUSE (3) execution effect is the same as MOVE_PAUSE(0).

21.png

Example for Mode 1: the effect of mode 2 is similar with mode 1 when motion label No. MOVE_MARK is automatically numbered , because each motion label is different. After one command is moved, motion label will change. When MOVE_MARK(2) takes effect, pause immediately.

Mode 2 is different from Mode 1 when setting MOVE_MARK manually.

22.png

23.jpg

MOVE_PAUSE(1) or MOVE_PAUSE(2)

Example for Mode 2: set MOVE_MARK manually, pause at different MARK border through MOVE_PAUSE(2).

24.png

25.jpg

MOVE_PAUSE(2)


(6) MOVE_RESUME -- Resume the Motion

When the BASE axis pauses, continue motion from where it paused.

You can check whether there is a pause through AXISSTATUS. AXISSTATUS displays 800000h, indicating that the axis has entered the pause state.

26.png

27.jpg


(7) MOVE_TABLE -- Output TABLE in Buffer

One TABLE is added into BASE axis motion buffer.

No movement is made during the execution of the instruction buffer, only the TABLE is modified, and the continuity of the interpolation movement will not be interrupted.

Grammar: MOVE_TABLE(TABLE No., value to be modified)

28.png

29.jpg


(8) MOVE_PARA -- Parameters in Buffer

Modify parameters in BASE axis motion buffer.

This command does not perform any movement during buffer execution, only modifies the parameters, and will not interrupt the continuity of the interpolation movement.

Grammar: MOVE_PARA(parameter name, parameter No., parameter value)

The parameter name must be a non-read-only parameter in ?*set.

30.png

31.jpg


(9) MOVE_PWM -- PWM in Buffer

Operate PWM in BASE axis motion buffer.

There is no movement during instruction buffer execution, only PWM is operated.

Please note PWM can only be turned off by setting the duty cycle to 0, but not by setting the PWM frequency to 0. And the PWM frequency must be adjusted before the PWM is turned on.

Grammar: MOVE_PWM(No., duty cycle[, frequency])

The number is the output port No. that supports the PWM function, it can be checked from hardware manual.

The duty cycle refers to the ratio of the active level to the entire cycle, the range is 0-1, and the pwm is turned off when it is set to 0. In one cycle, the active level is output firstly, and then the inactive level is output.

The default frequency is 1KHz,the hardware maximum is 1MHz, and the software maximum is 2KHz.

32.png

Example running effect: Initialize and turn off PWM output, after MOVE(10) is finished, operate PWM0 to output, when it remains 100ms, modify the duty cycle and duty frequency of PWM0, and then run MOVE(20) to turn off PWM output. And when the WHILE loop is running on axis 0, it prints the duty cycle and frequency of the PWM output every 30ms. After the axis 0 stops, exit the WHILEloop without printing.

33.png


(10) MOVE_SYNMOVE -- Trigger Other Axes in Buffer

In the BASE axis motion buffer, trigger the movement of other axes, and the current axis waits for the other axes to complete the motion, then the current axis continues to move.

Grammar: MOVE_SYNMOVE(axisnum,dis[,ifsp])

axisnum: axis No. that needs synchronous motion

dis: relative movement distance

ifsp: whether to use SP movement, the default value 0 is not used.

34.png

35.jpg

The effect after using SP movement is as follows. Set the last parameter to a value other than 0. At this time, the triggered movement speed of axis 1 is FORCE_SPEED=200.

36.jpg


(11) MOVE_ASYNMOVE -- Trigger Other Axes in Buffer 2

In the BASE axis motion buffer, trigger the movement of other axes, and the current axis doesn't wait.

Grammar: MOVE_ASYNMOVE(axisnum,dis[,ifsp])

axisnum: axis No. that needs synchronous motion

dis: relative movement distance

ifsp: whether to use SP movement, the default value 0 is not used.

37.png

38.jpg


(12) MOVE_TASK -- Open Task in Buffer

TASK opening is added into BASE axis motion buffer.

This instruction buffer does not do any movement during execution, but only starts the task, and will not interrupt the continuity of the interpolation movement.

Grammar: MOVE_TASK(task No., function name)

When the MOVE_TASK instruction is taken out from the entire motion buffer area and executed, the program marked with task_move is opened as task 1, and task 1 can be seen in the task window as being started.

39.png

40.jpg


(13)MOVE_WAIT -- Wait in Buffer

BASE axis motion buffering adds a conditional judgment.

When the command buffer is executed, it does not do any movement, but only waits for the specified conditions to be met, and the speed will automatically drop to 0 when the previous movement command ends.

Grammar: MOVE_WAIT(parameter name, parameter No., comparison condition, comparison value)

Parameters can be: DPOS, MPOS, IN, AIN, VPSPEED, MSPEED, MODBUS_REG, MODBUS_IEEE, MODBUS_BIT, VECTOR_BUFFERED, REMAIN

Comparison condition: 1 parameter value ≥ comparison value, -1 parameter value ≤ comparison value, 0 is not recommended

41.png

42.jpg


(14) MOVE_CANCEL -- Cancel in Buffer

Write CANCEL instruction into motion buffer.

Grammar: MOVE_CANCEL (axis No., mode value)

0 : cancel current motion, continue to get instruction from buffer

1 : cancel motions in buffer, current motion keeps executing

2 : cancel current motion and motions in buffer, axis stops immediately

3 : stop sending pulses immediately

43.png

Axis 0 moves 50, then MOVE_CANCEL (1,2) AXIS(0) command takes effect, CANCEL(2) means current motion of axis 1 and buffer motions are cancelled, axis 0 stops immediately, axis 0 keeps moving.  

44.jpg


(15) LOADED -- Blank Buffer

This is used to judge whether the motion buffer is blank , it is read-only parameter. Returned value 0 means there is the command in buffer, returned value -1 means the buffer is blank.  

45.png

46.jpg

WAIT LOADED: wait for buffer to be blank

47.jpg

WAIT IDLE: wait for axis to stop


(16) MOVE_MARK -- Motion Mark No.

The MARK label of the next motion instruction to be called, this mark will be written into the motion buffer together with the motion instruction.

Each time a motion command is called, MOVE_MARK will be automatically increased by one.

If you want to forcibly specify MOVE_MARK , it needs to set it once before each movement.

And the MOVE_PAUSE (2) command can be used to pause at different boundaries of MARK.

48.png

49.jpg


(17) MOVE_CURMARK -- Current Motion Mark No.

Return to MOVE_MARK of current axis that is running. The number starts from 0 by default and decreases by 1 to the total number of motion commands.

In the axis parameter window, the number of motion commands scanned by the current program can be watched, please check MOVE_MARK parameter, and the number of motion commands that the axis is currently running can be checked through MOVE_CURMARK .

50.png

51.jpg





2013-2024 版权所有 Zmotion Corp. Copyright Reserved 粤ICP备13037187号-1