Vicente Posted January 18 Report Share Posted January 18 Greetings to all, I am having communication problems with the UAC-CB-01RS2 module, the output transmissions from the PLC work correctly but when I send data repeatedly every second there is no way for the data to enter consecutively, every few data received from time to time takes a good one but the rest is like the received data buffer is messed up, moreover the length of the data changes too, the buffer size is much larger than the data received from RX of the RS232 transmission. I have done everything I can think of, I have used an example and nothing, I think it might be a problem with the PLC in the communication. I need some help. Thanks 2024-01-18 at 09-45-29.mp4 Link to comment Share on other sites More sharing options...
Vicente Posted January 18 Author Report Share Posted January 18 1 hour ago, Vicente said: Greetings to all, I am having communication problems with the UAC-CB-01RS2 module, the output transmissions from the PLC work correctly but when I send data repeatedly every second there is no way for the data to enter consecutively, every few data received from time to time takes a good one but the rest is like the received data buffer is messed up, moreover the length of the data changes too, the buffer size is much larger than the data received from RX of the RS232 transmission. I have done everything I can think of, I have used an example and nothing, I think it might be a problem with the PLC in the communication. I need some help. Thanks 2024-01-18 at 09-45-29.mp4 I have checked the TX and RX signals with the oscilloscope and they arrive at the PLC perfects, it is not a problem of noise or that the signals do not arrive well. Link to comment Share on other sites More sharing options...
DanT Posted January 18 Report Share Posted January 18 Hi; What is the device you are communicating with? What is the data stream protocol? - how is it structured? Appears to be a GPS device? Are you requesing the data via a command or is the data send automatic DanT Link to comment Share on other sites More sharing options...
Gabriel Franco Posted January 18 Report Share Posted January 18 Capture received characters periodically or compare the last received character with a known character (that is unique in the frame), such as LF. After processing the message, fill the buffer with 00hex. Link to comment Share on other sites More sharing options...
Vicente Posted January 25 Author Report Share Posted January 25 I have solved it but I don't understand it, you have to compare if the last character of the "UAC-CB-01RS2_0.Last Bytes Waiting In Buffer [Last Bytes Waiting In Buffer_3]" with the ETX of the Messages protocol and then the input data is taken correctly. If there is a message termination ETX, why do I have to compress with the last character of the incoming data, I don't understand it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now