BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Yet another real-world RG machine.

 

 http://www.youtube.com/watch?v=qybUFnY7Y8w


 

Message 631 of 2,635
(12,022 Views)

Link: http://forums.ni.com/ni/board/message?board.id=170&message.id=480910

 

 

Complicated way to get the boolean to light up if the ring control selection is not zero.

 

The recommended approach is shown at the top.

 

Message Edited by Ray.R on 03-09-2010 10:50 AM
Message 632 of 2,635
(11,957 Views)
Though as noted in the linked thread, there were two parts to the OR test, and the simplification only handles one part. An updated formula node-less version was posted by Ray.
0 Kudos
Message 633 of 2,635
(11,934 Views)

Hmm... how could I get the program to wait for 2 seconds to display a message to the user? (Actually found in a very helpful thread about externally posting User Events to LV)

 

Not terribly Rubish, but I just would have never thought to do it this way....

 

Wait2Sec.png

Message 634 of 2,635
(11,905 Views)
At least it's very scalable. 😉

___________________
Try to take over the world!
0 Kudos
Message 635 of 2,635
(11,894 Views)

376025a5-69a5-4f6a-bcfa-0b7ed1ddd935.jpg 

Hard way!
Ofcourse 2 frames are almost identical and i especially like the 1 step sequence.
b998cfd9-64d5-46d1-b445-c947ce249175.jpg

Message Edited by Yamaeda on 03-10-2010 11:01 PM
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 636 of 2,635
(11,854 Views)

Interesting way to get the time as DBL:

 

 

 

"Format it as complicated string, then scan if from string with the same format"

 

A simple "toDBL" would do the same exact thing!

 

Also notice that this entire construct is duplicated in the other case of the case structure. All that needs to be in the case structure are the two indicators.

 

(A better way would be to keep two two values in a globally initialized feedback node containing an array of two elements. Convert the boolean to 0,1 and replace the appropriate element. 😉 No indicators, locals, or sequence structures needed!

 

(spotted here, hey it's even the accepted answer! :D) 

Message Edited by altenbach on 03-10-2010 05:37 PM
Message 637 of 2,635
(11,834 Views)

altenbach wrote:

"Format it as complicated string, then scan if from string with the same format"

(spotted here, hey it's even the accepted answer! :D)


You shouldn't be making fun of this guy - his question was clearly misunderstood, which is why the posted code is so obfuscated. He clearly wanted a "tacometer". Attachment should point the original poster in the right direction:

 

Tacometer.png

Message 638 of 2,635
(11,818 Views)

Not sure what the intent of the code is or why the TRUE constant boolean.  There's no need for the Exclusive OR when using a TRUE constant.

Let's not mention the fact that the loop may run once or forever depending on the initial value for sensor.  I never use Exprwess VI's, but I'm sure some delay value should be wired to the input.

 

 

 

 

Simplified version:

 

 

 

Found here http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=482027#M482027

Message Edited by Ray.R on 03-12-2010 07:52 AM
0 Kudos
Message 639 of 2,635
(11,749 Views)

Ray.R wrote:

 I never use Express VI's, but I'm sure some delay value should be wired to the input.

 


Actually, the delay is configured by the popup Express dialog box.  In this case, it was set for 4 seconds, which can be seen through context help, or reopening the configuration dialog.

0 Kudos
Message 640 of 2,635
(11,731 Views)