Does Duet 6XD support RS485 communication
-
@T3P3Tony , @dc42 , @droftarts
I am trying to control over 60+ Electric Feeders from Duet using a RS485 communication . I would like to know if Duet 6XD can or does support RS485 communications. Here is my proposed configuration or wiring with assumption that 6XD can support RS485
Duet 6XD <=== RS485 ===> Mitsubishi PLC FX3U-48MR-ES with Expansion Modules <===> Electric Feeders connection Base,
any insights or suggestions on how to accomplish this with Duet 6XD?
-
@developeralgo222 RRF does not get support RS485
-
@jay_s_uk
i am screwed , How do i get to control my Feeders ? what does RRF support ? -
@developeralgo222 theres some basic i2c support, serial, pwm control. I'm not sure whether theres a way to communicate with a PLC
-
@jay_s_uk
Is there any Serial communication protocol supported by RRF 3.5 running on Duet 6XD ? and there some connections pins you can use for that on Duet 6XD ? -
@developeralgo222 yes, there is UART comms. that how the paneldue talks to the board.
https://docs.duet3d.com/User_manual/Reference/Gcodes#m575-set-serial-comms-parameters -
@jay_s_uk
Is that RS232 Serial communications only ? also typically a USB port, or serial-over-USB on Duet 6XD creates the "famous" Duet "ground loops" issues ?Since UART is a hardware component used for serial communication, while RS232 and RS485 are standards that define the electrical characteristics and communication standards.
Is there a list of what Serial communication Protocols supported by RRF 3.5 ? RS232, etc,
-
@developeralgo222 Currently, RRF doesn't support RS485, or ModBus.
RS485 and ModBus support has come up a few times in the past, though there doesn't seem to have been a feature request for it in https://github.com/Duet3D/RepRapFirmware/issues
In the past, @dc42 has said that it should be relatively easy to add support, by connecting a RS485 adapter to one of the UART ports. Modbus RTU support requires adding a relatively small amount of firmware to RRF including a MCode command to read is, perhaps a variant of M260/261.
If you're using a Raspberry Pi in SBC mode, you can get RS485 hats eg https://thepihut.com/products/rs422-rs485-serial-hat, and set up ModBus RTU eg https://www.instructables.com/How-to-Use-Modbus-With-Raspberry-Pi/. You may be able to use custom Gcode to control this, though you might need a little signposting from @chrishamm on how to set this up.
Ian
-
@droftarts
I am looking for the simplest way to accomplish this with RS485 or some UART communications protocol that is fast but RS485 is usually the preferred wayDuet 6XD UART (Panel Due UART ) <=== RS485 ===> FX3U-485ADP-BD (RS485 Adapter ) ==> Mitsubishi PLC FX3U-48MR-ES with Expansion Modules <===> Electric Feeders connection Base
Will something like this work ?
-
@droftarts said in Does Duet 6XD support RS485 communication:
In the past, @dc42 has said that it should be relatively easy to add support, by connecting a RS485 adapter to one of the UART ports. Modbus RTU support requires adding a relatively small amount of firmware to RRF including a MCode command to read is, perhaps a variant of M260/261.
Are you referring to the Panel Due UART port ?
-
@developeralgo222 on the 6HC io1 and io2 are UART. The Paneldue connector shares pins with io1. See https://docs.duet3d.com/en/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6HC_Hardware_Overview#inputoutput
M260 may be sufficient to send what you need, I don’t know the communication protocol your device uses: https://docs.duet3d.com/User_manual/Reference/Gcodes#m260-i2c-send-andor-request-data
@DonStauffer recently did something similar to control an external NeoPixel driver https://forum.duet3d.com/topic/35384/neopixel-driver-results
Ian
-
@droftarts said in Does Duet 6XD support RS485 communication:
@developeralgo222 on the 6HC io1 and io2 are UART. The Paneldue connector shares pins with io1. See https://docs.duet3d.com/en/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6HC_Hardware_Overview#inputoutput
i have 6XD not 6HC
-
@developeralgo222 said in Does Duet 6XD support RS485 communication:
i have 6XD not 6HC
6XD is the same: https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6XD_Hardware_Overview#inputoutput-port-capabilities
Ian
-
@droftarts
I think i already have IO_0 to IO_7 Used , i think i only have one IO empty. let me see if i can move the connectors around to Free IO_0 for use with RS485 -
@developeralgo222 do you intend to use the Modbus RTU protocol to communicate with the feeders? We're planning to add support for Modbus RTU in the fairly near future. It will require a spare UART IO connector (so IO0 or IO1 on the 6XD) and an additional IO_OUT pin to control the transceiver direction - although controlling it in hardware may also be possible if the RS485 baud rate is fixed in advance.
I have created this feature request https://github.com/Duet3D/RepRapFirmware/issues/981.