LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Create constant|control should allow scalar option

Status: Completed

Available in LabVIEW 2019 and later. Right-click any array terminal and select Create > Scalar > Constant or Create > Scalar > Control.

Whenever we create a constant (or control) on a partially connected function, we get not only the same datatype (good!), but also the same array dimensionality (often not so useful).

 

In the vast majority, I want do do some uniform operation on the entire array, so a scalar control or diagram constant would be much more desirable. I usually end up creating the array constant, then pulling it out of the container, hook it back up, and delete the container. This guarantees the correct datatype (I32, DBL, CDB, etc).

 

(It is even more tedious to place a diagram constant from the palette and then remember the datatype and adjust accordingly).

 

IDEA: 

When creating a control or constant, and it would result in an array, I would prefer to also have a scalar option.

 

This little move illustrates it in the case of creating a diagram constant. It should apply equally to controls.

 

 

Message Edited by altenbach on 07-11-2009 09:51 AM
9 Comments
Jim_Kring
Trusted Enthusiast
I'm constantly (pun intented) needing this feature.  I'd want to make sure that this also worked for the inputs of Polymorphic VI that have both array and scalar inputs.
LabBEAN
Active Participant
Might want to position "Scalar Constant" lower on the list (e.g. at bottom or after "Constant").

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
Intaris
Proven Zealot
I'd personally like to have an option to right click ANY object on the BD and choose "Make Array" or select and Array and choose "Make Scalar" (Even though this could be a misnomer because removing the "outermost" array won't necessarily result in a true scaler.....
muks
Proven Zealot
It would be a nice addition and a useful one too. You presentantion is really good.
altenbach
Knight of NI

> Might want to position "Scalar Constant" lower on the list

 

Typically, the entries should be sorted by expected frequency of use, and in the case of creating a constant or control, I would guess that creating a scalar is the normal case. Whenever you create an array, it is empty by default, thus destroying any output. Even if we add data to the array constant, we need to know the size of the "other" array input and match it for it to work properly. Creating an array constant is probably the exception. 😉

JÞB
Knight of NI
Heck- Id settle for Right-click (Remove dimention) and (Add dimention) functionalities that convert scalars to arrays and vice-versa.  It currently only works n to n+1 and n+1 to n Where n=>1  Why not change the bounds to 0?

"Should be" isn't "Is" -Jay
Darren
Proven Zealot
Status changed to: In Development
 
Darren
Proven Zealot
Status changed to: In Beta
 
Darren
Proven Zealot
Status changed to: Completed

Available in LabVIEW 2019 and later. Right-click any array terminal and select Create > Scalar > Constant or Create > Scalar > Control.