Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Lap Timing - a fun sheet to think about

Status
Not open for further replies.

swearingen

Civil/Environmental
Feb 15, 2006
663
0
0
US
I organize a local low-key track day and we use stopwatch timing to keep things inexpensive.

I've been using a program for a while that has been adapted from slot cars. One of our drivers suggested that we try to come up with one in Excel.

What are your thoughts? I'd like to have a single button for each driver that you click that will put the times down each lap. A simple one that the other driver came up with is one that has a macro button for each LAP that simply checks a cell with the NOW() function in it and subtracts it from the last lap and converts to a lap time. The problem is that we do between 10 and 15 laps per stint which means I would have to set up 75 buttons for 5 people being on the track...


If you "heard" it on the internet, it's guilty until proven innocent. - DCS

 
Replies continue below

Recommended for you

Seems to me that there would be a coordination problem. If all 5 tracks lap at roughly the same time, a single operator couldn't possibly click all 5 lap counters in less than about 2 seconds. Is that acceptable?

If so, then a single button per track should be doable. Your macro would simply move the active cell downward on each lap and store either the absolute time or the calculate the laptime on the fly. How long is a typical lap?

Given free rein and some money, it might be cooler to do all this in a Labview-like environment and some sort of PC I/O card, and have some sort of automatic lap switch being read by Labview for each track. That would allow Labview to correctly determine laptimes to less than 0.1 seconds or so. One could imagine using some sort of photo-interruptor switch on each track as an example.

Labview is obviously gross overkill, but there may be something substantially cheaper that could be found.

TTFN

FAQ731-376
 
Sounds achievable. What was the question?
The problem is that we do between 10 and 15 laps per stint which means I would have to set up 75 buttons for 5 people being on the track
Why couldn't you use 5 buttons... one per car/driver? Excel keeps track of how many laps are elapsed based on how many times a given driver's button has been pushed.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
This is a little kludgy, and probably not very robust, but it should give you a place to start.

Currently it handles 3 cars and 18 laps, but it's modular car wise, so if you need to handle more cars, just add more buttons.


One user form controls everything. Here's how to use it.

Enter the car numbers for the session in the text boxes - one car number per box.

Click the "Set Car #s" button. This will relabel the important buttons and fill in some row and column headings on sheet1.

When the green flag drops on the session, click the "Start Session" button. This will set the start time for all cars.

As each car crosses the line, click the button with that car number. This will record the time that that car crossed the line in the next open lap number for that car.

That's it.

If you need lap times you can do the subtraction on a separate sheet, or modify the code.
 
Firstly you'll need to set your macro security to medium.

Then you'll need to open the VBA editor (Alt-F11), open UserForm1 and manually run it.

I didn't put in any fancy frills like AutoRun.
 
How about using a simple event handler? Such as:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.NumberFormat = "hh:mm:ss"
Target.Value = "=now()"
Target.Copy
Target.PasteSpecial Paste:=xlPasteValues
End Sub
This places the current time in any cell that is clicked, and can be used in any sized cross-tabulation of racer versus lap.

It will work as is, but would improve with a bit of refining:
» In its present crude incarnation, you would need to open the spreadsheet WITHOUT macros activated to construct your table. Then save and re-open WITH macros to record your actual times. Then save and re-open WITHOUT macros to play with the results. It should not be too hard to have the time-insertion facility able to be turned on and off from within the spreadsheet itself.
» Protection could be used to prevent the inadvertent clobberation of non-time cells.
» Successive clicks in the one cell (without an intermediate click in a different cell) does not update the entry (because the "selection" has not "changed"). I'm sure there would be a way around this, but don't have the time to pursue it right now.
 
Status
Not open for further replies.
Back
Top