LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset all items in a cluster

I have bunch of items in a cluster that I would like to reset to "" (for
strings) and 0 for numerics.

Equivalent to memset in C.


vishi
0 Kudos
Message 1 of 6
(5,263 Views)
This is simple.
You just go to
>Operate
>>Tools
>>>reinitialize all to default
You can set your default value by
>Operate
>>>Tools
>>>>Make current value default
YOu can also do that in the block diagram by using invoke node.

Saw Naing Aye..
0 Kudos
Message 2 of 6
(5,263 Views)
There are several ways of doing this depending on the circumstances. How exactly are you using this cluster that you want cleared?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 6
(5,263 Views)
Mike,

Cluser has bunch of indicators which get populated when I recive info from
my device. I would like to clear them before I start but I want to do it in
code.

The way I did with the individual indicator was to use reference node and
set the text property to "" but looking for a better way in case i have a
big cluster. Don't want to set individual items at a time.


vishi

"mikeporter" wrote in message
news:50650000000500000040EA0000-1042324653000@exchange.ni.com...
> There are several ways of doing this depending on the circumstances.
> How exactly are you using this cluster that you want cleared?
>
> Mike...
0 Kudos
Message 4 of 6
(5,263 Views)
Ok, I understand. The faster way of doing this is to define all the inputs such that the cleared value is also the default. You can then use an invoke node to call the "Reinitialize All To Default" method.

Note that like property nodes, if you don't provide a vi reference to an invoke node it assumes you mean the vi it's installed in.

To create an invoke node to do this: right-click on free-space somewhere in the diagram and select an invoke node from the function menu (look under "Application Control").

After placing the invoke node on the diagram, right-click on the yellow part of it and select "Select VI Server Class>>VI". Finally, right click on the white part of the invoke node and select "Methods>>Reinitialize All To Default".


Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 6
(5,263 Views)
That's right Mike. Other techniques are to use the control method "Reinit to Dflt" that reinit only that single control or to write a default cluster value to a local variable.


LabVIEW, C'est LabVIEW

Message 6 of 6
(5,263 Views)