LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cond Retrieve Trigger only logs data around set point?

I need to acquire analog data after a set point level is reached until the signal falls back below that set point. The max level will be realtively high compared to the set point. I only seem to be logging data around a very narrow band relative to the set point. The vi is attahced. Thanks!
0 Kudos
Message 1 of 6
(3,006 Views)
Unfortunately, your VI didn't include the subvi you're using to calculate the parameters for your conditional retrieval, so my answer can't be very specific for you.

I wouldn't think you'd need to change your trigger level parameters every loop, so I was interested as to why you call that every iteration.

What is your hysteresis level set at?

When you say a very narrow band, do you mean that if your signal goes above by, say .2 volts, you don't get any more data from your AI Read VI?

Mark
0 Kudos
Message 2 of 6
(3,006 Views)
Mark,

Thanks for your interest. I had forgotten to save the VI as a library so I'll try that with this response. You have described my problem accurately; if I go above I do stop logging data until the signal falls back to something very close to the set point. One problem could be my hardware. I am using a 6024 DAQ card which may not support what I am attempting. Any thoughts or advice would be greatly appreciated.
0 Kudos
Message 3 of 6
(3,006 Views)
Well, that still didn't include your trigger level VI. No matter. First, upon taking a further look at your loop, you start a buffered continuous analog acquisition, but you don't have anything wired to the "number of scans to read" input of your AI read VI. The default for this input is -1, which means you read the entire buffer. This is not the setting you want when doing a continuous acquisition; you may get overrun errors doing this. You want to read a constant amount of data out of the buffer at a time, and it has to be less than your buffer size.

Second, this is not a limitation of your DAQ board. As long as your DAQ board can do buffered analog input, the triggering you are using is a software trigger, which is NOT a function o
f the DAQ board. The AI Read VI reads the data out of the buffer, and then based on the trigger specifications, determines whether or not this data should be passed out of the VI.

Since your arrays are not particularly large, I think it best to do it a different way. For example, the way you are doing it, the AI Read VI will return part of the buffer when the trigger occurs, but then stop because the next reading from memory that it does may not satisfy trigger conditions (no "edge", rising or falling).

Therefore, I propose that you get EVERY piece of data out of the AI Read VI (no trigger at all), and search through a particular channel's data for your trigger level. The first value that is above the trigger, get the rest of the data from that array. Then search the next arrays that come from AI Read VI until the value goes below the trigger value, and stop the acquisition when this occurs.

I can show you how to do that. It's not that difficult.

Mark
0 Kudos
Message 4 of 6
(3,006 Views)
Mark,

Thanks yet again for your interest. I would really like to have some help with the option you have described. As a matter of fact I had started down this road but didn't get far before I was stumped!
0 Kudos
Message 5 of 6
(3,006 Views)
Let me throw something together, and I'll post it here tomorrow.

Mark
0 Kudos
Message 6 of 6
(3,006 Views)