DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems displaying the correct x axis values with diadem report in labview

Solved!
Go to solution

Sorry for bothering you again but i have 3 more questions regarding the new tdms code;

I have tried to implement a multi page pdf report in a single file, but i wasn't able to append the reports as page 1, 2 , 3... (as you can see in the .vi file i need to change the name for each loop iteration otherwise i get an error). Is there a way for do something like that ?

It's possible to leave diadem running silent in the taskbar or in the background while it performs the reports and autoclosing as soon as the job is done ? (like diadem express report)

And the last one... if labview recognize that the x array has no points, (let's say i try to search over the limits of the array i get as xmin - xmax, 0 - 0)  it's possible to use a command for delete the correspondent graphic in the tdr file or select a different tdr file with less graphics on it ?

Thanks again for all your replies and the time you are spending for me.

 

 

0 Kudos
Message 11 of 18
(2,510 Views)

one more thing, when i try the for loop for multiple pdf pages, i get always a msgbox in diadem asking if i want to save the .tdr file, is there a way for let the vbs script detect the msgbox and autohandle it ?

Thanks in advance,

 

Ierman Gert

 

0 Kudos
Message 12 of 18
(2,481 Views)

Hi lerman,

 

I recommend that you only launch the DIAdem connection once after all your nested loops are done.  You could either create 1 really big TDMS file with all the measurements in it, or you could create N TDM files and send their file paths to DIAdem for batch processing-- I've coded up the latter approach.

 

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 13 of 18
(2,472 Views)

Thanks a lot Brad!

I've tried your new files and i must say they are great (as always), just one thing isn't working as i wanted to.

The pdf report is supposed to show 3 pages (Temp Data File1, Temp Data File2, Temp Data File3, with different x-y values for each file) but what i get is 3 times the first page (Temp Data File1).

I've tried to check your vb script but i wasn't able to fix it...

So my last question is: 

What i should modify in it ?

Thanks again and i hope this is the last time i bother you 🙂

 

 

0 Kudos
Message 14 of 18
(2,458 Views)

Hi lerman,

 

I didn't notice that you had textboxes referencing the Root properties of each of your TDMS data files.  The solution I sent is not refreshing those text boxes, because when you load 3 data files into DIAdem only the Root properties of the first data file are stored in he Root properties in the Data Portal.  So I decided to change the way the application is working.  Instead of loading all the data into DIAdem at once and appending multiple REPORT sheets, I decided to load one data file at a time and print one REPORT sheet at a time to the PDF file.  This way you can delete the Data Portal and load the next data file before refreshing that data file's REPORT sheet, so that data file's Root properties WILL be loaded into the Data Portal.  This also means that you can debug the DIAdem part by manually loading the TDMS file for the sheet you want to test, then manually loadin the TDR file and see what's not working there.

 

There are two ways to do this sheet-by-sheet PDF file creation.  The way I used in the attached ZIP file is the old DocStart / DocEnd printer spool approach that has worked since DIAdem 8.x and before.  As of DIAdem 11.0 it is also possible to append a sheet to an existing PDF file, so that's an alternative method available to customers with DIAdem 11.0 and later.

 

I also switched the process variables from the data files to the first Temp.TDMS file-- this cleans up your LabVIEW code and is architecturally superior.

 

The 3rd sheet has some issues on the bottom 2 graphs, but those can be debugged in LabVIEW-- it has to do with the data values and the resulting Xmin and Xmax properties. Note also that I configured the VBScript to look good with US paper sizes (8.5 x 11 inches).  You will need to tweak the "PrintWidth", "PrintLeftMarg" and "PrintTopMarg" variables in the VBScript in order to optimize the PDF sheet scaling and margins for A4 or other paper sizes.

 

Regards

Brad Turpin
DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 15 of 18
(2,440 Views)

Perfect, that's what i was looking for, thanks Brad !

One more thing; i've tried to make a .exe with this script; i added the .tdr, .tds, .csv files  (i tried to add also the picexport.vbs and updategraph.vbs as mentioned in some posts) but i wasn't able to get it working.

I'm getting an error out code 118 TDMS Open in Create PDF Report.vi (see attached img).

Is there a solution for this ?

Thanks again, Ierman.

0 Kudos
Message 16 of 18
(2,419 Views)

i'm still working on fixing this error, but without luck

All the suggestions or anything that can point me in the right direction will be appreciated.

Thanks, Ierman

0 Kudos
Message 17 of 18
(2,382 Views)

Hi lerman,

 

Today I tried to build a LabVIEW executable out of the last version of the code I sent you, and I was able to reproduce the error you reported at the "TDMS Open.vi".  I was then able to avoid the error by adding a second "Strip Path.vi" after the "Current VI's Path.vi" at the extreme left side of the block diagram.  The application (*.exe) constitutes an extra file/folder referencing layer that you have to escape from, as if the whole application was in another folder.  You can see this by adding an indicator to the current path going into the "TDMS Open.vi"-- instead of ending in the parent folder, it ended with "....exe".  Adding the second "Strip Path.vi" gets rid of this spurious "application folder".

 

Brad Turpin
DIAdem Product Support Engineer
National Instruments

Message 18 of 18
(2,360 Views)