DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Some errors when calling LabVIEW VIs Interactively from DIAdem

The picture of the task manager, see the attachment.



0 Kudos
Message 11 of 29
(2,333 Views)
 
0 Kudos
Message 12 of 29
(2,324 Views)
Brad,

Your message seem to be empty?

Regards

Roger Isaksson, Damill AB

0 Kudos
Message 13 of 29
(2,318 Views)

Hi Roger,

Wow, that's frustrating.  I typed in a long answer, and it showed up in the preview and everything, but now it's gone!  Use the below code with the original Test.vi instead of the built executable.  Once we get that to work, we can bug the LV guys to see how to call a LV executable with VI Server.  Te "123" is the integer value you want to pass to the VI input.

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

The big transfer size is due to ActiveX variant variables taking up 16 bytes per value-- twice as much memory as a DBL!  I recommend you save the large data channels to DAT or TDM file and pass the the file path through ActiveX instead.
 
Let's see if this sticks answer on the forum,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 14 of 29
(2,312 Views)
Brad, it use to happen sometimes, so I learned that its a good idea to edit the message in a text editor and then copy/paste it into the browser!

The modified script works now, see the attached image. Now to get it to run with labview..

The measurement data are stored as sgl. This makes the ActiveX variant 4 times larger and this would still not explain the more than 10 times RAM usage for the export? I am using the DIAdem "export channels" and the "open/close reference" Since our measurement files are going to be relatively large (GB's) we can not read the entire file to DIAdem. It's of course possible to store the data into several smaller files, but this would soon be tedious for the person doing analysis on this data.

Just to give you an idea of the requirements. Every hour(and file) there is about 0,7 GB of data collected, the tests can be run up to 18 days, this makes a total of about 300GB and about 400 files (one large hard drive). We want to analyze at least one hour and file at a time. Therefore we have a labview application for viewing, selecting and exporting data segments from these files to DIAdem.

If you have any suggestions for passing the data to DIAdem, we would be eager to know!

Regards,

Roger Isaksson, Damill AB
0 Kudos
Message 15 of 29
(2,307 Views)

Hi Roger,

With that much data and your individual file size < 2GB, I'm going to suggest that you use the DAT file format.  DIAdem has splendid data reduction and time slice windowing functionality, but only for data sets that have a DAT header.  I'd recommend you stream the binary SGLs to disk with LabVIEW file I/O functions and use the DAT header VIs in the LabVIEW-DIAdem Connectivity VIs to create a DAT header to match the 0.7 GB binary data file.  Note that the DAT header file can have implicit channels for data measured at constant time intervals-- this will also save space.

I'm glad to hear that the VBScript is now working.  Do we still need to figure out the ActiveX calling of a VI in a built executable?

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 16 of 29
(2,276 Views)
Hi Rogger and Brad,
This conversation helps me a lot. Thank you.
We have data log files created with LabVIEW. Now we want to generate reports with Diadem. So we would like to call LabVIEW application using diadem, which will call Read Datalog file and convert the file in readable format for Diadem. Then these data will be displayed in the diadem.
So we would like to make plugin for the same.
The code given by Brad is working perfect if I run it as a script file. But if I run the same code as plug-in it is not running and generating an error. (Attached : error1.jpg) Though this opens LabVIEW and not closing it. In Taskbar it shows "LabVIEW not responding".
 
 
Please guide me, how could I solve this?
 
Thanks.
Vishal.
 
 
0 Kudos
Message 17 of 29
(2,239 Views)

Hi Vishal.,

I do NOT recommend embedding AxtiveX calls to the VI Server inside a VBScript DataPlugin.  If this is a project that must be solved with DIAdem 9.x, then I recommend running a VBScript from a menu and using a file dialog to run the LabVIEW code.  If you can wait for DIAdem 10.x (DIAdem 10 went Beta last week), then you can start prototyping a G-code DataPlugin, which will have roughly the same quasi-feature status in DIAdem 10 that GOOP had in LabVIEW 7.x.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 18 of 29
(2,226 Views)
Hi Brad,
Thanks for the reply.
The requirement is as follows:
Customer has created some data files using LabVIEW datalog files. The data formats are of 3 - 4 types. (Specifically different clusters.) As these files were written using LabVIEW, it would be easy to read if from LabVIEW and get the data. So we want to call LabVIEW program to get the data from the data files in Diadem. As user selects the particular file, data plugin should execute and call respective LabVIEW program to get data in Diadem. Can you suggest me some other way to incorporate this using Data plugin with Diadem 9.1 and LabVIEW 7.1?
 
I thought of other option: To execute a script (which will in tern excute LabVIEW program to get data) from the Diadem plugin. This also gives the same error !!!! Does it also not possible?
 
Can we dynamically simulte Diadem Menu events in plugin?
 
Regards,
Vishal
0 Kudos
Message 19 of 29
(2,269 Views)
Brad thanks for the reply,

I have been evaluating the dat file format now. As a test procedure I created a vi that generates 60 channels, every channel's data content is a sine wave, and stored the data as a dat file. For example, a dat-file with a data file size of about 200MB takes about 5 minutes to open in diadem, is it supposed to be that slow? Am I missing something here. I attach the vi.

Regards

Roger Isaksson, Damill AB

0 Kudos
Message 20 of 29
(2,211 Views)