Does Duet 6XD support RS485 communication
-
@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.
-
i see your comment on Github. is the RS485 MODBUS RTU support is available in RRF 3.6 ? if yes what is the wiring to have it work ? my Mitsubishi FX3U-48MR/ES-A PLC with RS485 MODBUS Adapter (FX3U-485ADP-MD which has 2 Channels in total) is to be connected to Duet 6XD IO0 . I need 2 or 4-Wire Half or Full Duplex RS485 connection wiring to Duet 6XD that works for a faster RS485 MODBUS communications. Currently it seems IO0 will only have 2-Wire Full Duplex RS485 connection ? Currently i only have IO0 available and all other IO ports are occupied ( IO1 to IO8)
Full Duplex wiring
RS485 MODBUS adapter PLC: ============= DUET 6XD IO
SG (GND) =========> GND
SDA (TXD_A) =======> IO0.IN
RDA (RXD_A) =======> IO0.OUT
SDB (TXD_B) ====== > Not Connected
RDB (RXD_B) =======> Not Connected
How do i accomplish the connection for RS485 MODBUS RTU to work correctly with Duet 6XD ? 1 Channel i believe is enough for such communications
As per some comment online:
" Full-duplex, 4-wire operation usually works best for RS-232 signals. Half-duplex operation using “2-wire”
connections is usually NOT satisfactory because the RS-485 bus takes time to “turn-around” between
Transmit and Receive – some of the first byte sent may be lost. RS-232 devices do not wait before
responding to a data request. But RS-485 devices, designed for 2-wire operation, will wait " .AFAIK from googling:
" RS485 is a 2-wire half duplex system where there is one transmitter and
multiple receivers . If you use a 4 wire connection, that is TxA to RxB in one direction (Wher
A is one unit and B is another) and TxB to RxA in the other, then you can
work in full duplex. Of course B can represent a number of "outstations
(32 by the original RS485 spec) and provided only one drives the bus at
any given time you can still have full duplex operation.RS485 allows you to work with a 2 wire connection between A and B. The TX
and RX lines are paralleled. Only one driver can drive the lines at any
given time and hence it can only work in half duplex. As far as I know the
RS485 spec only addresses the electrical specification and not any form of
protocol that deals with half or full duplex operation. "i believe the Mitsubishi RS485 MODBUS RTU is designed to work with Half or Full Duplex 2 or 4-Wire connection
FX3U_MODBUS Serial Communication Edition_RS485_RS232_RS422.pdf
I trying to Control over 60+ electric feeders using RS485 on Duet 6XD . Trying to emulate the Manual functions of the SMT electric feeder
e.g
what are the RS485 GCode Commands to control PCB SMT Electric Feeders ? Is it M260 & M261 ?
What are the GCODE Commands in RRF 3.5.2 or 3.6(WIP) to support basic Functions ?
e.g
M260 Ax ; MODBUS Station Address
Mxxx Px ; Feeder ID ?
Mxxx ??? ; Move Tape Forward
Mxxx ??? ; Reverse Tape ( Move Tape backward )
Mxxx ??? ; Reset to previous position -
@dc42 said in Does Duet 6XD support RS485 communication:
@developeralgo222 do you intend to use the Modbus RTU protocol to communicate with the feeders?
Yes
-
-