要实现直线插补,只需要很简单的一条指令就可以了
MOVE(1000,2000)
MOVEType:Axis CommandSyntax:MOVE(distance1 [,distance2 [,distance3 [,distance4...]]])Alternate Format:MO()Description:Incremental move. One axis or multiple axes move at the programmed speed and acceleration for a distance specified as an increment from the end of the last specified move. The first parameter in the list is sent to the BASE axis, the second to the next axis in the BASE array, and so on.In the multi-axis form, the speed and acceleration employed for the movement are taken from the first axis in the BASE group. The speeds of each axis are controlled so as to make the resulting vector of the movement run at the SPEED setting.Uninterpolated, unsynchronised multi-axis motion can be achieved by simply placing MOVE commands on each axis independently. If needed, the target axis for an individual MOVE can be specified using the AXIS() command modifier. This overrides the BASE axis setting for one MOVE only.The distance values specified are scaled using the unit conversion factor axis parameter; UNITS. Therefore if, for example, an axis has 400 encoder edges/mm and UNITS for that axis are 400, the command MOVE(12.5) would move 12.5 mm. When MERGE is set to ON, individual moves in the same axis group are merged together to make a continuous path movement.Parameters:distance1:distance to move on base axis from current position.distance2:distance to move on next axis in BASE array from current position.distance3:distance to move on next axis in BASE array from current position.distance4:distance to move on next axis in BASE array from current position.The maximum number of parameters is the number of axes available on the controllerExamplesExample 1:A system is working with a unit conversion factor of 1 and has a 1000 line encoder. Note that a 1000 line encoder gives 4000 edges/turn.MOVE(40000) ‘ move 10 turns on the motor.Example 2:Axes 3, 4 and 5 are to move independently (without interpolation). Each axis will move at its own programmed SPEED, ACCEL and DECEL etc.'setup axis speed and enableBASE(3)SPEED=5000ACCEL=100000DECEL=150000SERVO=ONBASE(4)SPEED=5000ACCEL=150000DECEL=560000SERVO=ONBASE(5)SPEED=2000ACCEL=320000DECEL=352000SERVO=ONWDOG=ONMOVE(10) AXIS(5) 'start movesMOVE(10) AXIS(4)MOVE(10) AXIS(3)WAIT IDLE AXIS(5) 'wait for moves to finishWAIT IDLE AXIS(4)WAIT IDLE AXIS(3)Example 3:An X-Y plotter can write text at any position within its working envelope. Individual characters are defined as a sequence of moves relative to a start point so that the same commands may be used regardless of the plot origin. The command subroutine for the letter ‘M’ might be: write_m:MOVE(0,12) 'move A > BMOVE(3,-6) 'move B > CMOVE(3,6) 'move C > DMOVE(0,-12)'move D > ERETURN