From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with plots starting at y=350 and not at y=0

My program collects data from IMAQ technology through a camera and plots flux change with time. My problem is that want to see the that change when y=0 to whatever the final magnitude in y is. instead what I get is my graoh starts at either y==350 and decreases with the chnge in magnitude. How can I control where my data begins plotting (at y=0)? Please please someone help me.

0 Kudos
Message 1 of 8
(2,730 Views)

t's real hard to diagnose your problem without seeing your code which causes it (for example, listen to Car Talk on NPR on Saturdays), but, I'll take a stab at it. Check to see if your graph has the Y-scale set to "Autoscale" (on the FP, right-click on the graph and go down to "Y Scale".

 

Cameron

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 8
(2,721 Views)

thanks for the reply. It isn't the scaling that is the issue. It is that when I am seeing my data being graphed as the experiment is happening it begins plotting the data points at x=0 and y=350 and then as x which is time increases the y value decreases.what I would like to see is as the x (time) increases the y value increases however much the delta Y of the experiment is. hopefully this clarifies the problem a little.

0 Kudos
Message 3 of 8
(2,714 Views)

Without seeing the code (read my first reply over again, particularly the first clause), I'm reticent to take another blind shot at your problem. Please attach it and some representative data which illustrate what is going wrong.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 4 of 8
(2,695 Views)

Hello,

 

I have attatched a picture of my Front Panel. If you look at the front panel, you'll see a straight line on my FIRST graph. This line was plotted between the 300 and 350 y amplitude. This line is straight because no movement was detected for the experiment, and therefore there was no change in y. What I would like is for this to be graphed at y=0. It makes more sense for the y to begin at zero and increase if there is a delta y. Therefore is there isn't a delta y then the graoh you see on the front panel should be a straight line at y=0. Can you help me figure out the problem or where I need to go to change the default.

 

Thanks

 

Download All
0 Kudos
Message 5 of 8
(2,657 Views)

So what you are sayins is that Y=350 is a valid number and that is what you are receiving from the instrument, but you want to tare it out and have the displayed result be equal to zero.

 

For your first measurement, put your value into a shift register.  For all later measurements, keep that same value in the shift register.  Subtract the value in the shift register from the first and all later measurements before displaying it on your chart.

 

PS:  Your stacked sequence structure, and the deeply nested while loops and case structures scare me.  Also, you do know that Index Array is expandable?  You don't need to split the array wire.  Just expand the bottom of Index Array downwards and you'll get multiple outputs.

0 Kudos
Message 6 of 8
(2,649 Views)

Hello,

 

I did inherit this VI, so I am not very affluent in Labview. I don't understand what you mean about the shift registers, but I will attach the VI and maybe it'll be easier to help. Agian, I would like for my graph to begin plotting the measurments it recieves at (0,0) and then increase as water displacement occurs. 

 

0 Kudos
Message 7 of 8
(2,588 Views)

Hi question93

 

You might need to check the code and wire cables of the shift register in some frames of Stacked Sequence Structure or other nested structures. Keep in mind that the Stacked Sequence Structure is not recommended and that National Instruments encourages using state machines.

 

It will also be a good idea to set up the dimension of the shift register that you want to create.

 

Initialize array.png

 

Regards

Esteban R

0 Kudos
Message 8 of 8
(2,538 Views)