kandauru Posted June 27, 2015 Author Share Posted June 27, 2015 Under the topic "Constraints on Linear/Circle Moves" I have read the following: With very short moves, user must be careful not to overwhelm Power PMAC real-time calculation capabilities (run-time error would result and program would halt). It looks like it is my case, isn't it? Link to comment Share on other sites More sharing options...
bradp Posted June 29, 2015 Share Posted June 29, 2015 Not necessarily. Short in this case refers to time, not distance. If your moves are close to one servo cycle in time then it could be. You should calculate how much time each move is taking on average. Another test is to run at %10 federate override and see if the problem goes away. If not then it is really something else like I mentioned in the e-mails. If so increase the federate override until it comes back just to know at what value the trouble starts. Link to comment Share on other sites More sharing options...
curtwilson Posted June 30, 2015 Share Posted June 30, 2015 In firmware versions older than V1.6, if calculation of moves from the rotary motion program "caught up" with the loading of the buffer, program execution would stop with an error. That is, if the program went to calculate the next move from the buffer and that move wasn't there, that would be an error. Starting in V1.6, which was released in February 2014, if this happened, the program would go into a suspended mode, effectively dwelling until the next move was loaded. Often, this is still undesirable, especially if you wanted the moves to be blended on the fly. I think the key is to make sure your program loading stays well ahead of your move calculation. This means you want to load multiple program lines before you even start program execution. When you issue the "b0r" command and then start loading, PPMAC will calculate the first move as soon as you load it, then see that the buffer is empty. Even with the newer firmware, it would not blend the first move into the second. It is more efficient in loading the program if you execute a single "open rotary" command, then send a whole set of program lines, followed by a single "close" command. Link to comment Share on other sites More sharing options...
kandauru Posted July 8, 2015 Author Share Posted July 8, 2015 Finally, I see that rotary buffer is working, but not exactly what I wish. Axes move from point to point with a small stop, not smoothly. You can see it here: https://drive.google.com/open?id=0B6Q9gPky33lbd2J0V3l6OVl0VGs . Below you can find a motion program and parameters: &1 Coord[1].FeedTime = 1000 //sec Coord[1].SegMoveTime = 0 Coord[1].AltFeedRate = 300 //mu/s Coord[1].MaxFeedRate = 300 //mu/s Coord[1].Ta=1 Coord[1].Td=0 Coord[1].Ts=5 Coord[1].Tm=-5 Coord[1].NoBlend=0 &1 #1->1865x #2->1865xx #3->1865y #4->1865yy #5->1865z #6->1865zz #7->680.9714v #8->324.8089u #9->680.9714vv #10->324.8089uu open prog 1 Ldata.coord=1 frax(X,Y,Z) linear abs F20 cmd "&1a" cmd "&1 delete rotary" cmd "&1 define rotary 600000" cmd "&1 open rotary abs linear close" cmd "&1b0r" while (RunProg == 1) { cmd "&1 open rotary X-207Y308Z573V186U-249 X-207Y309Z573V186U-249 X-208Y311Z573V186U-249 X-208Y312Z573V185U-249 X-209Y314Z573V185U-249 X-209Y315Z573V185U-249 X-210Y317Z572V184U-249 X-211Y318Z572V184U-249 X-211Y320Z572V184U-249 X-212Y322Z572V183U-249 X-212Y323Z572V183U-249 X-213Y325Z572V183U-249 X-214Y326Z572V182U-249 X-214Y328Z572V182U-249 X-215Y329Z572V182U-249 X-215Y331Z571V181U-249 close" Sendallcmds cmd "&1 open rotary X-215Y330Z570V180U-249 X-214Y329Z571V181U-249 X-213Y327Z571V181U-249 X-213Y326Z571V181U-249 X-212Y324Z571V182U-249 X-212Y323Z571V182U-249 X-211Y321Z571V182U-249 X-210Y320Z571V183U-249 X-210Y318Z571V183U-249 X-209Y316Z571V183U-249 X-209Y315Z571V184U-249 X-208Y313Z571V184U-249 X-207Y312Z572V184U-249 X-207Y310Z572V185U-249 X-206Y309Z572V185U-249 X-206Y307Z572V185U-249 close" Sendallcmds } close BTW, way frax(X,Y,Z,U,V) is not acceptable with projpp? I am getting the following error: Error : ( error #31) invalid data : frax(z,y,z,v,u). So, my main question is how to make it moves smoothly? Thank you in advance! Link to comment Share on other sites More sharing options...
Gregs Posted July 8, 2015 Share Posted July 8, 2015 It is hard to guess what is happening, basically because that code, as shown, should not even run. Two motion programs cannot run at the same time in the same coordinate system, even if one is a rotary program. Perhaps the first thing is to correct for that. Also, you could email the project to support AT deltatau DOT com, and then we can look for the issue(s). Why are you using a rotary program? There are only two standard reasons: one is if a host is computing trajectories on the fly, and two is if the program is too large for a normal motion program buffer. Link to comment Share on other sites More sharing options...
kandauru Posted July 8, 2015 Author Share Posted July 8, 2015 Thank you for your reply, Gregs. The following part is defined in 0-coordinate_system.pmh &1 Coord[1].FeedTime = 1000 //sec Coord[1].SegMoveTime = 0 Coord[1].AltFeedRate = 300 //mu/s Coord[1].MaxFeedRate = 300 //mu/s Coord[1].Ta=1 Coord[1].Td=0 Coord[1].Ts=5 Coord[1].Tm=-5 Coord[1].NoBlend=0 #1->1865x #2->1865xx #3->1865y #4->1865yy #5->1865z #6->1865zz #7->680.9714v #8->324.8089u #9->680.9714vv #10->324.8089uu Motion program 1: open prog 1 frax(X,Y,Z) F20 cmd "&1a" cmd "&1 delete rotary" cmd "&1 define rotary 600000" cmd "&1 open rotary abs linear close" cmd "&1b0r" while (RunProg == 1) //RunProg - global variable { cmd "&1 open rotary X-207Y308Z573V186U-249 X-207Y309Z573V186U-249 X-208Y311Z573V186U-249 X-208Y312Z573V185U-249 X-209Y314Z573V185U-249 X-209Y315Z573V185U-249 X-210Y317Z572V184U-249 X-211Y318Z572V184U-249 X-211Y320Z572V184U-249 X-212Y322Z572V183U-249 X-212Y323Z572V183U-249 X-213Y325Z572V183U-249 X-214Y326Z572V182U-249 X-214Y328Z572V182U-249 X-215Y329Z572V182U-249 X-215Y331Z571V181U-249 close" Sendallcmds cmd "&1 open rotary X-215Y330Z570V180U-249 X-214Y329Z571V181U-249 X-213Y327Z571V181U-249 X-213Y326Z571V181U-249 X-212Y324Z571V182U-249 X-212Y323Z571V182U-249 X-211Y321Z571V182U-249 X-210Y320Z571V183U-249 X-210Y318Z571V183U-249 X-209Y316Z571V183U-249 X-209Y315Z571V184U-249 X-208Y313Z571V184U-249 X-207Y312Z572V184U-249 X-207Y310Z572V185U-249 X-206Y309Z572V185U-249 X-206Y307Z572V185U-249 close" Sendallcmds } close So, there is only one motion program. This is a small example that was implemented as a motion program and didn't work in the past. In a real application trajectory will be computed on the fly, that's why I need a rotary buffer. If you see something wrong, please, tell me. Link to comment Share on other sites More sharing options...
steve.milici Posted July 8, 2015 Share Posted July 8, 2015 The motion program processes the text to the rotary buffer too slow to keep the buffer executing continuously. What is your intention with the above code? Link to comment Share on other sites More sharing options...
kandauru Posted July 9, 2015 Author Share Posted July 9, 2015 Guys, could you give me a small example of rotary buffer? How to do it in right way. Link to comment Share on other sites More sharing options...
steve.milici Posted July 9, 2015 Share Posted July 9, 2015 You can simply start an Ethernet SSH connection (with a program like ‘putty’) log on to the Power PMAC start a GPASCII instance and send the following code: &1 a Coord[1].FeedTime = 1000 //sec Coord[1].SegMoveTime = 0 Coord[1].AltFeedRate = 300 //mu/s Coord[1].MaxFeedRate = 300 //mu/s Coord[1].Ta=1 Coord[1].Td=0 Coord[1].Ts=5 Coord[1].Tm=-5 Coord[1].NoBlend=0 #1->1865x #3->1865y #5->1865z #7->680.9714v #8->324.8089u enable delete rotary define rotary 600000 open rotary abs linear close b0r open rotary X-207Y308Z573V186U-249 X-207Y309Z573V186U-249 X-208Y311Z573V186U-249 X-208Y312Z573V185U-249 X-209Y314Z573V185U-249 X-209Y315Z573V185U-249 X-210Y317Z572V184U-249 X-211Y318Z572V184U-249 X-211Y320Z572V184U-249 X-212Y322Z572V183U-249 X-212Y323Z572V183U-249 X-213Y325Z572V183U-249 X-214Y326Z572V182U-249 X-214Y328Z572V182U-249 X-215Y329Z572V182U-249 X-215Y331Z571V181U-249 Close The connection should be fast enough to keep the rotary buffer alive until the end. Link to comment Share on other sites More sharing options...
steve.milici Posted July 9, 2015 Share Posted July 9, 2015 The general idea for implementing rotary buffer is using two separate GPASCII instances. First instance is in charge of setup and querying variables, while the second instance is only in charge of feeding data into the rotary buffer. Here are the steps each GPASCII instance should take: Link to comment Share on other sites More sharing options...
kandauru Posted July 9, 2015 Author Share Posted July 9, 2015 Thank you, Steve! I will check it and let you know a result. Link to comment Share on other sites More sharing options...
kandauru Posted July 19, 2015 Author Share Posted July 19, 2015 Hi Steve, I have implemented the rotary buffer according to what you had described but the result was same. I have seen all my points in the buffer (using list Rotary command) before I sent the command &1b0r. So, if all points were in the buffer, then I think the problem is in ta, ts, td parameters. Or maybe I should go for lookahead feature? Link to comment Share on other sites More sharing options...
kandauru Posted July 19, 2015 Author Share Posted July 19, 2015 Additional questions: in my system I have 12 axes. I define all my axes in CS1 when my application is started. While the application is running CS1 definition is not changed.Is it OK? Or I should define axes in CS before each simple movement (or complex trajectory movement)? Link to comment Share on other sites More sharing options...
kandauru Posted July 20, 2015 Author Share Posted July 20, 2015 Here is a video where you can see my problem: https://drive.google.com/file/d/0B6Q9gPky33lbdXpXeHkwcE1paXM/view?usp=sharing. On second video you can see what I want to have when it moves from point to point: https://drive.google.com/file/d/0B6Q9gPky33lbdW54ZTNCRTNNWWc/view?usp=sharing Link to comment Share on other sites More sharing options...
steve.milici Posted July 20, 2015 Share Posted July 20, 2015 Send me some plots of the motion in position/velocity vs time. Link to comment Share on other sites More sharing options...
kandauru Posted July 21, 2015 Author Share Posted July 21, 2015 Send me some plots of the motion in position/velocity vs time. Attached are plots of XX,ZZ,VV. Link to comment Share on other sites More sharing options...
kandauru Posted July 21, 2015 Author Share Posted July 21, 2015 And here are my points: XX4240YY-3065ZZ256UU-175VV-90 XX4240YY-3065ZZ256UU-175VV-90 XX4240YY-3065ZZ257UU-175VV-89 XX4239YY-3065ZZ258UU-175VV-88 XX4239YY-3065ZZ259UU-175VV-87 XX4238YY-3065ZZ260UU-175VV-86 XX4238YY-3065ZZ261UU-175VV-85 XX4237YY-3065ZZ261UU-175VV-84 XX4237YY-3065ZZ262UU-175VV-83 XX4236YY-3065ZZ263UU-175VV-82 XX4236YY-3065ZZ264UU-175VV-81 XX4235YY-3065ZZ265UU-175VV-80 XX4235YY-3065ZZ266UU-175VV-79 XX4234YY-3065ZZ266UU-175VV-78 XX4234YY-3065ZZ267UU-175VV-77 XX4233YY-3065ZZ268UU-175VV-76 XX4233YY-3065ZZ268UU-175VV-76 XX4233YY-3065ZZ267UU-175VV-77 XX4234YY-3065ZZ266UU-175VV-78 XX4234YY-3065ZZ265UU-175VV-79 XX4235YY-3065ZZ264UU-175VV-80 XX4235YY-3065ZZ263UU-175VV-81 XX4236YY-3065ZZ263UU-175VV-82 XX4236YY-3065ZZ262UU-175VV-83 XX4237YY-3065ZZ261UU-175VV-84 XX4237YY-3065ZZ260UU-175VV-84 XX4238YY-3065ZZ259UU-175VV-85 XX4238YY-3065ZZ258UU-175VV-86 XX4238YY-3065ZZ258UU-175VV-87 XX4239YY-3065ZZ257UU-175VV-88 XX4239YY-3065ZZ256UU-175VV-89 XX4240YY-3065ZZ255UU-175VV-90 Link to comment Share on other sites More sharing options...
bradp Posted July 21, 2015 Share Posted July 21, 2015 for these points what is the CS definition? Link to comment Share on other sites More sharing options...
kandauru Posted July 21, 2015 Author Share Posted July 21, 2015 &1 Coord[1].FeedTime = 1000 //sec Coord[1].SegMoveTime = 0 Coord[1].AltFeedRate = 300 //mu/s Coord[1].MaxFeedRate = 300 //mu/s Coord[1].Ta=10 Coord[1].Td=0 Coord[1].Ts=50 Coord[1].Tm=-200 Coord[1].NoBlend=0 #1->533.3432x #2->0 //position follower #3->533.3432xx #4->0 //position follower #5->799.9702y #6->799.9702yy #7->2719.5545z //Ua #8->2719.5545zz //Ub #9->2777.957u // Ba #10->2777.957uu // Bb //#11->0//a //#12->0//aa //#13->0//b //#14->0//bb #15->1927.0626v #16->1927.0626vv Link to comment Share on other sites More sharing options...
bradp Posted July 21, 2015 Share Posted July 21, 2015 Thank you, Brad! The " key" was in your last sentence. I have lost my decimal points somehow. Now it looks very smoothly. Regards, Konstantin. ;Subject: RE: Rotary buffer execution In the case that this is ABS programming I do not see any problem. This is the proper velocity profile for the XX axis. I have #1 as XX You see that it must move and stop since you have programmed the same absolute positions one after the other. If we look at the profile you programmed below, but just the XX data to make it easier to see you have. XX4240 // move to new position XX4240 // wait at position XX4240 // wait at position XX4239 // move to new position XX4239 // wait at position XX4238 // wait at position XX4238 // move to new position XX4237 // move to new position XX4237 // wait at position XX4236 // move to new position XX4236 // wait at position And if you look at the velocity profile that is exactly what is happening. It looks like you want a smooth sweep from XX4240 to XX4233 then back to XX4240. So either you need more decimal points as the duplicate numbers were not suppose to be duplicates or you need to rethink the profile. Best Regards, Brad Pedersen Link to comment Share on other sites More sharing options...
kandauru Posted July 21, 2015 Author Share Posted July 21, 2015 The problem was in decimal points of positions. Link to comment Share on other sites More sharing options...
kandauru Posted July 23, 2017 Author Share Posted July 23, 2017 Hi, what is a common way to set Coord[x].Ta, Coord[x].Td, Coord[x].Ts parameters? I mean, how to calculate it? I have a speed and a distance in my case. It used to be all 0 while using rotary buffer in my application, but we started to face a problem and I played a little with those parameters - it helped. So, I want to know how some basic principles of setting it. Please, advise. Link to comment Share on other sites More sharing options...
Unit101 Posted July 24, 2017 Share Posted July 24, 2017 Hi, what is a common way to set Coord[x].Ta, Coord[x].Td, Coord[x].Ts parameters? I mean, how to calculate it? I have a speed and a distance in my case. It used to be all 0 while using rotary buffer in my application, but we started to face a problem and I played a little with those parameters - it helped. So, I want to know how some basic principles of setting it. Please, advise. Here I assume you just need some basic guidelines on how to calc the accel parameters. If you have Velocity and Distance all that is needed is Time. Longer Time = lower Accel, Short time = high accel rate. So you adjust Velocity, Distance and Time to get the move with a given accel rate. Once you know desired rate, often some near max accel rate for your mechanical system then you can calculate the parameters TA,D,S for the move(s). Basic Accel Calc could be one of these: #1 Accel = Velocity/Time #2 Accel = 2Distance/Time*Time Example: move 50,000 cnts in .5 sec to a velocity of 200,000 cnts/sec #1 Accel = 200,000 / .5 = 400,000 cnts/sec-sec #2 Accel = (2*50,000) / (.5*.5) = 400,000 cnts/sec-sec So to go from 0 to 200,000 cnts/sec in 50,000 cnts distance in .5 sec will result in an accel rate of 400,000 cnts/sec-sec. To get this you would set your TA = 500 (msec) TD is same just decel rate at end of move. TS is S-curve, if you want 100% s-curve then set TA=0 and TS=250 (1/2 time) note with S-curve the accel rate in middle will be 2x your calc accel rate You can see now by simply adjusting any of the move parameters the accel rate of TA,TD,TS are affected. See the attached doc for a overview of all these motion calcs and a older turbo motion program example. Hope this helps...Formulas used in calculations.pdf Link to comment Share on other sites More sharing options...
kandauru Posted July 24, 2017 Author Share Posted July 24, 2017 Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts