Cancel
Showing results for 
Search instead for 
Did you mean: 

[ISV] Ignore comment

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi

 

Machine controller is fanuc.

 

There is a ";" comment in the program code.

11.jpg

 

There is currently an error in Simulation.

 

I want set ";" code block ignore.

 

 

 

 

5 REPLIES 5

Re: [ISV] Ignore comment

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

can you show me the NC line which occurs an error?

 

Thanks

Thomas

Re: [ISV] Ignore comment

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
For FANUC comment is a pair ()

Re: [ISV] Ignore comment

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Kimies,

 

the parser can be enhanced to handle that comments, but in Fanuc the comments are:

()

in Sinumerik comments are

;

 

So I wonder what is the real controller type, maybe a special Fanuc flavour?

 

Thomas Schulz
Siemens PLM
Manufacturing Engineering Software

Re: [ISV] Ignore comment

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

I'm not sure if this is exactly Kimies case, but maybe also others may use this:

In case of some exotic controllers which are similar to Fanuc, but for some reason use ";" for a comment (been there, done that...),  we can also handle it with CSEPreprocessLine method.

 

preprocess.png

 

 

 

It can be also very simply enhanced to handle also comments which might start in the middle of NC block using findSubstr() and trim()

Marek Pawlus, NCmatic

Development: C#, Tcl/Tk, CSE

Re: [ISV] Ignore comment

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

 

image.png

Then in the CseFanuc_Lex.py, you can add :

def t_COMMENT_3(t):
    r';.*'
    t.type = "COMMENT"
    return t

 

The advantage of this way is that you can say for example

G0 G91 G28 X0 Y0 Z0 ;goto machine zero

The goto machine zero in this case will be ignored, while the movement will still be executed.

Learn online





Solution Information