Thanks a lot, guys.
Let me try to explain this way. I have created a custom PID csv file that looks like below. This is for a Mitsubishi Outlander PHEV, that has two E-motors driving the front and rear axles, a generator to generate electricity, and more:
Name,ShortName,ModeAndPid,Equation,Min Value,Max Value,Units,Header
Front Motor Torque Request,FMTqReq,2101,A*256+B,-200,200,Nm,755
Front Motor Torque,FMTorque,2102,A*256+B,-200,200,Nm,755
Rear Motor Torque Request,RMTqReq,2101,A*256+B,-200,200,Nm,753
Rear Motor Torque,RMTorque,2102,A*256+B,-200,200,Nm,753
Generator Torque Request,GenTqReq,2101,A*256+B,-200,200,Nm,73C
Generator Motor Torque,GenTorque,2102,A*256+B,-200,200,Nm,73C
SOC Percentage Controller,SOC%Ctrl,2101,A/2-5,0,100,%,761
SOC Percentage Display,SOC%Disp,2101,B/2-5,0,100,%,761
Cell Voltage #01,CellVolt#01,2102,(A*256+B)/1000,3,4.50,V,761
Charge Count 100V,ChgCnt100,2102,A*256+B,0,10000,,765
Charge Count 200V,ChgCnt200,2102,C*256+D,0,10000,,765
I can import the file just fine. But for now I have two issues with it.
First of all I have not been able to deal with the flow control issue, yet. So for each request, I only see the first response. As a result, I can only access A, B, C and D and not the remainder of the payload (this is why I have a very limited PID file, for now).
cintakc suggeted using an init string, for example for the last two custom PIDs:
atz\natsp6\natsh765\natfcsd30080A\natfcsm1\natcra766\n1092
What I do understand is this:
– atz
– atsp6
– atsh765
– atfcsd30080a
– atfcsm1
What I do not understand is:
– Where to put it? Does it go into the Diag Start Command?
– If so, do I need to provide a Diag Stop Command?
– What is the purpose of atcra766? TP is not going to issue an atma command, right? So, why set up a filter?
– What is the purpose of 1092? cintakc already set it was not mandatory
Either way, I have tried several variations as a Diag Start Command, and neither seem to have an effect on the result I get back. I always get that one line. When I use telnet to talk to the ELM327, I do manage to enable auto flow control and I can get the full response that way. Simply by setting atsh765, atfcsd30080a and atfcsm1. So, I cannot be that far off.
There second problem I have is this. In test mode above custom PIDs work fine. When testing the “Front Motor Torque” PID, I get 10.000 Nm (still need to work on my formula). When testing the “Cell Voltage #01” PID, I get 4,05 volts. That’s also fine. But when I combine them into one single dashboard, I get 10.000 Nm for the first, and 10 Volts for the second. So apparently, for both custom PIDs, A*256+B is 10.000. But also, when I add the “Rear Motor Torque” and “Generator Motor Torque” PIDs, they all use the same input value of 10.000. When I press the accelerator of the car, to request power from the front motor, all PIDs go up with the same amount. It looks as if TP is not sending the correct header every time, and is using the same header (or device address) for each custom PID.
If somebody could help me out with setting this straight, I would appreciate it a lot …. Thanks,
Anko
|