handwheel on MESA 7I48 Encoder
- dirk61
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 46
- Thank you received: 0
			
	
						26 Nov 2017 12:30				#102349
		by dirk61
	
	
		
			
	
			
			 		
													
	
				handwheel on MESA 7I48 Encoder was created by dirk61			
			
				hi Guys
Have a problem with the handwheel
Have made the following HAL .......
Funtioniert so far, he always counts 4 times
With the commented out comes ne thick error message ...
Can one of you give me a tip?
# ---jogwheel signals to mesa encoder - shared MPG---
loadrt mux4 count=1
addf mux4.0 servo-thread
setp axis.0.jog-vel-mode 1
setp axis.1.jog-vel-mode 1
setp axis.2.jog-vel-mode 1
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001
net scale1 mux4.0.sel0 <= hm2_5i20.0.gpio.028.in_not
net scale2 mux4.0.sel1 <= hm2_5i20.0.gpio.029.in_not
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net mpg-x axis.0.jog-enable <= hm2_5i20.0.gpio.024.in_not
net mpg-y axis.1.jog-enable <= hm2_5i20.0.gpio.025.in_not
net mpg-z axis.2.jog-enable <= hm2_5i20.0.gpio.026.in_not
#net mpg-A axis.3.jog-enable <= hm2_5i20.0.gpio.027.in_not#
# ---jogwheel signals to mesa encoder - shared MPG---
setp hm2_5i20.0.encoder.04.counter-mode 0
#setp hm2_5i20.0.encoder.04.x4-mode 0
net pend-counts axis.0.jog-counts <= hm2_5i20.0.encoder.04.count
net pend-counts axis.1.jog-counts <= hm2_5i20.0.encoder.04.count
net pend-counts axis.2.jog-counts <= hm2_5i20.0.encoder.04.count
					Have a problem with the handwheel
Have made the following HAL .......
Funtioniert so far, he always counts 4 times
With the commented out comes ne thick error message ...
Can one of you give me a tip?
# ---jogwheel signals to mesa encoder - shared MPG---
loadrt mux4 count=1
addf mux4.0 servo-thread
setp axis.0.jog-vel-mode 1
setp axis.1.jog-vel-mode 1
setp axis.2.jog-vel-mode 1
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001
net scale1 mux4.0.sel0 <= hm2_5i20.0.gpio.028.in_not
net scale2 mux4.0.sel1 <= hm2_5i20.0.gpio.029.in_not
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
net mpg-x axis.0.jog-enable <= hm2_5i20.0.gpio.024.in_not
net mpg-y axis.1.jog-enable <= hm2_5i20.0.gpio.025.in_not
net mpg-z axis.2.jog-enable <= hm2_5i20.0.gpio.026.in_not
#net mpg-A axis.3.jog-enable <= hm2_5i20.0.gpio.027.in_not#
# ---jogwheel signals to mesa encoder - shared MPG---
setp hm2_5i20.0.encoder.04.counter-mode 0
#setp hm2_5i20.0.encoder.04.x4-mode 0
net pend-counts axis.0.jog-counts <= hm2_5i20.0.encoder.04.count
net pend-counts axis.1.jog-counts <= hm2_5i20.0.encoder.04.count
net pend-counts axis.2.jog-counts <= hm2_5i20.0.encoder.04.count
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17372
- Thank you received: 5064
			
	
						26 Nov 2017 14:14				#102351
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic handwheel on MESA 7I48 Encoder			
			
				HostMot2 hardware encoders do not support 1X mode
One workaround is to use the software encoder component
					One workaround is to use the software encoder component
Please Log in or Create an account to join the conversation.
- dirk61
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 46
- Thank you received: 0
			
	
						26 Nov 2017 18:29		 -  26 Nov 2017 18:31		#102359
		by dirk61
	
	
		
			
	
	
			 		
													
	
				Replied by dirk61 on topic handwheel on MESA 7I48 Encoder			
			
				Hello
That means that I can not use this hardware encoder for a handwheel ??
If it does not work I have to create an encoder with
setp encoder.2.x4-mode 0
setp encoder.2.counter-mode 0
net Handrad-Encoder-A encoder.2.phase-A <= hm2_5i20.0.gpio.048.in_not
net Handrad-Encoder-B encoder.2.phase-B <= hm2_5i20.0.gpio.049.in_not
net pend-counts axis.0.jog-counts <= encoder.2.count
net pend-counts axis.1.jog-counts <= encoder.2.count
net pend-counts axis.2.jog-counts <= encoder.2.count
is that correct
But unfortunately my inputs will soon go out to my machine
					That means that I can not use this hardware encoder for a handwheel ??
If it does not work I have to create an encoder with
setp encoder.2.x4-mode 0
setp encoder.2.counter-mode 0
net Handrad-Encoder-A encoder.2.phase-A <= hm2_5i20.0.gpio.048.in_not
net Handrad-Encoder-B encoder.2.phase-B <= hm2_5i20.0.gpio.049.in_not
net pend-counts axis.0.jog-counts <= encoder.2.count
net pend-counts axis.1.jog-counts <= encoder.2.count
net pend-counts axis.2.jog-counts <= encoder.2.count
is that correct
But unfortunately my inputs will soon go out to my machine
		Last edit: 26 Nov 2017 18:31  by dirk61.			
			Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17372
- Thank you received: 5064
			
	
						26 Nov 2017 18:57		 -  26 Nov 2017 18:58		#102360
		by PCW
	
	
		
			
	
	
			 		
													
	
				Replied by PCW on topic handwheel on MESA 7I48 Encoder			
			
				You dont need to lose any pins
You can use the existing 7I48 encoder inputs for a software encoder, either by using the GPIO pins
of A and B (check the pinout file for your firmware) or using the A and B hardware encoder pins:
hm2_5i20.0.encoder.04.input-a
hm2_5i20.0.encoder.04.input-b
Note that you must loadrt the encoder component and addf its functions to the servo thread
or it will not be functional
					You can use the existing 7I48 encoder inputs for a software encoder, either by using the GPIO pins
of A and B (check the pinout file for your firmware) or using the A and B hardware encoder pins:
hm2_5i20.0.encoder.04.input-a
hm2_5i20.0.encoder.04.input-b
Note that you must loadrt the encoder component and addf its functions to the servo thread
or it will not be functional
		Last edit: 26 Nov 2017 18:58  by PCW.			
			Please Log in or Create an account to join the conversation.
- skunkworks
- Offline
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 347
- Thank you received: 150
			
	
						27 Nov 2017 03:20				#102375
		by skunkworks
	
	
		
			
	
			
			 		
													
	
				Replied by skunkworks on topic handwheel on MESA 7I48 Encoder			
			
				This is also an easy fix..  I use it on the k&t
setp mux4.0.in0 0.025
setp mux4.0.in1 0.0025
setp mux4.0.in2 0.00025
					setp mux4.0.in0 0.025
setp mux4.0.in1 0.0025
setp mux4.0.in2 0.00025
Please Log in or Create an account to join the conversation.
		Time to create page: 0.070 seconds	
