BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Creating a marker values color ramp for an intensity graph apparently requires:

 

A stacked sequence with 4 frames.

 

  • In the first frame, we define the variables and place all terminal disconnected inside it.
  • In the second frame we ensure that Max>Min, requiring a case structure, a temporary "variable" and a three frame flat sequence (picture 1)
  • In the third frame we calculate several intermediary variables
  • In the last frame, we create the ramp, e.g. converting a DBL to U32 that then gets immediately coerced 3x to U8 (picture 2)
  • (The problem is that the result is incorrect, for example the max never appears in the output.)

 

 

Picture 1

altenbach_0-1747419845502.png

 

 

Picture 2

altenbach_1-1747419970140.png

 

 

I think this does it better:

 

altenbach_0-1747418905161.png

 

0 Kudos
Message 2611 of 2,635
(1,380 Views)

@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.

Message 2612 of 2,635
(1,336 Views)

wiebe@CARYA  a écrit :

@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.


Talking about a palmface: I am just discovering about the output configuration 😅

Would be nice to have it as a Right Click menu instead of full properties menu only.

 

0 Kudos
Message 2613 of 2,635
(1,328 Views)

wiebe@CARYA wrote:

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.


Works great here!

 

altenbach_1-1747665051969.png

 

 

 

Still, the output configurations is missing for some important function (LabVIEW 2020), for example I really would like to have it for:

 

  • Boolean to (0,1): (Locked at I16, but sometimes I want U8 (half the memory for large arrays!) and sometimes I want I32 (e.g. when summing for counting TRUEs in an array and the number might exceed the I16 range). (Yes, there are better way to count trues, of course!)
  • Round to +/-Inf or round to nearest: Here the result is a guaranteed integer, so why is the output orange and why cant we tell it what integer flavor we want???
  • probably some others...

 

0 Kudos
Message 2614 of 2,635
(1,307 Views)

@altenbach wrote:

Still, the output configurations is missing for some important function (LabVIEW 2020), for example I really would like to have it for:

 

  • Boolean to (0,1): (Locked at I16, but sometimes I want U8 (half the memory for large arrays!) and sometimes I want I32 (e.g. when summing for counting TRUEs in an array and the number might exceed the I16 range). (Yes, there are better way to count trues, of course!)
  • Round to +/-Inf or round to nearest: Here the result is a guaranteed integer, so why is the output orange and why cant we tell it what integer flavor we want???

While I agree about the Boolean to [0.1] function (I16 is a remainder of pre LabVIEW 5.0 times when LabVIEW Booleans were under the hood an I16) I'm not exactly sure I would want to support integer type for the Round nodes. First there is no number in any of the Integer types that represents +-Inf. Second a large part of the possible non-fractional floating point values is NOT exactly representable by an Integer value, even if you use an I64. It's not infinite because the total number of representable numbers in a floating point value is also not infinite, but the number of exactly representable rounded numbers as any integer is a lot smaller than the number of such numbers that would further have to be coerced to fit in the configured integer range.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2615 of 2,635
(1,291 Views)

I agree with the limitations, but you can make the same argument for any other operation that currently allows output configuration (add, multiply, etc). It should just blindly act the same as if wiring an explicit "toInteger" right after it. (But yes, just wiring a conversion is probably often fewer clicks than configuring the output 😄 )

0 Kudos
Message 2616 of 2,635
(1,282 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 🙄...

 

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.


The output config only says _that_ it's changed, but no info of what it actually is. Sure you can hover over the wire, but it's not directly visible. Still it'd be nice to have a Output configuration in the r-click menu just like the Representation on Numerics, maybe something for the Idea exchance or a r-click menu?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2617 of 2,635
(1,147 Views)

Look ma, I finally found all the "variables"!!! 😮

 

(Seen here)

 

Look at the navigation windows for the scale of it all. Yes, the main code only contains local variables (for write) and value properties (for read). Not sure why there are two sequence frames. 😄

 

altenbach_0-1749838828429.png

 

0 Kudos
Message 2618 of 2,635
(880 Views)

" Not sure why there are two sequence frames"

I expected 2 more frames, 1 for each datatype so the variables are organized!

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2619 of 2,635
(777 Views)

Parsing three U8 bytes into two U16 integers apparently requires lots and lots of pink!

 

Seen here

 

altenbach_0-1750873545125.png

 

Yes, the gigantic disorganize programs has plenty more lumps of coal everywhere....

0 Kudos
Message 2620 of 2,635
(707 Views)