I can succesfully open a connection to an instrument using a COMport.
But I want to know how can I let OpenTAP/Pathwave know when the initial connection of a resource did not complete succesfully.
This is my code that is executed when the connection fails
Log.Error( "Could not communicate to " + mComPort ); mC_ComClient.Close(); base.Close(); //this.Close(); // this closes the COM connection but OpenTAP still returns the same log IsConnected = false; // this does nothing, opentap still says it is opened
And these are the logs after I open the connection
08:29:21.408 COM instrument COM connection opened 08:29:21.408 COM instrument Testing Connection... 08:29:21.459 COM instrument Could not communicate to COM1 08:29:21.472 COM instrument Resource "COM instrument" opened. [119 ms] 08:29:34.222 COM instrument Resource "COM instrument" closed. [26.7 us]
Line 3 of the logs is coming from the Log.Error.
What should I change to let OpenTAP/Pathwave know there was an error connecting to the instrument?