How to access RS485 on Mesa 7i96?

More
24 Mar 2020 22:13 #161372 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

Please Log in or Create an account to join the conversation.

More
24 Mar 2020 23:19 #161378 by PCW
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.

More
26 Mar 2020 23:18 #161633 by andypugh

PCW wrote: 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.

More
27 Mar 2020 00:04 #161639 by PCW
Yes, hoping at some point that a string hal type would allow decoupling
the low level driver from the formatter component (modbus etc)

Please Log in or Create an account to join the conversation.

More
27 Mar 2020 08:17 #161689 by strahlensauger
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?

Please Log in or Create an account to join the conversation.

More
28 Mar 2020 21:29 #161842 by andypugh

strahlensauger wrote: 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.

More
28 Mar 2020 21:53 #161845 by PCW
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)

Please Log in or Create an account to join the conversation.

More
29 Mar 2020 00:40 #161892 by andypugh

PCW wrote: 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.087 seconds
Powered by Kunena Forum