07-24-2007 04:24 PM
I was also an EE type.
When I was troubleshooting mainframes, I could have used at least two approaches.
1) Start at the switches on the FP and check every signal on every chip as the signal progressed
or
2) Check the signal at the half way point and decide if the isseu was before or after were I was looking.
Sub-VI's are to LV as ckt borads or chips are to an electronic systems.
I would be hard pressed to design a system using only discrete components on a giant proto-board.
Rather I would use of the shelf boards and chips adding only the discrete devices I had to use.
When you create a sub-VI you are creating virtual chips that can be used again and again.
If I was torubleshooting and suspect a bad chip, I could put that chip in a tester and verifiy its operation. Similarly with sub-VI's. There FP's serve as built in testers.
Still trying to help,
Ben
07-24-2007 04:36 PM
07-24-2007 05:08 PM - edited 07-24-2007 05:08 PM
Hosehead wrote:Notice the white box in the upper left corner is the size of my screen, making the total block diagram about 10 screens wide and 6 screens tall.
Abrakadabra!!!
Well, I agree that you made 98.3% (1 - 1/60) of the wires disappear (to an offscreen location beyond the window border), but I don't think that's what the original poster had in mind. :o:D
Seriously: You already got quite a few stellar* (see footnote) comments, so I won't bother repeating. Please read them carefully. They are true!
At any given time, you see less than 2% of your diagram! Talk about tunnel vision! Lets say you're looking for some detail and your pattern recognition is so good that you need to glance at a screenful of code for only 10 seconds to fully comprehend it. It will take you 10 minutes just to go over your diagram. Looks like you need to work through lunch hour again... 😉
Be very aware that most larger organizations have very strict coding guidelines and monster diagrams such as your's would be junked unseen. This is not maintainable code.
Now I am curious about the front panel....
For some distraction, have a look at our collection of labview proverbs. One that might apply here is the following:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If your LabVIEW problem can be solved by getting a bigger monitor, the problem is elsewhere.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Message Edited by altenbach on 07-24-2007 03:12 PM
07-24-2007 05:18 PM
Just when you thought it was safe to go back into the water...
@altenbach wrote:
Now I am curious about the front panel....
07-24-2007 05:36 PM
I pretty much suspected as much, though those snippets are taken out of context. The tone behind the programming class question was borne out of incredulity at the actual code and the apparent fact that this type of programming is actually accepted at their place of work rather than asking a question intended to belittle or insult. There was actually no tone implied or present in my final statement. I was making a factual statement and, unfortunately, the truth is sometimes difficult to state in "nice" terms.
Whoever rated you probably objected more to the tone of voice in: "you would never get a job", "did you ever take a programming class".
07-24-2007 07:02 PM
Wow, a lot of new messages in 4 hrs.
I believe the original problem was, "My program has grown pretty big and now there are wires everywere." I can see the consensus (and expert) opinion is use Sub-VIs. Good to know. And this was pretty much said before I posted as well, which is why I put a (1-star) alternative.
You've all figured out that I'm not a programmer and don't have an EE (and couldn't get a job doing such). As mikeporter says, "the real key is to put the same level of professional effort into it that you would when performing your primary responsibilities (a.k.a. "your real job"). It's this level of care that separates software engineering from hacking."
So I guess my post is for the hackers out there. Those who don't use LabVIEW on a daily or even weekly basis, but use it once in a while to do some specific task, do it well (not the programming but the end result), and that's it. The great thing about LabVIEW is you don't need to be a programmer or have an EE degree to use it - after all they even let people like me use it! People who don't give a darn about being a programmer but just need to log data from a thermocouple or (insert your own task here), and do it yesterday. People who don't have time to become software engineers on the side, or even to learn how to use Sub-VIs with enough confidence that they won't cause your program to hang or crash. People who use LabVIEW as (gasp!) just another tool to get the job done.
I applaud all of you for trying to instill proper programming practices in me (and others reading this). Just don't forget that sometimes it's like answering the question, "How do I drive to work?" with a lecture on proper driving habits, when all they really want is the directions.
P.S.: smercurio - I don't mind if you did give me 1-star. As far as proper programming goes, I submit to the experts willingly, plus it's not like I'm using them anyway . And I did not rate you or anyone else here - it's not my place!
07-25-2007 10:49 AM
07-25-2007 12:54 PM
What happens if you get an accident tomorrow or leave the jobI have to make sure my code is clean and documented, I doubt your code will be that.
07-25-2007 01:06 PM
07-25-2007 01:17 PM
falkpl wrote;
Close your eyes click your heals and say "theres no place like C, theres no place like C ..." Presto the wires are gone.
"OUT OUT you demons of stupidity!" (Dogbert).
Sorry, I could not resist.
Ben