DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate pdf from labview using DIAdem

Hi

I am trying to generate a report (pdf) using DIAdem in LabVIEW 8.5, but I can't get the the template that I generate myself, to work properly.
I have some data (attached in the VI), which is a table with 3 rows, 1st: sample no, 2nd: frequency, 3rd: result.

What I need on my report is
1) The frequency plottet along the x-axis (equally spaced), and the result plotted along the y-axis (it's percent (%), so they really has to be multiplied with 100, so the y-axis should go from 0-100)
2) A table below with 2 rows, 1st: frequency, 2nd: result
3) Some extra information about who conducted the experiment, date and so on.

I have tried and make something like it, which you can see in the attached pdf Data.pdf.
I am all new in DIAdem, so can someone please help me make this template, I can't get it to work properly. I can't turn the table, so I get two columns instead of two rows, and I can't get the graph to plot the data as I want to.

Hope to hear from someone soon, today if possible, thank you very much.

Best regards
Simon

LV 8.5
LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 1 of 17
(8,679 Views)

Hi Simon,

I edited both your VI and the TDR file, and now I believe it does what you want.  I actually created 2 TDR layout files, one in portrait mode with the table as columns and the other in landscape mode with the table in rows.  Note that the "Text values" control on the front panel now wires in the descriptive text fields dynamically to the bottom section of the report.

Ask if you have further questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

Message 2 of 17
(8,666 Views)

Hi Brad

 

It seems to work just great now, thank you very much 🙂

Now I have another problem I hope you can help me with. I now want to compile this VI to an EXE, but when I have compiled it, the EXE works fine but when I press a button to create the PDF, none of my data and textfield values like user and material name is plotted to the PDF. The graph is empty and the fields for user and material are either empty or set to some default value. How do I get this to work?

 

Best regards

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 3 of 17
(8,613 Views)

Hi Simon,

 

My guess is that the TDR layout files the "DIAdem Express" block is using in the VI are not being found by the EXE.  Typically you build an installer and include the TDR files in the list of files to install.  I'm not actually sure, though, where the TDR files need to be in order to be found by the EXE, but I have heard of this problem before and heard that installing the TDR files properly is the solution.

 

Let me kno if you can't figure out where to install the TDR files-- in that case I will ask R&D for help.

 

Brad Turpin
DIAdem Product Support Engineer
National Instruments

Message 4 of 17
(8,601 Views)

Hi Brad

 

I have tried to build an installer and compile an exe and nothing seems to work regarding the template, eventhough I place the TDR file in the same directory as the executable. I can see that the pdf, that is generated, is using the right template, there is just no data in the pdf, I have even tried to plot the graphs in the VI, so I am sure the data is there, pretty weird.

 

I have attached my little example in the following zip, containing the VI, TDR and installer. It is made in LV8.5 and DIAdem 11 and I run it on the same machine as I compile i.

 

I have made a ring control to choose between two different paths for the TDR, because the path doesn't seem to be the same when you run it in LabVIEW and running the executable.

But again, I can see that it uses the right template, or else the pdf would just be blank, but there is just no data 🙂

 

Can you take a look at it?

 

Best regards

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 5 of 17
(8,486 Views)

Hi again Brad

 

Have you had any luck in figuring out, why I cannot get the Diadem reportgeneration to work, when I compile it to an exe-file?

 

Best regards

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 6 of 17
(8,336 Views)

Im also having exactly the same issues... I also have 8.5 and DIAdem 11. When compiling to an exe, its like no data and text properties are passed to the DIAdem Report Express VI, however when i use the same VI but within the LabVIEW environment and run it. it works fine!?

 

hmm, this is really dodge. anyone found a solution yet?

 

Alex.

:. LV2010 SP1 ... W7 .:
0 Kudos
Message 7 of 17
(7,969 Views)

Hi Ali66b

 

I didn't find a solution to the issue, so instead, I made a report to WORD (*.doc) which works fine when you compile an executable, and you can make a pretty nice report layout there also. The only difference is that you got a word doc-file instead of a pdf.

 

Hope this helps

 

Best regards

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 8 of 17
(7,965 Views)

Hi Simon,

 

Thanks for the info. This im really mad about, Ive spent days creating layouts, VIs that extract data from various TDMS files and built my whole project around this tool, and then I go to compile it and it doesnt even work! This has really finished me off, im screwed. Did nobody test this feature at NI - because thats what is seems like. B##locks. I initially had a great image of NI and its products, but my patience is surpassed.

 

Simon, is exporting to DOC available in the standard labview function set? and is it possible to get the nice vector based graphs into word or are they just snapshots of the front panels?

 

Thanks again

 

Alex.

 

 

Message Edited by ali66b on 12-11-2008 12:14 PM
:. LV2010 SP1 ... W7 .:
0 Kudos
Message 9 of 17
(7,963 Views)

Hi Alex

 

I understand your frustration, I have been there too Smiley Sad

I build my whole application for the use of DIADEM and then it didn't work when I compiled the program. I have tried including the template in a project as a dependency but nothing of the things I have tried worked..

 

So now I use a word report instead.

I am not sure if you need any special toolkit besides the standard Labview package, I think you will need LabVIEW Report Generation Toolkit for MS office. Try and do a search in the Labview examples for MS Office Report, the Express VI I use is called this.

 

You can make a template in word (*.dot) that you can customize to your likings (e.g. color, formatting) and link it in Labview with the Express VI (MS Office Report), and you should be able to customize the appearance of graphs too. HOWEVER, I have had some troubles customizing the look of my graphs, as default the graph from Labview is inserted, but you should be able to change this.

 

When you make your word template (*.dot) in word, you place Bookmarks, where you want your text (e.g. date, operator, material) to appear, pretty easy and straight forward.

 

Best regards

Simon

Message Edited by SCMAJA on 12-12-2008 09:09 AM
LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 10 of 17
(7,945 Views)