Applies To:
  • CitectSCADA

Summary:
Question: What will ComOpen() return if you try to open the same com port twice? 

Solution:
If you try to open the same com port twice with ComOpen(), the second open will fail and return -1. You should be very careful not to open com ports twice, and always check the return value from ComOpen. Also make sure you don't call ComRead() while another ComRead() is still pending on the same port, because this can produce unexpected results. The same applies for ComWrite(). 

Keywords:
 

Attachments