LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a VI to run in peroidic way

I've to run a VI for a few second and then sleep( free other process to run ) that for few second and again make it to process continously , how to make this
0 Kudos
Message 1 of 7
(3,268 Views)
Hi 2716jag,

use some delay functions in a proper way?

Or tell us more details to get a more detailed answerSmiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,263 Views)

Hi, after running a sequence of function, Im running one vi as thread (above normal priority) say (thread1.vi). in that thread i ve placed two call library node function, one poll for interrupt from driver, another will read data from the driver buffer after getting the interrupt.

Like thread1.vi  im running another thread2.vi in parallel with thread1.vi doing the same function as thread1, read data  from another driver buffer

Here after running the both vi's i cant able to access the front panel of main vi. and data is not received correctly.

so where i have to give the delay, or give some altenative

0 Kudos
Message 3 of 7
(3,259 Views)

Hi 2716jag,

From what I have read, maybe you want to try using a case structure. You can place your periodic code inside one case and only activate it whenever the loop counters is an integer multiple of some number or if a certain time has elapsed. You could do this by a few different methods: 1. You could use the Elapse Time Express VI or 2. For every 10th iteration, you would divide [i] by 10 using "quotient&remainder" and check if the remainder is zero. Or else, you could include a screenshot with an example and we can try implementing something else. Pictures are worth a 1000 words!

 

 

National Instruments
Applications Engineer
0 Kudos
Message 4 of 7
(3,216 Views)

Hey thnks man,

but, while for loop counting the other function vi will run or not??

because im going for periodic function is to free other proceess. so by doing this that other vi' wil get free??

0 Kudos
Message 5 of 7
(3,200 Views)

Hi 2716jag,

I'm not exactly sure what you are asking? Can you try to elaborate on that a bit more or maybe post an example? Thanks for the help!

Carla

National Instruments
Applications Engineer
0 Kudos
Message 6 of 7
(3,180 Views)

Hi GerdW,

I've used lab VIEW 7.0 only in windows 2000 /xp, so i cant able to tell u which one s good..

 

0 Kudos
Message 7 of 7
(3,163 Views)