12-22-2011 05:09 AM
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.
Solved! Go to Solution.
12-22-2011 07:57 AM
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.
12-22-2011 08:44 AM
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????
12-22-2011 09:29 AM - edited 12-22-2011 09:29 AM
Yes, the shift register would work. You could also use the replace array element to update the data.
12-22-2011 09:36 AM
@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
12-22-2011 11:28 AM
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???
12-22-2011 12:34 PM
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.
12-22-2011 03:15 PM
Hi,
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.
12-22-2011 04:17 PM
Here is a basic update. The initialize array would have to be specified as a number larger than your maximum number of URLs.
12-23-2011 05:12 AM
Thanks Mark.....It worked like Magic!!!!!!!!!!!!