Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Valued Contributor
Valued Contributor

helo dear friends we have a DMG machine with Siemens sl 840D controler and i'm trying to hardcode cycle 800 witch for our mahcine is in this format

CYCLE800(1,"DMG",100000,192,0,0,0,89.274,-6.902,0,0,0,0,-1,100,1)

 

im trying to hardcode it with a prog

 

like so

2019-01-09_220804.jpg

can you give me a hint as to how this can be hard coded and all otger symbols lile ( "?><|:[) ad so on how can they be hardcoded inside of postbuilder

8 REPLIES 8

Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

To output a special character in Tcl, preface it with a backslash (e.g., \ ).

 

As such, this line will output what you need without formatting the anglular output:

 

MOM_output_literal "CYCLE800(1,\"DMG\",100000,192,0,0,0,$mom_out_angle_pos(0),$mom_out_angle_pos(1),0,0,0,0,-1,100,1)"

While this line will output the same information, but format the angles to 4 decimal places:

 

MOM_output_literal "CYCLE800(1,\"DMG\",100000,192,0,0,0,[format "%.4f" $mom_out_angle_pos(0)],[format "%.4f" $mom_out_angle_pos(1)],0,0,0,0,-1,100,1)"

 

Regards,

~Ulas

Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Assuming Post Builder (I assume PC can do somehow as well)

If you have some of the other Siemens cycles set up as "Macros", I would tend to set this up as a macro with hardcoded values (rather than variables):

"Program & Tool Path" tab => "Macro" tab

 

Then in your custom command just "PB_call_macro" the macro you created.

 

Saves having to put the "\" and formatting in the call.

 

Choose your poison ;-)

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Valued Contributor
Valued Contributor

hello dear friend i have tried what you wrote with bouth options here's what it encounters when i do a postprocesing

 

first i set global comand to go and look for the variables 

 

global mom_out_angle_pos(0) mom_out_angle_pos(1)

 

than i do exatly like you showd me and 

 

MOM_output_literal "CYCLE800(1,\"DMG\",100000,192,0,0,0,[format "%.4f" $mom_out_angle_pos(0)],[format "%.4f" $mom_out_angle_pos(1)],0,0,0,0,-1,100,1)"

 

after posting this is the eror that i get

2019-01-10_211631.jpg

i have attached a sys log below with description for the eror.can you help me

because i have looked everywhere and to be hones i havent fount the coomand MOM_output literal with mom_out_angle_pos(0) or (1)

 

 

Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Aleitin:

 

The problem you've run into is that you have tried to declare an array variable along with it's index.  Specifically, mom_out_angle_pos is an array, so to declare it as global all you need to do is this:

 

global  mom_out_angle_pos

 

- You do not include the index values (i.e., mom_out_angle_pos(0) ) when declaring an array.

 

Hope this helps - let me know how you make out with this.

 

 

Regards,

~Ulas

Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Valued Contributor
Valued Contributor

hello Ulas it works 

 

like this 

global mom_out_angle_pos

MOM_output_literal "CYCLE800(1,\"DMG\",100000,192,0,0,0,[format "%.4f" $mom_out_angle_pos(0)],[format "%.4f" $mom_out_angle_pos(1)],0,0,0,0,-1,100,1)"

 

but when i do a posting there's an actual trajetory but the values of these angles  are missing 

 

%
CYCLE800(1,"DMG",100000,192,0,0,0,0.0000,0.0000,0,0,0,0,-1,100,1) - it looks like this 

 

and it should look like this 

CYCLE800(1,"DMG",100000,192,0,0,0,94.924,100.037,0,0,0,0,-1,100,1) - it supose to look like this
T00 M06
G00 X32.065 Y-18.956 B94.924 C100.037 S0 M03
G43 Z-2. H00
G01 Z-5. F250. M08
G41 X44.109 Y-15.194
G03 X35.983 Y9.036 I-14.472 J8.624 ; R16.847
G01 X6.34 Y21.09
G40 X-5.536 Y16.83
Z-2.
M02
%

for B and C axsis the walues are nowhere to be found

 

can this be fixed somehow

 

Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Valued Contributor
Valued Contributor

it worked i did the folowing the comand was like you told me 

 

global mom_out_angle_pos

MOM_output_literal "CYCLE800(1,\"DMG\",100000,192,0,0,0,[format "%.4f" $mom_out_angle_pos(0)],[format "%.4f" $mom_out_angle_pos(1)],0,0,0,0,-1,100,1)"

 

and i added it to the initial move because i figuret that in the start of the path 

 

2019-01-10_211631.jpg

the position of the dual rotary table is 0.0 for the B and C axsis but when i added it to the 

initial move tab 

2019-01-10_211631.jpg

it generated what i needed

 

it looks like this 

 

T00 M06
CYCLE800(1,"DMG",100000,192,0,0,0,94.9240,100.0370,0,0,0,0,-1,100,1)
G00 X32.065 Y-18.956 B94.924 C100.037 S0 M03
G43 Z-2. H00
G01 Z-5. F250. M08
G41 X44.109 Y-15.194
G03 X35.983 Y9.036 I-14.472 J8.624 ; R16.847
G01 X6.34 Y21.09
G40 X-5.536 Y16.83
Z-2.
M02
%

 

and this opens a whole lot posibilities for the spesific programing in my firm

 

thank you a lot for your help i could have not done it whitout you Smiley Happy

Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

N.P.

- Glad you have it working.

 

~U

 

Re: hardcode a siemens cycle 800 using PC CMD prog with MOM_output_literal

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Just to confirm, at "start of path" the mom_out_angle_pos (and a lot of other variables) are NOT set correctly.

They are only set correctly in the initial/first move events.

Even if you enable "read ahead":

global mom_kin_read_ahead_next_motion
set mom_kin_read_ahead_next_motion 1
MOM_reload_kinematics

They (the mom_nxt_* variables) are STILL not correct at "start of path" (If you want them correct at start of path, file a "Me too" ER on ER9187532)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Learn online





Solution Information