button to execute hal file
- wasausky
 - Offline
 - New Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 18
 - Thank you received: 4
 
			
	
						13 May 2021 17:16				#208742
		by wasausky
	
	
		
			
	
			
			 		
													
	
				button to execute hal file was created by wasausky			
			
				Hello everybody. I have a wireless joystick that uses the hal_input component.
the problem is that when disconnecting it the pins are lost and to use it again I have to execute the hal commands to reload the hal component.
I would like to implement a button to execute a file containing the hal command to use the joystick again.
i am using axis and linuxcnc 2.8 on raspberry pi 4.
					the problem is that when disconnecting it the pins are lost and to use it again I have to execute the hal commands to reload the hal component.
I would like to implement a button to execute a file containing the hal command to use the joystick again.
i am using axis and linuxcnc 2.8 on raspberry pi 4.
Please Log in or Create an account to join the conversation.
- Henk
 - Offline
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 404
 - Thank you received: 92
 
			
	
						13 May 2021 17:47				#208745
		by Henk
	
	
		
			
	
	
			 		
													
	
				Replied by Henk on topic button to execute hal file			
			
				You can probably use a custom user m code that issues a number of hal commands. Look at the m codes doc
There are ways to call this m code using a bitton
					There are ways to call this m code using a bitton
		The following user(s) said Thank You: wasausky 	
			Please Log in or Create an account to join the conversation.
- wasausky
 - Offline
 - New Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 18
 - Thank you received: 4
 
			
	
						13 May 2021 21:52				#208761
		by wasausky
	
	
		
			
	
			
			 		
													
	
				Replied by wasausky on topic button to execute hal file			
			
				Hello . Thank you, your answer served me. I already have the functional M code that configures the joystick for me now as I link it to a button			
					Please Log in or Create an account to join the conversation.
- Henk
 - Offline
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 404
 - Thank you received: 92
 
			
	
						14 May 2021 04:04				#208779
		by Henk
	
	
		
			
	
			
			 		
													
	
				Replied by Henk on topic button to execute hal file			
			
				This is a bit old but still valid. Links a MDI command to a pyvcp panel button.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding_Custom_MDI_Buttons
					wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding_Custom_MDI_Buttons
Please Log in or Create an account to join the conversation.
- wasausky
 - Offline
 - New Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 18
 - Thank you received: 4
 
			
	
						14 May 2021 21:17				#208855
		by wasausky
	
	
		
			
	
			
			 		
													
	
				Replied by wasausky on topic button to execute hal file			
			
				Thank you very much it works perfectly. I can now disconnect my joystick and connect it again with a button.			
					Please Log in or Create an account to join the conversation.
		Time to create page: 0.091 seconds