Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

[Useless Code Corner] Wires Length

Ever wondered how long your code really is? Ever wanted to know, how many wires have you actually laid? Would all the wires from your project allow you to finally escape your office through the window if you'd tie them together?

Here's a tool that let you answer all those questions, asked by generations of LabVIEW programmers!

Enjoy!

Instructions: unzip attached archive. Inside you'll find two versions of the project:

  • WireLength_2012 is original and tested project, I recommend using this one
  • WireLength_2009 is project saved to LV2009. I've slightly adjusted GUI (no silver palete in LV2009 ;( ) and haven't tested it (but I think it'll work just fine)

Pick your version and run _Main.vi, then follow the instructions. Enjoy!

Comments
Matt_McLaughlin
NI Employee (retired)
on

PiDi, this is fantastic! I ran it on your WireLength project itself, which comes to...2.68 meters of wires!

I guess I'll have to start using lots of local variables and overlapping block diagram items to keep my wire score down.

Matt
NI Community Team
National Instruments
PiDi
Active Participant
Active Participant
on

Thanks, Matt!

My record project so far is ~260 meters long, but I'm sure I can do much better And using local variables is like using electric arc to pass the signal through electronic circuit

Luis_AM3C
Active Participant
Active Participant
on

Can you save for previous version? I have LabVIEW 2009, thanks.

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
PiDi
Active Participant
Active Participant
on

I've updated the attachment - now it contains both LV2012 and LV2009 versions

Luis_AM3C
Active Participant
Active Participant
on

LV2009:Inside CalculateVIWiresLength.vi cannt found "Traverse for GObjects.vi"

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
banshouren4077
Member
Member
on

1m=100cm, not 1000cm.

PiDi
Active Participant
Active Participant
on

Yes, banshouren, but lets call it a feature, not a bug This is purely spelling mistake. The pixel/cm ratio is also not as I initially intended. However, many people have already downloaded it and tried. Therefore I decided to left those two things, so we all have the same scale to compare our codes

g_l_u_p
Member
Member
on

Cool! I have 36.72m of wire!!!!

mtedaldi
Member
Member
on

Cool. My newest project has 26m of wires...

And maybe I overdid it a bit when I put your program on a quite big project. It's now running for 20minutes just loading (not calculating) and consumes more than 1.3GB of memory.

Now I'm really wondering if it will crash or spit out an awesome result

--
Marco Tedaldi, University of Zurich, CLAD
Contributors