View Single Post
  #2   Spotlight this post!  
Unread 08-10-2008, 13:06
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,562
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: State machine in LabVIEW?

Quote:
Originally Posted by JBotAlan View Post
First off, last year I had, in C, a state machine for autonomous. It was an integer paired up with a giant switch/case; there were states for "moving forward", "turning left", "short segment moving forward", etc. It worked well. But it only worked well because there was a round robin method of execution--the arm control code got executed (feedback loops for the arm joints), the drivetrain control code got executed (feedback loops for the two crab drive mechanisms), and any other support code got called, once a loop. Now that we have LabVIEW, how do I implement a similar setup?

I have seen a Case statement for LabVIEW, but does that exclude any other code that might need to be executing? I need my feedback loops in one spot, executing all the time.
Labview is inherently parallel. If you want your feedback loops to run all the time, put them outside the case statement. If it depends on something from inside the case statement, run a wire from inside the case statement to your feedback loops outside.

Quote:
Originally Posted by JBotAlan View Post
How are auton and teleop separated in LabVIEW?
See the code team 39 posted for an example: http://forums.usfirst.org/showthread...8186#post18186

Quote:
Originally Posted by JBotAlan View Post
EDIT: For that matter, how do I regulate a feedback loop to run exactly every X milliseconds?
See this thread on the FIRST forums: http://forums.usfirst.org/showthread.php?t=9906
Reply With Quote