LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using a reference to update a cluster

Does anyone know a simpler way to update an element in a cluster using a passed reference?

Thanks


0 Kudos
Message 1 of 9
(11,379 Views)

Peease see this Nugget. I tried to include examples of all possible variations of working with cluster by using refs.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 9
(11,374 Views)
Wow,
That is an amazing amount of work and I may find it more useful in the future for using generic references.

The issue that I have now is that I have a known cluster that is updated by a number of different VIs.
In the first pass of code each VI has the cluster as an input, modifies it, passes it out, and the app uses a shift register for the data in the while loop.
Admittedly not very efficient, but it works.

I want to change all the Laser control VIs to use that cluster reference to update the values.

From looking at Figure 6 in your nugget, it seems that what I have is as efficient as I can get.

Or am I missing something?

Thanks again.


0 Kudos
Message 3 of 9
(11,358 Views)
There are far better ways of updating a single element in a shared cluster. Here's a link to another one of Ben's nuggets which might be useful. If you want specifically to update a value inside a cluster, have a look here (which is towards the end of that thread), where I give a quick example of GOOP.

___________________
Try to take over the world!
0 Kudos
Message 4 of 9
(11,340 Views)
I truly am not trying to be argumentative or difficult, but after reviewing the two placements of the thread that you linked (plus most of the entries in between), I still fail to see anything simpler for updating an element inside a small cluster that consists of a variety of controls.

The dqGOOP VI simply allows for unbundling the elements (in one way easier that searching for the label).
I cannot find the dqGOOP VIs in my installation (LabView 7.1 FULL), but copying it from the toggle VI shows that it is a different kind of reference.

Thanks again for the help.


0 Kudos
Message 5 of 9
(11,320 Views)


jspaarg wrote:
... I still fail to see anything simpler for updating an element inside a small cluster that consists of a variety of controls.

I beg to differ! 😄
 
You can create a value property node of any cluster element. All you need is the following:
 
 
Arguably, this is simpler code than yours! 😉

(Right-click on the cluster element... create...property node...value")


Message Edited by altenbach on 07-09-2008 11:44 AM
0 Kudos
Message 6 of 9
(11,316 Views)
I am not sure this is what was meant, but when I right-clicked the reference, I could create / property / value.

This is definitely far simpler.

I seem to have the knack with LabView of doing complicated things easily, and easy things complicatedly (sorry, I couldn't resist making up a word).


How do you put the image of VIs and functions in the body of the message.
I would have preferred that instead of the attachment.


0 Kudos
Message 7 of 9
(11,305 Views)

Its a multi step process.

First post your reply and include the jpg or png as an attac.

View your post and open the link for your attach.

Copy that URL

Edit your message (five minute limit) and then hit the insert an image button (looks like mountains).

submit edited.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(11,302 Views)


jspaarg wrote:

The dqGOOP VI simply allows for unbundling the elements (in one way easier that searching for the label).

And more elegant and much safer and more scalable and easier to use and almost certainly better performing etc.
 
Using the value property (by name, no less) as a data transfer/sync mechanism is bad and it may very well bite you one day when someone makes a change in the code and forgets to update the name or if it turns out to have a race condition or any other number of bad things which can happen.

I cannot find the dqGOOP VIs in my installation

That's because it's not part of it. A quick visit to Google can fix that.

___________________
Try to take over the world!
0 Kudos
Message 9 of 9
(11,289 Views)