LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the timing of one plot on a waveform graph

I'm having noisy data run through a filter in real-time and since the filter is running in real time there is an offset problem where the actual data and the filter data are unsynchronized. I'd like to move the starting point of the filtered plot back n number of indices to match up with the noisy data, that way both curves are in sync.

0 Kudos
Message 1 of 6
(2,273 Views)

Modify the t0 part of the waveform (Get Waveform Components, followed by Build Waveform) before you write the waveforms to the graph.

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

Thank you for replying, however I tried to use the Get Waveform Components and Build Waveform but I wasn't able to fully integrate them with the signal coming out of the DAQ. I've attached everything I have and basically what I'm working with. I tried a couple different ways with bundles, merge signals, and index arrays but the Get Waveform Component wouldn't connect. Any thoughts? Thank you again!

Download All
0 Kudos
Message 3 of 6
(2,228 Views)

Why are your front panel and block diagrams so large?  They stretched across 2 of my monitors even though it was mostly empty space!

 

I don't see any attempts to use waveforms in this VI.

 

You are grabbing just 1 sample at a time at whatever rate the while loop happens to run.  That means there is really no valid time base for what you are doing.

 

Also, you don't have a Waveform Graph.  It is a Waveform Chart since you just send 1 set of points at a time and the indicator keeps a history of the past data.

 

You should be using multiple channels, multiple samples   1D Waveform.

 

I hate to suggest and improvement to your current code because I don't think you are using the DAQmx function correctly here.  But it will do the delay function you are looking for.  Drop a feedback node on the block diagram on whichever scalar wire you are trying to delay.  Right Click,  Properties.  Go to Configuration tab.  Change the delay from 1 to however many iterations you want to delay the value coming out.

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

1. Yeah haha the original vi is much larger and took up two monitors but I deleted most of it and focused the vi on this particular part. I forgot to make the window smaller however, my bad.

2. Unfortunately I have to use a Waveform Chart because my research team wants to review the data and observe what it's shape/behavior was after each test that we do. I know it's easier to put different plots on multiple scales on the Waveform Graph but we need to be able to see a recorded history.

3. I changed the DAQ to multiple channels/samples and 1D Waveform. After that I put in a Feedback Node successfully but I couldn't move the starting-point of the Filtered Data much further back than 1 indice(s) even if I increased the delay.

4. I'm open to suggestions and any help provided! I appreciate any form of advice.

Download All
0 Kudos
Message 5 of 6
(2,207 Views)

When you start working with a Waveform, then you have to do what I told you in the earlier message about modifying the t0 of the one waveform.

 

The feedback node is based on the code you did post using single sample scalar acquisition.  And if you do that, you still need to do what I said in my most recent message of changing the properties of the feedback node.

Message 6 of 6
(2,194 Views)