DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Some errors when calling LabVIEW VIs Interactively from DIAdem

Hi! I'm having some trouble using the "Calling LabVIEW VIs Interactively from DIAdem" found on:

http://zone.ni.com/devzone/conceptd.nsf/webmain/1A98AB48E35D913086256E23004E6A22

Following the troubleshooting section didn't resolve the issue. I recompiled and built the exe (DIAdemLabVIEW.exe) for version 7.1.1, which I am developing on. But still I got the same error message, after a waiting for about a minute, on a diadem popup window:

Error in <MenuAdd...ctDo.vbs (row:1, column: 1)
Error in <addmenuentry.vbs (row:14, column: 3)
ActiveX component can't create object.: 'DIAdemLabWIEV.Application'

Using the llb's and exe's that was included with the installer worked flawless, with the exception that LV 7.1.1 vi's didn't appear on the popup window(DIAdemLabWiev.vi). So I tried to recompile and build for the 7.1.1, with this result.

I'd be very grateful for fixes or solutions for this problem!

Regards

Roger Isaksson






0 Kudos
Message 1 of 29
(5,313 Views)

I don't know whether the issues are related but I had some problems with some example DIAdem-LABview vis recently.  The issue was traced to my version of DIAdem.  You might need to download Service Pack 2 for DIAdem.  This is really a full install but did solve my problem.

Jim West

Summitek Instruments

0 Kudos
Message 2 of 29
(5,279 Views)
Jim,

Thanks! I'll give it a try.

Roger Isaksson

0 Kudos
Message 3 of 29
(5,276 Views)
The upgrade to DIAdem 9.1-SP2 did not resolve the issue.

Roger Isaksson

0 Kudos
Message 4 of 29
(5,270 Views)

Hello Roger,

 

Do you still experience problems with this issue? If so have you tried to download the latest SP for DIAdem? It seems like you have already installed SP2 but in June we also released a SP2b version that requires that you have SP2 installed. This SP release might solve the issues you are experiencing.

 

Regards,

Jimmie A.

Applications Engineer, National Instruments

 

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 5 of 29
(5,235 Views)
Hej Jimmie!

Thanks for the help, but unfortunately it's not working with the 2b-patch either. Any suggestions?

Regards

Roger Isaksson, Damill AB

0 Kudos
Message 6 of 29
(5,221 Views)
Hi Roger Isaksson,
 
You mentioned that you are building a LabVIEW executable (exe), are you trying to call the executable from DIAdem using VBScript?  Have you tried to call the VI instead from the VBScript?
 
I think you can take DIAdem out of the loop in your debugging and just run the VBScript code in the Microsoft VBScript host that comes with your OS-- to do this just double-click on the VBScript file in Windows Explorer.
 
My guess is that there is some tricky fine point in building a LabVIEW executable with ActiveX servers included and then calling that executable through ActiveX.
 
Brad Turpin
DIAdem Product Support Engineer
National Instrumnets
0 Kudos
Message 7 of 29
(5,211 Views)
Brad,

Thanks for the reply and help.

Yes, I am trying to call the executable from diadem trough the "RunMe.vbs" script included in the "LV Tool for DIAdem"-installer. The script works so far that it adds a menu to select a VI to call from diadem. See the attached picture "SelectVI.jpg". The error emerges if I try to click "Accept" or "Cancel".

When I try to run the script from separately, the following error message appears, see the attached picture "VBError.jpg". I have no experience in VB script, but it seem like the script want to call a function for resetting a menu in the first lines and that is the source of the error. Is not diadem requred for this script to work and to add diadem menu items?

A quick question; do the "LV Tool for DIAdem" work in your configuration?

Roger Isaksson, Damill AB

Message Edited by Roger Isaksson on 08-01-2005 09:41 AM

Download All
0 Kudos
Message 8 of 29
(5,212 Views)

Hi Roger,

I meant to run only the part of the VBScript that actually instantiates and uses the LabVIEW and VI objects, not the other parts that are DIAdem-specific (such as menus).  DIAdem-specific commands and variables will not run in a Windows Scripting host.  I still maintain that this is a LabVIEW question, and I remember once hearing the answer but unfortunately don't remember what it was.  It is a little tricky to build an ActiveX executable and call it through ActiveX from another application.

The below code is what I had in mind.  You need to edit the path to the executable, and you need to change the names of the control [paramName(0)] and the indicator [paramName(1)].  If your VI has more than one control / indicator which you want to address, you will have to make the paramName and paramVal arrays bigger.

Dim lvapp, vi, viPath, paramName(1), paramVal(1)
Set lvapp = CreateObject("LabVIEW.Application")
viPath = "Insert directory path here\BuiltExecutable.exe"
Set vi = lvapp.GetVIReference(viPath)
vi.FPWinOpen = True
paramName(0) = "Parameter0 Name"
paramVal(0)  = "Parameter0 Value"
paramName(1) = "Parameter1 Name"
Call vi.Call(paramName, paramVal)
Call lvapp.Quit()
MsgBox "Parameter1 Value = " & paramVal(1)

Let me know what happens with this code, modified, and run in Windows Explorer,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 9 of 29
(5,187 Views)
Brad, thanks for the reply! Below is my (correct?) modification of your script. Have I got it right?

Dim lvapp, vi, viPath, paramName(1), paramVal(1)
Set lvapp = CreateObject("LabVIEW.Application")
viPath = "C:\TEMP\Test.exe"
Set vi = lvapp.GetVIReference(viPath)
vi.FPWinOpen = True
paramName(0) = "In Name"
paramVal(0)  = "In Value"
paramName(1) = "Ut Name"
Call vi.Call(paramName, paramVal)
Call lvapp.Quit()
MsgBox "Parameter1 Value = " & paramVal(1)

I am not sure about the format of the <paramName(0) = "In Name">. The control name is "In" and is a I32, the name for the indicator is "Ut" and has the same storage type as the control.

Running the script gives an error in line 4, that is the <Set vi = lvapp.GetVIReference(viPath)>. I'll attach the exe and the error message.

I have another question regarding the relatively large amount of RAM that diadem uses for export from my labview application to diadem. More than 10 times the size of the data is required for exporting to diadem. Since our application use relatively large files, actually up to several GB's, this soon becomes problematic. See the attached picture of the memory usage after exporting a 10MB segment (contains 42 channels of measurement data). Your help in these matters would be appreciated!

Regards

Roger Isaksson, Damill AB

Message Edited by Roger Isaksson on 09-09-2005 10:22 AM

Message Edited by Roger Isaksson on 09-09-2005 10:22 AM

Download All
Message 10 of 29
(5,091 Views)