07-12-2023 01:13 PM
Hello,
I am quite new to LabVIEW, and I'm seeking to create a program that gathers data from an ae sensor connected to an NI 9775 card. This is easy enough, but my current goal is to set a threshold in volts so that only data points above that threshold are written to a measurement file. I started out with using the "Threshold Detector PtByPt" vi to check the data against an input value, and, if the read value exceeds the threshold, a case structure is activated and enables the Write to Measurement File. This program is linked below and is titled "AE Sensor Threshold and Producer Consumer Loop Without Trigger.vi". This program somewhat works, as I get text files that only include values above my threshold (using 0.004), but it's clearly missing most of the actual data that's being read, as I can run the program for a minute and only get a handful of data, even though I know there are a ton more points above 0.004. Attached is a screenshot of the text file containing a few points above 0.004.
After a bit of searching, I found the DAQmx Reference Trigger Analog Edge vi, which seems perfect for my uses, as I would ideally like to record the data above the threshold as well as the pretrigger samples, as well as record each "hit" in it's own separate measurement file for later analysis. However, after playing around with it some, I seemingly cannot get the program to record any data at all. Could someone suggest what I might be doing wrong, as well as any tips for using the reference analog edge or any improvements to my code without the trigger? My current code using the DAQmx Reference Trigger vi is linked and titled "AE Sensor Threshold and Producer Consumer Loop With Trigger.vi"
Thank you,
Harrison
Solved! Go to Solution.
07-12-2023 01:51 PM - edited 07-12-2023 01:52 PM
Hi Harrison,
Would you please save your codes to previous version? I cannot open them.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Colossians 3:17 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
07-12-2023 02:23 PM
Yes of course! Please let me know if this works, or if I need to send the folder that it gives me when I select "Save for Previous version." This should be for version 17, I believe.
Thank you,
Harrison
07-12-2023 03:13 PM - edited 07-12-2023 03:15 PM
Yes, the codes worked. Thanks! What are you expecting to be your threshold? Like is there a specific value or range maybe?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Proverbs 16: 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
07-12-2023 03:30 PM
If I use DAQ Assistant, background noise registers at about 9-13 mV, so I'm expecting a threshold of about 0.014 minimum for picking up anything above background noise. However, I've been sort of arbitrarily using 0.004 because many of the values that show up on the data display are beneath that, and I figured it would be a good indicator for if the measurement file was picking up data quickly. As for the actual application of the sensor, we do not yet have the experimental setup needed to find what level of values we'll be looking for.
07-13-2023 01:21 AM - edited 07-13-2023 01:23 AM
Hi Harrison,
what about this to filter only values above your threshold value:
07-13-2023 09:59 AM
Thank you so much!
This works perfectly for recording the data over the threshold, which is a huge step in the right direction for me, but you are right in that I ideally want to record data besides just the values over that threshold. I would like to instead start recording values once the threshold is triggered and continue until the data drops below that threshold, alongside some amount of pretrigger values.
This is why I thought that the DAQmx trigger vi, set to Reference Analog Edge, would be perfect, as it describes doing just that, but I am struggling to get that to work.
The end goal of this project is to be able to read data from my ae sensor, and when a set threshold value is reached, it records pretrigger data and all the data that comes through during the time span in which the threshold is being exceeded. It then spits this "hit" into it's own separate text file (which I think should be as simple as wiring a constant "true" to the reset on Write to Measurement file or TDMS). At the same time, I'd like to have a file that records the highest point and duration of each of these separate "hit" files.
Thank you again,
Harrison
07-13-2023 10:16 AM
Hi Harrison,
Can you please mark GerdW's answer as the best? just as a reference for someone who may be having the same issue in the future.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ John 3: 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~