4
Answers

How to calculate Baudrate and Write-Readtimeouts?

Sascha B

Sascha B

12y
3.2k
1
Hello again :)

I recieve many code error from my device so I want to check if the timeouts are right.
This is what I send:

02 39 39 30 31 30 34 30 31 03 30 37 0D 0A


And this is what I recieve:

02 30 30 30 31 30 20 32 30 2B 32 31 35 30 33 2B 32 32 32 38 33 2B 32 33 36 32 33 03 30 31 0D 0A 02 30 30 30 31 30 20 32 30 2B 32 31 35 30 33 2B 32 32 32 38 33 2B 32 33 36 32 33 03 30 31 0D 0A 
02 30 30 30 31 30 20 32 30 2B 32 31 35 30 33 2B 32 32 32 38 33 2B 32 33 36 32 33 03 30 31 0D 0A
These are my configurations:

                    comport.BaudRate = 9600;
                    comport.DataBits = 7;
                    comport.Parity = Parity.Even;
                    comport.Handshake = Handshake.XOnXOff;
                    comport.RtsEnable = true;
                    comport.ReadTimeout = 500;
                    comport.WriteTimeout = 500;
                    comport.PortName = portname;

How can I calculate if my timeouts are correct?

Answers (4)