Edm1922
I am trying to create a time counter for a channel which gives a value of 1 when active and 0 when inactive. I am wanting the counter to continually time when active to look at the total value over a race distance. However, when attempting to do this I continually run into errors, such as after each active period the channel returns to zero, or that the usage is determined by lap time opposed to actual active time. Any help on the best way to do this would be appreciated.
Reply 0 0
RvMorrow1
Hi
An example counter timer is shown here,
This counts off the amount of time (Seconds) where the driver is off the throttle pedal
 
[178729%2F9431743%2Fmceclip0]
Running this channel at 10Hz and counting 0.1 Seconds in this example allows the counter to be accurate in seconds.
 
Hope this helps
Reply 0 0
littleozfella
This will start a timer when distance == 1 so you would need to restart the logger (power cycle or set triggers to suite) before start of race. I guess you would get the formation lap also. This will just count until distance is reset to 0 for whatever reason.  May not be perfect but you can make some other channel to your desire.
 
Update rate must be 1hz so it counts in seconds. I think you want an over all time, not down to the 100's of a second.
 
register @a0;
register @a1;
register @a2;
register @a3;
@a0 = (choose( (([Distance]>1)&1)>@a2,1, @a3));
@a2 = (([Distance]>1)&1);
@a3 = (choose(@a0>0,@a0+1,0));
@a3
 
Cheers
Reply 0 0
Reply