Regards,
I've been trying to download the data stored in a measuring instrument. I have a DLL Library that contains all the methods that need to connect with the instrument.
I could to connect to the instrument, I can also do some configurations and also to recover the last data recorded by the instrument.
I Use a method that is in the DLLLibrary to determine if the port is open. i have suces to connecting my programa with the instrument but when I try to download the stored data,I get the following exception:
A first chance exception of type 'JPL.Systeme.Communication.SRadioFrec.Spyd.Core.Exceptions.ESerialPortCannotOpen' occurred in JplInstrument2Core.dll
Now,
My DLL Library is:JplInstrument2Core.dll
The instrument is: SRadioFrec
The instrumento is: SRadioFrec
Someone can help me to understand this exception and eventually fix it.
Here is the code to see if there is a problem:
Private Sub ButtonDescargaMedidas_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles ButtonDescargaMedidas.Click
Try
numeroSerieInstrum = TextBoxAdresse.Text
CaptorSonda = typeSonde + TextBoxAdresse.Text
spycom.PortOpen()
If spycom.PortOpened = True Then
SpyModem.DownloadSatelliteMeasurements(CaptorSonda, Data1, Data2)
For Each itemData1 As Byte In Data1
itemData1.ToString()
MsgBox(itemData1)
Next
For Each itemData2 As Byte In Data2
itemData2.ToString()
MsgBox(itemData2)
Next
Else
MsgBox("port?")
End If
Catch ex As Exception
MsgBox("problem")
End Try
End Sub
Finally, by placing a breakpoint in the code, I get that:
CaptorSonda returns the ID of the instrument=ok
Data1 = Nothing
Data2 = Nothing
I want to retrieve the data stored in Data1 and Data2. I am sure that Data1 and Data2 have something but i can't undesrtand why they dosen't appears.
I get that :
Exceptions.ESerialPortCannotOpen '
I appreciate your help.
thanks