Call external subroutine not working in recent versions of LCNC

More
7 years 8 months ago - 7 years 8 months ago #126294 by shipmodeller
In order to try to figure this out, I did 5 steps, and produced a Show LinuxCNC status report from the Machine dropdown tab after each step.
1:Bootup and set the Machine Enable button
2: Home machine
3: Hit the Toolchange button
4: Load program
5: Hit the Toolchange button again - fail.

I then did a file compare between each one. The last one showed an interperter_error_code 5, motion_mode went back to coord and state reflecting rcs_error. ANY assistance or suggestions are welcome.

Ok .. now for the big clue... to someone... if I now, after the failure, go back to the preloaded file, /usr/share/axis/images/axis.ngc, then the toolchange button works again... tell me why???? When I reload another file, the button stops working again

File Attachment:

File Name: status2.txt
File Size:5 KB

File Attachment:

File Name: status1.txt
File Size:5 KB

File Attachment:

File Name: status4.txt
File Size:5 KB

File Attachment:

File Name: status3.txt
File Size:5 KB

File Attachment:

File Name: status5.txt
File Size:5 KB
Last edit: 7 years 8 months ago by shipmodeller. Reason: Found sequence that makes it work again...??????

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

More
7 years 8 months ago #126297 by shipmodeller
Solved!!!!! I think this is a defect that should be addressed by the LinuxCNC community.
Tearing my hair out, but here is what I did.

Went into the file, and the Gcode files all had a % symbol in the start, and a % symbol in the end. This did not result in any error being displayed anywhere on the screen, and these files ran without a hitch. But it would kill the HAL button with file attached, which is the Z Touch button, with the error "Otoolchanged not found before EOF" when I hit the button.

I knew all this worked well in version 2.7.3 .. so, I created a small file, with just the % and %.. sure enough.. failure. I removed the % out of my files, pushed a M2 code at the end, and Wolla! The buttons worked as advertised.

My files with the leading % and trailing % was the issue.... I can adjust the gcode generator in MasterCamX now, and that should handle this. But boy, what a bear to find. I am including one of the thousands of files that failed this scenario. File will still run, it just kills that toolchange button. Sure would like someone to confirm this for me, and add it as a defect...

File Attachment:

File Name: CHECKERS12_E.NGC
File Size:5 KB
Attachments:

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

More
7 years 8 months ago #126299 by andypugh
Well, that is a very strange thing to discover,

Unfortunately I can't reproduce the issue here with the checkers12 G-code file. Possibly it is an interaction between that and tolchange3? Can you attach the toolchange3 file and I will try adding that to my test config here. (At the moment _my_ toolchange3 just contains
Code:
O<toolchange3< SUB (DEBUG, That Worked OK) O<toolchange3> ENDSUB

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

More
7 years 8 months ago - 7 years 8 months ago #126300 by shipmodeller
Attached toolchange file

100% failure rate with the scenario I indicated

File Attachment:

File Name: toolchange3.ngc
File Size:1 KB


And again.. my revision of Axis code is pre1-4559
Attachments:
Last edit: 7 years 8 months ago by shipmodeller. Reason: Pushed revision number of Linux just to be sure

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

More
7 years 8 months ago #126302 by shipmodeller
It's interesting to note that the toolchange3.ngc ALSO has the % front and back

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

More
7 years 8 months ago #126304 by andypugh

shipmodeller wrote: It's interesting to note that the toolchange3.ngc ALSO has the % front and back


Indeed, and removing them makes things work again (with them I _can_ reproduce your issue)

I have a vague memory that % shouldn't be used in an external subroutine file, but I had forgotten it until just now.
I wonder if that is documented anywhere?
The following user(s) said Thank You: shipmodeller

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

Time to create page: 0.537 seconds
Powered by Kunena Forum