Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Issues with multi-tasking (http://www.chiefdelphi.com/forums/showthread.php?t=133772)

Zephex 31-01-2015 13:49

Issues with multi-tasking
 



Alright, so as you guys can see in the pictures above I'm reading the values from X2 and Y2 and putting them into the motor, and I'm also using a gyro in order to stabilize the robot. Problem is, since I can't use a delay function, I'm forced to use a wave function. What I first wanted to ask is if there's a way to not use the wave function and somehow use the delay one without it stopping my enitre loop since I always have to check the values of the gyro. The second question is(if I must use the wave function) why when I'm putting 2 seconds in the frequency(Time2 box), its not actually doing the action for 2 seconds? basically what I'm trying to multitask, since I need to always check the gyro values.

Thanks in advance guys!

plnyyanks 31-01-2015 14:31

Re: Issues with multi-tasking
 
What's the reason for using a wave function?

If I understand your goals correctly, a better approach will be to, on a button press say, store the current time + your delay in a shift register, and compare the stored value to the current time every iteration. Then, you can put your deferred action into a case structure and process it there.

Alan Anderson 31-01-2015 15:44

Re: Issues with multi-tasking
 
"Multitasking", or parallel execution of independent tasks, is something that LabVIEW does without effort. However, I want to understand what you want the code to do before I give advice that might not be appropriate. Is this supposed to be part of your Autonomous?

Greg McKaskle 01-02-2015 09:55

Re: Issues with multi-tasking
 
Can you tell where this code is located? If it is teleOp, I suspect you do not need a loop at all.

So a better description of where the code runs or what it is meant for will help.

Greg McKaskle


All times are GMT -5. The time now is 10:29.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi