halui
- slowpoke
 - Offline
 - Elite Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 206
 - Thank you received: 28
 
			
	
						17 Jul 2024 14:56				#305496
		by slowpoke
	
	
		
			
	
	
		
			
			 		
													
	
				halui was created by slowpoke			
			
				I'm making a physical knob & push-button interface for Axis. I have an Arduino board that is successfully sending and receiving messages with Axis.
The next thing I want to try/test is push one of the physical buttons and then link that incoming message (that I can presently observe in HalShow) to cause the X axis to jog one increment in the positive direction. Assume I have already selected the X axis and set the jog increment, I just need to activate the "+" jog button. I searched through all the pins, signals etc in HalShow and could not find that "+ jog button", the closest thing I found was joint.0.kb-jog-active that gets activated when I click on the jog button, so not exactly what I need.
In the LinuxCNC HAL tutorial part 2, he has a bunch halui signals defined in his custom_postgui.hal file (see below). Can I simply replicate what he has done to get access to these signals or do I need to something else to expose the pins shown in the right hand column?
 
			
					The next thing I want to try/test is push one of the physical buttons and then link that incoming message (that I can presently observe in HalShow) to cause the X axis to jog one increment in the positive direction. Assume I have already selected the X axis and set the jog increment, I just need to activate the "+" jog button. I searched through all the pins, signals etc in HalShow and could not find that "+ jog button", the closest thing I found was joint.0.kb-jog-active that gets activated when I click on the jog button, so not exactly what I need.
In the LinuxCNC HAL tutorial part 2, he has a bunch halui signals defined in his custom_postgui.hal file (see below). Can I simply replicate what he has done to get access to these signals or do I need to something else to expose the pins shown in the right hand column?
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
 - 
				
											 - Offline
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 4557
 - Thank you received: 2029
 
			
	
						17 Jul 2024 15:10				#305497
		by Aciera
	
	
		
			
	
	
			 		
													
	
				Replied by Aciera on topic halui			
			
				Make sure you have this line in the [HAL] section of your ini file:
			
					HALUI = halui
		The following user(s) said Thank You: slowpoke 	
			Please Log in or Create an account to join the conversation.
- slowpoke
 - Offline
 - Elite Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 206
 - Thank you received: 28
 
			
	
						18 Jul 2024 00:07				#305547
		by slowpoke
	
	
		
			
	
	
		
			
			 		
													
	
				Replied by slowpoke on topic halui			
			
				Aciera, Thanks for that, I can now see the halui stuff in HalShow
I think I'm pretty close, but need a little help troubleshooting please.
The configuration:
Axis connected to an Arduino board, the Arduino board has a couple of digital inputs(6,7) and a couple of digital outputs(8,9) that are linked to LinuxCNC via a python script. The Arduino/Python portion seems to be working just fine, I can trigger Arduino outputs with HAL file links and I can observe digital inputs to the Arduino in Hal Watch.
What I'm trying to do: when I activate digital input 6 on the Arduino, I want Axis to jog X in the positive direction, (as if I mouse clicked the + "X")
What I have done: I added the following to postgui.hal:
net jog-x-pos halui.axis.x.plus
net jog-x-pos <= arduino.din.6
Arduino input 6 happens to be configured with a pullup, so when I push the button the input goes low, so I set the arduino.din.6-invert bit
What's happening:
When input 6 NOT pushed; arduino.din.6 is yellow (because it's pulled up), halui.axis.x.plus and jog-x-pos are both dark, so far so good
While input 6 IS pushed; arduino.din.6 is dark (it's now low), halui.axis.x.plus and jog-x-pos are both yellow, so far so good
However Axis does not jog. Estop is good, machine power is on, X is selected, just no movement and joint.0.kb-jog-active remains dark.
If I mouse click the actual + jog button in Axis, X moves and the joint.0.kb-jog-active watch LED briefly flashes yellow.
So for whatever reason my button press is not actually causing Axis to jog.
Please see attached, and thanks in advance for any guidance...
 
 			
					I think I'm pretty close, but need a little help troubleshooting please.
The configuration:
Axis connected to an Arduino board, the Arduino board has a couple of digital inputs(6,7) and a couple of digital outputs(8,9) that are linked to LinuxCNC via a python script. The Arduino/Python portion seems to be working just fine, I can trigger Arduino outputs with HAL file links and I can observe digital inputs to the Arduino in Hal Watch.
What I'm trying to do: when I activate digital input 6 on the Arduino, I want Axis to jog X in the positive direction, (as if I mouse clicked the + "X")
What I have done: I added the following to postgui.hal:
net jog-x-pos halui.axis.x.plus
net jog-x-pos <= arduino.din.6
Arduino input 6 happens to be configured with a pullup, so when I push the button the input goes low, so I set the arduino.din.6-invert bit
What's happening:
When input 6 NOT pushed; arduino.din.6 is yellow (because it's pulled up), halui.axis.x.plus and jog-x-pos are both dark, so far so good
While input 6 IS pushed; arduino.din.6 is dark (it's now low), halui.axis.x.plus and jog-x-pos are both yellow, so far so good
However Axis does not jog. Estop is good, machine power is on, X is selected, just no movement and joint.0.kb-jog-active remains dark.
If I mouse click the actual + jog button in Axis, X moves and the joint.0.kb-jog-active watch LED briefly flashes yellow.
So for whatever reason my button press is not actually causing Axis to jog.
Please see attached, and thanks in advance for any guidance...
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
 - 
				
											 - Offline
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 4557
 - Thank you received: 2029
 
			
	
						18 Jul 2024 05:56				#305555
		by Aciera
	
	
		
			
	
			
			 		
													
	
				Replied by Aciera on topic halui			
			
				Check the value of 'halui.axis.jog-speed'.
linuxcnc.org/docs/devel/html/gui/halui.html#_axis_jogging
					linuxcnc.org/docs/devel/html/gui/halui.html#_axis_jogging
Please Log in or Create an account to join the conversation.
		Time to create page: 0.194 seconds