05-03-2017 09:02 AM
Hello Everyone,
I work at a dental equipment manufacturer. I'm attempting to come up with a test for scaler shafts. If you tap the shaft, under controlled conditions, good ones make a different sound than bad ones. So we want to evaluate the spectrum in order to have a reliable repeatable test rather than just playing by ear, as it were.
I'm trying to send this spectral data to an excel spreadsheet. I can't use simply "Export Data to Excel" (via the graph of the power spectrum), since I want to send the data to an xl "template" that already has formulas built in. I'm having trouble just getting the data to any spreadsheet, though. I'm pretty new at this. Could someone please help?
Thanks,
Evidental
Solved! Go to Solution.
05-03-2017 10:23 AM
Hi there, would you mind saving for LV 2012 or earlier?
05-03-2017 10:46 AM
Hi Gregory,
Here's the VI saved as 2012, with some caveats. I used "Write To Measurement File" to save in Excel, but that wouldn't compile in 2012, so I just removed it.
There were some warnings, though, even after that:
I've attached it, such as it is...
Thanks,
Dave
05-03-2017 11:02 AM
Ok, I see you are converting to the dynamic data type, and I would avoid doing that. It will be easier to troubleshoot when you don't have mysterious things going on under the hood.
Also, have you taken a look at the report generation toolkit? It allows you to open an Excel sheet as a template and write to it, working with actual Excel files.
05-03-2017 11:04 AM
You have an Index Array right after the loop, so you are only logging the first capture. If you just want the last spectrum, as one of the comments in the VI implies, then right-click on the output tunnel and select Tunnel Mode->Last Value.
05-03-2017 11:45 AM
Hi crossrulz,
I actually started off using 'Last Value' as the tunnel mode, since that's the default for a While loop, but got nothing, not even a bunch of zeroes, just a blank spreadsheet.
Thanks,
Evidental
05-03-2017 12:09 PM
Hi Gregory,
"Write To Measurement File" seems to require the dynamic type. I have looked at the report generation toolkit - even had a 30 day evaluation, but didn't get a chance to use it before expiration.
Thanks,
EviDental
05-03-2017 12:12 PM
Hi crossrulz,
Just an addition to my previous reply -
If you run this, with Last Value selected, you'll see that 'appended array' and even 'Power Spectrum Cluster' are empty. It's as though the array is getting cleared, but I'm not clearing it.
Thanks,
EviDental
05-03-2017 12:21 PM
You are indexing your Power Spectrum Cluster (array) every iteration. If the iteration count is greater than the array size - 1, you will get a the default data for that cluster.
05-03-2017 12:50 PM
Hi Gregory,
That sure sounds reasonable. I tried this, however:
thinking that if I exceeded 1999, I would see the first entry at the output (just as if I'd used Auto-indexing), but there's nothing - zero, zip, nada...
Thanks,
EviDental