wanting to posting out 4th axis positive A 0.00 - 360.00 instead of negative A - 90 values

wanting to posting out 4th axis positive A 0.00 - 360.00 instead of negative A - 90 values

Anonymous
Not applicable
8,715 Views
21 Replies
Message 1 of 22

wanting to posting out 4th axis positive A 0.00 - 360.00 instead of negative A - 90 values

Anonymous
Not applicable

Hi

 

I've got what looks like a relatively simple issue. 

I've have  a straight forward set up  4th Axis unit on the right hand side of the table,  "A rotating around X" 

 

when i post out simultaneous 4th axis wrapped toolpaths i get  a mixture of +A values and - A values  

 
sample of program with negative A values :
N21 G54
N22 G0 A-51.519  ************
N23 G0 X30.928 Y0 Z55.45
N24 M8
N25 G0 Z41
N26 G1 Z37 F240
N27 G1 Z35.1
N28 G1 X30.94 Z34.961 F720
N29 G93 G1 X30.976 Z34.826 A-51.52 F5133.6  ********
N30 G1 X31.035 Z34.7 A-51.523 F5115.3
 
My Siemens 828 control only likes positive A values A0 , A90, A180, A270 etc etc
 
so the program will run the A positive value parts of the program. 
bit stops and alarms out as soon as we come across a negative A value 
 
 
I've read the link below:
 
and I'm assuming the issue lies within this part of the post ??

    if (true) {
    var aAxis = createAxis({coordinate:0table:trueaxis:[100],range:[-360,360],preference:1});
    machineConfiguration = new MachineConfiguration(aAxis);
 
 
I've played about with the :[-360,360],preference:1}); part of the post 
but nothing i do seams to work ??
 
anyone else had the same issue ?
 
Thanks 
Martin
 
 
 
0 Likes
Accepted solutions (1)
8,716 Views
21 Replies
Replies (21)
Message 2 of 22

mattdlr89
Advisor
Advisor

From my limited post knowledge I'd expect you just need to change the "-360" in range to 0. That should limit all A movements from 0 to 360. 

 

I tested it out here and that seemed to work on a simple file. 

0 Likes
Message 3 of 22

KrupalVala
Autodesk
Autodesk

HI @Anonymous ,

 

I have some doubts. How you are getting "A" negative even the toolpath is within 360 degrees and preferences is set to 1. Could you please share modified sample cam project with us? I need to check your project with you post.

 

Also,You can limit the rotary axis range(0,360) and get the positive value as @mattdlr89 said.

 

Thanks



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 4 of 22

Anonymous
Not applicable

HI @KrupalVala @mattdlr89 

 

My original thought was the same as yours ..... change the  [0.00,360],preference:1});

see below:

 

 

 

if (true) {
    var aAxis = createAxis({coordinate:0table:trueaxis:[100],range:[0.00,360],preference:1});
    machineConfiguration = new MachineConfiguration(aAxis);

    setMachineConfiguration(machineConfiguration);
    optimizeMachineAngles2(1); //  1 = TCP mode disabled  0 = enabled
  }
 
 
The problem is when i do this and try to post the program i get an error page.
  
Error: REWIND: Rewind of machine is required for simultaneous multi-axis toolpath and has been disabled.
 
so i'm thinking is there something else in the post that needs changing as well? 
 
*********************************************************************************************
 
What I've done is attach the fd3 file . and the 14-1-21 post that I used .
 
if you post out just the  "7 POCKET WRAP CONTOUR"  event,  you should get the same code as I'm getting.
 

N17 ; 7 POCKET WRAP CONTOUR
N18 T="EM6A" D1
N19 M6
N20 S8000 M3
N21 G54
N22 G0 A-51.735      ********** see the negative -A 51.735
N23 G0 X29.524 Y0 Z57.45
N24 M8
N25 G0 Z41
 
But how do we change the A negatives, to A positives??
 
Thanks 
Martin
0 Likes
Message 5 of 22

mattdlr89
Advisor
Advisor

Yes quite possibly something else needs changing. 

It will work if you set the range to [0, 720] if that is possible?

0 Likes
Message 6 of 22

