10-16-2019 12:51 PM
I want to read temperature from 5 different thermocouples using a cDaq and have a table on the front panel like the one shown below
I know I need a table or listbox for sure or an array, but my main problem is importing data into the table. How do I do that? Any idea?
P.S.: If anybody has similar VI that he/she previously, please show it to me so I can have an idea or you can refer me to something similar.
Thank you, guys.
Note: I'm a new learner.
Solved! Go to Solution.
10-16-2019 01:06 PM
A table is just a 2D Array of strings. So you read your data from the sensors, format the data into an array of strings, write to the table.
10-17-2019 02:00 AM
You can do this with a simple For loop and some string formatting if you already have the numerical data.
Here I used the Column Headers property to set the column headers, rather than placing the "Channels" and "Temperature" strings as part of the value:
Right click on the table and go to Visible Items > Column Headers to show these (you could also do the same with Row Headers and the thermocouple strings if you wanted).
10-18-2019 12:24 PM
Hi cbutcher,
Thank you, but what is the name of the block in the for loop right on top of the "number to fractional string function" block. I want to copy what you did and simulate it to check if it's working, but I do not know where to find that block or can you please attach a VI?
Thank you.
10-18-2019 12:41 PM
That block is a build array. Did you by chance notice the training material at the start of this forum? Reviewing that material will help you to get started with LabVIEW.
10-18-2019 01:22 PM
I'm talking about this block below, not the build array.
10-18-2019 01:27 PM
Format into String.
Definitely take tutorials.
Take time to browse through the palettes and check what functions are and there names. Do it with Context Help turned on it. Click on detailed help for any that look particularly interesting to you.
10-18-2019 02:10 PM
@GRC5000 wrote:
I'm talking about this block below, not the build array.
My apologies. For some reason I had in my head that you said to the right instead of on top. Ravensfan is correct that it is Format Into String.
10-19-2019 02:33 PM
I want my table to look like this one:
Here is my approach:
Note: So basically, I am trying to assign random numbers to Thermo 1 to 5 each time I run the VI and make the table look like the table above this VI. I attached my files and VI. Is there any way to solve this problem. My goal is to assigning random numbers to thermo 1 to 5 on excel and display the table on the front panel.
Note: Book1.csv is just a blank excel file where all the random numbers will be put on vertically, not horizontally.
10-19-2019 03:04 PM
You are using an array indicator(control) rather than a table indicator(control). Arrays don't look like tables.
mcduff