cancel
Showing results for 
Search instead for 
Did you mean: 

Labview "Tab" under string function

LexenZ
Member

Labview "Tab" under string function

Hi,

 

I have a string constant of data in 3 longgggggggggg columns, I have to seperate out the columns by enabling "tab"  to see the values of the data. 

 

Does anyone have any solutions on how to create this?

 

 

18 REPLIES 18
udka
Active Participant

Re: Labview "Tab" under string function

-Provide Sample data to explain the question better along with VI/LabVIEW snippet.
-Are you going to read from file? What is the format of the file?
-You can check Read From Spreadsheet File VI:https://zone.ni.com/reference/en-XX/help/371361J-01/glang/read_from_spreadsheet_file/ 

Thanks
uday
LexenZ
Member

Re: Labview "Tab" under string function

Message contains an attachment

Sorry about it, forgotten to upload the vi.

 

Basically given the data file I have provided, the string should come out in 3 "tabbed" columns.

The formate of the file is just a text file. 

 

 

udka
Active Participant

Re: Labview "Tab" under string function

Message contains a hyperlink

- Use Read from Text File Function to read the file and provide file path to the respective file path.

- Use Spreadsheet String To Array Function to convert to data to array of data.

- Refer the example provided here for reference:https://forums.ni.com/t5/Example-Code/Extract-Column-from-Text-File/ta-p/3524861

- You can exclude the Array subset since you need all columns of data.

 

Edit: P.S. Sorry on mobile, can't see VI if possible post snippet using : https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2PkCAI&l=en-US

Thanks
uday
LexenZ
Member

Re: Labview "Tab" under string function

Message contains an attachment

Basically, from the snipped photo I have shown, I have to make the 3 columns into seperate tabs using block diagram components. 

udka
Active Participant

Re: Labview "Tab" under string function

Use "Spreadsheet String To Array Function" to convert to string to tab delimited array data.
-Connect String to "spreadsheet string" input
-Connect %s to "format string" input
-Connect 2D array of String constant to "array type" input.
Thanks
uday
LexenZ
Member

Re: Labview "Tab" under string function

Message contains an attachment

Great option! I chose the "read spreadsheet" and eliminated my previous vi to get this as shown on the snipped photo.

Now, as you can see I have 3 columns, and i have to plot the 3 columns on a xy graph, say:

Column 1 vs Column 3 , 

Column 2 vs Column 3,

Column 2 vs Column 1,

 

I tried to build the xy graph component a shown, but I have no idea how to link it. Any solutions to that? 

udka
Active Participant

Re: Labview "Tab" under string function

Message contains a hyperlink

-Check examples provided along with labview: Help-> Find examples-> Search for XY Graph.

-I believe you definitely need to learn about LabVIEW. Please try below free online material :

Start with below links to learn about LabVIEW programming 

NI Learning Center

NI Getting Started

-LabVEW Basics

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction

LabVIEW Graphical Programming Course

Thanks
uday
PalanivelThiruvenkadam
Active Participant

Re: Labview "Tab" under string function

Message contains an image Message contains an attachment

XYGraph_Forum.png

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
PalanivelThiruvenkadam
Active Participant

Re: Labview "Tab" under string function

Message contains an image

ModifiedXYGraph_Forum.png

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------