LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where is the Variant Constant?

Why does LabVIEW not have a "variant constant" on the Functions Palette? The easiest way I have found to create one is to

 

1. Drop a Convert To Variant function onto the block diagram

2. Create a variant constant off of the Convert To Variant input terminal

3. Delete the Convert To Variant function

 

OR

 

1. Create a variant control

2. Go to the block diagram and select Change to Constant

 

Just seems odd to me.

 

Craig

0 Kudos
Message 1 of 3
(2,944 Views)

@craige wrote:

Why does LabVIEW not have a "variant constant" on the Functions Palette? The easiest way I have found to create one is to

 

1. Drop a Convert To Variant function onto the block diagram

2. Create a variant constant off of the Convert To Variant input terminal

3. Delete the Convert To Variant function

 

OR

 

1. Create a variant control

2. Go to the block diagram and select Change to Constant

 

Just seems odd to me.

 

Craig


OR

select a varaint control Drag to the BD Drop ( dropping any selected control on the BD creates a constant of that type- useful for Type Defs)

 

 

Sounds like a good proposal for the Idea ExchangeSmiley Wink


"Should be" isn't "Is" -Jay
Message 2 of 3
(2,936 Views)

The input of the To Variant function is actually a cluster of 0 zero elements, you need to create a constant off of the output.

 

At one point I felt like it was an ommission, but I don't really know when I would use it in place of create constant.  What uses for the constant do you have in mind?  9 times out of 10 I am using the constant to initialize a shift register, and I am only using the variant for its attributes.  Very easy to right click the SR and create constant.

 

You should see this idea:

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-Variant-constant-to-the-Cluster-Class-amp-Variant-...

0 Kudos
Message 3 of 3
(2,925 Views)