12-03-2008 03:38 PM
Im currently trying to export an XY Graph data from LabVIEW into DIAdem. I can load a specific report layout programatically and display the data on the XY graph successfully, however I woud also like to allow the user in LV to change the axis of the graph so only the data which is relevant is displayed in the PDF report. The type of diagrams displayed are acoustic measurements e.g. Frequency Response. The X-Axis is not the problem as this is auto-scaling, the Y-Axis is of interest in this case. I would like the display +10dB to -60dB for example. Is this programatically possible using a script that it controlled by LV somehow?
The only method I could really think of was to chop the array at +10dB to -60dB for example and the export it to DIAdem where the Y-axis is set to auto-scaling... are there other methods available?
Secondly, I would like to create one PDF with multiple pages for the different measurements that will take place in one test run. Is this possible without using some sort of external application to post-merge them?
Thirdly, Importing text arrays into a 2D table of some sort... I have a 2D array (2x20) with approx 20 measurement parameters that I would like to display on the report. Can I use one object in DIAdem for this? The only other method I know that works is to define multiple "free text" fields and use the "Text Values" input of the DIAdem Report VI to fill those fields... is there anything quicker or more efficient? The great thing about importing a text array to a single 2D table object is that the array can have different values/properties and sizes each time.
Fourthly, I think NI should come up with some sort of PDF Toolkit that enables vector graphics and the features I described above... I know of the Carya PDF Toolkit, but I used the demo version and looked at the resolution of the graphs to find that they were not vector based as I had hoped. Its a real issue that for PDF report generation in this form using DIAdem, one has to pay a 1000euro price tag to use just the PDF export functionality. I also believe that this is a single licence too, so each automated system that incorperates it needs a 1000euro licence!? is there any other way in terms of licencing/options? I'm sure many other developers feel the same way, as PDF generation in any industry is a must these days.
Best Regards
Alex Barker
Audio / Applications Engineer - Weiteck Ltd. Frankfurt
Solved! Go to Solution.
12-04-2008 10:39 AM
Hi Alex,
What VIs are you using in LabVIEW to communicate with DIAdem? There's a "DIAdem Report" express block that ships on the LabVIEW palette, but then there's also a suite of regular VIs known as the "LabVIEW DIAdem Connectivity VIs" that you can download for free. Your options will depend on which of these approaches you're taking.
The most LabVIEW-friendly way of limiting the display of the Y-axis is to do as you suggest and slice up the data array in LabVIEW before passing it on to DIAdem. The other option would be to set global DIAdem variables for the Ymin and Ymax values of the Y-axis, then call a VBScript that programmatically uses these variables to set the Y-axis display to the range you want. This approch would require the Connectivity VIs and some knowledge of VBScripting.
You can use the control cluster of booleans that the "DIAdem Report" express block provides to append sheets to a single, multi-sheet PDF file each time you call the "DIAdem Report" express VI. There is a shipping LabVIEW example that demonstrates this.
The "DAdem Report" express block does not enable tabular display or 3D graph display. Both are possible in DIAdem with a single REPORT object and your existing 2D array (expressed typically as a Group of Channels in the Data Portal). This approach would be an option with the Connectivity VIs.
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
12-11-2008 10:12 AM
Hi Brad,
Thanks for your reply.
I am using the DIAdem Report Express Block as you mentioned. Though i didnt know about the DIAdem toolkit, havent got round to trying it yet but it sounds promising for more advanced control.
The process you mentioned using the "global DIAdem variables" to set the X-Y axis... can you post an example? the problem i encountered when chopping the array, was that if I wanted the Y-Axis to be from 1-10 and the data max-min was only 0.3-0.5, it would autoscale to 0.3-0-5... so the chop method in this case is flawed.
I also tried to fill a FREE TEXT field with a string that has line fees LF or CR to get my table or list of values quickly on the paper, however this is also not possible. shame.
Found that example you mentioned about the multipage function. Exactly what I was looking for! marvelous. thou the next issues kills everything...
I've now hit a wall with the VI that ive turned into an exe... no data is being passed to it, the paths for the TDR layouts are fine (in data folder) and I have a indicator to show the paths in runtime to verify. When the PDF is generated, no TEXT VALUES or DATA is being sent through the Express VI, however when in the LabVIEW environment it works fine!!?
Same issue at: http://forums.ni.com/ni/board/message?board.id=60&message.id=9465&jump=true
Please could you help!
Best Regards
Alex.
12-16-2008 03:39 AM
Hi Brad,
Can you explain this wall ive hit with the report generation...? Ive gone through the service support team here in Germany and they havent got back to me yet... it cant be that a VI that runs in the LabVIEW development environment does not run as an exe... this is rediculous! This needs to be solved... Ive based alot of my work around this feature and im not giving up until I find a solution...
Best Regards
Alex.
12-17-2008 11:22 AM
Hi Alex,
I've now sent a request to the developer of the DIAdem Report.VI, who happens to be working out of the country at the moment, asking if he will send us back an example LabVIEW project that shows how to successfully compile this VI into an executable. I believe it can be done, and I remember hearing that it requires somehow specifically including the TDR files in the project prior to the build, but I've not done it myself. I'll let you know when I hear back-- with Christmas around the corner it might not be immediately.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-16-2009 09:45 AM
Hi Brad,
After pestering NI support here in Germany they provided me with a solution. It seems that the compiled exe could not find the script files, hence no data exchange with diadem. See below for solution!
1. Navigate to the following folder "C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Platform\express"
2. Find the files "PicExport.vbs" and "UpdateGraph.vbs" and copy them into the same directory as your exe.
3. If you need to use any of the standard DIAdem TDR templates or have not specified any custom TDR in your code... copy the whole "templates" directory from the path quoted in [1.] to your exe folder.
This has been tested and works a treat!
All the best
Alex (Happy Man) Barker