LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing String Data into a table

Solved!
Go to solution

Hi,

 

I am facing a problem in writing the data into table. Below is its description:

 

1. I have created a code which reads the URLs from  OPC.server.

2. I need to display it in a table. Since the number of URLs are known, I have defined the rows of the Table.

3. But am not able to display those URLs in the Table.

 

This problem can be simply put as to "how to write string datatype to the table". can property node be used and if yes, which property can be used??

 

I am still  a beginner in this....so would like help from all of fellow LabVIEWers out there

 

Thanks & Regards,

Sushruth.

0 Kudos
Message 1 of 14
(8,766 Views)

A table's datatype is a 2D array of strings. Are you actually creating a 2D array of strings? Do you have just one column of data? If so, you'd still need to create a 2D array of strings, even though you only have one column.

0 Kudos
Message 2 of 14
(8,754 Views)

Thanks for the swift reply.

 

A bit more description of my problem. I have set: no of rows = no of devices connected and no of Columns = 1. I have to pass the URL one at a time to this table. And the table should display all the URL in order of how its been passed. Is Shift Register an option here????

0 Kudos
Message 3 of 14
(8,750 Views)

Yes, the shift register would work. You could also use the replace array element to update the data.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 14
(8,743 Views)

@KEMLab wrote:

Hi,

 

I am facing a problem in writing the data into table. Below is its description:

 

1. I have created a code which reads the URLs from  OPC.server.

2. I need to display it in a table. Since the number of URLs are known, I have defined the rows of the Table.

3. But am not able to display those URLs in the Table.

 

This problem can be simply put as to "how to write string datatype to the table". can property node be used and if yes, which property can be used??

 


I assume you get the URLs as Strings and read it in a loop.

Let the output autoindex on the loop-out, r-click and create indicator.

That'll give you an array of strings that'll fill and show once the loop has completed.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 14
(8,739 Views)

Thanks for the reply.....

 

I have tried this and this works....But what i need is not this....I dont want to see URLs at the end of my program.....But want to see them while the program is running.....i am storing these URLs in TDMS. I also want them to view simultaneously in the front panel(one below the other in the table or listbox)....Any idea as to how can i proceed in this???

0 Kudos
Message 6 of 14
(8,732 Views)

Simply update your array data with the new data and wire it to the table. You could create a separate loop that handles the UI updates and you can pass the updates to the table via a queue. This is esspecially useful if you are getting the URL within subVIs. A common design pattern is the producer/consumer architecture.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 14
(8,725 Views)

Hi,

 onnection.png

I just want to connect the output of Datasocket i.e., the URL to the table for displaying it in Front Panel. above code is just a sample for one URL. But in my case i have about 50 URLs... In this example it will display one URL at a time. But what i need is to display the list of all the URLs selectet not at the end of the program but while the program is running(an entry of each URL must be seen in Table)

 

Mark,

 

Can you please elaborate on how can "Simply update your array data with the new data and wire it to the table" or else if possible a pic of a sample code????I am sorry for asking but i am a complete beginner in Labview.....Hence your inputs will be really appreciated...

 

Thanks & Regards,

Sushruth.

0 Kudos
Message 8 of 14
(8,716 Views)
Solution
Accepted by Sushkatta

Here is a basic update. The initialize array would have to be specified as a number larger than your maximum number of URLs.

 

Table Update.png



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 14
(8,710 Views)

Thanks Mark.....It worked like Magic!!!!!!!!!!!!

0 Kudos
Message 10 of 14
(8,692 Views)