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.
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.
02-04-2014 09:53 AM
Array displays by default start at the top left and then, for a 1D array, expand down or to the right, and for a 2D array, expand down And right.
For display purposes, I am wanting to have my display update from the bottom up. This will be for a 1D array.
Any simple way of doing this without filling and replacing all the upper cells w/ blanks or something and then replacing each cell as I go ?
Appreciate any thoughts.
02-04-2014 09:58 AM
Seems like a pretty nifty idea for an XControl.
The other way would be to make the default index display invisible and use a separate control to index in using property nodes.
The XControl method would work in Edit mode while the surrogate index method would only work during a run.
02-04-2014 09:58 AM
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/reverse_1d_array/
02-04-2014 10:37 AM
Reverse the array before writing to your terminal. That is by far the simplest way.
02-04-2014 10:54 AM
Looks like I have a couple options to experiement with.
Simply reversing the array would not suffice for what I am wanting by itself. If I want the array display to show perhaps 25 elements, I would expand the display on the front panel to show that. When it updated, even reversed, it is going to populate the display top to bottom.
A method to counter that would be to adjust the number of rows displayed through a property node with each addition. And I would either have to re-reverse or write some other code to keep the elements in order as collected. However, even then, the display will expand in a downward direction as I increase the number of rows. This means that the values in the array will constantly be shifting down as the array grows making it difficult to monitor the values as the elements are added.
Certainly doable but am hoping for something a bit more elegant. Ideally, I will have a blank 25 row display and the values will populate from the bottom up. Will have to look into the x-control. Have never played with those so will take a little research.
I have some ideas now but any other options will be appreciated.
02-04-2014 12:00 PM
Perhaps using a Table will do what you want. You will have to convert to strings and form it into a 2D array, but that might make what you want.
02-04-2014 12:03 PM
Can I populate a table from bottom up ?
02-04-2014 12:24 PM
You'll have to do it by manipulating an array of strings and inserting empty strings to the front, but you wouldn't have to do the resizing, etc.
02-04-2014 12:54 PM
Yea, That is what I was wanting to get away from. A lot of manipulation for the effect.
Looked briefly at Xcontrols. Never paid attention to that feature before. Will have to spend some time figuring out how to create and use them. I'm sure there are some examples in the help or online. Just don't have the time right now.
Will play with some stuff as I get the app developed and see what I can come up with.
02-04-2014 01:02 PM
For a simple but effective answer, you could always tell the customer to mount his monitor upside down, then use an upside-down font .
(Sorry, couldn't help it, today I needed some levity)
Cameron