LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delay

like that, when the sensor detected the motor will be run. after 5 sec the true constant will off giging the signal and off the motor. issit have any method to solve it? thank you very much .
0 Kudos
Message 11 of 20
(1,947 Views)

Do you know your while loop will run either exactly once (if the sensor boolean is False) or run forever (if the sneosr boolean is True).  The while loop is controlled by the value of that boolean which is read before the loop starts.  Once the loop starts, that tunnel will have that value constantly reusing it.  Even if you change the sensor boolean, it won't be detected because your code will be stuck in the while loop.

 

It is a basic data flow probelm.  I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

I don't know what "giging" or "issit" mean.

0 Kudos
Message 12 of 20
(1,945 Views)

Do you have any idea or example can share with me? thank you

0 Kudos
Message 13 of 20
(1,932 Views)

Not sure what you want to accomplish, but the example below will accomplish what you were trying to do.  Why the Exclusive OR?  Is the TRUE a constant as in your code?  Or is it a boolean variable, where you actually need eclusive OR?

 

 

Message Edited by Ray.R on 03-12-2010 07:44 AM
0 Kudos
Message 14 of 20
(1,926 Views)

Hi,

 

I am still not 100% sure what you want, but I made a few assumption and made the attached state machine for you. 

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 15 of 20
(1,915 Views)

jeff7095 wrote:
i am the new user off Labview. i wanna using delay to control gate of the feeder machine in 3 second. but  when the delay function block i put it the whole system are delayed. have ppl know how to create a delay just a sub part of the program delayed and not affected the whole program. please help me, thank you ^^

 

 

What I believe he is doing (haven't looked at any code) is using a wait to control when stuff happens. The problem is, that delay's your while loop. Even if it is in a parallel loop, if you hit stop and it is waiting it takes x amount of milliseconds to read the quit value has changed.

 

My prefered method...

 Use a timer wired to a case structure. That way your loop keeps spinning, but when the timer expires (say, for your case every 3 seconds, it will execute the "stuff" in the true case.

 

 

Where my code has "data taking interval, you would just wire up a 3.

 

Message Edited by for(imstuck) on 03-12-2010 01:52 PM
Download All
0 Kudos
Message 16 of 20
(1,907 Views)
what in gods name are my error terminals doing there?!?!?! Smiley Surprised Who did that?!
0 Kudos
Message 17 of 20
(1,901 Views)
I guess the error terminals felt like taking a walk 🙂
------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 18 of 20
(1,884 Views)
thank you your guy help me. trouble in FInal year project. Anywere thankyou very much.
0 Kudos
Message 19 of 20
(1,858 Views)

for(imstuck) wrote:
what in gods name are my error terminals doing there?!?!?! Smiley Surprised Who did that?!

 

I was going to reply to that post, but since your a nice guy I figured I'd let you get away with it.  😄

 

should that be called "error abuse"?  LOL!

 

At least you didn't place Locals in there..

 

 

<< you're forgiven >>

 

😉

0 Kudos
Message 20 of 20
(1,844 Views)