05-10-2019 12:53 AM
I have a small code which works as follows: DO up -> measure 3 AI channels -> DO down. Code works at some level, but I am having trouble with the results. It gives me voltage level without decimals. I have checked properties and there is 6 significant numbers accuracy. Tried some other tricks too but didnt get them to work. Any ideas?
2 channels should give -2.xx V and one channel 2.xx V
Instrument is Keysight U2355A
Solved! Go to Solution.
05-10-2019 01:09 AM
Hi LW,
Code works at some level, but I am having trouble with the results. It gives me voltage level without decimals.
Are you using the "default" driver VIs for your device - and use a computer with a different than the English decimal separator "point"?
It's pretty common to device drivers to expect default English regional settings…
05-10-2019 01:26 AM
Hi Gerd,
I noticed my "mistake". I clicked the box saying "hide trailing zeros", and there my decimals were. But measurement should not be 2.0000. I am not quite sure, what I am doing wrong here.
05-10-2019 01:33 AM
Hi LW,
I noticed my "mistake". I clicked the box saying "hide trailing zeros", and there my decimals were.
Wrong, next mistake!
You can show as many decimals as you like, but when the values are integers you only get zeros…
But measurement should not be 2.0000. I am not quite sure, what I am doing wrong here.
Did you read my previous comment (and did you understand it)?
05-10-2019 01:46 AM
@GerdW wrote:
Hi LW,
I noticed my "mistake". I clicked the box saying "hide trailing zeros", and there my decimals were.
Wrong, next mistake!
You can show as many decimals as you like, but when the values are integers you only get zeros…
Aah, this explains it.
But measurement should not be 2.0000. I am not quite sure, what I am doing wrong here.
Did you read my previous comment (and did you understand it)?
Yeah. Answer is yes and yes. (to drivers and computer). How I can fix this?
05-10-2019 01:56 AM - edited 05-10-2019 01:57 AM
Hi LW,
Answer is yes and yes. (to drivers and computer). How I can fix this?
Two options:
1. Set your computer to use English numeric formats (point as decimal separator, comma as thousands separator). Restart LabVIEW after changing the settings.
2. Create a copy fo that device driver and save it as backup. Then edit the Keithley driver to respect your local settings by applying proper format strings for each and every conversion between numbers and strings… (Don't forget to call Keithley and complain about the bad quality of their official drivers!)
05-10-2019 02:10 AM
Wow, it actually worked. I am almost tempted to call them due stupidity of this.
Thanks.
05-10-2019 02:27 AM - edited 05-10-2019 02:31 AM
HI LW,
I forgot a 3rd option: switch off the option to use the local decimal separator in the LabVIEW options dialog.
I prefer the two options I gave in my previous message, because:
1. using English locale settings gives the least problems with measurement data and external/3rd party DAQ devices.
2. settings proper format codes in your own VIs is a good learning topic for creating "good" code…
(The 3rd option above is the worst of them all because then all your LabVIEW programs behave different then most other software on the same computer…)