From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

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

Behaviour of Numeric constants

Status: New

I have searched the forum but cannot find this particular issue - only the adaptive nature of the dropped constant.

 

When an Integer Numeric Constant is dropped onto the block diagram the value '0' is highlighted ready to accept a typed value.  When you do the same thing with a DBL Numeric constant you have to double click it to highlight it before you can enter a value.  This behaviour is inconsistent the Integer being preferred.

 

Ken

9 Comments
PaulG.
Active Participant

More of a "feature" than a suggestion, but kudos anyway.

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
Ken_Naylor
Member

The 'suggestion' is to make the behaviour of the dropped DBL Constant the same as that of the dropped Integer Constant.  i.e. highlight the dropped DBL ready to type the required value.  Has anybody ever wanted the dropped DBL to be zero!?!

K C
Trusted Enthusiast

Feature, suggestion, maybe it is a bug.

 

And yes a zero DBL value is useful as an input for a initialize array or as an input for shiftregister or ....

 

I think the behavior should be the same as the Numeric Constant

elset191
Active Participant

I may be mistaken, but I believe the inconsistency stems from the fact that the DBL constant is actually a VI set to Place VI Contents, rather than a true constant like the Integer constant. (See also)

--
Tim Elsey
Certified LabVIEW Architect
JB
Trusted Enthusiast
Trusted Enthusiast

the DBL constant is actually a VI set to Place VI Contents

I don't think so. The Space Constant is such a VI but not the DBL constant.

crossrulz
Knight of NI

JB - I think you have your definitions flipped.  The space constant is an actual VI.  Place VI Contents means that the VI itself is not place, but the code inside of it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Mr.Mike
NI Employee (retired)

Elset191 is dead on, as with crossrulz.

 

The mechanism for selecting the constant value when you drop it from the palette is pretty separate from the mechanism for dropping the contents of a VI, so this one might be more challenging than it seems.

 

 

-- Mike
JB
Trusted Enthusiast
Trusted Enthusiast

crossrulz a écrit :
JB - I think you have your definitions flipped.  The space constant is an actual VI.  Place VI Contents means that the VI itself is not place, but the code inside of it.

Yes, you're right ! I know the difference but didn't take care enough while answering.

JLewis
Member

One workaround (extracted from the other thread on adaptive behaviors) is to use the Numeric Constant and type a trailing "." to get it to adapt to DBL automatically. That's actually more useful in this situation since you already need to type something into the constant.