LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you plot multiple curves on the same graph when using a while loop?

I am writing a program that will plot the IV Output chracterisitcs curves for a MOSFET transistor. I have two sweep variables Vg and Vd. For each Vg valve selected, Vd is swept from its start to stop voltage creating a graph for that Vg valve. Both of the sweeps are done using while loops. Ideally I would like to display all of the Vg plots on the same graph while having the ability to do real-time graphing. Can anyone help me figure this problem out? I have attached my program. Thanks!!
 
Tammy
0 Kudos
Message 1 of 6
(5,562 Views)
Hi Tammy,

Thank you for contacting National Instruments.

After looking at your code, I think the problem is caused because you are using a graph instead of a chart. The difference between the two is that a chart gets updated with time, new data points are appended to those already in teh display, but a graph stores data in an array and then plots the data to the graph.

I have put together a simple example of a VI that plots three random numbers in real time. The plot is cleared everytime the VI starts running and then the data is updated each time it goes through the loop. I was not able to work with your code since I don't have the same hardware you do, but this example should get you started on plotting the MOSFET values in real time.

Please let me know if you have any other questions.

TT
Applications Engineer
National Instruments

0 Kudos
Message 2 of 6
(5,542 Views)

Hi Tammy & Tica T,

As far as I see it - this thread is a very bad version of already existing bad version......

http://forums.ni.com/ni/board/message?board.id=170&message.id=127857

I expected, that an Applications Engineer from NI knows something about  a Transistor and how an Output characteristic looks like !!  Take a look to a typical Transistor Datasheet ( e.g. n-channel MOSFET) - you will see, that there is no relation of ID vs Time like in your example ( values vs time )  but  IDrain vs VDrain at different VGate's ( no relation to Mr. Bill Gates ).

Find attached a vi, that in general does what you need - drawing of  curves vs x-axis (XY-graph in use)  - in test_sweep.zip.  And that you geet an impression, how it might be done ...... dynamic Output characteristic of a Transistor with Standard Equipment of a Lab ( Scope + Generator + Power Supply ) find in addition a Frontpanel - picture. One of the interesting points here is - the self-heating effect; visible on ch3 of scope - 5µs Pulse is already a very long time...... This measurement was done in order to compare with our own Transistors......... 

Hope this helps a little bit to understand, what we are talking about.
 
Regards
Werner
Download All
0 Kudos
Message 3 of 6
(5,534 Views)
Hi , see this VI I just made it and test it ,  se you
 
Muhammed_PI
Muhammed Abdulrahman AL-Ani
0 Kudos
Message 4 of 6
(5,245 Views)

Muhammed,

I can see you are new to this forum. Avoid loosing your time giving answers to 2-years old threads. Have always a look at the date the question was posted. 😉

Cheers

 

Chilly Charly    (aka CC)
0 Kudos
Message 5 of 6
(5,232 Views)
Thanks Chilly....
Muhammed Abdulrahman AL-Ani
0 Kudos
Message 6 of 6
(5,124 Views)