ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

I really hoped never to see my own code in this thread, but after spending 1 1/2 hours yesterday (I was tired) trying to work out how to convert a Hex string into a boolean array, I came up with this. My boss couldn't think of anything better (he was busy, but really thats no excuse considering this code), and when I came in this morning and was about to search the forum for a more efficient way of doing it, I realised what a bad Rube I had made and how simple the solution really is.

 

(What is worse I now have to send corrected code to a customer as I found an error in my Rube that doesn't occur in the simple one).

 

Laugh:

 

Rube-Hex-bin_array.PNG

 

 

I thought it was so funny I had to post it. Smiley Very Happy 

 

James

 

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 681 of 2,635
(14,812 Views)

James W wrote:

when I came in this morning and was about to search the forum for a more efficient way of doing it, I realised what a bad Rube I had made and how simple the solution really is.

 


Thus proving what just taking a break from work can do. Next time you are stuck, just sit their and do nothing. Then, when your boss asks what you are doing you can say "im efficiently solving a problem"

Message 682 of 2,635
(14,785 Views)

the.JPG

 

 

 

Seen here

Message 683 of 2,635
(14,743 Views)

I'll call this one, Darin to the rescue. He uses the distributive property (I think thats like a 6th grade thing) to his advantage in summing all elements multiplied by the same number first, before multiplying. Seems that slipped my mind...Smiley Mad

 

Message Edited by for(imstuck) on 05-26-2010 03:26 PM
Message Edited by for(imstuck) on 05-26-2010 03:29 PM
Message 684 of 2,635
(14,582 Views)

Not sure this is necessarily better, it has a few ugly coercion dots, but here's another alternative way to do that calculation using the LabVIEW matrix functions:

Distributive.png

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 685 of 2,635
(14,542 Views)

Thoric wrote:

Not sure this is necessarily better, it has a few ugly coercion dots, but here's another alternative way to do that calculation using the LabVIEW matrix functions:

Distributive.png


 

OH, i like this one too.
0 Kudos
Message 686 of 2,635
(14,472 Views)

Ouch!

 

As you would have guessed, all terminals are in frame #1. The rest is just locals! 

 

(This is just a tiny part of the entire code!) 

 

 

 

(seen here

Message Edited by altenbach on 06-08-2010 10:14 AM
Message 687 of 2,635
(14,318 Views)

AAAIIEEEEE!!!

 

After seeing JDlabview's orange front panel and then seeing this,  my eyes are on FIRE Smiley Surprised

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 688 of 2,635
(14,301 Views)
dataflow boycott!
Message 689 of 2,635
(14,297 Views)

for(imstuck) wrote:
dataflow boycott!

 

I decided to right click and change the stacked sequence to a flat sequence.  Then I ran diagram cleanup.  BD clean up boycotted as well.  After about a 20 second pause, LV crashed having "encountered a serious problem and needs to close."

Message 690 of 2,635
(14,287 Views)