BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@.aCe. wrote:

Horror!

Found here: http://forums.ni.com/t5/LabVIEW/Running-LED-in-FPGA/m-p/2332192#M730755


The snippet is a bit misleading, because it turned all local variables into generic property nodes with references. Still, the original VI seems to do all integer calcuations in floating point (DBL!). All terminals disconnected and all using local variables. (e.g. A1 is read from 21 different local varaibles in the first frame)

0 Kudos
Message 1271 of 2,635
(11,410 Views)

Looks like a microprocessor schematic from a distance.

0 Kudos
Message 1272 of 2,635
(11,379 Views)

It should also make the Local abuse thread..    A candidate to post an idea on how to improve Locals by making them 3D (or something foolish)

0 Kudos
Message 1273 of 2,635
(11,352 Views)

View Locals as Icons Smiley Very Happy


"Should be" isn't "Is" -Jay
Message 1274 of 2,635
(11,341 Views)

ROFL!!

0 Kudos
Message 1275 of 2,635
(11,338 Views)

@JÞB wrote:

View Locals as Icons Smiley Very Happy


I had already considered posting that Idea exchange thread around the 1st of next month (Apr 1st).  I then thought Oh, C@#p! What if it gets a bazillion kudos?  Could I deal with my forum alias being "Credited" with that new feature?  

 

Locals are not evil- but, they do cause a few problems when miss used!  I recall my Greek authors.  I believe Aesop's tortoise was snorting opiates, The hare might have been dropping 'Ludes.  A classic "Race Condition!" 


"Should be" isn't "Is" -Jay
Message 1276 of 2,635
(11,351 Views)

Seen over here. Although, I made the assumption it was one long, \n delimited string, but I think it was actually separate strings just multiple examples for us to work with. A plain old scan from string works if it is separate strings.

 

 

 

 

 

Message 1277 of 2,635
(11,347 Views)

On FPGA you could make a case structure with a constant in 17 cases, or you could use scale by a power of 2. Good thing it wasn't a 64 bit number....

 

I should add, I guess I could have a constant array and index it, because the "i" is actually an input in the real code, with no for loop.

 

 

 

 

 

 

0 Kudos
Message 1278 of 2,635
(11,208 Views)

@for(imstuck) wrote:

On FPGA you could make a case structure with a constant in 17 cases, or you could use scale by a power of 2. Good thing it wasn't a 64 bit number....

 

I'm curious if there's another way to get a 0 as the first element without using the select (and without a build array after the loop). Any takers?

 


What's the point of your code? Since all inputs are constant, you might as well create a lookup table and use no code at all. (most likely that's what the compiler does anyway ;))

0 Kudos
Message 1279 of 2,635
(11,198 Views)

Something like this?

 

challenge.png

0 Kudos
Message 1280 of 2,635
(11,197 Views)