Page 1 of 1

PCMLogger with Innovate WB

Posted: Sun Aug 23, 2020 3:50 pm
by joukoy
I want to log AFR from innovate MTX-L wideband with pcmlogger.
Using:
https://www.innovatemotorsports.com/sup ... KSetup.zip

So, I started hacking MainForm.cs it with my limited programming skills, added:
- Reference to mtssdk.ocx
- combobox for COM-port selection
- button for connection.
- variables:

Code: Select all

        private MTS mtsDevice;
        private double CurrentAFR;
And code:

Code: Select all

        private void btnMtsConnect_Click(object sender, EventArgs e)
        {
            mtsDevice.CurrentPort = comboMtsPort.SelectedIndex;
            mtsDevice.NewData += new MTSSDKLib._IMTSEvents_NewDataEventHandler(Mts_ReceiveData);
            mtsDevice.ConnectionEvent += new MTSSDKLib._IMTSEvents_ConnectionEventEventHandler(Mts_Connected);
            mtsDevice.Connect();

        }
        private void Mts_ReceiveData()
        {
            int iCount;

            iCount = mtsDevice.InputCount;

            for (int i = 0; i < iCount; i++)
            {
                int sample;
                mtsDevice.CurrentInput = i;
                sample = mtsDevice.InputSample;
                if (mtsDevice.InputType == 1)    //AFR
                {
                    if (mtsDevice.InputFunction == 0)
                    {
                        CurrentAFR = (sample / 1000 + 0.5) * mtsDevice.InputAFRMultiplier;
                    }
                }
            }

        }
        private void Mts_Connected(int Result)
        {
            if (Result == 0)
                mtsDevice.StartData();
            else
                MessageBox.Show("MTS Connection failed");
        }

I think I have now enough code to read AFR, but how can I add it to log?

Actually I hope someone adds this functionality correctly to pcmlogger...

Re: PCMLogger with Innovate WB

Posted: Sun Aug 23, 2020 6:10 pm
by joukoy
:punk:
Never mind, this ugly hack works. Enough for me.

Now I just hope I can fix my MTX-L, did firmware update and it is now outputting Lambda, when requesting AFR + display is messed up :rant: