LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String to double

Hello
 
Today I wrote the programm attached. Now I do have the problem that I dont know how I should transform a string into a double?
 
I want to use the Outputs (Impuls Wheel, Impuls Gear) of the Scan From String operation as Inputs (Impuls, Impuls2) for the multiply functions.
 
How does this work?
 
The VI gets datastrings through RS232.
 
 
Bye
0 Kudos
Message 1 of 6
(17,043 Views)
Simply use "Fract/Exp String To Number" for each string and use the DBL output in your calculation.
Message 2 of 6
(17,029 Views)

Morning

Thank you.

It works now. The only problem I do have now is that the gauges tend to jitter.

I wonder If I made a huge mistake in the programm or that Labview is just not fast enough for that.

I do get a new inputstring every 100ms. When I change the constant of the waittimer it becomes better. But I think that is not the right way to get acceptable values.

Bye

0 Kudos
Message 3 of 6
(17,008 Views)
Hello LabLeo,

the jitter of your gauges seems to come from the "undefined" output of the case structure. You set it to "use default, if unwired". This will give you a Zero, each time the false case is executed -> resulting in jittering gauges. Use shift registers to remember the last measurement value and wire them trough the false case!

Added:
After switching on the digital display of the gauges (right-click -> visible items) you don't need those "Numeric" indicators...



Message Edited by GerdW on 11-04-2005 01:34 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(16,995 Views)
Since you only need to do the calculations for the gauges when new data arrives, all of it belongs inside the case structure. Now they will only get updated if needed and no longer flicker to zero. (See attached cleaned up version, LabVIEW 7.1)
0 Kudos
Message 5 of 6
(16,972 Views)
Hello
 
No. That was not the problem. It still tends to jitter.
I think that the serial port read might be cause the problem. Because if i look at the current string indicator during transmission. It also tends to jitter.
What is the difference between the Serial Port Init vi and the VISA Serial Port vi?
 
Bye
0 Kudos
Message 6 of 6
(16,953 Views)