12-12-2014 06:50 PM
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
12-12-2014 09:36 PM
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.
12-13-2014 07:57 AM
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
12-15-2014 06:07 PM
Tebefia,
What results do you get when you probe the output of teh DAQmx Read (before the Prone Data sub-vi)?
12-15-2014 09:18 PM
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.