PCMLogger with Innovate WB

They go by many names, P01, P10, P12, P59, E38, VPW, '0411 etc.
Post Reply
User avatar
joukoy
Posts: 398
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

PCMLogger with Innovate WB

Post 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...
User avatar
joukoy
Posts: 398
Joined: Tue Dec 17, 2019 3:27 am
cars: --
Contact:

Re: PCMLogger with Innovate WB

Post 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:
Post Reply