mattdlr89
Advisor
Advisor

It's worth saying...

 

This isn't my strong point so perhaps @KrupalVala is better placed to answer this.

 

Changing the range to [0 720] worked on that file but perhaps that isn't a fix-all and is only good for this situation? Someone else will have to help you there.

0 Likes
Message 7 of 22

Anonymous
Not applicable

HI @mattdlr89 

 

I'd not thought about changing the range above 360 ?

 

I have changed the post to [0 720]  and like you say it does work ... 

 

i know the machines Siemens control will read 0.00 - 360.00  as I've tested this works manually.

question is, will it read above 360.00 ??    360.00 - 720.00 ??

 

i'm not back in workshop until Monday Morning now but i will infidelity test this theory out and report back .

 

Unless anyone else is able to chip in with any advice i'll catch up with you @mattdlr89 on Monday 

 

 

Thanks 

Martin 

 

 

 

 

0 Likes
Message 8 of 22

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

 

You can implement the onRewindMachine capabilities in your post and get the positive angles as you want ..

 

First, copy the code from a post processor that contains these functions, such as the haas umc-750.cps post processor. All the lines between and including the following lines should be copied.

 

// Start of onRewindMachine logic
…
// End of onRewindMachine logic

 And enable the Rewind Logic 

var performRewinds = true; // enables the onRewindMachine logic

 

To know more about Rotary Axis Positioning and Rewind Procedure, please click here.

or Download Post Processor Manual and have look on Table-content Number 7.5

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 9 of 22

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

I would suggest you to use pattern option in your case. It won't generate Multi axis toolpath. Please check with same CAM sample project in fusion360 library. It will gives you desired NC output.

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 10 of 22

Anonymous
Not applicable

hi @KrupalVala 

 

I'll make your suggested changes to the post and test on Monday morning .

 

 

I'll let you know the results ..

 

thanks 

Martin 

0 Likes
Message 11 of 22

Anonymous
Not applicable

HI @KrupalVala  @mattdlr89 

 

i think we're getting close.with both of your suggestions .

 

 @mattdlr89  you definitely on the right line of thinking,  i changed the post as you suggested to read     ,range:[0.00,720.0],

 

machine alarms out is A is above 360 degreesmachine alarms out is A is above 360 degrees

but as expected the machine does not like any A values above 360.00  .  so we now know the posted program must have all A values posted out  as positive, between 0.00 - 360.00 degrees. 

 

so  I changed the range in the post to read     ,range:[0.00,360.0],
 
This is where @KrupalVala suggestion is required otherwise the post alarms out and will not post ..
So I've add the lines from the HAAS post 
// Start of onRewindMachine logic
…
// End of onRewindMachine logic

changed the 

 

var performRewinds = true; // enables the onRewindMachine logic

 

 Good news is we are now getting a posted program, however if we try to machine across the A 0.00 line we get a line of code in the program that the machine does not like ? 

 

e.g A359.99 - A360.00  >>>>>> A0.00

 

 
N880 G1 A359.999 F1966.6
N881 G1 A360 F9999
N882 ; REWIND: Tool is retracting due to rotary axes limits.  ???????????
N883 G1 Z47.99 F500
N884 G49 ; TCPC OFF
N885 G0 SUPA Z0 D0
N886 G0 A0
N887 G234 H1 ; TCPC ON
N888 G0 X9.375 Y0
 
 *************************************************
N948 G1 X31.315 A0.896 F2271.4
N949 G1 A0 F1968.1
N950 ; REWIND: Tool is retracting due to rotary axes limits.
N951 G1 Z47.99 F500
N952 G49 ; TCPC OFF
N953 G0 SUPA Z0 D0
N954 G0 A360
 
 
 
@KrupalVala  would i be right in thinking there is something that needs changing in the post around these lines??
 
2744   var text = localize("REWIND: Tool is retracting due to rotary axes limits.");
    warning(text);
 
2697 localize("REWIND: Rewind angles are outside the limits of the machine: ") +
2709 ("REWIND: Rewind of machine is required for simultaneous multi-axis toolpath and has been disabled."));
or 
2721   localize("REWIND: Rewind angles are invalid:")   
 
