04-24-2009 10:54 AM
Hi there,i'm trying to create 3 xy graphics with diadem express in labview from a csv file with x and y coords.
I've created a script that read the lines from the file as array, split them, delete the interested zones and send them to the diadem express.
I created also a report template with 3 graphics with manual range and ticks (setted it at 25 for x range and 1 for tick).
If i send the 3 arrays (the x ones) as 0-25, 25-50, 50-75 it works perfect (see Example X Channels.pdf), if i try to set the 3 arrays x values as (my final goal) 0-25, 24-49, 48-73, the 2nd and 3rd graphic eat some signals (see Example X Channels wrong.pdf).
I'm lost, i've tried everything and i have no idea how to fix this issue.. maybe a script or something like that ?
I've added as Attachements the .csv , .vi and the .tdr file that i'm using for this.
Thanks in advance,
Ierman
Solved! Go to Solution.
04-27-2009 05:54 AM
Dear Mr. Lerman
If I understood correctly you would like to have the x scale ranges of 0-25, 24-49, 49-73. I hope I understood your problem. If it is correct, please, confirm me. Here attached you can find a .pdf of the report generated with the ranges aforementioned and the .tdr file that allows to generate those graphs.
I hope this help!
HUDSON
04-27-2009 06:58 AM
Thanks a lot for you reply Hudson.
I've tried to check your files but the x values are set manually and i need diadem to recognize them in automatic.
If i send with labview 3 arrays of data (1 for each x axis) i need diadem to recognize the x starting and x ending value for each array and plot them on the graphic.
I used the example 0-25, 24-49, 48-73 but it can be also 3-28, 27-52, 51-76 (always 25 units x scale) , pratically i need diadem to show 25 units for each graph with x-start and x-end selected by the array begin value , end value
example:
3.0
3.1
3.3
3.7
4.4
5.6
6.9
......
24.7
28
I need diadem to recognize the first and last value of this 1d array and plot em in the x scale as begin and end of it.
I believe it's possible to do with a diadem vb script, but i have no idea on how to perform it 🙂
Thanks again for your patience
Ierman
04-27-2009 12:42 PM
Hi lerman,
You are correct that you need to invoke a DIAdem VBScript in order to impose your specific and dynamic X axis scaling. Luckily, the DIAdem Report express block you're using can call a VBScript instead of a TDR report layout file. I edited your application (in LV 8.6) to do this, and I created a VBScript to apply the custom scaling you asked for. I did have to concatenate the 3 separate 2D arrays into one because the DIAdem Report express VI collapses its 3 inputs to 1 when you tell it to call a VBScript instead of load a TDR report layout file.
Ask if you have further questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruemnts
04-27-2009 02:16 PM
Thanks a lot Brad, it's working like a jewel 🙂
I have one more question for you, is possible to set the y axis min - max from labview ? Or i have to manually modify the vbscript each time for it ?
04-27-2009 03:29 PM
Sorry if i bother you again but in the past with the tdr file i was able to write some text strings in the report, now with the integration of the vbs script i have no idea on how to insert them.
Can you give me a tip or an example please?
Thanks, Ierman
04-27-2009 03:38 PM
Hi lerman,
There's not built-in function in the DIAdem Report express block for setting the Y axis scaling-- you're going to need to pass that information in as data and access it with the VBScript on the other end. I incuded updates in the VBScript to look for the Y scaling in the last data channel transferred, and I changed the VI to compile the Y scaling information into the 7th "data channel row" of the 2D array being passed. Alternatively you could use the min and max values of each Y channel, which I've included commented out in the VBScript.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-27-2009 04:58 PM
Hi lerman,
I think with the text labels, added to your other requests, that you have finally come to the limits of what we can do with the DIAdem Report express block. You might want to consider instead using the DIAdem Connectivity VIs, which are a free download. My recommendation is to create a TDMS data file with all the properties and string data and numeric data you want to pass to the report, then tell DIAdem to load that TDMS file and run the VBScript for report tweaking (in your case specific axis limits). Your string data can either be named scalar properties or 1D arrays of strings stored in channels. The point is that you have complete control over the structure and content of the TDMS file from LabVIEW, and you have complete control over the data and property references from DIAdem. The "DIAdem Report Wizard Start CSC.vi" I used in my attached example is installed by the "LabVIEW DIAdem Connectivity VIs", though it doesn't show up on the palette.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-27-2009 05:14 PM
Sweet... thanks a lot Brad, you are just awesome..
I'm gonna study your code now 🙂
04-28-2009 04:28 AM - edited 04-28-2009 04:30 AM