LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table not showing data

Solved!
Go to solution

Hello all.  I made a program that displays 31 thermocouple temperatures (using two NI-9213s).  I am dividing the readings into groups of 5, with each group corresponding to temperatures on various components of motors.  I am using a table control to display the data, but nothing appears when I run the program. What is really strange is that I did see temperatures early on.  I was working with the data positions, as some temperatures were appearing in the wrong columns, but then suddenly nothing appeared at all.  What could have happened to make the data totally not appear at all when it originally did?

0 Kudos
Message 1 of 12
(250 Views)
Solution
Accepted by Dhouston

Is your Table Control empty?  You can replace elements in an empty array.

 

Why is it a control?  It seems to be treated like an indicator to just display data.

 

Instead of using Replace Array Subset, you should just be building up the array using Build Array and sending the data to a Table indicator.

Message 2 of 12
(240 Views)

In answer to your questions:

 

Is your Table Control empty?  You can replace elements in an empty array.

-The table control should be empty.  I didn't put anything into it when starting

 

Why is it a control?  It seems to be treated like an indicator to just display data.

-It is true that I want it act like an indicator.  Yes, its purpose is exactly as you state -- just to display data.  This is my second time using this control, so I just kept it as it is, as it worked and I didn't try anything else.  If anything, the only advantage to having it as a control is that it lets us change column and row headings if we use the wrong labels (this happened on another program that we made into an executable.)

 

Instead of using Replace Array Subset, you should just be building up the array using Build Array and sending the data to a Table indicator.

-NI seems to want to shy away from using Build Array, even though we tend to have to use it a lot.  I'll do what you are saying, and come back with the result.

0 Kudos
Message 3 of 12
(208 Views)

You can not replace a non-existent element in an array.

 


@Dhouston wrote:

In answer to your questions:

 

 

 

Instead of using Replace Array Subset, you should just be building up the array using Build Array and sending the data to a Table indicator.

-NI seems to want to shy away from using Build Array, even though we tend to have to use it a lot.  I'll do what you are saying, and come back with the result.


That is news to me.  What makes you NI wants to shy away from it.

 

Trust me.

Replace Array Subset WILL NOT work on an empty array.

Build Array is probably the most commonly used of the array functions and it is not going away.

 

0 Kudos
Message 4 of 12
(201 Views)

Well shucks, that actually worked.  I was fully expecting it to fail.  Here is the new program, for future reference for anyone else.  Thanks so much for the help.

0 Kudos
Message 5 of 12
(196 Views)
  • Now your local variable and shift register can be deleted without any change in functionality.
  • Your array operation could be reduced to a "one-liner". Way too convoluted. (What's the size of the original 1D array?)

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 6 of 12
(178 Views)

@altenbach wrote:
  • Your array operation could be reduced to a "one-liner". Way too convoluted. (What's the size of the original 1D array?)

Here's one possibility to get the same result with arguably much less code:

 

(Small correction are needed if the input array contains more than 32 elements. No way for me to tell)

 

 

altenbach_0-1618243818961.png

 

(note that reshaping after formatting will pad with empty strings while doing the same on the DBL array would give you zeroes)

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 7 of 12
(171 Views)

@altenbach wrote:
(Small correction are needed if the input array contains more than 32 elements. No way for me to tell

Here's how that could look like:

 

altenbach_0-1618244470263.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 8 of 12
(161 Views)

Oh my gosh!  Seriously?!  Yes, it did the very same thing.  The size of the original 1D array is 32.  Your code split it all up just right.  I don't understand the mechanics behind Reshape Array.  That's why I wouldn't have came anywhere close to trying to use it.  I would have never thought it would split up an array like this.

 

Thank you greatly!

0 Kudos
Message 9 of 12
(158 Views)

@RavensFan wrote:

Is your Table Control empty?  You can replace elements in an empty array.

 

 


Rereading this earlier message, I realize I mistyped it.  I was trying to say "you can't replace elements in an empty array."

Message 10 of 12
(154 Views)