LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone please just tell me the steps to take to build a VI that output data collected from a sensor on a table created on the front panel?

Solved!
Go to solution

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

Table.PNG

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. 

0 Kudos
Message 1 of 16
(2,888 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 16
(2,874 Views)

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:

Example_VI.png

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).


GCentral
0 Kudos
Message 3 of 16
(2,814 Views)

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.

 

0 Kudos
Message 4 of 16
(2,782 Views)

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.

0 Kudos
Message 5 of 16
(2,774 Views)

I'm talking about this block below, not the build array.

Capture.PNG

0 Kudos
Message 6 of 16
(2,767 Views)

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.

0 Kudos
Message 7 of 16
(2,764 Views)

@GRC5000 wrote:

I'm talking about this block below, not the build array.

Capture.PNG


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.

0 Kudos
Message 8 of 16
(2,757 Views)

I want my table to look like this one:

Table.PNG

Here is my approach:

Capture.PNG

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.

 

 

Download All
0 Kudos
Message 9 of 16
(2,798 Views)

You are using an array indicator(control) rather than a table indicator(control). Arrays don't look like tables.

 

mcduff

0 Kudos
Message 10 of 16
(2,774 Views)