LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

text file calculation

Solved!
Go to solution

Hi all,

How do u extract 2 to 3 fields from txt file and need to do caculation and save it on another file.

is there any example for this.

thanks

0 Kudos
Message 1 of 11
(3,758 Views)

Hi,

 

You can use file function and some string function to achive the target.

To get better idea about your requirement please share your tex file.

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 2 of 11
(3,752 Views)

Thanks for the reply.

i need to actual value from 1 file with tolerence from another file and produce test result.

thanks

Download All
0 Kudos
Message 3 of 11
(3,745 Views)

 

Hi 6878,

 

use ReadFromSpreadsheetFile with "|" as separator to get the individual values... Save likewise when needed!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(3,740 Views)

Hi,

 

Please find the attached VI

I made it for CL2_StSt_Info constant. You can do it pragmatically.

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 5 of 11
(3,737 Views)

Hi,

 

As gred Says you can also use delimiter with I.

Sam.JPG

 

Now no need for the for loop coding

 

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 6 of 11
(3,736 Views)

Thanks for brief explanation. when i writing to spread sheet array , i need to add one more column along the columms which i retrieve from read from spreadsheet array? Is there any fn to concate 2 arrays thanks

0 Kudos
Message 7 of 11
(3,709 Views)
Solution
Accepted by topic author 6878

Hi,

 

To concatenate two array you can use build array function with selection of concatenate array property.untitled.JPG

Thanks and Regards

Himanshu Goyal

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 8 of 11
(3,701 Views)

Is it possible to use string inside formula node.


if (x == 1)
result = Ok ;
else
result= "NOK"

 

tks

0 Kudos
Message 9 of 11
(3,691 Views)

Hi tks,

 

why do you need a formula node for such tasks?

check.png

 

Btw. "NOK" is a string, while Ok is some kind of variable. Your text will only work, when Ok is defined as string...

And quickly reading the context help for the formula node would have shown that there is no specifier to define a string - just floats and ints!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(3,689 Views)