Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Two analog input signal interaction on myDAQ with LabView

Solved!
Go to solution

JoAl0304, I have not made any changes, no.

0 Kudos
Message 11 of 14
(1,837 Views)

At the suggestion of charlesy and niki.b I've done some reading and I've been able to figure out how to switch to Continuous data acquisition and get the sampling rates I am looking for. This seems to have solved the "two signal interaction" issue I was having before. 

Now, what suggestions do you have for structuring this VI? I basically want to acquire data at 1kHz and then if any incoming value exceeds some threshold value, plot an array of x number of values before and after the threshold was triggered. I've been able to map this all out within a single while loop, but I think this might be computationally heavy. Would you agree?

I'm not sure how to pass data outside of the while loop, to only execute upon triggering of this event. I know a little about shift registers, but I can't seem to send an array outside of a while loop.

0 Kudos
Message 12 of 14
(1,810 Views)

Use a case structure to do the equivalent of an if/else statement. I would pass all the array data out of the while loop (just wire it straight out) and then use the case structure to determine when to actually execute code on it.

Lindsey Nestor
Program Manager, Hardware Services
National Instruments
0 Kudos
Message 13 of 14
(1,803 Views)

Lindsey, 

That is exactly what I thought. I'm having issues tunneling data (especially Boolean) out of my main while loop to serve as the case selector. 

If I tunnel with indexing, this provides an array of all previous Boolean values recorded. Whats the best way of correctly handling this?

0 Kudos
Message 14 of 14
(1,799 Views)