LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array element label

I have a Type Def that consists primarily of an array of clusters.

The cluster consists of five LEDs and two numeric displays.

 

These represent status information from an Axis in a motion system.

 

I would like to put a caption above the elements of the array to indicate the axis label for that element.

I initially had it as four individual clusters, but that provided problematic for other reasons and it is simpler from a programmability standpoint to use an array of clusters.

 

This control is used on multiple systems which have different designations for the Axes (hence the desire to have programmatic labels).

 

The closest posting to this was this one

http://forums.ni.com/ni/board/message?board.id=170&message.id=426506&query.id=991805#M426506

 

But it does not quite get what I want.

 

The simplest solution would be if there were a simple text string that could be changed programmatically that is not associated with a control, but I cannot find a reference to such an item.

 

If I use a real control (e.g. a string), I cannot make the control invisible and keep  the caption.

 

Any ideas are appreciated.

 

Thanks

 

0 Kudos
Message 1 of 7
(6,674 Views)

Try adding a string indicator to your status cluster.  Use the Simple Sting indicator from the Classic palette.  (no border)  Set preferences so that the label and caption  are not visible.  Change the background color of the string indicator to match the background of the cluster.  Now the cluster contains a string that identifies which axis it is associated with ( Easy to change at run time ) and it appears as text label in cluster.

 

Example_VI_FP.png

Message 2 of 7
(6,650 Views)

I've used that approach in other clusters/arrays in the past.

This time I'm a little size constrained and I don't want to use the space needed for a string.

 

It wasn't going to work this time for aesthetic and sizing reasons.

 

However, I did not know about the classic simple string.

That seems to solve most of the issues.

 

The only other thing that would be really nice is if I could center the text.

I will check the property node.

 

Thanks

 
0 Kudos
Message 3 of 7
(6,636 Views)

You don't need a property node to center text.  Select the string indicator and use the LV toolbar to set the Justify to center.

 

Justify.PNG

Message Edited by Wayne.C on 09-22-2009 04:47 PM
0 Kudos
Message 4 of 7
(6,633 Views)

Aargghh!

 

I got so excited about the simple string fitting that I forgot that I update the cluster every 250 ms.

I either have to go to the database to get the label every time, pass in the original cluster so the label is available, or change to a reference.

 

That was why I wanted a string outside the actual status cluster.

 

Any other ideas?

 

Thanks.

 

Can Unsolution something?

 

0 Kudos
Message 5 of 7
(6,629 Views)
I guess I don't see the problem.  You have an array of clusters that you update every once in a while and then display.  Populate the string for each cluster in the array when the program starts and hold the array in a shift register.  Then all you need to do is update the status items in the clusters before updating the front panel.
0 Kudos
Message 6 of 7
(6,588 Views)

That would probably work, and I probably should use shift registers more often.

I wound up putting a string array separate from the status array cluster above the status array.

That way, I only need to update the status each pass.

I used your idea about the simple string, but may wind up changing it for aesthetic reasons.

 

AxisStatus.jpg

 

I need to work on sizing the array a little better, but it works for now.

Thanks for the idea 

Also, thanks a lot for how to center things.  I knew there had to be an easy way that I didn't know.

 

0 Kudos
Message 7 of 7
(6,574 Views)