Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

integrating waveform data

Hi I have graph that is displaying both analog and digital data and I am trying to integrate the analog input only when the digital input is high. I'm not really sure how to go about it. I was thinking that I would have to get the time stamps whenever the digital input goes high and then low, and then use those as  my limits of integration...

 

I was hoping to get some feedback or tips on how to approach my problem. Anything would help.

I've attached a photo of the code that I have so far.

 

 

Thanks!

0 Kudos
Message 1 of 2
(3,594 Views)

Hi sara25,

 

You could multiply the data together. So when the digital value is low (value 0), multiplying the analog signal would result in no signal shown. However when the digital signal is high (value 1), multiplying the analog signal by this value will give you the analog signal itself. I hope this helps!

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(3,552 Views)