Thanks Martin
 
 
0 Likes
Message 12 of 22

engineguy
Mentor
Mentor

@Anonymous 

 

This may sound a bit silly as I would expect that you have already checked on this but, (there is always a "but") have you checked the settings in your HAAS control that enable the Rotary Motion that allows it to go above the 360 Degrees ??

It is the "circ. wrap." option, this allows the Rotary Axis to just keep on turning past the 360 degree point, so if you have a setting of say 99999 degrees in your PP then that is the maximum the PP will output and the CNC will go to that as well.

OK, if all that works there is the issue of re-wind, you don`t want it to be running all the way back, so, you have to set parameter 108 to "on" in your control, then it will use the shortest distance back to A0 using the standard G91 G28 G00 A0 followed on the next line with a G90 to get back to Absolute moves.

Here is a link to a HAAS video that covers both of the above, hope it is of some help and I am not wasting your time with something that you already know 🙂 🙂 🙂

https://www.youtube.com/watch?v=vupmJflbAIE

 

Stay Safe

Regards

Rob

0 Likes
Message 13 of 22

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

Please add cyclic as true in you post.

var aAxis = createAxis({coordinate:0, table:true, axis:[1, 0, 0],cyclic:true,range:[0,360],preference:0});

 

After above modification, please do below tests in you machine to check how the rotary Axis chooses the path.

 

Test 1 :  useShortestDirection: true
  useShortestDirection: true, // specifies that shortest angular direction should be used
 This change will give you below code,
N484 G1 X9.375 A=DC(359.104) F2273.6
N485 G1 A=DC(0) F1966.7
 

Test 2 : useShortestDirectionfalse,

useShortestDirection: false, // specifies that shortest angular direction should be used

This change will give you below code. 

N484 G1 X9.375 A359.104 F2273.6
N485 G1 A0 F1966.7
 
From above tests ,We will know how the rotary Axis chooses the shortest path. Whether the rotary axis unwinds and takes a position or will use the shortest path to reach the nearest position.  Also, remove Rewind logic. its not needed.
 
thanks, 
 


Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 14 of 22

Anonymous
Not applicable

Hey Rob @engineguy 

 

The thing i Like about using this forum is the known, unknowns ... 

what i mean is i may have lead you to think I'm using a HAAS control. 

as i mentioned the code then @KrupalVala suggest i use  was  from the HAAS post...

 

and insert it into my Siemens 828 post  "i think there may be a mentioned that I was using Siemens in an earlier post"??

 

but by you making a suggestion it's triggered an idea💡 
The Siemens may also have a similar  parameter in the control which allows the control go go past 360 degrees..

 

i will investigate this and let you know it is an option  ..   so thank you .

 

it may be we end up with a couple of possible solutions to this issue ??

i.e change the control your idea..  or change the post  @KrupalVala idea ???

 

Thanks Martin

 

0 Likes
Message 15 of 22

engineguy
Mentor
Mentor

@Anonymous 

 

I would expect that the Siemens control will have similar parameter options, Fanuc, Heidenhain HAAS, HURCO and even Hobby controls like Mach3 and LinuxCNC have these settings, they are pretty much "Industry Standard" although some are a "Pay for extra" depending on the MTB.

 

Sounds like time for some "Operators Manual" light reading 🙂 🙂 🙂

 

Stay Safe

Regards

Rob

0 Likes
Message 16 of 22

Anonymous
Not applicable

Hi @KrupalVala 

 

so the first test shortest direction ON/YES

 

Screenshot 2021-01-18 16.17.18.png

 

 

Posts this code
 
N21 G54
N22 G0 A=DC(246.651)
N23 G0 X25.395 Y0 Z57.45
N24 M8
N25 G0 Z41
N26 G1 Z37 F333.3
N27 G1 Z33.1
N28 G93 G1 X25.396 Z32.983 A=DC(246.633) F7858
N29 G1 X25.397 Z32.87 A=DC(246.581) F7008.9
N30 G1 X25.399 Z32.767 A=DC(246.496) F6557.9
N31 G1 X25.401 Z32.676 A=DC(246.381) F6396.4
 
*******************************************************************************
 
 
Shortest Direction NO/OFF
Screenshot 2021-01-18 16.22.26.png
 
 
  
 
N21 G54
N22 G0 A246.651
N23 G0 X25.395 Y0 Z57.45
N24 M8
N25 G0 Z41
N26 G1 Z37 F333.3
N27 G1 Z33.1
N28 G93 G1 X25.396 Z32.983 A246.633 F7858
N29 G1 X25.397 Z32.87 A246.581 F7008.9
N30 G1 X25.399 Z32.767 A246.496 F6557.9
N31 G1 X25.401 Z32.676 A246.381 F6396.4
N32 G1 X25.404 Z32.601 A246.242 F6488.1
N33 G1 X25.407 Z32.546 A246.083 F6849.9
N34 G1 X25.411 Z32.512 A245.911 F7558.3
 
 
0 Likes
Message 17 of 22

Anonymous
Not applicable

@engineguy 

 

I think your right that's my bedtime reading sort3d for tonight ..

 

i'll let you know how it goes.. 

Thanks again..

0 Likes
Message 18 of 22

Anonymous
Not applicable
 
 
you say  remove Rewind logic. its not needed.
 
do you mean remove all of this line..
 
2713  // Allow user to override rewind logic if (onRewindMachineEntry(_a_b_c)) {
    return;
  }
 
Martin
0 Likes
Message 19 of 22

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

If your machine rotary axis has a fixed limit( 0 to +360), you need to run the above tests in your machine. From the test, you will know how it chooses the shortest path. (Test 1 or 2). useShortestDirection: true will solve your issue.

If you can change the rotary limit then well and good.

 

In your case, a complete rewind logic is not required. You can remove it from beginning to end.

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 20 of 22

Anonymous
Not applicable

Hi @KrupalVala 

 

Hopefully we are on the same page here .?

 

I have removed the rewind logic section of the post .

would i correct in thinking the "cyclic:true,range: " part means we don't need the  rewind logic section in our post ?

 

var aAxis = createAxis({coordinate:0table:trueaxis:[100],cyclic:true,range:[0,360],preference:0});// preference 0=dont mind 1=positive -1=negative
 
 *****************************************************************************************
 
As far as the tests go the test with the SHORTEST DISTANCE ON runs much quicker plus look much safer.
"at the moment I've only run the tests in fresh air, i will run again in the morning at cut some material"
run time 1:21
 
the 1 thing i find puzzling about the SHORTEST DISTANCE ON is the way that the A values are display
e.g   
N29 G93 G1 X30.976 Z34.826 A=DC(308.48) F5133.6    
N30 G1 X31.035 Z34.7 A=DC(308.477) F5115.3   ***********
N31 G1 X31.115 Z34.586 A=DC(308.474) F5098.7
N32 G1 X31.214 Z34.487 A=DC(308.471) F5084.5
N33 G1 X31.328 Z34.407 A=DC(308.467) F5072.6
 
A=DC(308.477)  I've never come across the A=DC before?  do you know what the DC part relates too?
 
****************************************************************
 
 
the test with SHORTEST DISTANCE OFF took over twice as long
run time 3:12 
plus it looks like the A axis is referencing while the tool is down between some of the pockets ?
i.e referencing from slot 3 to slot 4  travels the long way round "not surprising as  SHORTEST DISTANCE OFF  is selected  but the concerning thing  is the tool would be engaged in the material.. NO RETRACT?
 
 
N28 G1 X30.94 Z34.961 F720
N29 G93 G1 X30.976 Z34.826 A308.48 F5133.6
N30 G1 X31.035 Z34.7 A308.477 F5115.3
N31 G1 X31.115 Z34.586 A308.474 F5098.7
N32 G1 X31.214 Z34.487 A308.471 F5084.5
N33 G1 X31.328 Z34.407 A308.467 F5072.6
 
The program does however look more familiar with the A308.667 rather than the A =DC
 
So long story short.... 
if the 4th axis programs run safely should i expect the programs to have  A =DC values throughout them ?
 
Thanks 
Martin
 
0 Likes