08-12-2021 01:44 PM
I'm having trouble measuring anything other than noise from a PCB 352C23 Accelerometer wired to a NI-9234 held in cDAQ-9188. I am at the start of my troubleshooting journey but wanted to reach out to the community to see if that chain of hardware was fundamentally incompatible.
Will share more details immediately if those three are good with each other and somebody asks for more.
Kind regards,
Henry
Solved! Go to Solution.
08-12-2021 02:40 PM
PCB 352C23 Accelerometer is compatible with the 9234. Share your code that configures the DAQmx task; it should configure an accelerometer channel or explicitly enable IEPE excitation. The other specification compatibility to note is the low sensitivity of this high-acceleration accelerometer. At 5 mV/g, you will get 5 V out at 1000 g. What acceleration levels are you testing at?
08-16-2021 02:44 PM
Hi Doug,
Thank you for the advice. I believe I've enabled IEPE and seem to be making progress. I really had trouble sampling at 1,000Hz while writing to the file in the while loop (I imagine that took more than 1ms, throwing everything out of time) so I'm build an array and then writing the array as a whole at the end, is that the correct approach? and in general are there any other glaringly obvious issues with the code? LabView is very new to me, let alone "visual programming" so I'm not sure if I'm way off in places.
My measurements will be up to 500g potentially so I'm not expecting great sensitivity in the low acc values, but with the attached setup I'm still not even able to pick up the difference in having the accelerometer with or against gravity, is that normal?
In addition I still think something is wrong as infrequently I get decaying signals as an output and other anomalous readings. Once again, I still don't have loads of faith in my code.
Kind regards,
Henry
08-17-2021 04:14 AM
It shoudn't be a problem to continously log data with 1kSPS (or even 500kSPS)
Do have access to the Sound and Vibration Tools ?
Take a look at the shipped examples (Help-Find Examples ..)
08-17-2021 04:47 PM
Hi Henrik,
That's good to hear. I don't believe I do, I can't find a examples with elements that I can copy of:
an IEPE enabled accelerometer,
sampling at 50kSPS for 50ms,
saving reading out to a csv/tsv file.
Is using a while loop still the right option for that?
Kind regards,
Henry
08-17-2021 05:17 PM
In your code, I recommend the following changes:
Do you always intend to take data for 1 s ? If so, you may consider a finite acquisition.
Rather than make changes to your existing VI, it may be more efficient to start from one of the shipping DAQmx examples:
<LabVIEW>\examples\DAQmx\Analog Input\IEPE - Continuous Input.vi
<LabVIEW>\examples\DAQmx\Analog Input\Voltage - Finite Input.vi
If you want to use a soft front panel to configure, acquire, and save the data, you can download a free application here:
DSA Soft Front Panels Download - NI
08-18-2021 04:10 AM
Learn about the producer-consumer architecture in LabVIEW.
One loop continously read the data and pipe it into a second loop for display and storing..
08-20-2021 08:01 AM
Thank you very much Doug,
With your help my code looks like this now and nearly does exactly what I need it to do.
You've certainly answered my question so I've accepted yours as the solution but have a few follow up questions if you'd be so kind (otherwise I'll start a new treads in a different boards):
- I would like to save the 9 channels I'm collecting to a JSON file, I can't find the right combination of converting the DAQmx Read data output from array to something "Flatten to JSON" accepts without throwing "polymorphic terminal cannot accept this data" I've tried building an array, clusters etc.
- further to this, the best format would be an array of objects like:
{
"time(ms)": "0.0194",
"ch1": "0.000000",
...
"ch9": "1.212011",
}
or each channel has it's own object and time values. but mainly including the time of each sample as I gather they aren't always the same as the theoretical rate.
- This acquisition is one part of a custom build running on a Raspberry Pi 4 that controls stepper motors, electromagnets and more. I assume I can't get a full LabVIEW instance running on the Pi but can I bundle this up and run it in a headless mode with the DAQ wired up to the pi? Anything to avoid using another computer in addition to the Pi
- Finally, whether it's running on the Pi or a sperate desktop. I have light gates that trigger a slow-mo camera & measure velocity, they go into the GPIO on the Pi. Can I use those to trigger the start of the 0.1 second accelerometer data capture window?
Happy to start asking elsewhere but you've been so helpful so far I wanted to ask more questions!
Kind regards,
Henry
08-20-2021 08:07 AM
Glad we could help... and happy to continue helping... but yes, please do start a new thread.