ni.com is currently undergoing scheduled maintenance.

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

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rube classic

Just started a new job developing new systems and cleaning up existing systems. 

Came across this beauty in their archives. 

This is but a small snapshot of a much more horrifying display.

The basic premise is this: tester is running four test systems in parallel.

So the LV coder made individual case structures to contain every control on the front panel.

Then put them all in a for loop to update them all in sequence. 

This same process was repeated throughout the entire VI. It is a marvel to behold!

Imagine the (wasted) time and dedication it took this person to create a case structure for every control on the front panel, and populate each one with a local variable!!

Boggles the mind.

 

ruby ruby.png

0 Kudos
Message 1 of 3
(2,886 Views)

Looks like the programmer came from a text-based programming background. Feel free to post this in the Local Variables thread or the Rube Goldberg thread. It's a candidate for either one.

0 Kudos
Message 2 of 3
(2,879 Views)

But even from the old text-based background on initializing everything directly, the multiple case structures don't make sense. Even the text based code would look stupid:

 

for i=0 to 3 do

  // Control1

  case i

     0: control1_1=0

     1: control1_2=0

     2: control1_3=0

     3: control1_4=0

     // don't forget to add another case if there is one more test station

  end

  case i

  //ok, let's initialize the next control....

 

Felix

0 Kudos
Message 3 of 3
(2,867 Views)