LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulty in plotting xy graph for x, y inputs coming from two different while loops one under another!

Dear all,

I want to plot a xy graph where the x and y inputs are coming from two different

while loops. y inputs are coming from the first while loop where as the x inputs are

coming from a while loop which is within the first one. Now when I run the vi I can see

only the y input corresponding x=0, in the xy graph but not able to see the  change of x inputs!

When I run the vi with the highlight bulb on, I can see both x and y data points are going into the xy graph for each change of x input. But inspite of that no change of x value is visible is visible on xy graph.

If you guys can help me, please give areply. I am attaching the screen shots of the block diagram. I also attached the front panel screen shot to have a view how the xy hraph appears during the measurement.

ID is the y input and VG is the x input there and ID vs VG is the mentioned xy graph.

with reagrds

Amrita

PG student

IIT Bombay

Download All
0 Kudos
Message 1 of 6
(2,875 Views)

Hi,

 

What is inside your sequence structure? Can you elaborate the order as to what you want to do? Have you tried to append the output of the ID vs VG values with the previous values just like how you would append the values of ID?

 

Is there a need to have one sequence structure and a while loop inside the outer while loop? You do know that the inner while loop will not run unless it obtains the neccessary input or perhaps that was the part of the code purpose? 

 

Warmest regards,

Lennard.C

 

 

Learning new things everyday...
0 Kudos
Message 2 of 6
(2,835 Views)

Are you expecting a different X value and Y value each time there is an iteration of the innermost while loop?

 

You said you were using highlight execution, did you keep running with it on to pay attention to dataflow?  When the data from the upper half of the code flows into the tunnel of the innermost while loop at the bottom, that vaue is now fixed at that as long as the inner while loop runs.  Not until the inner while loop stops, and the outermost while loop as a chance to iterate again will the code at the upper portion have an opportunity to get a new Y value.

 

Is there a reason you have one while loop inside the other?

0 Kudos
Message 3 of 6
(2,825 Views)

Hi everyone!..

Let me explain a little more why to put the outer while loop. Actually this code is to measure FET transfer characteristics using keithley 2612a which is a dual source meter. Now the outer while loop is to provide bias from drain to source of FET.  And inner loop is controlling the gate to source of the FET. Now outer loop is controlling one channel of the meter and inner loop is controlling the other channel depending on the control of outer loop!..Since inner loop is controlling the gate terminal of FET, depending on the variation of gate voltage (VG or my x input as mentioned in problem!) the drain current (ID or y input will change).

Thus I need the outer while loop to store the ID value for each change of VG from the inner while loop. Now when I am testing the code using keithley 2612a (but not using any FET) .my 'ID or Y' inputs will not change since it is not controlled by VG of inner while loop(without presence of FET). So I am expecting to get a straight line parallel to my X axis or VG axis (right?) where for every sweep of VG, ID should remain constant.

But I’m not getting this. When I am testing the code with the highlight bulb on I can see each time VG value enters in the cluster,

the constant ID value(for this case),also tunnels inside inner loop and enetrs in the cluster and data pass into the XY graph. But in the graph only ID value is showing when VG=0!

Is there any reason for this?

 

0 Kudos
Message 4 of 6
(2,816 Views)

Hi Amrit,

 


Is there any reason for this?


 

Sure…

 

Maybe the X array (built in your sequence structure) only contains one element, when it enters the while loop. Now you try to measure several Y values and put them in an array - but you still have just one element in the X array…

 

You should be using probes to verify this behaviour!

 

You should have mentioned your original thread for reference and additional information…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(2,801 Views)

Dear All,

Sorry I am littile late to update..! I have tested the code with a MOSFET. When I keep the drain voltage (Vd) fixed  and try to measure the variation of drain current(Id which is my Y input) by sweeping the gate voltage(Vg or the X input) I couldn't see any change. Means due to the sweeping of gate voltage(Vg) change of drain current is not shown by the code..! But if I do the same manually I clearly noticed the change. I don't undrstand why this is happening. And the Id vs Vg plot is still showing the one point that is the initial Id value at zeo Vg. Please help me out. I am sharing the code with you.

with thanks and regards,

Amrita

0 Kudos
Message 6 of 6
(2,747 Views)