Thread Content
I’ve recently encountered such a challenge while working on a project: I need to communicate with multiple devices through the PLC’s 485 interface, using the ASCII protocol and a 4-wire connection. I use a program to control relays in order to establish connections between the PLC and the R+ and R- wires of each device, while connecting the T+ and T- wires of all devices together and feeding them into the PLC. In theory, this should allow communication with each device via a single serial link. However, tests show that communication is possible when only one device is connected, but not when multiple devices are used. Is this approach feasible? If so, what is the problem?
I’ve recently encountered such a challenge while working on a project: I need to communicate with multiple devices via the PLC’s 485 interface, using the ASCII protocol and a 4-wire connection. I use a program to control relays in order to switch the connections between the PLC and the R+ and R- wires of each device, while connecting the T+ and T- wires of all devices together and feeding them into the PLC. In theory, this should allow communication with each device one after another through a single 485 interface. However, tests show that communication is possible when connecting just one device, but not when connecting multiple devices. Is this approach feasible? If so, what is the problem?
Number each device, and when receiving a program, use these numbers as handshake signals for processing – that should work, just for reference
Can communication be established individually and with each device? Can it only communicate with one device?
The 485 interface can connect multiple devices using a two-wire system!
Each device requires a separate ID number; By default, it’s all an ID number; when more than one device is connected, the main device can no longer locate the secondary devices, and thus connection becomes impossible. Therefore, set each ID number in the devices, starting from 1, 2, 3, 4, and so on
Additional note: It would be best to be able to switch to 422 communication; I have used it to connect 9 devices before
I’m not sure if the original poster’s problem has been resolved. I also think that if each device can communicate on its own, then it’s likely still an issue with the ID settings. Additionally, it should be noted that the wired connections between devices need to be made using a daisy-chain configuration.
It’s possible that each of your RS485 terminals has a 120R matching resistor. In fact, when multiple RS485 devices are connected together, it is sufficient to install the 120R matching resistor only on the host and on the terminal that is farthest away; try removing the matching resistors from the other terminals.
485 communication must be distinguished by address. There are corresponding modules in the PLC
Is it because a termination resistor wasn’t added?
It’s because the device doesn’t have an ID, that’s why relays are used to send the signals separately~
It can communicate individually with each device, but multiple devices cannot be connected at the same time; once connected, it stops working
It’s just that the instruments don’t have IDs. I’ve also conducted experiments with instruments that do have IDs, and communication between multiple instruments connected via a two-wire 422 bus works fine. The problem now is that the instrument doesn’t have an ID, so only 4-wire 485 communication is possible. I think the experiment I designed is theoretically feasible, but it seems like something is missing~
Actually, success is just one step away~ It was still a conceptual mistake; I thought that by controlling the R+ and R- wires of the PLC’s 485 interface, I could control the data transmission. But that’s not the case. To convert 485 from full-duplex to half-duplex, it’s necessary to short-circuit the two + and two - wires. In other words, the voltage signals on 485 are still transmitted via the + and - wires. So I controlled the R+ and T+ wires, and sure enough, it worked~~~ Haha! ! This means that no matter how many instruments are present on site, as long as they use the 485 bus, one connection is sufficient, which saves a lot of serial port modules (which are quite expensive!) I’m still very grateful to all the brothers who replied for their support! ! ~
Firstly, it is recommended to use half-duplex mode; the current setup uses full-duplex mode. Secondly, it is advised to establish a master-slave configuration, with the PLC acting as the master and other devices as slaves. Each slave device should have its own address, and addresses of different slaves must not repeat. Thirdly, in terms of hardware configuration, since half-duplex mode is used, only three wires are needed: D+, D-, and GND. Each slave device’s D+ connects to the master’s D+, its D- connects to the master’s D-, and its GND connects to the master’s GND; these connections are made in the same manner as those between the slave devices and the PLC. Fourthly, note that the programming port of the PLC is powered at 24V (for example, the 7-pin connector on the programming port of Siemens S7-200 series PLCs operates at 24V).