Automation devices and other intelligent devices, which you need to receive the data from, can be connected with the following ways:
The configuration of these connections is described here.
Wiring diagram of WEBHMI to devices with RS-485 interface.
Probably (if you already have experience with this interface), after reading the phrase RS-485, you immediately decide to use a 2-wire circuit, connecting to the standard terminals A and B, since only 2 wires are really enough to transmit the signal (a lot of specialists adhere to this opinion). However, this is a generally accepted error. The EIA/RS-485 standard says that 3rd wire is needed:
Sources for the formation this fallacy can be:
In fact, it turns out that:
Thus, for a reliable connection it is necessary to use a 3-wire circuit. The operation of the three-wire circuit is shown in the following figure:
Here Vos is the transmitter bias voltage (measured relative to the common and midpoint of the voltage divider with the same shoulders connected to the A and B outputs), Vgpd is the voltage between the “common points” of the transmitter and receiver, Vnoise is the voltage of the electromagnetic “ line, Vcm is the common-mode interference voltage applied to both inputs of the receiver, which adds up as Vgpd + Vos + Vnoise. The transmitter modulates the differential voltage, forming a signal. The receiver must recognize this signal in the presence of strong interference, and it does this very effectively, but within certain limits. The voltage values for the transmitter and receiver are limited by the standard and range from -7 to + 12V (+/- 7V with respect to the 0..5V signal).
In reality, in addition to interference, between the common points of the receiver and transmitter there may be a potential difference of the “ground” Vgpd, which is applied through the outputs of the shaper to the inputs of the receiver. In case of exceeding the Vcm of the above levels, communication becomes unreliable or even disappears. The induced interference is effectively suppressed by a screen grounded at one point. Interference through difference of potentials “common” points suppresses the third wire, closing the currents generated Vgpd, which otherwise would have been input currents lines A and B the receiver.
As for the 2-wire circuit of the isolated RS-485, it is also unstable for the following reason. The system can be under parasitic induction in this case, but the current noise “general form” always eager to go back to the source, no matter where and how the chain captures interference, ie, including return through an isolated “general” scheme. This point can in turn become a source of electromagnetic interference for another part of the electronic circuit (for example, through capacitive parasitic links). A large explanation of the role of one wire is given only to save the user from the loss of valuable time for setting up communications. In addition, on long lines and at high exchange rates, it is recommended to use a matched cable (twisted pair on the screen, 120 ohm impedance) and termination resistors at the ends of the network segment.
First of all, after connecting the device and creating a connection, you can create a register in a known state, for example, the bit “always on”, etc. After the register is created, its value (Value) will be displayed with the register list:
A dash line instead of value means that there is no connection established. In this case first double check the cable and the settings on both sides. Cables are sources of issues in most cases.
To deal with communication issues on the built-in RS-485 port TX/RX LEDs on the front panel could be used. During normal operation they should flash alternately. At first blinks TX LED and then blinks RX LED.
In the absence of RX blinks it is clear that the device does not respond at all, i.e. the format or speed of the exchange may be misconfigured. Or there is issue with wires.
If the RX LED flashes in an irregular manner, as if “breaking through” a uniform flashing TX is likely to be in the presence of strong electromagnetic interference, it is necessary to follow the recommendations for RS-485 connection.
If the value is read but incorrect - the wrong data type is specified in the register description, so for example only the parameter byte can be read instead of the whole word.