From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

N x N square help

Solved!
Go to solution

I am looking for ideas on how to impliment the following:

 

I am redesigning a program that will take data from Labview and place this data into an comma-delimited text file on another file server. One of my many "mini-projects" is to take a square and make it into a N x N square. Think of a large square that has smaller squares inside of it. There are two pieces if information that need to be handled & displayed on the U on each square: The identification number info and the samples value from a external serial device. I am having issues displaying the N x N square. I'd like to make this dynamically if possible. I want to start small, like a 2x2 square.

 

Has someone done something like this and if so, where do I even start?

 

Thanks,

Eric

 

0 Kudos
Message 1 of 15
(2,963 Views)

I really didn't understand what you meant by N x N square. Do you mean to form N number of rows and columns with some value? Please explain

 

If possible can you show a picture of what you are looking for?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 15
(2,952 Views)

You got it. I need to hold two pieces of information within each row and column:

 

  • An identification number
  • Value (Double)

I want to display both pieces if information on the UI; like a grid.

0 Kudos
Message 3 of 15
(2,944 Views)

Start with a 2-D array of a cluster that contains the controls for the values you want to display.  Use the "Replace Array Susbset" to place your data.  It won't work if you specify a location that is out of bounds, so you'll have to pre-define your array size, first.  (This may seem tricky at first, but you shouldn't have any problems obtaining this if you just think about it a little bit.)  You can resize the array control to display all your data with the array property node.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 15
(2,941 Views)

The below VI should get you an idea although I do not like how it's implimented. Is there a better way?

0 Kudos
Message 5 of 15
(2,940 Views)

billko,

 

I've been successful manipulatuing the columns and rows in my test vi, but how do I go about writing data to the Array Cluster? The VI is in 2012.

 

Thanks,

Eric

Message 6 of 15
(2,912 Views)

@Eric1977 wrote:

billko,

 

I've been successful manipulatuing the columns and rows in my test vi, but how do I go about writing data to the Array Cluster? The VI is in 2012.

 

Thanks,

Eric


You got the idea, but the control should be an indicator, since you want to display data.  The input to that indicator will be your data.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 15
(2,900 Views)

Well, that's not necessarily true; at least for the string.

 

At times, my users will need to update the Mold ID string as molds get replaced and get saved back to a MS Access database to be used at a later date so I cannot use indicators as you suggested.

0 Kudos
Message 8 of 15
(2,894 Views)

@Eric1977 wrote:

Well, that's not necessarily true; at least for the string.

 

At times, my users will need to update the Mold ID string as molds get replaced and get saved back to a MS Access database to be used at a later date so I cannot use indicators as you suggested.


Sorry, I just assumed that this was for information only.  In that case, you can keep it as a control, but do the original data popualtion with a local variable.  I'm not sure of your skill level.  Do you already have a plan for the rest of the stuff?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 15
(2,887 Views)

I do. I am just not sure of how to populate the data per the Replace Array Subset like you suggested. When I try to add data to the Array Cluster, it does not appear to add any data.

0 Kudos
Message 10 of 15
(2,826 Views)