Go to Post Practice. Don't leave home without it. - JesseK [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 24-01-2012, 00:32
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Jaguar Direction Control

For anyone still awake, here's an update.

After many Google searches, I think I found what I'm looking for. When button 2 is pressed, this initiates the stacked sequence. A timer begins. Once the timer reaches a value greater than the predefined stop time, it terminates the while loop.



Now, my two questions.

Once the while loop is terminated, does frame 1 pick up where frame 0 terminated?(will I have to TELL it to execute frame 2 immediately after 1?) ?

Will this confounded piece of code work? With only one motor output set, it appears to be too many steps. But, rest assured, there will be many, many many more added after I can get one working.

Thanks guys.
Reply With Quote
  #17   Spotlight this post!  
Unread 24-01-2012, 12:36
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,560
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: Jaguar Direction Control

Quote:
Originally Posted by DominickC View Post
After many Google searches, I think I found what I'm looking for. When button 2 is pressed, this initiates the stacked sequence. A timer begins. Once the timer reaches a value greater than the predefined stop time, it terminates the while loop.



Now, my two questions.

Once the while loop is terminated, does frame 1 pick up where frame 0 terminated?(will I have to TELL it to execute frame 2 immediately after 1?) ?

Will this confounded piece of code work? With only one motor output set, it appears to be too many steps. But, rest assured, there will be many, many many more added after I can get one working.

Thanks guys.
Yes, the frames in the stacked sequence will execute right after each other.

There's one problem with this code, depending on where it is placed. Your telop VI needs to execute quickly and return. This allows more data to be received from the driver station. If your teleop vi takes longer then 20ms to execute, you will miss data from the driver station. If you miss too much data from the driver station, all outputs will be disabled.

There are too ways to work around this. The first would be to take this code, and put it in periodic tasks. The code in periodic tasks will execute in parallel with the rest of the code and not block communications. The second is to rewrite the code as a state machine. You would design the state to check if the time expired and exit quickly if it hadn't. Then the next time in, it would go to the same place and check the time again. frcmastery.com has a tutorial on state machines http://www.frcmastery.com/labview-fo...tate-machines/
Reply With Quote
  #18   Spotlight this post!  
Unread 24-01-2012, 13:55
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Jaguar Direction Control

So, if I were to place that code into the periodic.vi file, it would function the same if it were within teleop.vi? What I'm asking is if I need to make a refrence to pereodic.vi or place anything within teleop.vi which initalizes periodic.vi.
Reply With Quote
  #19   Spotlight this post!  
Unread 24-01-2012, 16:09
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Jaguar Direction Control

Alright, here's the deal.

I've written it into teleop, and it works, but as you said, I lose data at later point of the execution.

I've moved the working code into periodic.vi and reopened the joystick, however nothing happens when I press the defined button. Do I need to call the VI within teleop?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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