LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DIODE IV CHARATERISTICS

Solved!
Go to solution

Lynn,

 

        Now I have two VIs. One is the final diode VI that u helped me in simulating and other is the VI that is given by NI ELVIS instrument as a way to use the variable power supply. Now I have connected a simple diode circuit (diode in series with a resistor) on the NI ELVIS kit. I have also obtained voltages across diode and resistor at channel 0 and channel 1. What I wish to do now is I want to make the Variable Power supply VI automatic..ie it shuld increment in steps of 0.03 and then plot the diode characteristics by obtaining the voltages and current through the NI ELVIS kit..Can you help me in the same. ?

Jay    

0 Kudos
Message 11 of 21
(2,154 Views)

Jay,

 

I do not have the ELVIS VIs so I cannot help much.

 

You probably need to save a copy of the ELVIS power supply VI under a different name and then modify it to work like a subVI.  Get rid of the user interface.  Some of that will be part of your main VI. That mens that the event structure will also be removed, but only after you copy the code inside which you need to another location.

 

The initialization and closing of the power supply should either be in new, separate states in the state machine or in separate subVIs so the power supply does not ge reinitialized every time the subVI is called.  It probably sets the voltages to zero when initialized and this could create problems for your I-V measurements.

 

I would probably start from scratch and copy pieces and parts from the power supply VI, but it might be easier for you to try to modify it as I described in the paragraph above.

 

Lynn

0 Kudos
Message 12 of 21
(2,151 Views)

Lynn,

 

I am working in the same way by copying the original NI ELVIS file to another location with a different name. Also I am just using the 2 knobs on the VI to control the signal and nothing else. So yes I will need to filter the remaining things out. But as of now can you help me in making the VI automatic such that the supply+ control knob moves on its own in steps of 0.03 ?

 

The initialization and closing of the power supply should either be in new, separate states in the state machine or in separate subVIs so the power supply does not ge reinitialized every time the subVI is called.  It probably sets the voltages to zero when initialized and this could create problems for your I-V measurements.

 

Can u explain this in detail ?

 

Jay

0 Kudos
Message 13 of 21
(2,149 Views)

Jay,

 

I cannot give details about the way the power supply VIs work because I do not have them.

 

Generally when an instrument software is initialized, the instrument is set to a "safe" and known state.  Typiclaly for a power supply that would be with the output voltages disabled or set to zero.

 

If you just put the ELVIS power supply in a loop, it would initialize and close the power supply every time the loop iterated.  You do not want that. What you want is Initialize, change output voltage until limit is reached, then set voltage back to zero and close. There are two common ways to do this:

 

1. Create three subVIs. One does the initialization. The next sets the voltage. The third closes.  Looking at the VI names, it appears that these already exist.  So the existing power supply VI has this structure.  The only difference is that it is set up for manual operation rather than for use as a subVI.  More on this later.

2. Create a state machine program.  States include (among others): Initialize, Set Power Supply, Calculate Next Voltage, and Shutdown. It would start at the Initialize state.  After initialization it might go to an Idle state to wait for the user to start the experiment.  Then it loops Calculate Next Voltage, Set Power Supply, repeat, until the end voltage is reached.  Then it goes to Set Power Supply with the voltage = 0 followed by Shutdown.

 

Further comments on converting the existing Power Supply VI: Make the initialization subVI from the stuff to the left of the while loop which is relevant to the power supply.  Remove all the property nodes, because the front panel will not be open while it is running and the User Interface (UI) stuff is irrelevant.  Inside the loop the event structure in the Idle case will be removed - but - carefully as some of the code inside it is still needed. It looks like the Timeout case code needs to run at least once.  Perhaps this should be moved to the initialize subVI outside the loop.  The update VI may be all you need in the loop.  I cannot be sure, again because I do not have the code. The VI needs some new controls: Start Voltage, Step Voltage, and Stop Voltage.  Some error checking to make sure that Start + N*Step will reach Stop for some N. Connect Start to the left terminal of a shift register. After writing to the update VI inside the loop, add Step to the value on the shift register and wire it to the right terminal of the shift register.  Stop the loop when the Stop voltage is reached.  Note that you need to account for both positive and negative voltages.

 

