04-30-2014 09:19 AM - edited 04-30-2014 09:24 AM
Hi everybody,
I'm a brand new user of Labview (v 2009). I try to save some data from my electrometer (Keithley 617) in an array (time and electric current). And it works, I can see these data in a text file, with the time on the left, and on the right the value of the current. The issue is that I can only record the integer part. The current I try to record is something like 10E-12 A. So if I don't multiply the result by a constant of 10E15 for example, the result would be 0 instead of 0.00...004658 A. And it is the same for the time. I can see 1, 1, 1, 2, 2, 3, 3 instead of 1.034, 1.45, 1.89, 2.36, 2.98, 3.48, 3.95 for example. I've try to change the format, but it doesn't solve this problem of the integer part. I'd like to see the whole number (integer and decimal parts). Attached, please find my program. Also I attached 2 files. test01 is what I'd like to record, and test02 is what I currently record. Could you help me please ?
Thank you !
PS : I try to expose as best as I can my problem, I'm French...
Solved! Go to Solution.
04-30-2014 09:32 AM
Try "%g" instead of %f as a format specifier
04-30-2014 09:34 AM - edited 04-30-2014 09:43 AM
Hi thom,
what kind of decimal separator do you use (over there in France)? Is it set to comma or point?
You should use the point for all measurement device related tasks, as those devices are usually using it!
When saving your data you can enforce a certain decimal separator by including it in the format string. See the LabVIEW help for all format codes…
Btw. why do you wildly mix DBL and EXT numbers? Did you notice all those red coercion dots?
@Jeff: Even with %f those time values (like 1.034) should be included correctly in the file…
04-30-2014 09:36 AM
or use %.6e to output as in test01.txt
Ken
04-30-2014 09:40 AM
I've just tried "%g" as you told me, but no change.
04-30-2014 09:42 AM
Ken, same thing, it doesn't work.
04-30-2014 09:44 AM
GerdW,
I use point, I'm French but I work in USA. Could the red coercion dots be a problem for my program ? What should I do ?
04-30-2014 09:49 AM
Are you getting the expected strings from your GPIB Read. Write the string output to a text file and post it please.
Ken
04-30-2014 09:56 AM
Ok I think I found a solution. A double precision float "DBL" was missing just before the "measurement" part. I attach you my program and the results.
Thank you for your help !!
Thomas.