LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple property nodes

Hi,
I have about 10 or so numeric indicators that I modify their properties so I can change the background colors etc.  The problem is, these indicators are not bundled or anything, so I bascally have 10 different property nodes that I have to wire and it looks bad in the block diagram.  I was wondering if there is a way to bundle only the property nodes in the block diagram and apply the changes directly to the bundle so my code would be cleaner.  Hope my question is clear enough. BTW, the changes made to every indicator property nodes are the same.
 
Thanks
 
Yohan
0 Kudos
Message 1 of 10
(3,967 Views)
Create a reference for each control, build them into an array and wire that array into a for loop with a property node inside. The property node will be cast to the highest level common class. If the controls are all simple numerics (no slides, etc.), you should have all the properties you need.

___________________
Try to take over the world!
Message 2 of 10
(3,962 Views)
thanks, hadnt thought about that 🙂
0 Kudos
Message 3 of 10
(3,957 Views)
Sorry, but could anybody do me a favor and translate tst's posting into a vi? I tried to build it, but I just can't figure out what exactly he's writing about :-(.

Help would be greatly appreciated!

Kind regards,
Severin
0 Kudos
Message 4 of 10
(3,841 Views)
Attached is a vi and an image of the block diagram.


Edit: The VI will not run as is, you need to wire something to the property node in order for it to run.

Message Edited by Novatron on 06-23-2006 09:21 AM

Message Edited by Novatron on 06-23-2006 09:22 AM

Download All
0 Kudos
Message 5 of 10
(3,834 Views)
Great, thanks a lot!
0 Kudos
Message 6 of 10
(3,824 Views)
actually, I tried to copy your example, but it refuses to run - "For loop: N is not wired, and there are no indexing inputs". I've heard about autoindexing, and I thought this (what I've coded) was an example of autoindexing, but apparently something's wrong. Do you have an idea?
Download All
0 Kudos
Message 7 of 10
(3,817 Views)
You're sending a reference to an array into the for loop (A single object pointing to many objects).

This is different to the other example which sends an array of references (A group of objects each pointing to a single object).

The latter case is an array, therefore the autoindexing works.

If you send a REFERNCE to an array, it's a single value (Address in memory) and it can't autoindex.

Send the value of the array instead of the reference.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 8 of 10
(3,814 Views)
Thanks, I got your point. Trouble is, once I send the value (maybe I'm doing this wrong: either by Create->Property Node->Value or by Create->Local Variable), I can't wire the value to the property node: "The type of the source is Boolean. The type of the sink is Array Refnum"; which makes sense, I guess.
0 Kudos
Message 9 of 10
(3,807 Views)
If I may be so frank,

It seems the mistakes you are making are relatively basic.

I would try  looking at the examples of Property nodes shipped with LabVIEW.

The "Value" of the array is an array.  If you want to put an object in the array, you need to use something like "Replace array" or "append Array".  You can't just wire a boolean to a boolean array.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 10 of 10
(3,783 Views)