NET: can not add OUT pin .. it already has out pin
- AndrewHsasku
 - Offline
 - Junior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 23
 - Thank you received: 0
 
			
	
						11 Dec 2017 19:08				#102927
		by AndrewHsasku
	
	
		
			
	
			
			 		
													
	
				NET: can not add OUT pin .. it already has out pin was created by AndrewHsasku			
			
				How net function should work? Why I can't connect one input to two outputs?or			
					net enable	axis.0.amp-enable-out				=> driver.enable	x-pid.enablenet enable <= axis.0.amp-enable-out
net enable => driver.enable
net enable => x-pid.enablePlease Log in or Create an account to join the conversation.
- Todd Zuercher
 - 
				
											 - Away
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 4687
 - Thank you received: 1433
 
			
	
						11 Dec 2017 20:10		 -  11 Dec 2017 20:40		#102931
		by Todd Zuercher
	
	
		
			
	
	
			 		
													
	
				Replied by Todd Zuercher on topic NET: can not add OUT pin .. it already has out pin			
			
				Multiple in pins can be connected to an out, but only one out can ever be connected to a signal.
If for some reason you need to use more than one source for a signal, you can use an or2 or another hal logic component.
linuxcnc.org/docs/html/man/man9/or2.9.html
Example
Now the example you gave looks like it only has one output pin (axis.0.amp-enable-out) and two input pins, so it shouldn't be a problem. (I say this guessing that "driver.enable" is supposed to represent some GPIO input pin that sends a signal out to enable your drive, such as parport.0.pin-09-out.)
					If for some reason you need to use more than one source for a signal, you can use an or2 or another hal logic component.
linuxcnc.org/docs/html/man/man9/or2.9.html
Example
loadrt or2 count=1
addf or2.0  servo-thread
net outpin1 <= some.hal-out1 => or2.0.in0
net outpin2 <= some.hal-out2 => or2.0.in1
net target <= or2.0.outNow the example you gave looks like it only has one output pin (axis.0.amp-enable-out) and two input pins, so it shouldn't be a problem. (I say this guessing that "driver.enable" is supposed to represent some GPIO input pin that sends a signal out to enable your drive, such as parport.0.pin-09-out.)
		Last edit: 11 Dec 2017 20:40  by Todd Zuercher.			
			Please Log in or Create an account to join the conversation.
- AndrewHsasku
 - Offline
 - Junior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 23
 - Thank you received: 0
 
			
	
						11 Dec 2017 20:31		 -  11 Dec 2017 20:37		#102933
		by AndrewHsasku
	
	
		
			
	
	
			 		
													
	
				Replied by AndrewHsasku on topic NET: can not add OUT pin .. it already has out pin			
			
				Don't get it. Once again - one pin is an input. This input is casted as a signal. This signal is transmitted to multiple output pins.
As it is written here: linuxcnc.org/docs/2.5/html/hal/basic_hal...#_net_a_id_sub_net_aThis is my case, that prints error.
Maybe there is a missconception about input and output. I mean input as an input for net function.
					As it is written here: linuxcnc.org/docs/2.5/html/hal/basic_hal...#_net_a_id_sub_net_a
#   signal    source            destination          destination
net xStep stepgen.0.out => parport.0.pin-02-out parport.0.pin-08-outMaybe there is a missconception about input and output. I mean input as an input for net function.
		Last edit: 11 Dec 2017 20:37  by AndrewHsasku.			
			Please Log in or Create an account to join the conversation.
- Todd Zuercher
 - 
				
											 - Away
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 4687
 - Thank you received: 1433
 
			
	
						11 Dec 2017 20:46				#102936
		by Todd Zuercher
	
	
		
			
	
			
			 		
													
	
				Replied by Todd Zuercher on topic NET: can not add OUT pin .. it already has out pin			
			
				That line of hal code should not give you any problems due to multiple out pins, as both of the parport pins you have there are both hal input pins. (It is a little confusing since in hal they receive the signal as an input that the parallel port sends out.)
If you are getting a fault because of something to do with that line, it is possible that signal name is used somewhere else in your hal file(s) where another output (or even possibly the same one) is connected to it.
					If you are getting a fault because of something to do with that line, it is possible that signal name is used somewhere else in your hal file(s) where another output (or even possibly the same one) is connected to it.
Please Log in or Create an account to join the conversation.
- AndrewHsasku
 - Offline
 - Junior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 23
 - Thank you received: 0
 
			
	
						11 Dec 2017 22:50		 -  11 Dec 2017 23:10		#102946
		by AndrewHsasku
	
	
		
			
	
	
			 		
													
	
				Replied by AndrewHsasku on topic NET: can not add OUT pin .. it already has out pin			
			
				It seems that any net connection that output is my driver's pin results in such error
exact line looks for example like that:			
					exact line looks for example like that:
net x-enable	axis.0.amp-enable-out	=> x-pid.enable	driver.axis_x.enable
net x-vel-cmd	x-pid.output		=> driver.axis_x.velocity
		Last edit: 11 Dec 2017 23:10  by AndrewHsasku.			
			Please Log in or Create an account to join the conversation.
- Todd Zuercher
 - 
				
											 - Away
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 4687
 - Thank you received: 1433
 
			
	
						12 Dec 2017 03:51				#102970
		by Todd Zuercher
	
	
		
			
	
			
			 		
													
	
				Replied by Todd Zuercher on topic NET: can not add OUT pin .. it already has out pin			
			
				If you could post a copy of your whole hal file.			
					Please Log in or Create an account to join the conversation.
- ozzyrob
 - 
				
											 - Visitor
 - 
				
			 
			
	
						12 Dec 2017 04:37				#102974
		by ozzyrob
	
	
		
			
	
			
			 		
													
	
				Replied by ozzyrob on topic NET: can not add OUT pin .. it already has out pin			
			
				If you can run halrun and load your driver, then run show pin that will show the pins available from your driver and their directions.
No need to run a whole configuration.
					No need to run a whole configuration.
Please Log in or Create an account to join the conversation.
- AndrewHsasku
 - Offline
 - Junior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 23
 - Thank you received: 0
 
			
	
						12 Dec 2017 13:39		 -  12 Dec 2017 13:56		#102994
		by AndrewHsasku
	
	
		
			
	
	
			 		
													
	
				Replied by AndrewHsasku on topic NET: can not add OUT pin .. it already has out pin			
			
				Thanks, it started working
I used hal_pin_bit_newf(HAL_OUT not hal_pin_bit_newf(HAL_IN
					I used hal_pin_bit_newf(HAL_OUT not hal_pin_bit_newf(HAL_IN
		Last edit: 12 Dec 2017 13:56  by AndrewHsasku.			
			Please Log in or Create an account to join the conversation.
- ozzyrob
 - 
				
											 - Visitor
 - 
				
			 
			
	
						12 Dec 2017 16:48				#103011
		by ozzyrob
	
	
		
			
	
			
			 		
													
	
				Replied by ozzyrob on topic NET: can not add OUT pin .. it already has out pin			
			
				So you zigged when you should have zagged ? 
Glad you got it sorted
			
					Glad you got it sorted
Please Log in or Create an account to join the conversation.
		Time to create page: 0.085 seconds