1, the computer using the USB to serial port cable can communicate with the device, change the screen and the device does not communicate?
(1) It is possible that the computer USB to serial port connect to the device, that use standard serial port function, that is, in addition to RX, TX, GDN, but also used other pins. For example, like Omron PLC, Mitsubishi PLC, in the actual communication with the screen, it is necessary to solder some of the pin shorting situation.
(2) computer and controller or PLC communication, is to scan the baud rate parameters, adaptive, screen communication parameters may not be set up. In Mitsubishi, KEYENCE and other PLCs, there is a change in the baud rate for communication interaction process.
(3) It is also possible that the wiring is not right. Because some DB9, but also need a male, female. If you don’t pay attention, you can connect TX to TX and RX to RX.
(4) here to add, sometimes you may use some serial port assistant to send test data and controller communication, some serial port parity is not working.
2, the A screen can communicate with the device, but can’t work if you change to the B screen?
1) First of all, make sure that the wiring is correct, RX and TX are compatible.
2) Whether the ground wire is not connected.
3) Besides RX, TX and GND, are there other pins that need to be shorted?
4) Whether the communication protocol is consistent or imperfect, and whether the baud rate is the same.
3. You can communicate without a grounding wire in the past, but why do you need a grounding wire when change the equipment?
Because some devices use isolated power supply. Previously not grounded can communicate, it is possible that the ground has been in another loop has been common ground, the actual ground has been connected, so you can communicate. May have changed a power supply with isolation, the ground of the two devices is isolated, you need to connect the ground on the serial port.
4 , a device is 232, another device is 422, no conversion device, how to do?
I have encountered this situation, the customer’s equipment is 422 communication, but I do not have 422 equipment, only 232 communication can be tested. Therefore, it is necessary to convert 422 to 232 for communication.
Just now also talked about 422 and 232 wiring, because these two are full-duplex, receive and transmit are divided to, and 422 is only a differential signal transmission.
Connect the Rx+ of the 422 to the TX of the 232, and the RX- of the 422 to the GND of the 232.
Connect the 422’s TX+ to the 232’s RX and the 422’s TX- to the 232’s GDN.
In this way, the 422 device to send data, can be sent to the 232 RX. 232 TX send data, because TX and GND also form a differential signal to 422, 422 can receive the data.
5, with 232 communication is not a problem, with 485 communication is not a problem, the use of 232 to 485 after the communication is not stable?
232 and 485 from the principle of communication, the biggest difference is the difference between full-duplex and half-duplex. But the application layer to send data and receive data does not care whether the bottom is full-duplex or half-duplex.
But 485 will have to care. Because since it is half-duplex, it is necessary to strictly ensure that there can only be sent or received data on the path, once the same time there are sending and receiving, the data will conflict. So the solution is the master device, that is, the active command party needs to strictly control the rhythm of sending data commands.
Of course, some 232 to 485 equipment to do a better job, you can optimize this, but the master station or to control, compared to the communication rate adjustment slower (not adjust the baud rate).
-
High Performance DB9 RS232 Male to Male Cables
-
Versatile 9-Pin Serial Cable Male to Female D-sub Cables
-
Reliable RS232 Female to Female Cables
-
4-port RS232 COM to Type C Serial Cable – Future-Ready Connectivity
-
Seamless PL2302 Chip USB Type C to Serial Cable Connection Solutions
-
Efficient PL2302 Chip USB Type C to RS485 RS232 Serial Communication Cable
6, 485 alone connected to each device are communicating normally, more than one slave connected to a piece of communication is not stable?
This belongs to the 485 communication instability.
7 , To realize two screens or two masters through the 485 access modbus devices, what is a good way?
In 485 communication, basically one master and many slaves. However, some customers encountered in the actual use, some customers want to use two screens to access a modbus device. There is no good way for the time being.
8, for the weakness of serial communications, in the use of what should be noted?
Speaking of the weakness of serial communications, it is a long story. But let’s make it short.
(1) the problem of signal interference
It is recommended that the use of shielded wire, wiring should be strict, such as grounding. Some 485 communication on, but also consider connecting a terminating resistor to match. If 232, try not to make the line too long. Communication protocols try to avoid long messages on the data communication.
2) The problem of baud rate matching
Because some devices are calculated baud rate there is an error, especially some controllers, due to the use of the crystal is not the same. Therefore, in some baud rates such as 9600 baud rate there is an error. What is the impact of the existence of error. Because the receiver is through the time to calculate a bit. So if a message is too long, there will be a problem of error accumulation, and the calculation will be biased. Therefore, this is some of the serial communication instability, in the use of attention should be paid to avoid sending packets of too long data.
(3) In some cases where there may be interference, in some cases of selection, you can consider using odd parity or even parity. Because although the possibility of error is unlikely, but since there is interference, if you add the checksum, at least you can filter out the wrong message. It’s better than having no checksum and then not knowing when the communication data is wrong. Or try to use some protocols with checksum to prevent data errors.
4) Serial communication is already slow, please reduce the data response requirements.
Because serial communication itself is slower than Ethernet. Moreover, serial communication is not multi-threaded like CPU. Because a port and a line of data out, even if you apply to the program and then how to use multi-threaded data processing, but the bottom is only a port out, a time can only pass a bit, a byte over. Because there are customers in the use of 9600 baud rate communication, but also hope that how much data can be in how many milliseconds to get a response.
But the serial port communication or to be factual, so the correct understanding of the serial port communication on the application, on the development, on the communication has a great help.
Why not use synchronous communication?
Just mentioned, synchronous communication needs to rely on the clock signal. This raises the question of who initiates this clock signal. In synchronous communication, it is often necessary for a master device to initiate the clock signal to read the data from the slave module. In practice, there are screens that read PLCs and screens that read data from screens. And simply from the asynchronous serial communication, there is no master and slave, both sides are equal roles, can send each other information, mutual information. And synchronous communication is generally applied to the CPU to read some modules, the CPU initiated by the clock signal, such as reading SD card module, you can through the SPI method, there are some sensor modules.