Hello,
I have written a python script that loops infinitely, listens for meter connection requests, uses the connection parameters defined in those requests to try to connect to the meter and read the data.
My problem is when my serial cable is plugged into my machine and not connected to the meter or when the connection parameters to the meter are wrong, the first connection attempt, to the meter, produces three occurrences of the error "Data send failed. Try to resend */3" the next time I try to connect to the meter with parameters that are still wrong, my python script closes suddenly without generating an exception.
I'd like to know how to prevent my python script from closing suddenly. Using exceptions doesn't work
Thanks in advance for your help.
Hi, Have you closed theā¦
Hi,
Have you closed the connection to the serial port before the next try? That might cause problems, but you should receive an exception.
Are you running this on Windows or Linux?
BR,
Mikko