09-05-2008 12:47 AM
Hi all,
Now, I have to do a project which is using tha LabVIEW to monitoring power failure. That project is a system which can detect the faulty power point during the unstable voltage occurred. Therefore, the parameters of voltage, current, power, and indicator for faulty power point can be display on the screen of PC for monitoring purpose, and all power points also can be controlled through the front panel. But, the problem is when I was clicked on "POWER" button of the front panel to turn off the system, it will be made my whole house electricity was tripped. Here attach my designed vi,..
Need you advise here for this problem...
Appreciate you help!
Thank you,
al![]()
n.....
09-05-2008 02:43 AM - edited 09-05-2008 02:45 AM
UUps looks like your first LV program ![]()
Make yourself familiar with the most basic part of LabVIEW: Dataflow
Easily be seen when you hit the highlight (lightbulb) button and run your program.
Your power button will be read once at beginning and never again...
Its not a good idea to run your program with the RUN CONTINUOUSLY button, instead make yourself familiar with the while loop.
HINT: only controls and indicators inside the loop will be updated while the loop is running.
You don't need a loop (while or for) if you always will run it once
Sorry, for not having the time to teach you more
09-05-2008 08:35 AM - edited 09-05-2008 08:38 AM
There's also way too much duplication of code - buttons with the same name that do the same thing, duplicate DAQmx operations, etc. Your problem description is also a little vague.
p.s. You've got the Certified LabVIEW Developer logo. Is that legitimate? I'm sorry but that program does not look like something a CLD would write.
09-05-2008 09:03 AM - edited 09-05-2008 09:03 AM
I like this bit (which occurs in two places):
Hmm... If the output of the NOR is False, put it into a case structure to spit out a False. If the output of the NOR is True, put it into a case structure to spit out a True. 
09-05-2008 09:27 AM
aloon wrote:
it will be made my whole house electricity was tripped.
Awkward English, but what does that mean exactly? Did you trip a circuit breaker?
09-05-2008 10:43 AM
Yes, please carefully read all the above hits, they will help you become familiar with better programming practices. REALLY! 😄
One thing I don't understand is your use of the formula node. You place all statements on a single line and then resize the formula node so most of the code is hidden, creating obfuscated code. For example your second statement is D=(C*0.8996)*26.667;", which does not sound right, else you could just multiply with a single number (D=23.9896*C). Shouldn't it be D=(C-0.8996)*26.667;" for symmetry with the first statement?
(see also this related post)