LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Scan From String" - something I didn't know...

Hey, everyone.  I noticed fairly recently (I don't know, maybe a couple of years ago?) that, not only can you control the representation of a number by wiring a constant to the "other side" of the output, but you can also give the wire a name!

billko_0-1612719168094.png

When did you find out?  I feel kinda dumb.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 1 of 25
(3,400 Views)

It makes sense.  But I didn't know it either.

0 Kudos
Message 2 of 25
(3,358 Views)

I've known the data type trick for a very long time.  I never tried naming the constant though.  It makes sense and this gives me ideas for making it easier to debug that node.


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
0 Kudos
Message 3 of 25
(3,322 Views)

Since we are having fun with the Scan From String, did you know you can define a Boolean and an Enum with a string or a numeric?


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
Message 4 of 25
(3,317 Views)

I'm like Crossrulz -- I knew about wiring Inputs to get specific types of Outputs, but didn't know about naming the constants (though I've used Named Constants in other situations where I've needed to "name a constant" -- I don't remember the exact use now, after the Stupor Bowl).  However, Bill's example is peculiar -- in order to get the Indicator wired to the output of Scan from String to take on the "name" of the Input Constant, you need to bring the output wire into a Frame Sequence (or maybe any other structure).  Crossrulz' example illustrates this -- notice an input constant named "Enum String", while the output is named "Enum Strnig".

 

Here's Bill's example using a Case Structure instead of a Frame, and showing both types out Created Indicators:

Billko from String.png

Interesting.  There are undoubtedly other "features" to be discovered ...

 

Bob Schor

Message 5 of 25
(3,305 Views)

@Bob_Schor wrote:

I'm like Crossrulz -- I knew about wiring Inputs to get specific types of Outputs, but didn't know about naming the constants (though I've used Named Constants in other situations where I've needed to "name a constant" -- I don't remember the exact use now, after the Stupor Bowl).  However, Bill's example is peculiar -- in order to get the Indicator wired to the output of Scan from String to take on the "name" of the Input Constant, you need to bring the output wire into a Frame Sequence (or maybe any other structure).  Crossrulz' example illustrates this -- notice an input constant named "Enum String", while the output is named "Enum Strnig".

 

Here's Bill's example using a Case Structure instead of a Frame, and showing both types out Created Indicators:

Billko from String.png

Interesting.  There are undoubtedly other "features" to be discovered ...

 

Bob Schor


Hmmm, if you create an indicator directly from the output, you get "output 1" as the indicator label, but the wire is named "Test Value 1".  But if the wire goes through a tunnel and you create the indicator from that, the label of the indicator takes the name of the wire...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 6 of 25
(3,300 Views)

@crossrulz wrote:

Since we are having fun with the Scan From String, did you know you can define a Boolean and an Enum with a string or a numeric?


Wow!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 25
(3,298 Views)

This whole topic came about because I saw a recent topic about "Format Into String" and it reminded me of "Scan From String".

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 25
(3,296 Views)

The "Scan from String" (and the converse) enum as a string is something we use extensively in our software. It's a great feature.

Message 9 of 25
(3,278 Views)

Bill,

From Mark Twain, something like: "If a little knowledge is a dangerous thing, who has enough to be out of danger?"

 

This is an interesting topic, BTW.

Message 10 of 25
(3,217 Views)