LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delay

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 ^^
0 Kudos
Message 1 of 20
(3,047 Views)

Hi Jeff,

 

I am not exactly sure what you mean, but I think what you have are codes that are on the same thread as the delay and you want those codes to run while the delay is running? 

 

If you want other code to run, while a delay subvi is being executed, that other code must be in parallel of the delay. 

 

Yik

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

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 2 of 20
(3,044 Views)

Yik is correct. 

 

Your code needs to be architectured in such a way that the code with the delay runs in one thread, whereas the rest of the code is in one or more "other" threads.  This is done quite simply in LabVIEW.  Having two While Loops in parallel is an example.  Having two threads within the same loop will cause both threads to experience the delay due to the dataflow nature of LabVIEW.

0 Kudos
Message 3 of 20
(3,027 Views)

sry guys, may be i am new user of Labview so i really not understand about that. my system is like that. a have a fish feeder machine. when i set the position in the system. the feeder machine will launch, when the sensor detected the feeder machine, the feeder machine will stop and open the gate to feeding the fish. the gate will be close back in 5 second. then the machine continue to another position.now i face the problem in delay system. when the delay code put in the block diagram, whole block diagram will delay in process. do you have any idea to make the delay code stand alone in the block diagram? or do you anything similar ecample canshare with me?thank you Yik and Ray^^

0 Kudos
Message 4 of 20
(3,003 Views)

Like this?

 

 

 

Regards
Guru (CLA)
0 Kudos
Message 5 of 20
(2,993 Views)
dun know yet , but i will try thank you
0 Kudos
Message 6 of 20
(2,985 Views)

I still cannot i had draw a ecample in the picture, there have 2 different part , A and B and a delay Added in the Part A. then what should i do to make the part B is undisturb by part A. what code or function i should add? can teach me please^^

0 Kudos
Message 7 of 20
(2,964 Views)

Hi Jeff,

 

Replace the box that you were for part a and b with while loops.  Remember to put a time delay in the loops, so that the loops are not looping too quickly.

 

Yik

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

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 8 of 20
(2,942 Views)

if i make a while loop in the part A but i another make a link from the switch in part B to connect the output RED in part A. issit the part B RED also will effected by the delay ? issit got method to solve it?

0 Kudos
Message 9 of 20
(2,934 Views)

Post a VI so we can understand what you are describing .

 

Better yet, create the VI and try running it yourself and figure out how it is working.  Turn on highlight execution to slow it down and watch it work.

0 Kudos
Message 10 of 20
(2,931 Views)