My Z touch off probe subroutine error

More
27 Jun 2022 00:11 - 27 Jun 2022 00:17 #245973 by Craig E
Hello, I am having trouble setting up my Zaxis tool touch block. I have it running but it faults after it finishes the second G38.2 touch off.  The error I get is Unknown word where unary operation could be.  If I comment out the G38.2 stuff and do a simple move with this button and subroutine it works fine.  

File Attachment:

File Name: custom_postgui.hal
File Size:0 KB

File Attachment:

File Name: touch_plate.ngc
File Size:0 KB
[attachment  =46786]Touch_Plate.ini[/attachment]

File Attachment:

File Name: Touch_Plate.hal
File Size:13 KB
Attachments:
Last edit: 27 Jun 2022 00:17 by Craig E.

Please Log in or Create an account to join the conversation.

More
27 Jun 2022 06:39 #245983 by Hakan
# is not a comment. Use ";" instead.

Please Log in or Create an account to join the conversation.

More
27 Jun 2022 12:33 #245998 by Craig E
Sorry I am not following will you please use it in a command so I can understand? I have always used # to comment out stuff in the .INI, dose it not work in subroutines?

Please Log in or Create an account to join the conversation.

More
27 Jun 2022 14:05 #246010 by mgm
No, in g-code files it is different.
As Hakan already said you use the " ; " there.

as an example:
; MACROCOMMAND=
; MACRODEFAULTS=
; MACROIMAGE=go_to_home.svg,1,1

O<go_to_home> sub
 G0 G53
 G28 Z0
 G28 X0 Y0
O<go_to_home> endsub
M2

Please Log in or Create an account to join the conversation.

More
27 Jun 2022 21:31 #246023 by Craig E
Thank you Hakan and mgm it is clear to me now.

Please Log in or Create an account to join the conversation.

More
28 Jun 2022 22:36 #246118 by Craig E
A quick update. The issue was actually that I had activated the Classic Ladder and checked probe in the Advanced Tab in PnCConf wizard and forgot that I did that.
Once I turned off did that and uncommented the other issue everything worked.

Thanks for the help!

Please Log in or Create an account to join the conversation.

Time to create page: 0.157 seconds
Powered by Kunena Forum