# Delta Tau Forums

Full Version: Lookahead is not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We use Turbo clipper for the first time, we made a test using an example in PMAC training course for the lookahead, as anticipate the velocity will decelerate in the corner if lookahead working, but actually the velocity is remain unchanged. I have no idea about the question, can sb. give me some help pls?
the code is as below
Undefine All
&1
#1->1000X
#2->1000Y
I5049 = 10
I5000 = 1
I5113 = 5
I5192 = 0
I116 = 50
I117 = .5
I216 = 50
I217 = .5
I5120 = 4/3/2*I116/I117/I5113
End Gat
Del Gat
Del Rot
Del Comp
Del Look
Close
Open Prog 1 Clear
Linear Abs
CMD"End Gat"
CMD"Del Gat"
CMD"Def Gat"
Dwell 0
CMD"Gat"
Dwell 0
F 50
X 10 Y 10
X 0 Y 20
Dwell 0
Cmd "End Gat"
Dwell 0
Close
What are your values for TA and TS (I5187 and I5188)? If these do not cause rates of acceleration greater than your motor limits, lookahead will not change the profile.
(02-27-2020, 01:23 PM)curtwilson Wrote: [ -> ]What are your values for TA and TS (I5187 and I5188)? If these do not cause rates of acceleration greater than your motor limits, lookahead will not change the profile.
Tank you for your reply, Wilson. I have not changed I5187 && I5188, they were the default values, respectively 0 and 50. Which limits should be concerned, Ixx17 or Isx78? And we donnot know the radius of the corner, so how to calculate the rates of acceleration here?
In lookahead, PMAC compares the rate of acceleration from the programmed trajectory to the Ix17 motor acceleration limit. It also compares the velocity to Ix16.

As far as velocity is concerned, if I5190 is at the default value of 1000, so your feedrate is in axis units per second, your peak motor speed is 50 cts/msec, which is equal to I116, so lookahead will not reduce this. (If I5190 is 60000 so feedrate is axis units per minute, your peak motor speed is 0.833 cts/msec, less than your limit.)

For the "pure" S-curve acceleration you are using, the peak acceleration is V/TS. With I5190=1000, this is 50/50 = 1 ct/msec^2. So lookahead might stretch out the acceleration profile some to keep each segment under the I117=0.5 limit. But this will not reduce the top speed.
(02-28-2020, 05:22 PM)curtwilson Wrote: [ -> ]In lookahead, PMAC compares the rate of acceleration from the programmed trajectory to the Ix17 motor acceleration limit. It also compares the velocity to Ix16.

As far as velocity is concerned, if I5190 is at the default value of 1000, so your feedrate is in axis units per second, your peak motor speed is 50 cts/msec, which is equal to I116, so lookahead will not reduce this. (If I5190 is 60000 so feedrate is axis units per minute, your peak motor speed is 0.833 cts/msec, less than your limit.)

For the "pure" S-curve acceleration you are using, the peak acceleration is V/TS. With I5190=1000, this is 50/50 = 1 ct/msec^2. So lookahead might stretch out the acceleration profile some to keep each segment under the I117=0.5 limit. But this will not reduce the top speed.
Tanks, wilson. I have made some test.

First, if I set Isx13 equals to 0(Non-segmented LINEAR mode moves) and feedrate(F) greater than Ixx16, the actual feedrate would be limited to Ixx16, and then, if I set Isx13 equals to 5, Isx20 equals to 13 (lookahead buffer defined and Isx20 greater than 0), the actual feedrate will be greater than IXX16 and equals to the setting feedrate(F).

As mentioned in the "Turbo SRM.pdf", "Ixx16 is not used for segmented LINEAR and CIRCLE mode moves when the special lookahead buffer is not active.", so I think someting is wrong with my setting about lookahead, enclose my setting about the motors and all of my motion programs and plc, Looking forward to you reply

MOTOR SETTING
//PWM Frequency=4.5173Khz
//phase frequency=9.0346Khz
//servo Frequency=2.2586Khz
I7000=6527
I7001=0
I7002=3
I10=3713991

