06-12-2011 07:15 PM - edited 06-12-2011 07:17 PM
Hi!
First of all, I would like to apologize if this question has already been answered in the forums, but I haven't been able to find anything for this particular situation... I am using LabView v.8.6 so as to conduct TSC (thermally stimulated current) measurements, by controlling a Lake Shore Cryotronics 330 (Lake Shore Model 330 Autotuning Temperature Controller) and a HP4140B pA meter. I am taking as a starting point the VIs available in the driver libraries (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=014FB74E7B0C1ED3E0440003BA7CCD... and http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E92C3659CE034080020E748..., respectively), and I would like to merge both programs ("Lake Shore Cryotronics Controller Output.vi" and "HP4140B Example (current vs. voltage).vi") into a single program that can simultaneously record both the current values (at a fixed voltage) from the HP4140B and the temperature as it is changed in the 76K to 300K range (with the Lakeshore 330).
The problem lies in the fact that I don't know how to make compatible the numeric output "Sample sensor data" of the Lakeshore with the numeric array (which does not have a defined size) named "current/cap" of the HP4140B in aforementioned programs. What I am trying to do is to: (1) save the data to a file (I have attempted using "Write to measurement file" Express block, which I am not sure of whether it's the best option or not); and (2) plot current vs. temperature (not current vs. time and temperature vs. time separately).
Any help with these issues would be most appreciated, since I'm stuck on my research because I can't record any data! This really goes right over my head...
PS: I enclose the file that I have been working on, but perhaps it's better to work from scratch (I'm still a newbie and I may have made errors!)
Solved! Go to Solution.
06-13-2011 06:06 PM
Montealeku,
I guess to start out, lets figure out what is and isnt working currently. Are you able to get the correct data in from the devices themselves? If so, you should be able to use a build array function of whatever data you want to plot. IE: Take an array of current data, and an array of temperature, build the array, then plot that on an XY graph.
Let me know if this isnt going to be what youre looking for.
06-20-2011 12:10 PM
Kyle,
Thank you for your response and sorry for having taken a while to reply, but the equipment is shared with other groups and I haven't had access to it in a while.
I have managed to get the program running using LabVIEW 7.1 (I don't know why, but the HP4140B drivers don't seem to be compatible with LabVIEW 8.6) and using the "HP4140B Read Single Meas.vi" example (and not "HP4140B Read Wave Meas.vi", as I had tried before) so as to get a double instead of an array, avoiding synchronization problems when merging data from the HP4140B and the LakeSHore 330. Then I have used a do-while loop to get "continuous sampling" of the waveform. Nonetheless, because of having chosen this approach, now I can only use a fixed voltage, which would be of for a TSC measurement, except for the fact that I need to increase the voltage in small steps so as to avoid damaging the sample. I am using another do-while loop so as to keep increasing the voltage gradually (and also be able to update the LakeShore 330 parameters), and once the desired voltage is achieved, I press a "stop" button, allowing the program to flow into the next stage and take the measurements... I am aware that it's not an elegant solution, so if you can come up any ideas for an improved version, it would be most appreciated!
Regards,
Pablo
06-21-2011 12:14 PM
Pablo,
While its not the 100% absolute cleanest/most efficient code Ive ever seen, you did merge the behavior well, and if you have it working, that's what ultimately matters. Im sure we could spend a week optimizing back and forth, but ultimately, it would effectively do the same thing and we probably wont ever make up the time in efficiency.
One thing I highly recommend though is to comment the code, especially if youre using existing code from somewhere. It lets other people know where you got the template from. I also suggest mentioning in the code what you need to have installed to run the program. If they didnt have the right driver, they may not know where to get it/what to get.
Regards,
Kyle Mozdzyn
Applications Engineering
National Instruments