BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Maybe there needs to be another thread called "code only a mother...original developer... could love...understand"   Joe's post 268 could certainly fit into that category even if it's not meeting the Rube Goldberg criteria.Smiley Happy
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 271 of 2,635
(13,557 Views)
Thanks Steve.. 

Today's been one of those days... A BAD-POST day for me..   sigh 😞
 
3 months no coffee..  WHat a switch from the daily dose of Espresso...   😮
0 Kudos
Message 272 of 2,635
(13,524 Views)
3 months no coffee, no wonder you lost half of your eye sight. Smiley Very Happy

The mentioned code isn't bad, the programmer is just relucting in removing long executing code in a event structure.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 273 of 2,635
(13,488 Views)
Misquoting Salieri: "Too many loops!"
 
 
 
All better, same result:
 
 
 
0 Kudos
Message 274 of 2,635
(13,386 Views)
 
Whew, that's bad!
 
(1) Here's a small section of the diagram, see the navigation window for an overview.
 
 
Some other nuggets found:
 
(2) Let's index out of an empty array to get an empty scalar perhaps???? What!!!????
 
 
 
 
(3) Use some backwards wires, unneeded locals (Race conditions!: There is no wat to guarantee that the local is read before the terminal is written).
 
 


Message Edited by altenbach on 06-12-2008 10:56 PM
Download All
0 Kudos
Message 275 of 2,635
(13,325 Views)
Continued from previous post:
 
Use "delete from array" to get an array slice as 2D array, take a 2D subset, transpose, and get a slice. .... 😮
 


Message Edited by altenbach on 06-12-2008 10:59 PM
Message 276 of 2,635
(13,376 Views)
 
 
We need to typecast a string to a U32 array. The hard part seems to get "something" for the type input....
 
Simple! Just convert the U32 array output to a digital waveform, then, via a feedback node convert the digital waveform back to a U32 array and use that for the type input of typecast. 😄
 


Message Edited by altenbach on 06-19-2008 09:14 AM
Message 277 of 2,635
(13,263 Views)
A simper way to convert a string delimited by commas into an array..

For some reason, it appears that a 2D array was desired???  Hummm...  not sure...

Message Edited by JoeLabView on 06-19-2008 09:44 PM
Message 278 of 2,635
(13,232 Views)
Sometimes even the experienced among us somehow get stuck into generating Rube Goldberg code in a momentary lapse of thinking:



from http://forums.ni.com/ni/board/message?board.id=170&thread.id=333631


Message 279 of 2,635
(13,179 Views)
LOL!  Good catch smercurio.
 
If interested, here is the final example for the R-G code above..  The one with the While Loop... 
 
0 Kudos
Message 280 of 2,635
(13,174 Views)