LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Units and number precision problem

Solved!
Go to solution

Hi,

I have attached a VI that is used for configuring a current source of a spectrometer. This is the Keithley 2600 current source. The vi is used to set the level of source current. But the problem is I am only able to give it whole values that are in Amperes, like 1A, 2A etc. I am unable to give values like 500mA or 0.005A. When I try to do that its only being 0A. How can I make it into mA or a decimal pointed ampere value. Kindly do help me. Thank You.

0 Kudos
Message 1 of 5
(2,293 Views)

Hi govindsankar,

 

is the resulting command string as expected by you and your device?

check.png

Just a wild educated guess: Does your computer use a comma as decimal separator? Nearly all devices expect a point…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,282 Views)

Yes, my computer uses a comma and also I expect 0.36 A or 360mA. Either of them I want in the device. 0.36A is also fine. 

0 Kudos
Message 3 of 5
(2,267 Views)
Solution
Accepted by topic author govindsankar

@govindsankar wrote:

Yes, my computer uses a comma and also I expect 0.36 A or 360mA. Either of them I want in the device. 0.36A is also fine. 


If your computer uses a comma for the decimal place, it will convert the number to a string using a comma, which the device most likely doesn't understand.  it probably considers everything left of the comma to be valid, and the comma and everything to the right as invalid; therefore, a whole number only.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 5
(2,259 Views)
Solution
Accepted by topic author govindsankar

Hi govindsankar,

 

when your computer uses the comma you need to change this VI to get a point as decimal separator!

 

Read the help for FormatIntoString and the format strings. Hint: "%.;"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 5
(2,251 Views)