View Single Post
  #9   Spotlight this post!  
Unread 15-02-2013, 08:23
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Stopping all motors

Quote:
Some other question:
1) How can I run the motors without a loop(I need to run a controlled by time motor action).
2)I have some values to put in the dashboard. How can I send the values to the dashboard?
3) How can I run another thread?(I want an multi threading system which the shooter wont interrupt the driver).
1. I think you are describing a sequence of motor speeds. To perform this, I'd suggest putting it into the Periodic Tasks VI. The loop is generally used just to keep the code armed and checking for a trigger. When triggered, it can run your timed sequence and arm again checking the trigger. The sequence is often easiest to perform using a sequence structure, the frames of film object next to the loops in the palette.

2. SmartDashboard is there for this purpose. In the lower right of the palette you can write the value into a named variable that is replicated on other clients. On the dashboard, you can read with the same name or simply put the display indicator on the panel in the Operation tab and name it the same as the variable.

3. LV does parallelism using threads, but without you needing to manage them. Each parallel loop you draw will multitask, and each branch of code will multitask. The system will have a pool of threads that take turns running the code based on a priority queue. By default there are four threads per CPU.

Greg McKaskle
Reply With Quote