LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FP Control Array update using References

Thanks for all your replies, and I am working on implementing your suggestions.  

@Jim.Morris:  I'm trying to build on your example by the array reference to my many subVI instances so that values can be updated in the subVI.  However, I am having trouble with the array reference.   In my subVI I am getting the error "Bundle By Name: Cluster items are not named", and I think it's because I changed the cluster of controls that makes up the array.  I have the cluster as a typedef, but I don't know how to apply the typedef to the array in the subVI (I hope that's clear.)  Here's a snippet from my subVI with the error:

subVIArrayError.png

 

@Ben:   Taking your advice, I plan to use the DVR in the many subVI instances to update the values for the control array using IPE.   Then I will have a while loop in the main vi which just updates the FP indicators from the DVR using an IPE.  I have created the DVR for the control array in my main VI.  How do I provide the DVR as a subVI input terminal?

 

Thanks in advance for clearing up my misunderstandings.

0 Kudos
Message 11 of 16
(882 Views)

Make sure all the elements of the cluster are named.

 

I guess the cluster you have in your array now is NOT the typedef?  If so, then drag out the element that is in there now and delete it.  Drop a constant of the typdef and drag it into the array container.

 

To make a control or indicator of the DVR reference,  just right click on the reference wire and pick Create Control, or Create Indicator.  Copy and paste that to any subVI's that need it and connect their connector panel to that.

0 Kudos
Message 12 of 16
(872 Views)

@RavensFan:

 

>I guess the cluster you have in your array now is NOT the typedef?  If so, then >drag out the element that is in there now and delete it.  Drop a constant of the >typdef and drag it into the array container.

I gave this a try but likely I didn't do it correctly--the array container is on the front panel and the typedef constant is on the block diagram, so when I did what you suggested, I didn't get another typedef'd cluster of controls in the array.  

What I did to fix the error was to add additional indicators to the typedef, and then I needed to reorder the controls on the FP control array:

Reorder.png

I have done this in a cluster before, but I didnt know the same "Reorder controls in cluster" could be done in the control array.   After matching the order in the typedef'd cluster, the error is fixed, but I'd still like to apply the typedef to the control array.

 

To make a control or indicator of the DVR reference,  just right click on the reference wire and pick Create Control, or Create Indicator.  Copy and paste that to any subVI's that need it and connect their connector panel to that.

0 Kudos
Message 13 of 16
(865 Views)

Thanks to all who replied, I have the basic mechanism working now.   My many subVIs use the DVR and channel number as input to update the channel's FP values, and I have a while loop in my main VI that updates the entire FP array of indicators from the DVR.    Seems to be working fine at the moment.

0 Kudos
Message 14 of 16
(863 Views)

@wygonski wrote:

What I did to fix the error was to add additional indicators to the typedef, and then I needed to reorder the controls on the FP control array:

Reorder.png

I have done this in a cluster before, but I didn't know the same "Reorder controls in cluster" could be done in the control array.   After matching the order in the typedef'd cluster, the error is fixed, but I'd still like to apply the typedef to the control array.

t.

I explained how to make the array of the typedef controls in my previous message.  Rearranging and adding to a normal cluster to make it work with a typedef is NOT the same thing as actually making an array of the typedef cluster.

Message 15 of 16
(853 Views)

@RavensFan:

>Rearranging and adding to a normal cluster to make it work with a typedef is NOT the same thing as

>actually making an array of the typedef cluster.

 

Yes, you're right-- I ended up without the benefit of the typedef in my FP control.    Since I had the FP control cluster visually formatted, I was able to make that into a typedef control and then use the same typedef for FParray:

FPControlTypedef.png

 

Also, using your suggestion I was able to get the DVR input to my subVIs.   Thanks for your help and patience.

0 Kudos
Message 16 of 16
(842 Views)