LabVIEW

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 6
(2,681 Views)

 Hi sara25,

Do you mean ignoring the analog input when the digital is low and integrating constantly (every value that is acquired has to be integrated to a previous result value?) all the values on the analog input when the digital is high?

 

I think I do not understand pretty well what you want to do. Would you explain it a little bit better please?

 

Thank you very much

0 Kudos
Message 2 of 6
(2,599 Views)

So what I am trying to do is integrate the analog input only when the digital input is high. To do this I was thinking I would have to see the time stamp for when the digital input goes high and low and then use that for my limits of integration on the analog input. 

 

My problem is that I cannot do this when the two waveforms are not synchronized. It seems that the digital input is off by 0.05 seconds and Im not sure how I could fix this. 

0 Kudos
Message 3 of 6
(2,569 Views)

Which modules are you using?

 

There are some ways we can synchronize the tasks using the cards´ clocks but it depends on the modules that you use.

 

By the way, I would recommend you to delete this forum post and do it in the Multifunction DAQ forum the next time, so you would get more answers and people more familiar to the questions.

 

Thanks!

0 Kudos
Message 4 of 6
(2,547 Views)

This actually my first project with LabVIEW so I'm not familiar with cards' clocks or knowing what modules to use.....could you explain that?

 

I will post this on the Multifunction DAQ forum as well.

 

Thanks

 

0 Kudos
Message 5 of 6
(2,540 Views)

Great Sara, welcome then!

Link your post to this one and we can continue working on the other forum whre other people can share ideas with us,

 

Thank you!

0 Kudos
Message 6 of 6
(2,530 Views)