From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@thoult wrote:

@tst wrote:

@Ben wrote:

After asking 8 LV developers, 6 of which are CLA's NONE of us knew that.


By now I'm so used to LV's widespread polymorphism with certain types of functions, that I'm usually only surprised when I try something like this and it doesn't work.


This. I also get irrationally annoyed when it's not!


Yep me too. Even some (what I think should be) fairly trivial functions don't let me bung arrays into them (can't recall any off hand though). Makes things nice and messy for me.

0 Kudos
Message 1581 of 2,571
(10,544 Views)

Seen here.

 

0 Kudos
Message 1582 of 2,571
(10,414 Views)

If the array is twice as long as it should be, we would typically use the array subset function.

 

Apparently, there are better ways (if you are paid by the diagram area and raw amount of code). 😄

 

(seen here)

 

 

 

 There are quite a few RG elements. Can you find them all?

 

0 Kudos
Message 1583 of 2,571
(10,355 Views)

@altenbach wrote:

If the array is twice as long as it should be, we would typically use the array subset function.


Actually, that would be a Decimate 1D Array (they ar keeping every other element).


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 1584 of 2,571
(10,350 Views)

Yes, you are possibly right. However, a decimation would be incorrect for the convolution problem at hand. He needs to take the array subset.

 

I thought maybe the wire is actually connected to the IQ terminal (with some wire bends under the node), which could easily be the case judging from the mess of the other wires. 😄

0 Kudos
Message 1585 of 2,571
(10,345 Views)

@altenbach wrote:

Yes, you are possibly right. However, a decimation would be incorrect for the convolution problem at hand. He needs to take the array subset.

 

I thought maybe the wire is actually connected to the IQ terminal (with some wire bends under the node), which could easily be the case judging from the mess of the other wires. 😄


That wouldn't halve the array size (unless N=4) So the thing is both RG Rich and fails to meet requirements (OOPS- That happens with "Richly Obfuscated" code)

  • Case Selector driven by Comparison of an integer 
  • Case could be replaced by Conditional tunnel  (Pick one of the above)
  • Loop Unnecessary (Q&R handels arrays just fine and there are so many ways to generate a array if incrementing I32s)
  • Q&R Unnecessary- Base Condition on i++<= N/2
  • Whole darn thing unnecessary- There is an array primitive for that

How did I do?

 

Edit - I nearly did the "coffee forcefully expelled to monitor" thing when I read your response "You probably should have had a coffee and waited for the second thing"Smiley LOL


"Should be" isn't "Is" -Jay
0 Kudos
Message 1586 of 2,571
(10,253 Views)

Saw this one today.

I suppose it's possible the author could be forgiven since this was originally written in 1999. That's before my time - does anyone know if the Delete From Array primitive did not exist by that time?

 

 Delete From Array.png

 

0 Kudos
Message 1587 of 2,571
(10,164 Views)

I am pretty sure that "insert into array" and "delete from array" are relatively late addition to the array palette. (The matrix things are even newer.)

 

Edit: Yes, I was right. Just checked my LabVIEW 4.0 installation and it does not have the insert/delete function in the array palette.

0 Kudos
Message 1588 of 2,571
(10,156 Views)

@altenbach wrote:

Edit: Yes, I was right. Just checked my LabVIEW 4.0 installation and it does not have the insert/delete function in the array palette.



You have a LabVIEW 4 installation?! o.O

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1589 of 2,571
(10,105 Views)

@Yamaeda wrote:

@altenbach wrote:

Edit: Yes, I was right. Just checked my LabVIEW 4.0 installation and it does not have the insert/delete function in the array palette.



You have a LabVIEW 4 installation?! o.O

/Y


Don't look so surprised.  He also has a copy of LabVIEW 3.


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 1590 of 2,571
(10,089 Views)