|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Load file quicker
Thanks for all the help guys, I just took a lot of globals out of the program and also removed all the inputs I no longer needed (which is ALOT!). With as much useless data that I took out, I think it will load a lot quicker. Before I was recording 53 different inputs, now i'm at 19 and I could still remove a few more if necessary.
I'll be testing my code in about an hour, if I'm still not satisfied I'll see if I can find out how to write to a different format as Joe suggested. |
|
#2
|
|||
|
|||
|
Re: Load file quicker
The code works now thanks to the changes you guys suggested, I never had to change the file type but I will definitely look into that in the off-season as it would be nice to have the program run without any noticeable delay at all. The one thing I noticed is that the program seemed to playback much faster in autonomous mode than it did in teleop mode (I have a mode to record it in teleop & play it back). Any ideas on what could be causing this?
|
|
#3
|
|||
|
|||
|
Re: Load file quicker
How much difference are you seeing? Are we talking about a small rounding error that accumulates, or something else?
Greg McKaskle |
|
#4
|
|||
|
|||
|
Re: Load file quicker
like its running twice as fast or so.
|
|
#5
|
|||||
|
|||||
|
Re: Load file quicker
Could be your Teleop loop is slower than the 50Hz packet rate.
You might be dropping every other DS packet and your playback rate would appear half speed. Check the timing of the Teleop loop with Greg's Elapsed Times.vi under Support Code in your Project Explorer window. Drop one copy in Teleop and another in Autonomous to compare the speeds. View the Elapsed Times front panel while running the code from your PC. Then match the Autonomous loop to the times you're getting from Teleop. I'd suggest using Wait Until Multiple to get the times. A simple Wait will lag just a tiny bit every loop. Last edited by Mark McLeod : 09-03-2011 at 08:05. |
|
#6
|
|||
|
|||
|
Re: Load file quicker
I tried everything I could to make it run the same speed but I couldn't get it. In the end I made it so that autonomous enabled would run the same case as teleop enabled and start playback right away.
Thanks for all the help guys, it worked even better than I thought it would ![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|