Please help with adding laser control
- SjCNC
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 14
- Thank you received: 1
			
	
						06 Jul 2025 16:26				#331397
		by SjCNC
	
	
		
			
	
	
			
			 		
													
	
				Please help with adding laser control was created by SjCNC			
			
				Long story short, I need help getting laser control working again.
Setup was functional with the main diode laser (which failed one day), then edited to use a cheaper diode laser. I tried switching everything back over after repairing the main laser, and it's been a downward spiral.
I'm now pot committed to starting from scratch. Setup is a 7i76e, with a 5 axis BoB on expansion port P1. OS has been upgraded to 2.9.4, and 7i76e_7i76x1_5abobpD.bit has been flashed to the board.
The attached config is just a basic pncConf output. Any guidance for implementing PWM would be greatly appreciated.
 			
					Setup was functional with the main diode laser (which failed one day), then edited to use a cheaper diode laser. I tried switching everything back over after repairing the main laser, and it's been a downward spiral.
I'm now pot committed to starting from scratch. Setup is a 7i76e, with a 5 axis BoB on expansion port P1. OS has been upgraded to 2.9.4, and 7i76e_7i76x1_5abobpD.bit has been flashed to the board.
The attached config is just a basic pncConf output. Any guidance for implementing PWM would be greatly appreciated.
Please Log in or Create an account to join the conversation.
- Benb
- 
				  
- Offline
- Elite Member
- 
				  
		Less
		More
		
			
	
		- Posts: 183
- Thank you received: 60
			
	
						06 Jul 2025 19:15				#331410
		by Benb
	
	
		
			
	
			
			 		
													
	
				Replied by Benb on topic Please help with adding laser control			
			
				I think it would be helpfull to mention your previous os version and linuxcnc version, also include hal and ini pre-overhaul when the machine was operating properly.			
					Please Log in or Create an account to join the conversation.
- SjCNC
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 14
- Thank you received: 1
			
	
						06 Jul 2025 20:46				#331412
		by SjCNC
	
	
		
			
	
	
			
			 		
													
	
				Replied by SjCNC on topic Please help with adding laser control			
			
				Agreed, this has had me stall posting for a few weeks...Pretty sure I was using 2.7.14 when setting up the 7i76e, and 2.8.2 most recently.I've not been great with version control, while moving across computers and machines. These might be the last working files, but unsure...  Laser signal as 'sj' in line 39			
					Please Log in or Create an account to join the conversation.
- Benb
- 
				  
- Offline
- Elite Member
- 
				  
		Less
		More
		
			
	
		- Posts: 183
- Thank you received: 60
			
	
						06 Jul 2025 22:18				#331417
		by Benb
	
	
		
			
	
			
			 		
													
	
				Replied by Benb on topic Please help with adding laser control			
			
				My suggestion is to use:
www.diffchecker.com/
I tested by cutting/pasting your previous and new files; it shows the difference and it gives you the ability to merge the differences line by line.
					www.diffchecker.com/
I tested by cutting/pasting your previous and new files; it shows the difference and it gives you the ability to merge the differences line by line.
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17371
- Thank you received: 5064
			
	
						06 Jul 2025 22:27				#331418
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic Please help with adding laser control			
			
				If you don't want to use your old config, you could simply copy all the
lines from the old hal file that contain 'pwm' and import them into your
new hal file.
					lines from the old hal file that contain 'pwm' and import them into your
new hal file.
Please Log in or Create an account to join the conversation.
- SjCNC
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 14
- Thank you received: 1
			
	
						06 Jul 2025 23:54				#331423
		by SjCNC
	
	
		
			
	
	
			
			 		
													
	
				Replied by SjCNC on topic Please help with adding laser control			
			
				I've got to get better at asking the right questions... Using the old config:
signal 'sj'
motion.analog-out-00, and
hm2_7i76e.0.pwmgen.00.value
All these values update as M67 changes the output.
hm2_7i76e.0.gpio.017.in toggles to True when the gcode starts running.
Does everything seem mapped right for the PWM to reach pin 1 on a 5 axis breakout board? Should that be on hm2_7i76e.0.gpio.017.in? Maybe the code is fine, and I should be chasing down a hardware issue?
					signal 'sj'
motion.analog-out-00, and
hm2_7i76e.0.pwmgen.00.value
All these values update as M67 changes the output.
hm2_7i76e.0.gpio.017.in toggles to True when the gcode starts running.
Does everything seem mapped right for the PWM to reach pin 1 on a 5 axis breakout board? Should that be on hm2_7i76e.0.gpio.017.in? Maybe the code is fine, and I should be chasing down a hardware issue?
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17371
- Thank you received: 5064
			
	
						07 Jul 2025 00:57				#331430
		by PCW
	
	
		
			
	
	
			 		
													
	
				Replied by PCW on topic Please help with adding laser control			
			
				The connections look OK
If you set the PWM value to 0, does GPI0 017 go false?
I don't see that the PWM scale was set so anything >= 1 will be full scale
(default PWM scaling is 1.00 = full scale)
If the PWM values are in percent, you probably wantsetp hm2_7i76e.0.pwmgen.00.scale 100
in the hal file
 			
					If you set the PWM value to 0, does GPI0 017 go false?
I don't see that the PWM scale was set so anything >= 1 will be full scale
(default PWM scaling is 1.00 = full scale)
If the PWM values are in percent, you probably wantsetp hm2_7i76e.0.pwmgen.00.scale 100
in the hal file
		The following user(s) said Thank You: SjCNC 	
			Please Log in or Create an account to join the conversation.
- SjCNC
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 14
- Thank you received: 1
			
	
						07 Jul 2025 01:36				#331431
		by SjCNC
	
	
		
			
	
			
			 		
													
	
				Replied by SjCNC on topic Please help with adding laser control			
			
				Thanks for checking things over PCW!
I can't setp the value since it's linked to a signal, but when gcode runs M67 E0 Q0, GPIO 017 does go false.
'setp hm2_7i76e.0.pwmgen.00.scale 100' has been added, this may yield better results. Since I didn't set the scale, all values (1-100) were sending full power. This tip right here may be the biggest sanity check, thanks PCW!
					I can't setp the value since it's linked to a signal, but when gcode runs M67 E0 Q0, GPIO 017 does go false.
'setp hm2_7i76e.0.pwmgen.00.scale 100' has been added, this may yield better results. Since I didn't set the scale, all values (1-100) were sending full power. This tip right here may be the biggest sanity check, thanks PCW!
Please Log in or Create an account to join the conversation.
		Moderators: snowgoer540	
		Time to create page: 0.113 seconds	
 
													 
	