LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing a program with temp

c8e50f50-cb29-412c-b152-ba31f78bbdad.jpg

b7fb7e06-4dcc-4ec2-981f-ebf11fade3e0.jpg

bfdf5492-1da9-4149-8ba8-7ae67036c52e.jpg

  

9eb1d74d-eb89-4be5-835e-927688f3b3d5.jpg

3b71036d-a393-4ef4-b6d9-7dd68bf61dc9.jpg

38644e5e-c80d-48c5-8f9d-1b1cd472b243.jpg

abdb1152-042e-4a0b-81d7-a626c9a18484.jpg

ddbd4ceb-6999-4f90-8ca3-5d7ab259e6e0.jpg

kangn_0-1732527955349.png

kangn_1-1732527970424.pngkangn_2-1732528007018.png

 

   

0 Kudos
Message 1 of 7
(345 Views)

Is this a test?

Please express your question.

 

Greets, Dave
0 Kudos
Message 2 of 7
(337 Views)

Why are the wires all zig-zaggy?  Don't you care about the quality of your work?

0 Kudos
Message 3 of 7
(299 Views)

@paul_a_cardinale wrote:

Why are the wires all zig-zaggy?  Don't you care about the quality of your work?


It's not just for aesthetics, either.  Wires that are unkempt are hard to follow making debugging difficult.  Maybe a wire runs behind a VI but it looks like it's connected.  And it needs to be connected.  Or it gets lost in a rat's nest of wires and you don't know where it is supposed to go.

 

Spaghetti code is like random indents in a text-based language.  The compiler doesn't care, but if you did this and someone came in looking to kill the person who did this, I'd point to your desk and excuse myself early for lunch so I could have plausible deniability for whatever came next.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(264 Views)

If you want people to look at your code, you need to make it easy.  Do a File > Save For Previous Version... and save it for 2018 (many people use older versions) and then post the VI.

 

No one is going to look at 10 pictures and try to put your logic together.  😉

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 5 of 7
(249 Views)

@billko wrote:

@paul_a_cardinale wrote:

Why are the wires all zig-zaggy?  Don't you care about the quality of your work?


It's not just for aesthetics, either.  Wires that are unkempt are hard to follow making debugging difficult.  Maybe a wire runs behind a VI but it looks like it's connected.  And it needs to be connected.  Or it gets lost in a rat's nest of wires and you don't know where it is supposed to go.

 

Spaghetti code is like random indents in a text-based language.  The compiler doesn't care, but if you did this and someone came in looking to kill the person who did this, I'd point to your desk and excuse myself early for lunch so I could have plausible deniability for whatever came next.


I'm retired now, but I spent a significant percentage (probably more than half) of my time cleaning up the software messes left behind by others (I referred to myself as a software janitor).  So I have little regard for anyone who makes no attempt to do clean work.

0 Kudos
Message 6 of 7
(234 Views)

You did not add any text so we don't even know what your question is. A subject of "writing a program with temp" is not any clearer (%TEMP% folder? Temperature? something else?)

 

Just glancing at the picture, there is a lot of code smell (it reeks!!!!!).

 

  • Event structures trapped inside inner loops and other structures. No!
  • A FOR loop disguised as WHILE loop with a fixed number of iterations known from the start. No!
  • Plenty of terminals without labels. No! No! No!
  • Many control terminal not connected to anything. No!
  • Way too many unnecessary local variables. No!
  • Glaring race conditions (e.g. you write to a local variable of "stop 2" and read from a local variable in parallel. Whatever happens first wins! There is a 50% change that you read stale data. No!
  • Lots of dupliciate code that can be consolidated
  • etc
  • etc.

As has been said, attach your VI (saved for previous, 2020 or below) and explain exactly the requirements and how it is supposed to be used.

0 Kudos
Message 7 of 7
(223 Views)