Jump to content

Rahul A. Kharche

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Rahul A. Kharche

  1. On 1/22/2014 at 4:04 PM, FJ_Sanchez said:

    Hello,

     

    I'm trying to use a library to interface some LVDT gauges from Marposs. It's implemented through COM objects and I have it working in Excel with VBA with this code:

     

    
    Private Sub CommandButton1_Click()Dim oSmaoMain As SMAO.SMaoMainDim clsInfo As SMAO.InfoDim sInfo As String'Initialize the SMAOMain ObjectSet oSmaoMain = New SMAO.SMaoMainoSmaoMain.Initialize'List all the Installed DriversFor i = 1 To oSmaoMain.DriversCount   sInfo = sInfo & "Driver Name : " & oSmaoMain.Driver(i) & " " & oSmaoMain.DriverDesc(i) & vbNewLineNextMsgBox sInfo, vbOKOnly, "Installed Drivers"'List all the Enabled DriversSet clsInfo = oSmaoMain.InfosInfo = ""For i = 1 To clsInfo.DriversCount   sInfo = sInfo & "Driver Name : " & clsInfo.Driver(i) & " " & clsInfo.DriverDesc(i) & vbNewLineNextMsgBox sInfo, vbOKOnly, "Enabled Drivers"Set clsInfo = NothingSet oSmaoMain = NothingEnd Sub

    When I port this code to LabVIEW I get answer from the SMAO.SMaoMain, correct initilization and even I can read the main objects properties. The problem comes when I try to access it's child object SMAO.SMaonMain.Info. When I get the reference and I make calls to the methods/properties, I get different results, always 0 drivers enabled.

     

    I've attached the LabVIEW code I'm using and some captures of the creatable objects I can see from LabVIEW.

     

    Any idea of what could be happening?

     

     

    TestMarposs.png

    Creatable_objects.PNG

    Creatable_objects_smaoinfo.PNG

    Creatable_objects_smaomain.PNG

    can you please upload this library and vis

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.