M52 P1 as RS274 Startup Code

More
5 years 7 months ago #202424 by mic
Hi,
has anyone tested M52P1 as RS274 Startup Code to enable adaptive feed by default?
If i try to add M52P1 Linuxcnc is not starting up. Running M52P1 after startup is working fine.
Is there a reason why this is not working or is ther a workaround?
I tried with 2.8 and master.

Please Log in to join the conversation.

More
5 years 7 months ago #202678 by andypugh
What error do you see?

It works for me (testing in a VM with 2.8-pre. (Which is just what I had handy))

Please Log in to join the conversation.

More
5 years 7 months ago #203904 by mic
Replied by mic on topic M52 P1 as RS274 Startup Code
Thank you very much, it was a very good hint to solve the problem by my self... I saw no error Message because LCNC hung up at a specific point. But studying the whole Console Output showed the following Entry in an very early state:
emc/task/emctask.cc 411: interp_error: Mehrere P-Wörter in einem Satz
emc/task/emctaskmain.cc 3087: can`t initialize interpreter.
Because the interpreter was not initializing Gmoccapy hung up.

I found out that RS274NGC_STARTUP_CODE shall contain only one Parameter Px.
My Startup Code was:
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9 M52P1
The following Change is working well (removing blend tolerance):
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G80 G90 G94 G97 M5 M9 M52P1

Is there a way to add multiple "P-Sentence" in the Startup-Code?

Please Log in to join the conversation.

More
5 years 7 months ago #203938 by andypugh

mic wrote: Is there a way to add multiple "P-Sentence" in the Startup-Code?


No. There is only one of each parameter allowed per G-code block. (They can be provided in any order, so with multiples the interpreter does not know which command they should be associated with.)

The answer is to have:
Code:
RS274NGC_STARTUP_CODE = O<setup> CALL

And put the commands in an O-word subroutine called setup.ngc containing:
Code:
O<setup> SUB G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M M52P1 O<setup> ENDSUB M2

(you can replace "setup" throughout with anything that suits you)

Please Log in to join the conversation.

Time to create page: 0.111 seconds
Powered by Kunena Forum