11-29-2011 09:24 AM
Ok, I need some help from you math geniuses (or those that remember calculus).
I am recording two signals to a TDMS file, one is a pressure measurement and the other is a trigger monitor channel (basically it records a voltage change when the device is triggered).
So what I want to do is when the device has been triggered (voltage changes from around 1 V to around 0 volts), I want to evaluate my pressure channel to see how quickly it gets above a certain threshold.
I am thinking I need to integrate the trigger channel and somehow correlate that to the pressure channel, but I could be wrong.
I attached a sample dataset.
Thanks for the help.
11-29-2011 10:13 AM - edited 11-29-2011 10:16 AM
Could you not find PSI when on/off first reaches about 0 in your table, then grab the corresponding time, then find your PSI threshold, grab the time and subtract the two to get the elapsed time? Or maybe I am missing something - I'm no math genius. 😉
Edit:
Oh, maybe you are evaluating them in real time and not from the table?
11-29-2011 10:19 AM
Correct on most of it. What I am looking for is a way to "know" when the on/off signal goes from 1 to 0. now I could do a while loop and compare the current value to the previous value and if the difference is greater than say 0.75 V, it must have been triggered and then do my further analysis. But on a long dataset that could take some time.
I am pretty sure that there is a less brute force mathematics way to do this, but I cant think of it off the top of my head.
11-30-2011 10:30 AM
Hmmm, maybe one of the threshold VIs could help you there.
12-01-2011 05:40 PM
Kenny,
Are you trying to do the analysis as you are acquiring the data or are you opening a file and doing the analysis while looking at the file?
Kira T
Applications Engineer
National Instruments
12-02-2011 08:45 AM
I could do either, but it is intended to be after the fact, with a file.
12-05-2011 02:31 PM
Hey Kenny,
If you are trying to read it from a file I would suggest just doing it the brute force way, but I would suggest using a For Loop and wiring the size of the array to the number of iterations. Using a For Loop or a While Loop should not take too long to do the calculations you are trying to do.
Kira T