From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

iv curves

Solved!
Go to solution

Hello, 

 

I need to make a program using Labview in order to get IV curves when characterizing photovoltaic cells.

 

I have two motors that move in X and Y direction. Choosing one Y, the Xmotor moves a required distance and stops a determined time in a series of steps. What I need is to add the IV curve measurement in every of this steps. I have Keithley2400 drivers, but I do not know if it would be better to use VISA, any idea how to do this?? (it´s the first time I use VISA resources or similarSmiley Sad)

 

Thank you very much

 

 

0 Kudos
Message 1 of 9
(4,303 Views)

Your VI does not show any attempt to include the measurement.

 

I suggest a state machine architecture. You could have states for Move X, Move Y, Measure Cell, Save Data, as well as initialization, error,  and shutdown states. It would be far mot flexible than trying to extend the VI you now have.  There are examples, templates, or Design Patterns with all recent versions of LV.

 

The drivers probably use VISA. If the drivers work well for you, do not bother with trying to write your own. If you find that you need to do something which is not easily done through the drivers, then you may need to write a VI or set of VIs to handle that situation.

 

You should wire up the error clusters, get rid of the sequence structure (which will be maed unnecessary by wiring the error clusters), and use wires rather than local variables.

 

Lynn

0 Kudos
Message 2 of 9
(4,250 Views)

Hi Johnsold, 

 

thanks for your reply. Yes, no attempt to measurement in the previous VI because it was the script for the motors movement. Attached you can find a new version, do you think this is the proper way to do it? (I got the subVI for measurement from the net).

 

One doubt: when I move the motor X from X1 to X2, I tell it "Time to wait" in order to wait. The idea was make the measurement in this time, but I do not know how to relate this time to wait with the measurement action. 

 

Thank you very much!! 

 

0 Kudos
Message 3 of 9
(4,222 Views)

You are getting closer.

 

You apparently do not completely understand the state machine concept. Consider how your VI will work. When the VI starts the shift register is initialized to "Measurement." After the code in the Measurement case runs, the right side of the shift register is set to Move Ymotor. On the next iteration the Move Ymotor case will run. But then the shift register will always have Move Ymotor because the constant is wired to the right terminal. So the loop will stay in the Move Ymotor case until the Stop button is pressed.

 

The selection of the next state needs to be inside the case structure. After a Y move the next state might be another Y move if the motor has not reached the final position or it might be Measurement or X move. I would not have the internal for loops but would have a step counter (or one for each direction) wired to shift registers. the decision logic for the next state then is something like this:

 

 # X steps >= #desired steps?  T: next state = Measurement. F: next state = Move X

 

What is the purpose of the convert 1D array to DDT, convert DDT to 2D array, Index 1D array from 2D array? A straight wire will do exactly the same thing.

 

Lynn

 

RG Wire.png

0 Kudos
Message 4 of 9
(4,205 Views)

Hi again jonhsold, 

 

attached there is a new version of the program, did I go closer? My question now is, how can I make a case to decide between two alternatives? For example, when being in "Move NextX", if the ActualXposition is smaller than Xfinal then program comes back to measurement. But, how does know the program that it has to go to "Move NextY" is AcutalXposition is equal or bigger than the Xfinal? I´ve used a selector, but I do not know how to join it to the cases 😞

 

 

By the way, I tried to wire the 1D array you told me but I got some errors (anyway, this will be another point ;D).

 

Thank you very much for your help, I really appreciate it! 

 

 

Download All
0 Kudos
Message 5 of 9
(4,186 Views)
Solution
Accepted by topic author lacorgui

You'll find plenty of VIs in the forums related to the 2400, some of which specifically for IV sweeps (using drivers OR VISA).  I posted a piece of my IV sweep code here previously.....  http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/How-do-I-set-a-source-current-and-measure-the...

 

I find using VISA provides a little more freedom in communication but of course it can lead to more errors.

0 Kudos
Message 6 of 9
(4,171 Views)

Thanks pjr1121!!  I´ll try yours and let you know!! 😉

0 Kudos
Message 7 of 9
(4,146 Views)

Keep in mind, that link isn't a complete VI, just some sub VI related to making a measurement over GPIB

0 Kudos
Message 8 of 9
(4,144 Views)

I´ll take it into account!!! Smiley Wink

 

Thank you very much for your support!!! 

0 Kudos
Message 9 of 9
(4,140 Views)