Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Autonomous timing of events are to fast (http://www.chiefdelphi.com/forums/showthread.php?t=128191)

Alan Anderson 30-03-2014 23:33

Re: Autonomous timing of events are to fast
 
Quote:

Originally Posted by grosh (Post 1366964)
Could you check to see if I've added them correctly?

I don't understand what your "read global variable" loop is intended to do. It's going to be continuously overwriting the global with the current motor value, which is likely to interfere with anything else trying to write the global. If that loop was newly added as part of implementing the global variable, remove it.

There is nowhere I can see that actually sets the motor value. You replaced the spot in Periodic Tasks where that was being done with another global variable write, where all you needed to do was replace the constant 0 with a read of the variable. The only places that should be writing the global are what used to be setting the motor value in the autonomous sequence.

I also don't see why you added a rearMotors global. Was something interfering with it as well?

grosh 05-04-2014 20:09

Re: Autonomous timing of events are to fast
 
2 Attachment(s)
I cleaned up and attached the code with corrections. I can't check the code on our robot until district championships, so I am relying on your feedback to get this running.

Thanks again!

Kevin Phan 05-04-2014 22:03

Re: Autonomous timing of events are to fast
 
Why do you have the driver station writing a value to the frontMotors, my interpretation from Alan is to write your frontMotor global values from the periodic task to your motors. You can still have your driverstation determine what the value of the frontMotors.

grosh 05-04-2014 22:09

Re: Autonomous timing of events are to fast
 
We read from the driver station so that it is easy to tune the motors for a shot. Will it not work this way? Our shot was fairly consistant in our last district event and can set it in the global. Do I need to do this to make the global work? I'm new to globals.

Kevin Phan 05-04-2014 22:26

Re: Autonomous timing of events are to fast
 
Edit: I think I'm reading your code wrong. Your frontMotor values are suppose to be set in periodic task and you're doing something that I can't see in auto, correct. The code is fine. Sorry for the confusion.


All times are GMT -5. The time now is 20:10.

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