Menu

wait until n-bytes are received

Anonymous
2017-11-13
2017-11-13
  • Anonymous

    Anonymous - 2017-11-13

    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?

     
  • Stefan Zieker

    Stefan Zieker - 2017-11-13

    Hi,

    in the attachment you can find an example of how to do this.

    Best regards,
    Stefan

     

    Last edit: Stefan Zieker 2017-11-13
  • Anonymous

    Anonymous - 2017-11-13

    Thanks! I'll try it out and report back.

    worked with a bit of modification. thanks.

     

    Last edit: Anonymous 2017-11-15

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.