LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

my program doesn't graph

I don't though. I just have it in a while loop for time being so i just wanna see it graph something first. I'm really not sure if that answered it or not
0 Kudos
Message 21 of 49
(1,332 Views)

The calculation of Y is not in the while loop. If you see Y increment, you are either running a different VI than the one you posted or you are using the run continuous button.

0 Kudos
Message 22 of 49
(1,304 Views)
the calculation of Y gets a number out when i turn the highlight execution on but when I just run it and i have a probe i'm not getting any numbers. Whats the difference?
0 Kudos
Message 23 of 49
(1,291 Views)

I don't think that is relevant but in highlight execution, the timing is significantly different. What really matters, I think, is that none of that code you have outside the while loop will execute more than once. None of those time functions seem to be doing anything at all and certainly do not refresh once you click on the run button.

0 Kudos
Message 24 of 49
(1,284 Views)

And I am getting very tired trying to navigate around on that block diagram of yours. I don't know what size monitor you have but it doesn't fit on my dual 20" setup. You've got a lot of wasted space and it justs makes it harder to debug - especially harder for the people trying to help. Here's a cleaned up clock diagram. I also removed some of the silly code you had with the data conversions. The front panel is way too big as well but I'm not going to touch that.

0 Kudos
Message 25 of 49
(1,280 Views)
thnxs a lot for that. would putting the stuff that is outside the while loop back in the while loop than it'll execute more than once. Also the graphing problem, would it be better if the graph was outside the while loop then when i hit the stop button than it'll graph? Or I could use a for loop instead and let it run for say 150 cycles to collect and store in a array than graph? Do any of those methods solve it? I'm lost
0 Kudos
Message 26 of 49
(1,274 Views)
I finally got it to graph now. You know the problem with the depth(Y). I'm getting values and its usually the time elapsed multiplied by 1.52. The constant that comes out is always the same. I wanted the depth to start low and increase slowly as time goes by. That was the whole reason behind it. Would there be another way to implement that. You've been great in helping me. I really appreciate it
0 Kudos
Message 27 of 49
(1,260 Views)

Yes, placing the code inside the while loop will mean that it will execute more than once. I suspect that you will need a shift register to keep track of the time. What you have now does not make much sense to me.

 

First put the code inside the loop so that you get an x value that increments. One thing at a time.

0 Kudos
Message 28 of 49
(1,259 Views)
I have it in the while loop.
0 Kudos
Message 29 of 49
(1,252 Views)
Great, now you need to fix the logic so that the Y is actually changing. It seems to me that what you have is overly complex. Try a shift register or try multiplying the "i' of the loop iteration by your 1.52.
0 Kudos
Message 30 of 49
(1,240 Views)