FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Hi

Solved!
Go to solution

How can i programm in labview in such a way that i read a text which contains values like X=10  Y=20  Z=30 and once i read from the text file i need to write thes values to three different GUAGE indicators say X=10 to indicator 1 ,Y=20 to indicator 2 ,Z=30 to indicator 3.

Thanks& Regards

sharath

0 Kudos
Message 1 of 6
(6,339 Views)
Solution
Accepted by topic author daystohotel

Here is a simple answer

ReadFromFile.png

The hard part is format of the data in your file and converting it correctly from a string to a number.

Do you have complete control over how the data is stored in your file?

Is there any chance in the future the format of the data string in the file could change?

Also look at Configuration file (.ini files) in LabVIEW

Omar
Message 2 of 6
(3,687 Views)

i am facing problems while reading floating point numbers what modifications is to be done in the regular expression input( X=(\d+) of the match regular expression.

0 Kudos
Message 3 of 6
(3,687 Views)

This is a VI I use to parse floats

Parse Numbers.png

It will go through a string and pull out any and all numbers that is finds in order.

The simplest method is to use the Scan From String. The format string has to be exactly correct for the expected string.

It is not very flexible. If one thing does not match, you get all zeros

Scan From String.png

So again, the method you use depends a lot on the format of the string in your file.

Omar
0 Kudos
Message 4 of 6
(3,687 Views)

thanks a lot ..........

0 Kudos
Message 5 of 6
(3,687 Views)

How can programm right click customize control for push button. for eg: if i right click the push button during execution and say on it should execute the the on case similarly if i right click and say off it should execute off case.

Thanks

0 Kudos
Message 6 of 6
(3,687 Views)