Click here to Skip to main content
15,912,457 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:

VB
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
Posted
Comments
[no name] 22-Aug-13 9:13am    
Did the manufacturer of your device create this DLL? You would be better off asking their customer support people.
alonetmr 22-Aug-13 9:19am    
Hi, the Customer support gived me the DLL Library.
Trak4Net 22-Aug-13 18:02pm    
I would be willing to bet that SpyModem is trying to open the port but it is already opened by spycom, not sure if you have them tied together elsewhere, but with the given sample that would be my first place to look.
alonetmr 23-Aug-13 11:02am    
Not, in fact, i erased SpyModem and i tryed just with spycom and it doesn't work.
alonetmr 23-Aug-13 6:40am    
Ok, i will see that and will you give more information.
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900