mainloop time - what is considered too much
Moderators: jsmcortina, muythaibxr
mainloop time - what is considered too much
i've never paid any attention to this field before and just for the hell of it i looked. on a coyote @ 6500rpm this comes up to 4000 us. . i check logs from other cars and the other no coyote log i have is from an ls and it hits 2000 or so at 7k.
-
- Super MS/Extra'er
- Posts: 6828
- Joined: Sun May 15, 2011 11:41 am
- Location: Walnut Creek, Calif. USA
Re: mainloop time - what is considered too much
That seems kind of high to me. Tooth-time on the popular 36-1 wheel at 6000 rpm is only 278 usec. Did I do my math correctly?
This subject was discussed briefly a couple of years ago. My recollection is that the mainloop time is usually in the 50-300 usec range. We need the FW guys to advise how all this is handled, what the limits are.
I'm guessing it all depends on how much you are asking the CPU to do, how many "extra" functions beyond just fuel and spark. I feel that is something that isn't understood or considered when people ask for new features that are of limited value. Everything added to the FW adds to the mainloop time. It may be very minor if the new feature isn't used, as the FW can just bypass the sub-loop for that feature. But, there must be a least a little bit of code (and mainloop time) to determine if the feature is in use. It all adds up...
This subject was discussed briefly a couple of years ago. My recollection is that the mainloop time is usually in the 50-300 usec range. We need the FW guys to advise how all this is handled, what the limits are.
I'm guessing it all depends on how much you are asking the CPU to do, how many "extra" functions beyond just fuel and spark. I feel that is something that isn't understood or considered when people ask for new features that are of limited value. Everything added to the FW adds to the mainloop time. It may be very minor if the new feature isn't used, as the FW can just bypass the sub-loop for that feature. But, there must be a least a little bit of code (and mainloop time) to determine if the feature is in use. It all adds up...
-
- Site Admin
- Posts: 39617
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: mainloop time - what is considered too much
It's going to be the VVT code most likely using up processor time.ashford wrote:i've never paid any attention to this field before and just for the hell of it i looked. on a coyote @ 6500rpm this comes up to 4000 us.
A V8 at 6500RPM has a new ignition event every 2300us, so your 4000us number means that the fuel and ignition are recalculated approximately every two cylinders. The commanded advance and fuel will be applied as they should to cylinders in-between, but the PW and advance won't allow for any changes in operating conditions.
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
-
- Super MS/Extra'er
- Posts: 6828
- Joined: Sun May 15, 2011 11:41 am
- Location: Walnut Creek, Calif. USA
Re: mainloop time - what is considered too much
James, am I guessing correctly that the tooth counting/timing is done in multiple passes through a loop within the mainloop; that's why a seemingly slow mainloop can easily handle the shorter tooth-to-tooth intervals?
-
- Site Admin
- Posts: 39617
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: mainloop time - what is considered too much
Interrupt code handles those events.
The main processor is interrupted on each crank and cam tooth.
The fuel and spark outputs are handled by timed interrupt code on the XGATE co-processor.
James
The main processor is interrupted on each crank and cam tooth.
The fuel and spark outputs are handled by timed interrupt code on the XGATE co-processor.
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Re: mainloop time - what is considered too much
that makes me feel better.jsmcortina wrote:Interrupt code handles those events.
The main processor is interrupted on each crank and cam tooth.
The fuel and spark outputs are handled by timed interrupt code on the XGATE co-processor.
James
but this raises some more questions, i am currently out of i/o on 2 cars(coyotes take alot) and have been considering an iobox setup. does the iobox do much for math? ie for speedo in/out, does the iobx do the calculations on input then output mph on can then turn that mph into the ppm for the output, or is all the maths done in the ms3? i havent really tried it out since there is no interface to the iobox itself.
i use speed in for the reverse lockout solenoid on my trans, but being i use all the pt inputs it looses signal around 50mph on a slower input
-
- Site Admin
- Posts: 39617
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: mainloop time - what is considered too much
Adding an IO box will add more work to the MS3, so the mainloop will get a bit slower.
James
James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".