|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
multitasking
Now that we have the three components of our code done (drive, shoot, and pickup) we started testing and we found a problem. We can only do one thing at a time. We have tried a few thing to fix this with no luck. Any ideas on how to fix this issue we are having?
![]() |
|
#2
|
|||
|
|||
|
Re: multitasking
We need more details on how you implemented the tasks to answer your question properly, but I'll take a stab at it anyway.
LabVIEW will let you run multiple tasks in separate parallel loops (e.g. multiple while loops that are not nested). One way to do this is to put each loop in a separate VI. When separating the loops be careful to note if you are using the same resource (e.g. joystick) in the different loops—in which case you may have to choose one loop to handle the resource and share the information with the other loops (e.g. global variables, functional global variables). |
|
#3
|
|||
|
|||
|
Re: multitasking
here is another thing i posted on another board yesterday -
So we are trying to get our robot to do 3 things. pick up balls, shoot, and suck the up through a convaire belt system. The drive is a pid car drive system that works well till you put it with shooting and picking up balls. The shooter works for a fraction of a second and than stops till the next ball is in place. The suck just goes for X amount of time. We put these parts in the basic framework and the result is the same. You can do one of them and if you get 2 of them to work they don't work right of just don't work at all. The shooter and suck start by microswitches on the DIO ports. We have tried this is a statemachine tonight and that didn't work. Can somebody tell me an easy way to do this or send me example code of some sort to look at and figure out what I have to do? ![]() |
|
#4
|
|||
|
|||
|
Re: multitasking
There are lots of examples of doing this. To get help on your code, I think you need to post it.
Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|