LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple voltage sweep

Hello,
 
I am very new to Labview, and am trying to write a program to control a new field emission system with x,y,z scanning motors. Basic operation is as follows..
 
The motors raster scan from the bottom left to the top right of a sample and stop at each of the inputted step size to measure an IV.
 
I have written the "raster loop" program which works fine (allthough getting my head round the serial commands to talk to the motors was a nightmare!) However, I'm having real problems writing the IV sweep program which I will insert as a sub vi to measure IV at each step point.
 
I'm using a keithley 248 and a 6485.
 
What I want the IV rogram to do is have Vstart, Vend, Vstep and Number of loops. I probably need some sort of averaging of the current too. IT would be really nice if the data could be somehow linked to the x,y,z coordinates of the raster program as there will be a huge number of IVs for a given sample. The program I have at the moment is based on a previous one posted which I have tried to modify (without sucess!) At the moment all I want it to do is loop the voltage, recording a current each time, then continue until it hits Vend. I haven't tried putting in graphs or "save to table/matrix" yet.
 
Attached are 2 pictures, IV1.jpg is the block diagram, and error.jpg is the only error I get when it hits the scan string box. I'm not sure if this is the reason why it wont run out of slow speed either.
 
Any help/suggestions would be much apriciated.
 
Many thanks,
 
Rich
 
Download All
0 Kudos
Message 1 of 3
(3,027 Views)
A few points:
  • I don't quite understand what you're talking about when you talk about the raster program and the IV sweep. Can you elaborate on this relationship?
  • If you have Vstart, Vend, and Vstep, what's "Number of Loops" for? What does it control?
  • You don't need to use a while loop. You can use the  Ramp Pattern (Signal Processing->Signal Generation palette) function to generate your voltage steps as a nice, neat array that you can then use to auto-index a for-loop. If you're using LabVIEW 8.5 you should use the error cluster to force-quite the loop in the event of a run-time error. (You should have been doing that with the while loop anyway).
  • Is there a reason you're using the old-style GPIB functions? Are the motors not IEEE488.2 compliant? The old-style GPIB functions were left in primarily to allow old programs to not break when opened in newer versions of LabVIEW. They should not be used for new designs. VISA is the preferred API to use.
  • Instead of the Scan From String function, all you need is one of the string->numeric functions. The Fract/Exp String to Number is the one you probably want.
0 Kudos
Message 2 of 3
(3,000 Views)
Hi,
 
Many thanks for the reply. Sorry for the confusion about the 2 programs. Basically the first "raster" program (not in the pictures) controls 3 motors via a serial port. The motors will step around a user determined area i.e. x+, x+, x+, x+, y+, x-, x-, x-, y+.... that program works fine. What I now needed to do was have a second program "IV" which would ramp a voltage up and down, recording values for current at each voltage step. This would happen at every motor step in "raster". The number of loops command I mentioned is just there to repeat the voltage sweep a number of times at each motor stop point if you wish to.
 
I'll look into the VISA commands you mention, the only reason I'm using the old style is that was from an example I found. I'll also have a look at the ramp pattern you suggest, looks a lot simpler than the method I'm using!
 
As for the program I posted, your suggestion about changing the scan from string function worked. The program happily ramps the voltage and displays the current.
 
I think I've got a long way to go, but I'll push on
 
Thanks,
 
Rich
0 Kudos
Message 3 of 3
(2,995 Views)