How to access RS485 on Mesa 7i96?
- MakingStuff
- 
				 Topic Author Topic Author
- Offline
- Premium Member
- 
				  
		Less
		More
		
			
	
		- Posts: 121
- Thank you received: 14
			
	
						24 Mar 2020 22:13				#161372
		by MakingStuff
	
	
		
			
	
			
			 		
													
	
				How to access RS485 on Mesa 7i96? was created by MakingStuff			
			
				I was watching a video on YouTube where a USB RS485 device was used to control a VFD spindle.  I was wondering if it is possible to do this using the RS485 port on the Mesa 7i96 instead of having to use an extra USB device.
Here is the code that was used to access the USB device. Is it even possible to do this with the Mesa 7i96? If so what would I change?
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw motion.spindle-forward =. vfd.spindle-forward
net spindle-ccw motion.spindle-reverse => vfd.spindle-reverse
net on motion.spindle-on => vfd.spindle-on
					Here is the code that was used to access the USB device. Is it even possible to do this with the Mesa 7i96? If so what would I change?
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw motion.spindle-forward =. vfd.spindle-forward
net spindle-ccw motion.spindle-reverse => vfd.spindle-reverse
net on motion.spindle-on => vfd.spindle-on
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17372
- Thank you received: 5064
			
	
						24 Mar 2020 23:19				#161378
		by PCW
	
	
		
			
	
	
			 		
													
	
				Replied by PCW on topic How to access RS485 on Mesa 7i96?			
			
				Unfortunately  this is not doable yet			
					
		The following user(s) said Thank You: MakingStuff 	
			Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						26 Mar 2020 23:18				#161633
		by andypugh
	
	
		
			
				
That depends on how you define "doable".
I think all that is missing is a modbus driver for the Mesa UART?
					
	
			
			 		
													
	
				Replied by andypugh on topic How to access RS485 on Mesa 7i96?			
			Unfortunately this is not doable yet
That depends on how you define "doable".
I think all that is missing is a modbus driver for the Mesa UART?
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17372
- Thank you received: 5064
			
	
						27 Mar 2020 00:04				#161639
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic How to access RS485 on Mesa 7i96?			
			
				Yes, hoping at some point that a string hal type would allow decoupling
the low level driver from the formatter component (modbus etc)
					the low level driver from the formatter component (modbus etc)
Please Log in or Create an account to join the conversation.
- strahlensauger
- 
				  
- Offline
- Elite Member
- 
				  
		Less
		More
		
			
	
		- Posts: 195
- Thank you received: 66
			
	
						27 Mar 2020 08:17				#161689
		by strahlensauger
	
	
		
			
	
			
			 		
													
	
				Replied by strahlensauger on topic How to access RS485 on Mesa 7i96?			
			
				In several FAQ plenty oft people asking to connect
Mesa cards via the rs422 to a vfd. Wouldn't it be possible to add a second rs 485 in future releases oft the cards?
					Mesa cards via the rs422 to a vfd. Wouldn't it be possible to add a second rs 485 in future releases oft the cards?
Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						28 Mar 2020 21:29				#161842
		by andypugh
	
	
		
			
				
The physical connection is not really the problem, it is getting the right data to the the FPGA.
I wonder if there is a way to make the Mesa UART appear in /dev as a serial port?
					
	
			
			 		
													
	
				Replied by andypugh on topic How to access RS485 on Mesa 7i96?			
			In several FAQ plenty oft people asking to connect
Mesa cards via the rs422 to a vfd. Wouldn't it be possible to add a second rs 485 in future releases oft the cards?
The physical connection is not really the problem, it is getting the right data to the the FPGA.
I wonder if there is a way to make the Mesa UART appear in /dev as a serial port?
Please Log in or Create an account to join the conversation.
- PCW
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 17372
- Thank you received: 5064
			
	
						28 Mar 2020 21:53				#161845
		by PCW
	
	
		
			
	
			
			 		
													
	
				Replied by PCW on topic How to access RS485 on Mesa 7i96?			
			
				Its probably possible but I think a cleaner way would be to support a hal string type
so this can all be done by a generic hal protocol component connected to the hal pins
exported by the UART TX and RX modules. This avoids losing real time if its desired
(and even if modbus for example is not real time, there's no reason to add userland
uncertainly to transactions)
					so this can all be done by a generic hal protocol component connected to the hal pins
exported by the UART TX and RX modules. This avoids losing real time if its desired
(and even if modbus for example is not real time, there's no reason to add userland
uncertainly to transactions)
Please Log in or Create an account to join the conversation.
- andypugh
- 
				  
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 19677
- Thank you received: 4554
			
	
						29 Mar 2020 00:40				#161892
		by andypugh
	
	
		
			
				
Indeed. But that would require re-writing of all the existing VFD drivers, which currently hook in to /dev/ttyUSB0
					
	
			
			 		
													
	
				Replied by andypugh on topic How to access RS485 on Mesa 7i96?			
			Its probably possible but I think a cleaner way would be to support a hal string type
so this can all be done by a generic hal protocol component connected to the hal pins
exported by the UART TX and RX modules. This avoids losing real time if its desired
(and even if modbus for example is not real time, there's no reason to add userland
uncertainly to transactions)
Indeed. But that would require re-writing of all the existing VFD drivers, which currently hook in to /dev/ttyUSB0
Please Log in or Create an account to join the conversation.
		Time to create page: 0.075 seconds	
