CAA SerialCOM - hCom Reset max value 1023

dagsupport
2024-03-22
2024-03-29
  • dagsupport - 2024-03-22

    Hi everybody

    We are currently working on a project with an RS232 serial COM interface and using the CAA SerialCOM library. We have it working fine reading and writing data, although we have found an issue we cannot resolve and any suggestions would be helpful.

    We have noticed that after a while the RS232 stops working. We have tracked this down to the HANDLE hCom keeps increasing and when this reaches 1023 the COM returns an unknown error "5003".

    Is there a way to reset this hCom reference?

    Thanks

    Richard

     
  • TimvH

    TimvH - 2024-03-22

    You should only open de COM port once and then leave it open.
    This hCom should not keep on incrementing.

    (off course when you are done communicating, you need to close the COM port)

     
    πŸ‘
    1
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       
    • dagsupport - 2024-03-28

      Hi TimH

      Thanks for the information, I thought that was the case so have stepped through the code and found an error that wasn't closing the port, therefore hCom was increasing. Thanks

       

Log in to post a comment.