Hello, I'm currently working on a script and interfacing with a COM port. every messange I receive and send is always exactly 14 bytes long. However sometimes the byte array cuts off mid-way through the reception process so that my data becomes currupted as it is seen as two or more seperate receiving processes.
is there a way to read n bytes using the serialport class without it cutting out while receiving data?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hello, I'm currently working on a script and interfacing with a COM port. every messange I receive and send is always exactly 14 bytes long. However sometimes the byte array cuts off mid-way through the reception process so that my data becomes currupted as it is seen as two or more seperate receiving processes.
is there a way to read n bytes using the serialport class without it cutting out while receiving data?
Hi,
in the attachment you can find an example of how to do this.
Best regards,
Stefan
Last edit: Stefan Zieker 2017-11-13
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks! I'll try it out and report back.
worked with a bit of modification. thanks.
Last edit: Anonymous 2017-11-15