//Motor Type Select
//stepper, rotary
I101=0
I100=1
I201=0
I200=1
I301=0
I300=1
I401=0
I400=1

//PFM Turbo-PMAC2 Channel1
//PFM frequency setting=2.4576Mhz
I7016=3
I102=\$78004
I169=32767
I7003=2258
I130=20000
I131=0
I132=650
I7026=3
I202=\$7800C
I269=32767
I230=20000
I231=0
I232=650
I7036=3
I302=\$78014
I369=32767
I330=20000
I331=0
I332=650
I7046=3
I402=\$7801C
I469=32767
I430=20000
I431=0
I432=650

//Amp Fault Signal, Ignore Amp Fault
//Position Limits Disabled
I125=\$78000
I124=\$120001
I225=\$78008
I224=\$120001
I325=\$78010
I324=\$120001
I425=\$78018
I424=\$120001

//Postion Loop Feedback Sensor Setup
//Incremental Encoder X4
I103=\$3501
I108=96
I7010=8
I203=\$3502
I208=96
I7020=8
I303=\$3517
I308=96
I7030=8
I403=\$3518
I408=96
I7040=8
//Velocity Loop Feedback Sensor Setup
//Incremental Encoder X4
I109=96
I209=96
I309=96
I409=96
I164=-16
I264=-16

PROGRAM
Undefine All
/***********************Setup and Defination*****************************/
&1 ;Enter coordinate system 1
#1->1000X ;Assign motor 1 to X axis
#2->1000Y ;Assign motor 2 to Y axis
I5049 = 10 ;gather every 10 servo cycle
I5000 = 1 ;Strore gather in Ram and do not permit wrap-around
I5113 = 5 ;Enable segmentation; compute every 5 ms
I5192 = 0 ;Enable blending
I116 = 50 ;Set motor 1 max vel. to 50 cts/ms
I117 = 0.5 ;Set motor 1 max Accel. to 0.5 cts/ms^2
I216 = 50 ;Set motor 2 max vel. to 50 cts/ms
I217 = 0.5 ;Set motor 2 max Accel. to 0.5 cts/ms^2
I5120 = 13 ;Compute number of lookahead segments needed
End Gat
Del Gat
Del Rot
Del Comp
Del Look
Close
Define Lookahead 13,50 ;Define lookahead buffer based on the number in I5120

/**************************************Motion Program************************/
Open Prog 1 Clear
Linear Abs
Cmd "End Gat" ;End gathering
Cmd "Del Gat" ;Delete contents of gather buffer
Cmd "Def Gat" ;Define gater buffer
Dwell 0
Cmd "Gat" ;Begin gathering
Dwell 0
F 100 ;Feedrate 50 user units/sec
X 10 Y 10
X 0 Y 20 ;Move to X 0 and Y 20 user units
Dwell 0 ;Do not blend to next command
Cmd "End Gat" ;End gathering
Dwell 0 ;Do not blend to next command
Close

M100=0;
OPEN PLC 1 CLEAR
IF(M100=0)
COMMAND"&1A"
COMMAND"&1B1R"
M100=1;
ENDIF
CLOSE
Your behavior indicates that lookahead is not active for some reason. In segmentation mode, the move-by-move limits are not active, but the segment-by-segment limits require lookahead to be active.

In the Executive program, select the View tab, then select "Specialized Buffers". Does it show a lookahead buffer?

Even though you don't seem to need much lookahead, try defining a larger buffer and a longer lookahead distance.
(03-10-2020, 11:32 AM)curtwilson Wrote: [ -> ]Your behavior indicates that lookahead is not active for some reason. In segmentation mode, the move-by-move limits are not active, but the segment-by-segment limits require lookahead to be active.

In the Executive program, select the View tab, then select "Specialized Buffers". Does it show a lookahead buffer?

Even though you don't seem to need much lookahead, try defining a larger buffer and a longer lookahead distance.
Thank you curt， I had found the reason for this error， the look-ahead buffer was deleted when I used “\$\$\$” to reset the system.