08-07-2010 08:51 PM
Is there a way to reverse the way labview displays array data? When using a boolean array I would like the LSB to be on the right side.
I know that you can use the reverse array function, but that changes the actual data. I would rather just change how the data is displayed. Also I have quite a few and don't want to have to add that to all of them.
Thanks
08-07-2010 08:58 PM
There is no built-in way to do this. You may be able to write an XControl to do this.
08-07-2010 09:08 PM - edited 08-07-2010 09:10 PM
It should be fairly trivial to add a reverse array before displaying the data. Keep in mind, when you display the data on the Front Panel, you can keep a parallel branch wire on the Block Diagram that is not affected by the Reverse Array.
Also, if you are displaying many of these arrays, perhaps you could use a 2D array on the Front Panel to show all bitmaps at once? Or, a 1D array that contains a cluster of the Boolean array if the Boolean arrays are ragged/jagged. Using this method would be scalable, meaning you would need only 1 Reverse Array for N arrays you want to display.
And smercurio_fc is right about the XControl being able to display a reversed array. But if you're not willing to drop Reverse Array in a few places, you're probably not willing to bite off the non-trivial task of creating an XControl (there's a moderate learning curve for getting the hang of creating a good XControl).
08-07-2010 10:13 PM
One thing I use quite often to display a bitmap is the Type Cast function, for the very reason that it puts the array in what I consider "human readable" form, ie. LSB on the right. Compare the result to the usual Number to Binary Array.
May or may not help you here, but at least keep in mind for future reference. Right-click on the Type Cast to select the 4.x data conversion.
08-08-2010 05:06 PM
Wow, thanks for the quick replies. I'll have to look into doing an x control, I haven't used those before. It might be a bit more work but I only have to do it once and it would apply globally. This seems like it should be an option for an array indicator... I can't be the only one who expects to view the zero element on the right.
Thanks for all the suggestions!