- Posts: 55
- Thank you received: 3
Call external subroutine not working in recent versions of LCNC
- shipmodeller
- Offline
- Senior Member
-
Less
More
7 years 8 months ago - 7 years 8 months ago #126294
by shipmodeller
Replied by shipmodeller on topic Call external subroutine not working in recent versions of LCNC
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
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
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.
- shipmodeller
- Offline
- Senior Member
-
Less
More
- Posts: 55
- Thank you received: 3
7 years 8 months ago #126297
by shipmodeller
Replied by shipmodeller on topic Call external subroutine not working in recent versions of LCNC
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...
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...
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
7 years 8 months ago #126299
by andypugh
Replied by andypugh on topic Call external subroutine not working in recent versions of LCNC
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
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.
- shipmodeller
- Offline
- Senior Member
-
Less
More
- Posts: 55
- Thank you received: 3
7 years 8 months ago - 7 years 8 months ago #126300
by shipmodeller
Replied by shipmodeller on topic Call external subroutine not working in recent versions of LCNC
Attached toolchange file
100% failure rate with the scenario I indicated
And again.. my revision of Axis code is pre1-4559
100% failure rate with the scenario I indicated
And again.. my revision of Axis code is pre1-4559
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.
- shipmodeller
- Offline
- Senior Member
-
Less
More
- Posts: 55
- Thank you received: 3
7 years 8 months ago #126302
by shipmodeller
Replied by shipmodeller on topic Call external subroutine not working in recent versions of LCNC
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.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
7 years 8 months ago #126304
by andypugh
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?
Replied by andypugh on topic Call external subroutine not working in recent versions of LCNC
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