Lynn

 

 

Message 14 of 21
(2,143 Views)

Lynn,

 

        Thanks. Such guidance will certainly help. Now in the Power Supply VI I posted, there is a big while loop containing many event structures such as Error , Idle, Default , Supply + and Supply - etc. Now i need to use only the Supply + voltage part which I intend to make it automatic. So still shuld I go with developing subVIs or should I make changes to the existing one. Also here options of reset, error etc are mentioned.

 

2. Create a state machine program.  States include (among others): Initialize, Set Power Supply, Calculate Next Voltage, and Shutdown. It would start at the Initialize state.  After initialization it might go to an Idle state to wait for the user to start the experiment.  Then it loops Calculate Next Voltage, Set Power Supply, repeat, until the end voltage is reached.  Then it goes to Set Power Supply with the voltage = 0 followed by Shutdown.

 

I have not worked before on a state machine so dont know how to start. Can you help me make that VI ?

 

I will certainly work on your guidelines. It has helped me with a better understanding.

 

Thanks again

 

Jay

0 Kudos
Message 15 of 21
(2,135 Views)

Jay,

 

Starting with the easy one - Look at the examples and Design Patterns for state machines which come with LV.  They can provide you a framework.  Then you have to fill in the details.

 

I do not have your VI open now, but I think there is an update VI which apparently sets the power supply voltage.  That may be all you need.

 

Lynn

0 Kudos
Message 16 of 21
(2,131 Views)

Lynn,

You have been a wonderful and a very good teacher. Now I am able to increase the variable power supply in steps of 0.1 V and also get it interfced with the NI ELVIS KIT such that when I connect the NI ELVIS Kit Variable Power Supply to channel 1, I get a step voltage of 0.1 on the graph. Thank you again Sir.

 

Now, I have my semester exams till December end. And so wont be working on my project for a while. So I would like to get your personal email ID if possible so that I can bring it to your notice if needed

 

Also, I will be having my viva in next week. Will surely update you on the same.

 

Thanks again Lynn

Jay

0 Kudos
Message 17 of 21
(2,116 Views)

Jay,

 

I am glad that you are making progress on your project.

 

It is generally not a good idea to post email addresses on a public Forum like this.  If you have questions about LV, create a new thread in this Board.  If you have comments of interest to members of the Forum but which are not specific to LV, you could post them on the Breakpoint board.

 

Lynn

0 Kudos
Message 18 of 21
(2,111 Views)

Hello

      I was busy with my semester exams and now that they are done I am resuming work working on my project. I now want to make a .vi simulating the working of a transistor. Its an npn transistor and only simulations is required for now. I want to implement the output characterictics ie. Vce v/s Ic (collector current). The equations are Ic= [Vcc (Supply voltage- Vce)/Rc(approx 1k) ]. We change Vce to get different Ic for a particular value of Ib(base current). The file attached is what I want to achieve. The second file is the biasing diagram

 

I am stuck on a problem ie I cant find a way to change Vce which depends on Vcc and then change Ic to get the output characteristics. Please help.

Download All
0 Kudos
Message 19 of 21
(2,075 Views)

@Jay.kothari wrote:

Hello

      I was busy with my semester exams and now that they are done I am resuming work working on my project. I now want to make a .vi simulating the working of a transistor. Its an npn transistor and only simulations is required for now. I want to implement the output characterictics ie. Vce v/s Ic (collector current). The equations are Ic= [Vcc (Supply voltage- Vce)/Rc(approx 1k) ]. We change Vce to get different Ic for a particular value of Ib(base current). The file attached is what I want to achieve. The second file is the biasing diagram

 

I am stuck on a problem ie I cant find a way to change Vce which depends on Vcc and then change Ic to get the output characteristics. Please help.


reposted here: http://forums.ni.com/t5/LabVIEW/NPN-transistor/m-p/1826821

 

Please do not post the same question multiple times.

0 Kudos
Message 20 of 21
(2,070 Views)