Subroutine error

More
07 Aug 2021 16:39 #217137 by beltramidave
Subroutine error was created by beltramidave
Running V2.7.15
 

Getting an error message when trying to run a touch off routine via a pyvcp button.  This has just started and had been working for a couple years.  I have 2 subs not working and the rest work fine.  Have not edited anything recently to effect these either.  It appears that it is looking in the currently open file for the sub, but it is totally separate.
 
 
 

The reason I say that it appears to be looking in the currently loaded file is because after a reboot, there is no file loaded yet and it shows a different error
 

Anybody with any ideas appreciated.  I have looked at subs and ini file for some type of corruption, but to no avail..
Thanks
Attachments:

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
07 Aug 2021 16:58 #217141 by tommylight
Replied by tommylight on topic Subroutine error
In the ini file there is "open file", see what file is mentioned there as it seems to be missing from the config folder.
Or just set it to
""
And save, this way it does not try to open anything at start.

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

More
07 Aug 2021 18:40 #217148 by beltramidave
Replied by beltramidave on topic Subroutine error
The problem isn’t that anything is loading at startup. The problem is my subroutine is not working.
My subroutine folder is at the same location as the .Ini files is looking for as my other subs work.

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

More
08 Aug 2021 12:39 - 08 Aug 2021 12:40 #217215 by BigJohnT
Replied by BigJohnT on topic Subroutine error
Attach your ini file and the files in question instead of screen shots.

JT
Last edit: 08 Aug 2021 12:40 by BigJohnT.

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

More
08 Aug 2021 15:11 #217244 by beltramidave
Replied by beltramidave on topic Subroutine error
Here are the files.  The subs 100 & 102 are the ones that were giving me an issue.  All the rest of the subs were working fine.
I have rebooted several times since the initial post and now this morning all subs are working again.  It's almost like Linuxcnc is loading something correctly, yet when this happened the first time, it was just out of the blue and the PC had not been shut down recently.

Guessing that you won't find anything in the files.  Frustrating that it happens only occassionaly.
Attachments:

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

More
08 Aug 2021 17:11 #217248 by roland
Replied by roland on topic Subroutine error
usually there is an M2 at the end of the sub file.
In your case the M2 is missing. Maybe this has an affect 

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

More
11 Aug 2021 00:21 #217447 by andypugh
Replied by andypugh on topic Subroutine error
It looks like the problem might well be the lack of an M2 at the end of the subs.

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

More
11 Aug 2021 10:09 #217500 by beltramidave
Replied by beltramidave on topic Subroutine error

It looks like the problem might well be the lack of an M2 at the end of the subs.

I can most certainly add M2 to the end and see if it makes a difference, but none of my other subs have it and they work fine all the time.   I will try and report back,   Thanks

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

More
19 Aug 2021 11:21 #218132 by beltramidave
Replied by beltramidave on topic Subroutine error
Sorry for the lapse in replies.
Adding M2 to the end of my subroutine had no effect on my issue.

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

More
19 Aug 2021 15:34 #218145 by MaHa
Replied by MaHa on topic Subroutine error
in the ini file
OPEN_FILE = /home/probotix/Desktop/Warmup Routine.ngc

having spaces in .ngc files could cause problems...

in o100 SUB
o101 if [#1 NE #5400]

but after start, maybe there is no tool in spindle, #5400 , and then further down the routine, P#1 must be a valid toolnumber from tooltable
G10 L11 P#1 Z0 R0

i think you need to exclude read this when loading, with something like

   o800 IF     [#<_task> EQ 0]
   o800        RETURN [99]
   o800 ENDIF
   
 

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

Time to create page: 0.196 seconds
Powered by Kunena Forum