ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Make the corrections

Hello guys...

I have some question...1stly, I have created one program about my thesis. So, refer to my vi file that i post here. It have some mistakes in programming it.the mistakes are:
   
    1. the pause button didn't function after i put a local variable in a while loop. I don't know why. Of course that stop button did not work coz i dont have to wire it.

    2. Read measurement file. This program i have copy from the example. But something I don't like it because I want to combine this read file into one program within the other 
        function.

    3. I'm using elapsed time to make sure this program will run from first time to the last time. This elapsed time using seconds to count it. How to convert this function from using 
        seconds to day. Coz I want to key in with date/time format not a seconds.

Actually, there are more mistakes i think. But I think I want to fix this three 1st.Could anyone help me or give me some suggestions how to correct it. thank u very muchSmiley Happy
0 Kudos
Message 1 of 10
(3,976 Views)

First of all, all your tight polling loops need small waits, else the VI uses 100% of the CPU doing absolutely nothing except checking the button millions of times per second. If you put a 10ms wait in these, the CPU use will drop to 0.01% without any change in behavior.

There is no logic in you boolean logic. That "OR FALSE" can be deleted without a change in functionality.

You should not have two different buttons labeled "start". That's confusing!

 

Your pause loop is set to "stop if true", meaning once you press pause, the loop only iterates once. Maybe you want to set the loop condition to "continue if true".

... I'll look at the rest later. I agree that the program should be rewritten from scratch. Too many odd constructs and duplicate code sections. 🙂

Message Edited by altenbach on 10-25-2007 09:03 AM

Message 2 of 10
(3,971 Views)
Hello Altenbach....

Thanks 4 ur reply.Yeah...you're right, seems like the pause button will function after we set the loop condition to "continue if true". How about the outputs of the array.I mean the output [DBL] indicator for V, I n P. how can I convert this values to scalar input.because I want put some numeric such as gauge, meter and etc. n I hope u will give me the solutions for the rest.thank u very much.Smiley Happy
0 Kudos
Message 3 of 10
(3,931 Views)


@TaKiMi wrote:
Thanks 4 ur reply.Yeah...you're right, seems like the pause button will function after we set the loop condition to "continue if true".
Also note that your pause construct is way too complicated. You don't need the case structure. A single loop containing a small wait and the pause terminal (wired to the loop condition) is all you need.

@TaKiMi wrote:
How about the outputs of the array.I mean the output [DBL] indicator for V, I n P. how can I convert this values to scalar input.because I want put some numeric such as gauge, meter and etc. n I hope u will give me the solutions for the rest.thank u very much.Smiley Happy

You cannoy "convert" an array to a scalar, because an array typically has much more information that a scalar can hold. You could just use an "index array" to e.g. get the first element. You could also take for example the mean of the array or the maximum value. It really depends what is most important to the operator.

Message 4 of 10
(3,925 Views)
Another tip is to get rid of the mustard yellow background.  It burns my eyes!Smiley Wink
Message 5 of 10
(3,917 Views)
Oh, I see.so, i do not need to put case structure in while loop instead a single loop containing a small wait and the pause terminal. thanks for ur suggestions. and my stop button.how can i wire it. In the main while loop i put the elapsed time and wired to the loop condition. So, I don't know how to wire it to make this stop button will function.thank u very much.Smiley Happy
0 Kudos
Message 6 of 10
(3,911 Views)
Hi Ravens Fan....

I agree with u.I don't like this yellow for my background.If you don't mind, could you suggest me which one color should I pickSmiley Happy
0 Kudos
Message 7 of 10
(3,910 Views)


Ravens Fan a écrit:
Another tip is to get rid of the mustard yellow background.  It burns my eyes!Smiley Wink




It's not mustard. It's wasabi...
Chilly Charly    (aka CC)
Message 8 of 10
(3,902 Views)
A single Get Date/Time should be enough to define all the signals t0s
No need to convert from Dynamic data to feed the "waveform graph for I". Get the P array directly.

Something strange in the way you store the data : you start accumulating the data in a 2D array, and then extract only the first line ?

I agree with Altenbach. This should be rewritted from scratch.
Chilly Charly    (aka CC)
Message 9 of 10
(3,899 Views)


@TaKiMi wrote:
Hi Ravens Fan....

I agree with u.I don't like this yellow for my background.If you don't mind, could you suggest me which one color should I pickSmiley Happy


I would just use the default grey that you can copy from the background of a new VI.
0 Kudos
Message 10 of 10
(3,894 Views)