02-11-2014 03:06 PM
I've done the following steps:
Created a report (page) template.
Each page has 4 charts
1. X, Y , Z plot (accelerometer data)
2. FFT transforms of (1).
3 and 4 are the same for the next channel, and there are 5 channels total.
Looking at the Curve and Axis definition dialog, it shows the type, color, Y-Axis (which are all Y1), X-Channel (blank), and Y-CHannel (my data).
What I am trying to do with my script is get it to step through all of the data and plot it using the specified template.
Each channel is labelled "N X (Filtered)" where N is 1 - 5, and there is an X, Y , and Z. The FFTs are labelled: "N X (Filtered) FFT" with the same set of channels.
Hope this makes sense.
Thanks.
Solved! Go to Solution.
02-12-2014 08:21 AM
Hi Worldtraveller,
Would you submit or email me (brad.turpin@ni.com) the data, TDR file and VBScript you have so far? I have some code that I can adapt to sequence through your channels, but the adaptation will depend on the structure you have in the Data Portal and also the way you've laid out the graphs in the TDR file.
Brad Turpin
DIAdem Product Support Egnineer
National Instruments
02-12-2014 09:02 AM - edited 02-12-2014 09:03 AM
On its way.
The layout in the report isn't set in stone, if it's easier to do one channel and FFT per page than two, I can easily live with that when producing the final report.
02-18-2014 12:02 PM
I've made some progress.
Using the 'Copy as Script' command in the report template, I have the following line:
Set o2DLine = o2DAxisSystem.Curves2D.Item(1).Shape
And it's giving me the following error:
The index "1" is outside valid range
Not sure if this is enough context to figure this out, but I don't understand enough of what the script is doing to know why I'm getting this error.
02-18-2014 03:10 PM
Brad, can you verify you got my email?
Thanks.
02-19-2014 05:45 PM
Hi Worldtraveller,
I emailed the solution I created directly to you, yes.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-20-2014 09:04 AM
It worked great! Thanks.
02-20-2014 09:43 AM
Brad,
Thanks for your help. There appears to be an error (somewhere) with the script.
I am processing 6 data files. The script works great on 2-6, but for some reason the following happens in File1:
1) All of the report sheets in Diadem show with the names 'Sheet 1, Sheet2', etc, and not the channelgroup names.
2) The export to pdf exports the correct number of pages, but all of them are duplicates of page 1 (so I get 50+ pages that are identical).
I've tried the following troubleshooting:
1) Re-ran the script with just File1, same results as above.
2) Re-ran the script with just File2, same result.
I suspect, based on this, that there is a logic error (somewhere) that only affects the first loop. As a workaround, I will next run the script with a dummy file and the actual file1 to see if I can get a good result (I really need to get this report done and off to the customer). I will take a look at the script later and see if I can figure out the error, but if you have time, I'd like your input. I can send you two files, or you can just duplicate the one I sent you and give the channelgroupss some different names to easily discern which is which.
Cheers.
02-20-2014 10:18 AM
FYI. The workaround worked, so there's def something wrong with the logic in the first loop through. I have an idea, but it'll have to wait until I can get this report out to the customer and revisit the script.
Thanks again for your help Brad. This would have taken me weeks or more to script on my own (and months to do it manually....).
02-20-2014 12:35 PM
Hi Worldtraveller,
Would you please email me that 6 test data set? I'd like to look into this and get you off that workaround.
Brad Turpin
DIAdem Product Support Engineer
National Instruments