LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need help with daq occurrence config.vi

Hi,

I've played a bit with the DAQOccurrence3.vi and changed it in the way I thought.

My goal is to change the analog trigger conditions for the daq occurrence while continously aquisition of analog data.

Well, my example doesn't work proper, my new occurences seems not to be valid.

Does anybody have an idea what could be done better?

Thanks in advance, Andreas
0 Kudos
Message 1 of 5
(2,712 Views)
I've tried this, but it's been my experience that once you start a buffered acquisition, you can't change the parameters for a DAQ occurrence. They can only be set before the acquisition starts. Therefore, if you don't stop the acquisition, you can't change the DAQ occurrence as you are doing.

Mark
0 Kudos
Message 2 of 5
(2,712 Views)
In looking at your VI further, what is it you are trying to accomplish? In your VI, you set the DAQ occurrence parameters, then start the acquisition; as soon as you get the trigger, the data starts going to the graph.

If you change the trigger parameters, you'd have to restart your data acquisition anyway; therefore, if you want to set a different trigger level, stop the acquisition, change the DAQ occurrence parameters, then restart the acquisition. This should do what you want.

Mark
0 Kudos
Message 3 of 5
(2,712 Views)
Hi Mark,

thank you for answering!

The aim of my application is on the one hand to have a continously data aquisition of 2000Hz on six chanels with continously data logging but on the other hand to have nearly realtime control on a valve triggered by a threshold of one of these chanels.

In LV5 I had done this with a slower samplerate, sampling a couple of data, looking for a threshold in these data and setting an occurrence to set the valve via digital output. Unfortunately, there was a big time delay between realtime trigger conditions and setting the valve.

In LV6 I found this Daq Occurrence Config.vi and it works fine and pretty fast, but - as you told me now - I can't change the DAQ occurrence parameters without stopping and restarting data aqu
isition (what I don't want).

Well, if you might have an other idea or an topic which I should look on, I am pleased, if you or anyone can tell me.

Thanks so far.

Andreas
0 Kudos
Message 4 of 5
(2,712 Views)
Other than the way you've tried, I'm not sure that there's any other way short of doing it by hand. You'd have to take the data coming out of the AI Read VI, and search in it for the trigger level--then set the valve if the trigger level was crossed. I can't think of anything else, without stopping the acquisition.

Mark
0 Kudos
Message 5 of 5
(2,712 Views)