![]() |
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. :D Thanks guys. |
Re: Jaguar Direction Control
Quote:
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/ |
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.
|
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? |
| All times are GMT -5. The time now is 22:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi