2.9.3 - Stuck in wrong state and stops
- rodw
- 
				 Topic Author Topic Author
- Online
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 11460
- Thank you received: 3843
			
	
						20 Mar 2025 06:09				#324339
		by rodw
	
	
		
			
	
			
			 		
													
	
				2.9.3 - Stuck in wrong state and stops was created by rodw			
			
				Reported by a customer. Sometimes, QTP freezes. Moving the float switch by hand seems to clear the error and the cut proceeds.
Any ideas or feedback? I have never experienced this.
I wanted to write a script that updates APT to look at the new Buildbot for 2.10 instead of the Linuxcnc.org 2.94 repo so it looks like I need to do that now....
					Any ideas or feedback? I have never experienced this.
I wanted to write a script that updates APT to look at the new Buildbot for 2.10 instead of the Linuxcnc.org 2.94 repo so it looks like I need to do that now....
Please Log in or Create an account to join the conversation.
- tommylight
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 20843
- Thank you received: 7106
			
	
						21 Mar 2025 01:45				#324393
		by tommylight
	
	
		
			
	
	
			 		
													
	
				Replied by tommylight on topic 2.9.3 - Stuck in wrong state and stops			
			
				Any news on this?
What exactly happens, if you got more feedback?
-
Last i actually used it for work (not just testing) QTP was over a year ago (when Debian 12.3 was released), it still had a nasty habit of getting stuck doing nothing as follows:
-usually does any number of cuts ok then it hangs on torch going up and does nothing at all, did not try the switch thing so not sure if this is the same issue, but i did notice the Z axis would not go all the way to the top safe travel height, usually 1-3mm lower, only stopping the execution and running from line would work for me.
The same thing happened on PlasmaC and Phill fixed it, so it is strange that it happens on QTP but not on PlasmaC....well it did happen on PlasmaC, about once in 6-9 months of daily use, while on QTP it would happen daily, several times a day sometimes, then it would not happen for months, then happen again.....
Hence i do not use it on production machines.
-
I wrote a rant here and deleted it...
					What exactly happens, if you got more feedback?
-
Last i actually used it for work (not just testing) QTP was over a year ago (when Debian 12.3 was released), it still had a nasty habit of getting stuck doing nothing as follows:
-usually does any number of cuts ok then it hangs on torch going up and does nothing at all, did not try the switch thing so not sure if this is the same issue, but i did notice the Z axis would not go all the way to the top safe travel height, usually 1-3mm lower, only stopping the execution and running from line would work for me.
The same thing happened on PlasmaC and Phill fixed it, so it is strange that it happens on QTP but not on PlasmaC....well it did happen on PlasmaC, about once in 6-9 months of daily use, while on QTP it would happen daily, several times a day sometimes, then it would not happen for months, then happen again.....
Hence i do not use it on production machines.
-
I wrote a rant here and deleted it...
		The following user(s) said Thank You: rodw 	
			Please Log in or Create an account to join the conversation.
- snowgoer540
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 2495
- Thank you received: 833
			
	
						22 Mar 2025 21:35				#324587
		by snowgoer540
	
	
		
			
				
Rants don't usually help ... however configuration backups (made from the settings tab) sometimes do. It's hard to diagnose otherwise since Phill, nor I, nor a guy who cut so much plate with QtPlasmaC he was able to sell his plasma table and buy a large fiber laser have seen this issue.
Also, adding the following to your postgui.hal file might help see where it gets stuck as well:
Lastly, it's worth noting that plasmac, plasmac2, and qtplasmac all use the same plasmac component at least to the extent where anything fixed in the original PlasmaC was carried forward to the same PlasmaC component today.
If there's a bug, no one wants to find it more than me, but it’s really challenging to identify a bug without being able to reproduce it. Can't squish a bug I can't see 
			
					
	
	
			 		
													
	
				Replied by snowgoer540 on topic 2.9.3 - Stuck in wrong state and stops			
			The same thing happened on PlasmaC and Phill fixed it, so it is strange that it happens on QTP but not on PlasmaC....well it did happen on PlasmaC, about once in 6-9 months of daily use, while on QTP it would happen daily, several times a day sometimes, then it would not happen for months, then happen again.....
Hence i do not use it on production machines.
-
I wrote a rant here and deleted it...
Rants don't usually help ... however configuration backups (made from the settings tab) sometimes do. It's hard to diagnose otherwise since Phill, nor I, nor a guy who cut so much plate with QtPlasmaC he was able to sell his plasma table and buy a large fiber laser have seen this issue.
Also, adding the following to your postgui.hal file might help see where it gets stuck as well:
setp plasmac.debug-print 1Lastly, it's worth noting that plasmac, plasmac2, and qtplasmac all use the same plasmac component at least to the extent where anything fixed in the original PlasmaC was carried forward to the same PlasmaC component today.
If there's a bug, no one wants to find it more than me, but it’s really challenging to identify a bug without being able to reproduce it. Can't squish a bug I can't see
 
			
		The following user(s) said Thank You: tommylight 	
			Please Log in or Create an account to join the conversation.
- rodw
- 
				 Topic Author Topic Author
- Online
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 11460
- Thank you received: 3843
			
	
						22 Mar 2025 22:19				#324589
		by rodw
	
	
		
			
	
	
			 		
													
	
				Replied by rodw on topic 2.9.3 - Stuck in wrong state and stops			
			
				More feedback here. Customer has an IT savvy brother. His brother told him to lift the torch to clear the stall after reviewing the code and it worked!
It goes without saying, I have asked for a line number reference.
I think this implies the bug lurks in the plasmac.comp state machine somewhere.
I've already found my plasmac bug for the day. Maybe someone elses turn!
					It goes without saying, I have asked for a line number reference.

I think this implies the bug lurks in the plasmac.comp state machine somewhere.
I've already found my plasmac bug for the day. Maybe someone elses turn!
		The following user(s) said Thank You: tommylight 	
			Please Log in or Create an account to join the conversation.
- snowgoer540
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 2495
- Thank you received: 833
			
	
						23 Mar 2025 02:05				#324604
		by snowgoer540
	
	
		
			
				
Provided the works was not completely locked up, float activation, torch breakaway, ohmic detection, or arc ok lost will always result in a program pause which should break up any state hangs.
That check (during a running program) begins at line 691. What would be more useful would be to know what state it was in when it "freezes".
That could be seen by running QtPlasmaC from a terminal, and either using Halshow to change plasmac.debug-print True, or having already addedto the postgui.hal file.  Watch the terminal for the state it freezes in.
A backup of the config from the Settings tab may help too.
					
	
	
			 		
													
	
				Replied by snowgoer540 on topic 2.9.3 - Stuck in wrong state and stops			
			More feedback here. Customer has an IT savvy brother. His brother told him to lift the torch to clear the stall after reviewing the code and it worked!
It goes without saying, I have asked for a line number reference.
I think this implies the bug lurks in the plasmac.comp state machine somewhere.
I've already found my plasmac bug for the day. Maybe someone elses turn!
Provided the works was not completely locked up, float activation, torch breakaway, ohmic detection, or arc ok lost will always result in a program pause which should break up any state hangs.
That check (during a running program) begins at line 691. What would be more useful would be to know what state it was in when it "freezes".
That could be seen by running QtPlasmaC from a terminal, and either using Halshow to change plasmac.debug-print True, or having already added
setp plasmac.debug-print 1A backup of the config from the Settings tab may help too.
		The following user(s) said Thank You: rodw 	
			Please Log in or Create an account to join the conversation.
- rodw
- 
				 Topic Author Topic Author
- Online
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 11460
- Thank you received: 3843
			
	
						23 Mar 2025 07:44				#324632
		by rodw
	
	
		
			
	
			
			 		
													
	
				Replied by rodw on topic 2.9.3 - Stuck in wrong state and stops			
			
				Thanks, given that this issue only happens once a week or so, is the output logged anywhere?
This table gets some pretty heavy use so maybe it will be a good candidate for finding bugs.
Its probably not 100% current but the config is here
github.com/rodw-au/showstopper
					This table gets some pretty heavy use so maybe it will be a good candidate for finding bugs.
Its probably not 100% current but the config is here
github.com/rodw-au/showstopper
Please Log in or Create an account to join the conversation.
- snowgoer540
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 2495
- Thank you received: 833
			
	
						23 Mar 2025 13:40				#324664
		by snowgoer540
	
	
		
			
				
Not other than the terminal. I spent 5-10 minutes confirming my suspicion that the mismatch in timing between the GUI and the component is such that catching the state changes at a GUI level is fruitless. Even appending them to a variable and writing that to the log file when the machine goes IDLE again reveals that it misses some state changes. I'd be reluctant to add file based logging to the component.
Not sure where the harm would be in running from the terminal, and turning on debug-print and then having your customer look at the terminal window the next time it "freezes" and report back on the last state displayed.
					
	
			
			 		
													
	
				Replied by snowgoer540 on topic 2.9.3 - Stuck in wrong state and stops			
			Thanks, given that this issue only happens once a week or so, is the output logged anywhere?
