LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change bit in U32 depending on state

Hmm, just seen that i already stumbled about the issue in the past (LV 8.5 times). This is what i done back there, which is more "flat":

 

Set Bit in U32.PNG

 

Norbert

 

EDIT: This is btw what Rolf describes in his post. At least this is what i understood from it 😉

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 11 of 13
(703 Views)

@Norbert_B wrote:

Hmm, just seen that i already stumbled about the issue in the past (LV 8.5 times). This is what i done back there, which is more "flat":

 

Set Bit in U32.PNG

 

Norbert

 

EDIT: This is btw what Rolf describes in his post. At least this is what i understood from it 😉


It's exactly what I described, except that I usually wouldn't use the Select node but rather a case structure instead. The Select node has a better visibility of both code paths while the case structure has a small runtime performance gain, but it's definitely not a gain that should be overestimated unless you call this code a few million times in a tight loop.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 12 of 13
(691 Views)

@rolfk wrote:
[...] The Select node has a better visibility of both code paths while the case structure has a small runtime performance gain, but it's definitely not a gain that should be overestimated unless you call this code a few million times in a tight loop.

True, but i wasn't aware of that back in those days 😉

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 13 of 13
(680 Views)