Diagnosis and troubleshooting of communication faults in weighing instruments

push time:2023-06-26 Popularity: source:1

1. Overview

The use of weighing instruments often requires communication with computers, PLC, and DCS systems to achieve automatic control, computer management, and other requirements. The communication of weighing instruments is also a frequently malfunctioning link. This article introduces the communication faults, causes, and troubleshooting methods of RS232 and RS485 threading interfaces commonly used in weighing instrument communication.
2. Communication Bus and Protocol

According to the electrical characteristics of the communication interface, it can be divided into RS232 and RS485.

The RS232 interface of the weighing instrument is usually a simplified version, using only TxD for sending and receiving two data lines and ground wire GND for TxD. RS232 adopts an unbalanced transmission method, with signal lines to ground -3V to -15V indicating logic 1, and+3V to+18V indicating logic 0. The interference suppression ability of the unbalanced transmission method is poor, and it is easily affected by common ground noise and external interference. It is generally used for low-speed and short distance communication, with a communication distance of 15 meters.

RS485 adopts a two wire balanced transmission method, commonly referred to as A at the same phase end and B at the opposite phase end. When the data at the sending end is 1, the A level is+2V~+6V relative to the B level, and when it is 0, the A level is -2V~-6V relative to the B level; When the A level is higher than the B level by 200mV at the receiving end, the output is 1. When the A level is lower than the B level by 200mV, the output is 0; The common mode voltage range of the signal line is -7V~+12V. The RS485 bus has strong resistance to common mode interference, with a maximum transmission rate of 10Mbps, which is inversely proportional to the transmission distance. At a transmission rate of 100Kbps, it can reach a communication distance of 1200m. If a longer distance needs to be transmitted, a 485 repeater needs to be added. The RS485 bus generally supports a maximum of 32 nodes, and if a specially designed 485 chip is used, it can reach 128 or more nodes. RS485 generally adopts a bus structure with terminal matching, rather than a ring or star network. When the transmission rate is high and the communication distance is long, terminal resistors need to be added to prevent reflection from causing errors. Because the characteristic impedance of most twisted pair cables is around 100 amp; Omega~ 120& Omega; Therefore, the terminal resistance is generally taken as 120 amp; Omega;.

The communication interface of weighing instruments generally adopts asynchronous serial mode, and there are four important parameters that must be mutually agreed upon: baud rate, number of data bits, number of stop bits, and parity. The data bits are generally 7 or 8 bits, the stop bits are 1, 1.5, or 2 bits, and there are several methods for parity validation, such as null parity, even parity, odd parity, or validation position 1, set to 0, etc. The transmission rate of communication interfaces generally ranges from 300pbs, 600bps, 1200pbs to Mbps.

A communication protocol is like the language used by both parties in communication, and it must be mutually agreed upon in order to communicate correctly. Many weighing instruments have their own communication protocols, so communication must follow the protocol format specified by the instrument manufacturer. In order to ensure correct data transmission, many data have adopted validation and validation methods, and the calculation and representation methods of validation and validation are also different. When programming communication software on the upper computer, careful consideration is needed.

Modbus protocol is a standard communication protocol. Instruments using Modbus protocol can read data as long as they know the address, and can easily communicate with PLC or configuration software to form an automation control system. The Modbus protocol for serial communication is divided into RTU mode and ASC II mode. RTU is a necessary mode with high transmission efficiency; Optional mode for ASC II. When using configuration software programming, it should be noted that many configuration software follow the habits of some PLC manufacturers, combining Modbus function codes with variable addresses as variable addresses. For example, Siemens and Modicon series use 0dddd to represent input coils, 1dddd to represent input bit registers, 3ddd to represent input registers, 4dddd to represent holding registers, and dddd to represent address ranges ranging from 1 to 9999 or 1 to 65535 depending on the system, The system automatically selects the corresponding function code when reading and writing. The instructions for the C602, C606+and other series instruments of AVIC and Shanghai Yaohua are defined in accordance with GB/T19582.1 for variable addresses, which are calculated from 0. Therefore, when using configuration software, corresponding conversions are required. For example, reading the net weight represented by integers in the C602 instrument, according to the C602 instruction manual, it is input register 0 and hold register 0, and according to the Siemens or Modicon series, it is 30001 and 40001. In addition, special attention should also be paid to the length of variables. The data of C602 is arranged in high byte, sub high byte, sub low byte, and lowest byte order.

3. Common causes of communication failures

Debugging instrument communication is a troublesome task, as many factors can affect the normal communication function. Below is an analysis of possible fault causes based on the different stages of installation, debugging, and use, in order to provide some ideas for troubleshooting communication faults.

3.1 The common causes of faults during the system installation and debugging phase are: 3.1.1 Wiring errors

For example, in RS232 communication, the TxD of the instrument needs to be connected to the RxD of the upper computer, the TxD of the instrument needs to be connected to the RxD of the upper computer, and the GND of the instrument needs to be connected to the GND of the upper computer. A common phenomenon is that one end RxD and TxD are connected in reverse.

The common phenomenon of RS485 bus is that the A and B wires are connected in reverse. It should be noted that some manufacturers' definitions of A and B are inconsistent with common customs. For example, digital modules such as AD104 from HBM Company have A as the reverse end and B as the same phase end, which is contrary to common practice. Some instruments, such as Yaohua's C602 and RS485, use a four wire bus. If you want to connect to a two wire RS485 bus, you need to short circuit the T+and R+, T - and R-terminals of the instrument, and then connect them to A and B. Although RS485 uses a two wire balanced transmission method, theoretically there is no need to connect a ground wire, if the common mode voltage exceeds the specified range of -7V~+12V, it will interfere with communication, and in severe cases, it will damage the interface device. Have we ever measured the current connected between the grounding wire of an instrument using a switch and the grounding wire of a computer? At the moment when the instrument power is turned on, the maximum peak current flowing through the connecting wire will reach several amperes. If the grounding wire of the instrument and computer communication interface is not connected, this current will flow through the interface signal wire, which is highly likely to damage the device.

3.1.2 Inconsistent communication protocol

As mentioned earlier, if the communication protocols of both parties are not consistent, effective communication cannot be achieved. In most cases, even a wrong space character can cause communication failure. Sometimes implicit issues related to protocols can also affect communication. The reason for encountering a communication failure in a system was that a certain model of PLC did not release the RS485 bus in a timely manner after issuing a query command, and the instrument response time was too short, resulting in bus conflicts and communication failures. Later, the instrument communication program was modified to delay responding to PLC commands before normal communication occurred.

3.1.3 Improper connection method

RS485 requires a bus connection method, which involves connecting all devices with a twisted pair cable. Especially when the baud rate is high and the devices are scattered, using a star connection will make communication very unstable. If a star connection is necessary, it should be connected through an RS485 hub.

online service
contact information

Sales hotline:

Miss Chen: 18520271262

  Miss Xie: 18688494254

Mr. Huang: 18688492451

Working hours:

Monday to Saturday9:0018:00

QR code
Scan and contact us
Online Service