annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Using same DAQ for two events

Risolto!
Vai alla soluzione

Hi everyone!

I created an event structure for two events which use the same hardware for voltage acquisition. I click the boolean for the first event and after a few minutes, I click the boolean for the second event. I have kept the DAQ task inside the event structure separately for each case. Can I know if this would work or if anything else is to be done? I have attached the image and VI with this. Thanks in advance for the help! 🙂

Scarica tutti
0 Kudos
Messaggio 1 di 6
2.897Visualizzazioni

Hi everyone!

I created an event structure for two events which use the same hardware for voltage acquisition. I click the boolean for the first event and after a few minutes, I click the boolean for the second event. I have kept the DAQ task inside the event structure separately for each case. Can I know if this would work or if anything else is to be done? I have attached the image and VI with this. Thanks in advance for the help! 🙂

Scarica tutti
0 Kudos
Messaggio 2 di 6
2.895Visualizzazioni

Are the two cases supposed to read the same channels?

 

I typically do not like having DAQ inside of an event structure.  I prefer keeping the DAQ in a separate loop, continuously running, and use a Queue, Notifier, or Global Variable to pass the values to other loops.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Messaggio 3 di 6
2.883Visualizzazioni

Hi!

Yes, they're from the same channel. I'm using the same hardware so there's only one connection to the board. But I need to read a specific number of samples and after a few minutes, take the reading again. So I placed the DAQ inside the structures separately and ran the program.

So according to your suggestion, if the DAQ is placed separately, how can I separately get the readings? 😞 Is it possible with the global variable? Please help! Also, thank you very much for the suggestion.

0 Kudos
Messaggio 4 di 6
2.854Visualizzazioni
Soluzione
Accettato da autore argomento raghav06

If you only care about the latest value, then just use a Global Variable or a Notifier.  Let the DAQ loop capture X data points, calculate the mean, and write to the global.  And have it doing this constantly.  Then you just read the global when you need a data point.  Alternatively, you could use a Notifier just to get a "more up to date" reading.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Messaggio 5 di 6
2.840Visualizzazioni

Hi! Thanks a lot for the help! It works fine now with global variable but as said I just get a bit delayed reading. I'll look upon the notifier! 🙂 Cheers! 😄

0 Kudos
Messaggio 6 di 6
2.828Visualizzazioni