- Possible bug in subroutines
-
Member
Possible bug in subroutines
I have run into a possible bug in running a subroutine. The problem comes when you switch modes between G90 > G91 or G91 > G90. PathPilot errors and the sub crashes out.
IF someone has the time could you test the code on your end to make SURE it is not something else wrong here before I submit a trouble report to Tormach. It is a very simple probing sub. I am starting to transfer all of our Mach/UCCNC/Fanuc/Haas probing codes over to PathPilot and there is a LOT of them to do.
o <20901> sub
G90 F20
G0 X0 Y0 Z0
G0 X5
G1 Z-1
G91
G38.3 X2 F20 (probe X+)
G1 X-.1 (pullback)
G90
G0 Z0
G0 X5
o <20901> end sub
Similar Threads:
-
-
Re: Possible bug in subroutines
There is too much snow here to comfortably go to the workshop so I tried running your code on the Pathpilot virtual machine. I added a call to your subroutine and commented out the G38.3 line but otherwise left it unchanged. It runs without errors. This is with PP 2.2.1 configured as a 770M. What error do you get? What version of PP? What machine?
-
Member
Re: Possible bug in subroutines
12:50:11 | subroutines/192 = cycle time 00:00:09 run time 00:00:09
12:50:11 | Probe Complete
12:50:09 | mode G91
12:50:09 | G38 completed
12:50:03 | Mode G91
12:50:02 | Test mode G91 Started as Gcode file
12:49:26 | subroutines/192 = cycle time 00:00:00 run time 00:00:00 last line 18
12:49:12 | Unable to execute command: (EMC_AXIS_ABORT:120) in MDI mode
12:49:12 | Unable to execute command: (EMC_AXIS_ABORT:120) in MDI mode
12:49:12 | Unable to execute command: (EMC_AXIS_ABORT:120) in MDI mode
12:49:12 | Unable to execute command: (EMC_AXIS_ABORT:120) in MDI mode
12:49:12 | Mode G91
12:49:10 | Test mode G91 <<< started as sub
I have tired it as a o call and as M98 Pxx same results
-
Member
Re: Possible bug in subroutines
When you said " I added a sub call to teh subroutine". What exactly did you add ?? Maybe I am missing something here (;-).
(;-) TP
-
Re: Possible bug in subroutines
We're probably both missing a lot!
I initially removed the <> around the subroutine number since that is not the documented syntax for LinuxCNC programs. I just retried using exactly your code and invoked it as "O20901 call" via the MDI. It runs without an issue and with no messages on the Status tab.
-
Member
Re: Possible bug in subroutines
OK teh <20901> is how Tormach does it adn that does work.
There must be a problem in usuing teh SIM version of PP. It is Version 2.3.6 running in sim mode and fails every time when called as a sub with either o call or M98 Pxx.
Thanks For teh help, (;-) TP
-
Re: Possible bug in subroutines
You piqued my curiosity so I braved the snow and tried your subroutine on a real 770-3 running PP 2.3.6. Invoking it via the MDI as "O20901 call" produces the expected result. "M98 P20901" (is that the correct FANUC syntax?) gives the error message " 'O.... sub' subroutine must be called with 'O.... call' "
Last edited by kstrauss; 11-11-2019 at 04:35 PM.
-
Member
Re: Possible bug in subroutines
Teh M98 sub call requires you to write teh sub as a Fanuc Sub
o190 ( Sub Name)
gcode
gcode
etc
etc
M99
- Possible bug in subroutines
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules