Cancel
Showing results for 
Search instead for 
Did you mean: 

[ISV] G28 move setting

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi

 

I try to setup the millturn.

I have a question.

 

I want to set the moving motion for "G28 X Y Z".

There is currently no movement.

 

G28_MOVE.jpg

 

 

8 REPLIES 8

Re: [ISV] G28 move setting

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

in the screenshot below you can see that the implemention of GMe_GoToReferencePosition (called from G28) uses hardcoded axes strings e.g. "X" . Your axes strings are followed by a number e.g. X1. This is valid and good so far but the implementation is not robust enough to handle this.

 

2018-05-03 14_21_49-XML Notepad - C__Users_feind_AppData_Local_Temp_re_md_tp_1525339885030.xml.pngYou have to copy this method from CCF to MCF and then customize it.

 

Hope that helps

 

Thomas

 

 

Re: [ISV] G28 move setting

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi thomas.

 

I have not tried your advice. I did not understand a little.

Can I get the SAMPLE MCF file?

I want to see the setting value for G28.

Re: [ISV] G28 move setting

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hi Thomas,

I should simulate the same behaviour with the code G30XYZ.

I should modify GMe_GoToReferencePosition called from G30.

Can you show me how to solve this issue? Because I tried but I receive always the same error "Parse error after reading 'G30XYZ' "

 

Thanks for your support,
Marco Riva

Re: [ISV] G28 move setting

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Marco,

 

G30XYZ is not valid for the parser. I guess there are values needed for X Y Z.

Which controller do you use?

 

Thomas

Re: [ISV] G28 move setting

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hi Thomas,

I'm using Fanuc controller. 
Tha CNC is Mazak. With the code G30XYZ the machine moves the head to tool change position.

Do you think that I can simulate it?

Thanks,
Marco

Re: [ISV] G28 move setting

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Marco,

 

sure .... why not?

 

When you simply reuse the G28 implementation for the G30 it should work.

 

Thomas

Re: [ISV] G28 move setting

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

I tried to modify the GMe_GoToReferencePosition but I can understand how I can manage it to simulate correctly the behaviour "G30XYZ". Can you help me? Can you show me how I should change this method?

Because also if I tried to simulate "G28X" without any value it doesn't work.

Thanks for your help!

Marco

Re: [ISV] G28 move setting

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi Marco,

 

I'm sorry, it was a misunderstanding. I thought there were still values behind it. In your case you have to adjust the parser. Currently the implemented expects a value after each axis address.

 

Steps to do:

1. Open the CseFanuc_Yacc.py and search for the p_address rules. There are several inside.

As you can see in rule p_address4-7, there is always a value expected. Behind lex token

AXISADDRESS

Look into lex file which characters are defined for AXISADRESS token rule.

 

2. I would suggest to add a new rule which allows an axis addresses without any value.

It could look like this (use a unique function name, continue the numbering of p_address rules):

    def p_address_1234(self, p):
        '''address : AXISADDRESS'''
        dictArgsNC = {}
        self.callFactory.CreateMetacodeCall(p[1], dictArgsNC)

 

3. Within the G30 Metacode you can catch the X, Y or Z adresses then as MCParam.

 

  <Name>G30</Name>
  <MCParam>X</MCParam>
  <MCParam>Y</MCParam>
  <MCParam>Z</MCParam>
  <Execute>
    <IfCommand>
      <Condition>isDefined(X)</Condition>
      <Then>
        <Comment>do this</Comment>
      </Then>
    </IfCommand>
  </Execute>
</Metacode>

Hope that helps.If you are interested in the Parser Customization topic I suggest to watch the TechTipp training session:

Python-Parser-Customization-in-NX-CAM-Simulation

 

Thomas

Learn online





Solution Information