05-03-2018 05:53 AM
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! 🙂
Solved! Go to Solution.
05-03-2018 05:54 AM
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! 🙂
05-03-2018 06:25 AM
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.
05-03-2018 09:07 AM
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.
05-03-2018 01:33 PM
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.
05-04-2018 04:52 AM
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! 😄