DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Diadem startup script doesnt run when executing associated file

Solved!
Go to solution

Hello,

 

I have a startup script that works properly when diadem is run itself, however when I open a file associated with diadem (tdms file) the startup script doesnt run.  Is there any way to ensure the script runs regardless?  Thanks for the help!

 

Bala

0 Kudos
Message 1 of 8
(5,772 Views)

To clarify,  I have diadem referenceing the startup script under settings-options-general.  The script runs when diadem is exectued alone, however opening an assocaited file seems to bypass the startup script.  My end goal is to open a tdms file in diadem from labview and then process it with a diadem script.  If anyone has any thoughts on how to do this, that would be greatly appreciated.

 

Thanks!

0 Kudos
Message 2 of 8
(5,718 Views)

Hi Bala,

 

Is it important that you return back to LabVIEW after running the DIAdem script? What's the reason behind wanting to load the TDMS file dynamically into DIAdem from LabVIEW? It might be easier to simply load the file in DIAdem after your LabVIEW has completed. Take a look at the following resources to see if they help you.

 

Reporting Data Using the DIAdem Report Express VI:

http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/reporting_using_diadem_express_vi/

 

Run a Script When DIAdem Loads a Data File:

https://decibel.ni.com/content/docs/DOC-14200

 

Launching a stand alone DIAdem instance from LabVIEW:

https://decibel.ni.com/content/docs/DOC-23507

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 3 of 8
(5,713 Views)

Hello Kelsey,

 

I will not be returning back to labview after running the diadem script. 

 

My VI generates a TDMS file and at the end of the VI, I would like for the TDMS file to be automatically opened in diadem, and then automaticallay procesed with the diadem script. Two of the links you shared will generate reports, however I am not interested in a report and those VIs dont seem to have an imput for just a file. The second link you posted works if you have diadem already open and then load a file from the navigator in Diadem. 

 

The basic intent here is to have all of the pararmeters for a specific view layout to be in place and for the file to be automatically loaded via labview.

 

0 Kudos
Message 4 of 8
(5,710 Views)

Bala

 

Seems like the issue is: are your TDMS file path/names the same between runs.    If so it would be straightforward to put the tdms name in a  load command and then process it.

 

Just guessing, that you have different TDMS file names.  In this case,  DIAdem can be started from a script in two ways, 1)  From the options startup script. selected from general | options.     2) From a command line option when DIAdem is called.    I have not found that both will work, It was just one or the other. 

 

What I have done for a similar use case, is to make a Text file ( for me is was a ini file)  that holds one or more tdms file names and other information about how to handle the file.  This ini file can be built by the labVIEW app and then the DIAdem App would then read the file and pickup it's names, and load them up.  If you need code to read/write a ini file in DIAdem, let me know.

 

 

Paul

 

 

 

 

 

0 Kudos
Message 5 of 8
(5,690 Views)
Solution
Accepted by topic author Bala_S

Hi Bala,

 

Based on your use case, I would suggest calling the following VI, which ships with LabVIEW, after your acquisition VI is done creating the data file.  Just pass the data file path into the top input and your VBScript file path into the input below that.

 

"C:\Program Files (x86)\National Instruments\LabVIEW 2013\vi.lib\ExportToExcel\DIAdem Report Wizard Start CSC.vi"

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 6 of 8
(5,667 Views)

Thanks a bunch for the help!  The DIAdem Report Wizard Start CSC.vi did the trick!

0 Kudos
Message 7 of 8
(5,661 Views)

Great!

 

By the way, the reason that VI ships with LabVIEW is that this is the VI that is called when you right-click on a LabVIEW graph on the front panel and select the context menu "Export to DIAdem".

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 8 of 8
(5,624 Views)