BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


wiebe@CARYA wrote:

Probably a Monday morning ( 🌴😑 :palmface:) issue, but honestly I never use the output configuration.


It can be important for Boolean array to number. It defaults to a U32 output but at least the help documentation mentions that you can change the output type through that property window.

0 Kudos
Message 2621 of 2,625
(251 Views)

@Jacobson wrote:
It can be important for Boolean array to number. It defaults to a U32 output but at least the help documentation mentions that you can change the output type through that property window.

If you decide to configure the output, another complication is however the hard to find "sign extension mode" which is ONLY available in the right-click menu, but completely absent from the properties page (where it belongs!!!!!!!!). It defaults to "If output is signed" so if you e.g. convert a short array (e.g. T, F, T), you end up with a I32 of "-3"

So of you think you need an I32 output because you want to wire it to an array index without coercion dot, you will NOT get any existing array element unless you change the sign extension mode first

 

This actually belongs in this thread and I will also post i there. Don't forget to vote for this idea!

Message 2622 of 2,625
(230 Views)

wiebe@CARYA wrote:

@altenbach wrote:

Somebody just kudoed this old post here and it is probably important to mention that this method is only fully safe for integer arrays. For example if the input is DBL and contains NaN, they would remain NaN and could cause unexpected results downstream.


wiebeCARYA_0-1744635505327.png

This returns 0 regardless the input or numeric type.

 

Not sure what it does to performance. *0 might be slower that initialize array too though. Who knows without testing...

 

You'll loose the ability to inline the VI, for undisclosed reasons (probably "no priority").


24 years ago (when I first saw LabVIEW) my first two questions were:

  • How do I initialize an array?
  • Where does the semicolon go?

I might have learned some things. 😀


"Should be" isn't "Is" -Jay
0 Kudos
Message 2623 of 2,625
(161 Views)

wiebe@CARYA wrote:

@altenbach wrote:

 


I always forget about that output configuration...

 

You could argue that a To Unsigned Byte integer is clearer, but actually I don't even know how to get the output configuration working 🙄...

wiebeCARYA_0-1747646443459.png

The output stays a double or breaks the wire when connected to a Join Number:

wiebeCARYA_1-1747646636923.png

 

Probably a Monday morning ( 🌴😑 :palmface:) issue, but honestly I never use the output configuration.


I forgot about that output configuration ONCE!  "ALWAYS " seems like an excessive number of times to make the same mistake 😕


"Should be" isn't "Is" -Jay
0 Kudos
Message 2624 of 2,625
(155 Views)

@JÞB wrote:

wiebe@CARYA wrote:

@altenbach wrote:

 


I always forget about that output configuration...

 

You could argue that a To Unsigned Byte integer is clearer, but actually I don't even know how to get the output configuration working 🙄...

wiebeCARYA_0-1747646443459.png

The output stays a double or breaks the wire when connected to a Join Number:

wiebeCARYA_1-1747646636923.png

 

Probably a Monday morning ( 🌴😑 :palmface:) issue, but honestly I never use the output configuration.


I forgot about that output configuration ONCE!  "ALWAYS " seems like an excessive number of times to make the same mistake 😕


In my defense, outside the forum, I've only seen this being used a few times over the past decades.

0 Kudos
Message 2625 of 2,625
(110 Views)