Digital Output Issue
- Aldulain
- 
				 Topic Author Topic Author
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 9
- Thank you received: 1
			
	
						11 May 2022 08:26				#242591
		by Aldulain
	
	
		
			
	
			
			 		
													
	
				Digital Output Issue was created by Aldulain			
			
				Hi all,
I have noticed an issue with digital output toggling.
I interface with LinuxCNC through the Python Interface.
What I have noticed is that if you toggle an output that has not yet been allocated within the HAL file, e.g. motion.digital-out-16, it will instead toggle motion.digital-out-00. ( c.set_digital_output(16, 1) )
If digital-out-00 is assigned to a physical output, i.e. hm2_5i25.0.7i76.0.0.output-xx, it will toggle that output, which could lead to unsafe conditions.
I haven't taken time to see if this issue is still evident in 2.8.2, but I have noticed it in LinuxCNC 2.8.0.
I have reserved motion.digital-out-00 as a "do not use" output to prevent accidental output toggling on the machine.
Jarryd
					I have noticed an issue with digital output toggling.
I interface with LinuxCNC through the Python Interface.
What I have noticed is that if you toggle an output that has not yet been allocated within the HAL file, e.g. motion.digital-out-16, it will instead toggle motion.digital-out-00. ( c.set_digital_output(16, 1) )
If digital-out-00 is assigned to a physical output, i.e. hm2_5i25.0.7i76.0.0.output-xx, it will toggle that output, which could lead to unsafe conditions.
I haven't taken time to see if this issue is still evident in 2.8.2, but I have noticed it in LinuxCNC 2.8.0.
I have reserved motion.digital-out-00 as a "do not use" output to prevent accidental output toggling on the machine.
Jarryd
Please Log in or Create an account to join the conversation.
- rodw
- 
				  
- Offline
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 11461
- Thank you received: 3843
			
	
						11 May 2022 09:43				#242602
		by rodw
	
	
		
			
	
			
			 		
													
	
				Replied by rodw on topic Digital Output Issue			
			
				Does motion.digital-out-16 exist?
By default there are only 4 digital output pins unless you have enabled more.
					By default there are only 4 digital output pins unless you have enabled more.
Please Log in or Create an account to join the conversation.
- Aldulain
- 
				 Topic Author Topic Author
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 9
- Thank you received: 1
			
	
						11 May 2022 10:56		 -  11 May 2022 10:58		#242618
		by Aldulain
	
	
		
			
	
	
			 		
													
	
				Replied by Aldulain on topic Digital Output Issue			
			
				Hi Rod,
It does but is not assigned. (It was an example in this case)
What I mean is there is no listing or signal assignment to the digital output.
If I try set an unassigned output via python "c.set_digital_output(x, 1)", it will instead set digital output 0 with the given state value.
The actual machine has num_dio=32
I'm setting up a newer iteration of said machine with num_dio=64 but I haven't gotten to final testing to see if the issue is still there in 2.8.2
					It does but is not assigned. (It was an example in this case)
What I mean is there is no listing or signal assignment to the digital output.
If I try set an unassigned output via python "c.set_digital_output(x, 1)", it will instead set digital output 0 with the given state value.
The actual machine has num_dio=32
I'm setting up a newer iteration of said machine with num_dio=64 but I haven't gotten to final testing to see if the issue is still there in 2.8.2
		Last edit: 11 May 2022 10:58  by Aldulain.		Reason: additional information	
			Please Log in or Create an account to join the conversation.
- rodw
- 
				  
- Offline
- Platinum Member
- 
				  
		Less
		More
		
			
	
		- Posts: 11461
- Thank you received: 3843
			
	
						11 May 2022 20:10		 -  11 May 2022 20:11		#242670
		by rodw
	
	
		
			
	
	
			 		
													
	
				Replied by rodw on topic Digital Output Issue			
			
				You could raise an issue in github but bear in mind  that expected use of these pins is to be set by gcode as stated here:Ref: linuxcnc.org/docs/devel/html/man/man9/mo...9.html#MOTION%20PINS[/i][/b]			
					motion.digital-out-[i]NN OUT BIT - These pins are controlled by the M62 through M65 words.
		Last edit: 11 May 2022 20:11  by rodw.			
	
		The following user(s) said Thank You: Aldulain 	
			Please Log in or Create an account to join the conversation.
- Aldulain
- 
				 Topic Author Topic Author
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 9
- Thank you received: 1
			
	
						12 May 2022 07:36				#242750
		by Aldulain
	
	
		
			
	
			
			 		
													
	
				Replied by Aldulain on topic Digital Output Issue			
			
				I use the python interface as I have my own automation controller that sits on top of linuxcnc so that I can sync two cnc together.
We use linuxcnc for a label print and place cnc for this particular project.
I'll raise the issue on Github, but it isn't an immediate concern as I have a work around with the reserved output-00.
Someone else might run into this same issue though and it threw me for a spin when I first encountered it.
					We use linuxcnc for a label print and place cnc for this particular project.
I'll raise the issue on Github, but it isn't an immediate concern as I have a work around with the reserved output-00.
Someone else might run into this same issue though and it threw me for a spin when I first encountered it.
Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Online
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						14 May 2022 23:56				#242990
		by andypugh
	
	
		
			
	
	
		
			
			 		
													
	
				Replied by andypugh on topic Digital Output Issue			
			
					Attachments:
Please Log in or Create an account to join the conversation.
		Time to create page: 0.165 seconds	
 
													