取消
顯示結果 
搜尋替代 
您的意思是: 

Rube Goldberg Code

I have the gut feeling that this can be simplified significantly 😄

 

 

(seen here)

991 條訊息(共 2,635 條)
12,509 檢視

I may as well start posting the Rubes that I've been fixing along the way.  Imagine spending each day for the past month fixing Rubes and other non-sense.  I'm at the point where I think the enhanced code has Rubes of its own... 😛

 

This one concatenates the bits to create a word which is written to a register.  Hundreds of variations of this one.  There's a few which had these values concatenated to each other by passing the value (output) to param1.  Imagine this sub-vi creating a 16-bit word where is concatenates 2 bits at a time!

 

The top right solution circled in red replaced the rest of the code.

 

 

0 積分
992 條訊息(共 2,635 條)
12,440 檢視

The funny part is that this one is a sub vi where the person goes to the trouble of selecting 1 out of 4 constant strings and converts it into 4 ASCII parts only to recombine into a U8 array.

 

There's an app for that..  It's called "String to Byte Array". 

 

Code is full of things like this.  I could spend my days posting RG's...  Even retire by doing so..  but I'm sure there's better things to do upon retirement than posting RG's.  😉

 

 

 

 

0 積分
993 條訊息(共 2,635 條)
12,431 檢視

@Ray.R wrote:

The funny part is that this one is a sub vi where the person goes to the trouble of selecting 1 out of 4 constant strings and converts it into 4 ASCII parts only to recombine into a U8 array.



Well, the lower part might be 4x faster on a quad CPU, because all four conversions can execute in parallel. 😄 (Just kidding!)

0 積分
994 條訊息(共 2,635 條)
12,422 檢視

I can imagine that one didn't notice that there was allready something for that...   

What I don't understand is why people don't make a vi when they create the same code multiple times.  I allready do that when I would use code twice!

0 積分
995 條訊息(共 2,635 條)
12,414 檢視

Example_VI_BD.png

 

I don't get the thing with the array at all. It could be something left over from a code-n-fix spree.

=====================
LabVIEW 2012


0 積分
996 條訊息(共 2,635 條)
12,338 檢視

@Steve Chandler wrote:

Example_VI_BD.png

 

I don't get the thing with the array at all. It could be something left over from a code-n-fix spree.


I do that sometimes, to make the wire thicker so it can carry more current. You normally see this on longer wire lengths than the one shown. Highy recommnded for the green wires (ground). 

Richard






997 條訊息(共 2,635 條)
12,332 檢視

@broken Arrow wrote:

@Steve Chandler wrote:

Example_VI_BD.png

 

I don't get the thing with the array at all. It could be something left over from a code-n-fix spree.


I do that sometimes, to make the wire thicker so it can carry more current. You normally see this on longer wire lengths than the one shown. Highy recommnded for the green wires (ground). 


 

But don't you run the risk of creating ground loops?

998 條訊息(共 2,635 條)
12,319 檢視

smercurio_fc wrote:

But don't you run the risk of creating ground loops?


Did you even bother to read the manual? Ground Loops are the loops placed toward the bottom of the wiring diagram.
For my next Micro-Nugget, I'll be discussing using multiple Not gates in parallel to boost power in Boolean wires.

 

Richard






999 條訊息(共 2,635 條)
12,314 檢視

To take the average for each column of a 2D array apparently needs a huge scaffold of arrays and complicated integer operations that always result in a plain zero (Top of image). A possible code alternative is shown below it.

 

(seen here

 

 

1000 條訊息(共 2,635 條)
12,306 檢視