LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I get output values if I don't have any error messages?

New to labschool, taking an electronics in graduate school. Set up this circuit. The question read: 

 

(b) Write a VI that calculates the voltage drop across R2 for all of the following:
R2=0, 50, 100, 200, 400, 800, 1600, and 3200  (other components values are as in (a)). Use
a for loop to calculate the value and build arrays for the voltage and R2 values. Make a graph
of them in your front panel.
(c) Calculate the voltage drop across R1 as R2 is varied as in (b). This can be done by modifying
the previous VI. Plot the voltage drop across R1 vs. R2 up to and including the case where
R2=3200.

 

This is for part c. I'm not getting any error messages, yet I'm not getting my output values! I did it on b and it worked. Not sure what the deal is. Any ideas?

0 Kudos
Message 1 of 20
(3,001 Views)

You have an empty array control called Vout.  It auto-indexes the For Loop.  That loop will run ZERO times.

Message 2 of 20
(2,993 Views)

Yes we do have an idea. Can you upload your VI in 2011 format for debugging purpose..

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 3 of 20
(2,992 Views)

I just deleted it and readded it, and it seemed to clear it. At first I got the same errors, then I changed it to an indicator and it worked. So the auto-indexing, it doesn't take into consideration the N at the top left of the loop?

0 Kudos
Message 4 of 20
(2,982 Views)

I seriously said labschool? Oh my God, I need sleep. I'm sorry guys, been at this for a long time. 

0 Kudos
Message 5 of 20
(2,981 Views)

Once you have hands off it..You really gonna appreciate it...

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 6 of 20
(2,957 Views)

@Torii wrote:

I just deleted it and readded it, and it seemed to clear it. At first I got the same errors, then I changed it to an indicator and it worked. So the auto-indexing, it doesn't take into consideration the N at the top left of the loop?


I dont think deteting and readding solved problem

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 7 of 20
(2,955 Views)

If you wire the N terminal and several autoindexing arrays, the loop will stop at the lesser.

A common trap for LabVIEW newbies and also sometimes for experienced programmers.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 8 of 20
(2,942 Views)

Your "Vout" is a control, not an indicator. Nothing ever writes to it. Your FOR loop just pumps hot air and does not produce any output.

 

Calling an output of the formula node "Vout" is completely independent and does not magically write to an array control with the same name.

 

(What's the purpose of "R2" and "R2 2", seems redundant. Also learn about autoindexing. All your terminals belong before the loop, they need to be read only once)

Message 9 of 20
(2,937 Views)

I did the two R2's to wire it to the graph. Do I not need that? Or can I take the wire like I did from Vout from the node to vout, and wire it off that wire to the cluster thing. (I am so LabVIEW illiterate it's not even funny. Sorry!)

 

Definitely going to try and figure out auto-indexing. Paolo, you wrote that the loop stops at the lesser--I'm not 100% sure what that means.

0 Kudos
Message 10 of 20
(2,907 Views)