Not other than the terminal. I spent 5-10 minutes confirming my suspicion that the mismatch in timing between the GUI and the component is such that catching the state changes at a GUI level is fruitless. Even appending them to a variable and writing that to the log file when the machine goes IDLE again reveals that it misses some state changes. I'd be reluctant to add file based logging to the component.
Not sure where the harm would be in running from the terminal, and turning on debug-print and then having your customer look at the terminal window the next time it "freezes" and report back on the last state displayed.
Please Log in or Create an account to join the conversation.
- snowgoer540
- 
				  
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 2495
- Thank you received: 833
			
	
						23 Mar 2025 13:44				#324665
		by snowgoer540
	
	
		
			
	
	
		
	
			 		
													
	
				Replied by snowgoer540 on topic 2.9.3 - Stuck in wrong state and stops			
			
				Here is what it looked like:  
 
For reference:
So it missed:
4 - ZERO_HEIGHT
14 - SAFE_HEIGHT
16 - END_CUT
17- END_JOB
					For reference:
        # plasmac states
        self.IDLE           =  0
        self.PROBE_HEIGHT   =  1
        self.PROBE_DOWN     =  2
        self.PROBE_UP       =  3
        self.ZERO_HEIGHT    =  4
        self.PIERCE_HEIGHT  =  5
        self.TORCH_ON       =  6
        self.ARC_OK         =  7
        self.PIERCE_DELAY   =  8
        self.PUDDLE_JUMP    =  9
        self.CUT_HEGHT      = 10
        self.CUT_MODE_01    = 11
        self.CUT_MODE_2     = 12
        self.PAUSE_AT_END   = 13
        self.SAFE_HEIGHT    = 14
        self.MAX_HEIGHT     = 15
        self.END_CUT        = 16
        self.END_JOB        = 17
        self.TORCH_PULSE    = 18
        self.PAUSED_MOTION  = 19
        self.OHMIC_TEST     = 20
        self.PROBE_TEST     = 21
        self.SCRIBING       = 22
        self.CONS_CHNG_ON   = 23
        self.CONS_CHNG_OFF  = 24
        self.CUT_REC_ON     = 25
        self.CUT_REC_OFF    = 26
        self.DEBUG          = 27So it missed:
4 - ZERO_HEIGHT
14 - SAFE_HEIGHT
16 - END_CUT
17- END_JOB
Attachments:
		The following user(s) said Thank You: tommylight, rodw 	
			Please Log in or Create an account to join the conversation.
- rodw
- 
				 Topic Author Topic Author
- Online
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 11460
- Thank you received: 3843
			
	
						24 Mar 2025 02:49				#324720
		by rodw
	
	
		
			
	
			
			 		
													
	
				Replied by rodw on topic 2.9.3 - Stuck in wrong state and stops			
			
				I received additional detailed information from the customer and have raised an issue in github here
github.com/LinuxCNC/linuxcnc/issues/3382
Hopefully, this can be resolved.
					github.com/LinuxCNC/linuxcnc/issues/3382
Hopefully, this can be resolved.
Please Log in or Create an account to join the conversation.
- phillc54
- 
				  
- Offline
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 5711
- Thank you received: 2093
			
	
						24 Mar 2025 04:51				#324725
		by phillc54
	
	
		
			
	
			
			 		
													
	
				Replied by phillc54 on topic 2.9.3 - Stuck in wrong state and stops			
			
				Is there a complete sim config somewhere that can be used to test for this issue?
If so I can probably make a bit time to have a look.
The config posted above is not a sim but a quick glance does show a couple of oddities in runstep.hal:The two plasma:program-is-... signals seem to have nothing driving them, just two inputs connected together.
Have you thought of using the provided external button pins?
 			
					If so I can probably make a bit time to have a look.
The config posted above is not a sim but a quick glance does show a couple of oddities in runstep.hal:
# External Program Pause/Resume and Run/Step Buttons
# Pause/Resume Section
unlinkp halui.program.is-paused
unlinkp halui.program.is-running
net plasmac:program-is-paused => pr-or2.in0
net ispaused halui.program.is-paused => pr-or2.in1
net plasmac:program-is-running => pr-or3.in0Have you thought of using the provided external button pins?
Please Log in or Create an account to join the conversation.
		Moderators: snowgoer540	
		Time to create page: 0.522 seconds	
 
													 
			