LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constant Zero Values

Hi Folks, am trying to develop a LabVIEW application that is supposed to be plotting the highest difference between continously acquired data and the Mean of twelve values, on a Waveform Chart in my Front Panel.

 

When my application is run, I see just a straight flat line along the Y = 0 axis.  This is not something I want, but the plotted chatted should be hovering around the Y=0 axis, or even deflect away sometimes, as I expect that when application is continously acquiring data, it should be plotting the maximum differences between instantenous value and the calculated mean.

 

I probed my vi, and surprisingly I see Zeros on the wire going to my Waveform chart.  I don't know what to do differently to avoid this values of Zeroes, and I will appreciate any help and suggestion.

 

Attached is a snippet of my Main vi, and two Subvis that are related to this section of my code.  I will truly appreciate any help or suggestion.

 

Thanks in advance.

Regards

Tebefia

0 Kudos
Message 1 of 5
(3,280 Views)

We'd really want to see your code as a whole to see what's going wrong with it.

 

You used the word snippet.  It doesn't mean what you think it means.  Snippet is a specific term in this community.  You can save code as a snippet or as an image, which you did.  An image is NOT a snippet.  It's like the squares and rectangles thing.  All squares are rectangles.  Not all rectangles are squares.  With a snippet, you can drag the code onto a block diagram and the code will be transferred.  You'll need to go to your Edit menu to save code in this manner. 

 

Although, if you're going to post code just do it as the vi.  Making a snippet to use as an attachment just means an additional step for both you and those reading your post.  If you use snippets, embed them in your post.  This provides code that is easy to read within the post while maintaining the ability to move it into code.

0 Kudos
Message 2 of 5
(3,252 Views)

Hi natasftw:

 

Thanks a lot for your response.  Attached now is the simplified Main vi, and supporting Subvis which still illustrates the problem of my signal plotting as a constant flat line.  

 

I would appreciate any help or suggestion.

 

Regards,

Tebefia

Download All
0 Kudos
Message 3 of 5
(3,214 Views)

Tebefia,

 

What results do you get when you probe the output of teh DAQmx Read (before the Prone Data sub-vi)?

--------------------------------------
0 Kudos
Message 4 of 5
(3,135 Views)

If the "Zero Signal" button is True, you will get zeroes because you are calculating the mean of the differences (and you are comparing each sample to itself so they are all zero) instead of first calculating the mean of the reference data and then subtracting it from the data.  So calculate the means first, then do the subtraction.

0 Kudos
Message 5 of 5
(3,119 Views)