大家帮忙看看
JMP UNCONDITIONED , M1
M8 :SET H0 = 370
M4 :JMP H0 > 457 , M2
JMP UNCONDITIONED , M3
M5 :ADD H0 + 1
JMP UNCONDITIONED , M4
M3 :SET H301 = 0
SETI 【H0 】 = H301
JMP UNCONDITIONED , M5
M2 :MEM LOAD DATA
WAIT 100 ms
SET H430 = 200
SET H431 = 3
SET H432 = 172032
SET H433 = 0
SET H439 = 0
SET H440 = 1
SET H442 = 0
SET H443 = 7
SET H444 = 0
SET H446 = 1
SET H447 = 9
SET H397 = 0
RET
M6 :JMP LO I0010000000000000, M6
M7 :JMP HI I0010000000000000, M7
SET H100 = H511
SET H300 = H100
ADD H300 + H260
SET H101 = H300
RET
M1 :TASK2 START M6
BSET H484.1 = 1
CALL M8
SET H310 = 1100
SET H311 = 4
SET H312 = 200
SCOM RECEIVE , H310
SCOMON
SET H205 = 0
SET H210 = 5
SET H250 = 3
SET H251 = 3
SET H110 = 500
SET H111 = 500
SET H105 = 5000
SET H106 = 5000
SET H10 = 0
SET H439 = 0
SET H410 = 1
SET H413 = 512
SET H436 = 0
GETSYS H250 = PO-DATA
SET H301 = H253
MUL H301 * 10
SET H260 = H301
M10 :SET H301 = H483
AND H301 & 40 hex
JMP H301 == 0, M9
BSET H484.1 = 1
SET H436 = 0
GETSYS H250 = PO-DATA
SET H301 = H253
MUL H301 * 10
SET H260 = H301
SETSYS RAMP TYPE = H205
BCLR H484.1 = 0
GO0 U, W,CAM
SETSYS POS.SPEED C(C)W = H110
GOA WAIT H260
BSET H480.0 = 1
WAIT 1000 ms
BCLR H480.0 = 0
JMP UNCONDITIONED , M10
M9 : SET H301 = H483
AND H301 & 400 hex
JMP H301 == 0, M11
BSET H484.1 = 1
SET H436 = 0
SETSYS RAMP TYPE = H210
SET H439 = 0
BCLR H484.1 = 0
M13 :SET H301 = H483
AND H301 & 800 hex
JMP H301 == 0, M12
SET H436 = 0
SET H439 = 500
JMP UNCONDITIONED , M13
M12 :SET H301 = H483
AND H301 & 1000 hex
JMP H301 == 0, M9
SET H436 = 0
SET H439 = -500
JMP UNCONDITIONED , M12
M11 :SET H301 = H483
AND H301 & 100 hex
JMP H301 == 0, M14
BCLR H484.1 = 0
SETSYS RAMP TYPE = H210
SET H400 = 0
SET H10 = 1
SET H11 = 1
BSET H480.2 = 1
JMP UNCONDITIONED , M15
M14 :SETSYS RAMP TYPE = H210
SET H400 = 1
SET H401 = 0
SET H404 = 1
SET H403 = 1
SET H11 = 0
M15 :SET H301 = H436
CPEQ H301 == 0
SET H302 = H10
CPEQ H302 == 1
ANDL H301 && H302
SET H302 = H11
CPEQ H302 == 0
ANDL H301 && H302
SET H302 = H483
AND H302 & 100 hex
NOTL H302 = NOT(H302)
ANDL H301 && H302
JMP H301 == 0, M10
WAIT 100 ms
SETSYS RAMP TYPE = H205
BCLR H484.1 = 0
SETSYS POS.SPEED C(C)W = H105
GOA WAIT H101
SET H10 = 0
BCLR H480.2 = 0
JMP UNCONDITIONED , M10
END
引用波恩 的回复内容:多项式几次数与可求导的阶数还是有一定关系的,对于位置规划的三次式可有效求导3次,一直反映到加加速度,而5次式的目的可能还不仅仅在可求导出加加速度,也许还有更深的用途。不知刘斑竹是否知道其妙用。
位置求导三次对应冲击,
位置求导四次对应能量,
五次多项式是为了优化能量输出,
下面附上贝加莱电子凸轮支持的插补方式,共8种。
5th degree polynomial function
6th degree polynomial function
Symmetrical spline with 3 segments
Standard spline with 3 segments
Sine line for pause to pause
Modified acceleration trapezium for pause in pause
Modified sine line for pause in pause
Modified sine line for constant speed to constant speed