by MikeD on Wed Mar 01, 2023 3:31 am
Hi,
your settings are wrong, and you just had some luck that at a specific temperature the actual values correlate with what you get presented in the PDM software.
Talking about engine temperature as an example (read Emtron documentation to find out what I write here):
Emtron values are transmitted as 16bit (unsigned) and little endian byte order (="byte swap" setting), so change those settings on all your signals.
Temperature is transmitted with a resolution of 0.1 deg and an offset of -50 degC.
So the ECU transmits 80 degC on the CAN as 80*10= 800 + offset 500 = 1300 (= the raw digit value that the PDM will read).
Your scaling is "divisor 16" which means 1300 / 16 = 81.25 (so you are calculating wrong but at that moment the luck is on your end... it's obviously not correct but you could leave it like this if thats all you need.)
I would now probably use a divisor of 10 (to get correct degC values but offset by 50 degC) and rename the CAN input like "SL4.Engine.Temp+50°C" if that makes sense for you... it would mean that when you receive said 80°C engine temp then thats a raw value of 1300 and divided by 10 it results in a value of 130 (which is 80°C + 50).
In this way if you ever need another temperature threshold like 85°C then it's still very easy for you to figure out as a PDM value of 135 equals 85°C.
For the following two signals RPM and VEHICLE SPEED first you have to be aware that the PDM can only handle values from 0 - 255.
For engine RPM the divisor of 100 could be reasonable as the PDM can handle values up to 255 resulting in up to 25500 rpm.
Using this divisor 100 brings you "RPM/100" (which I would use as the name for this input) and then 100 rpm = PDM value 1, 200 rpm = 2, 300 rpm = 3... you get the idea...
SPEED is transmitted with a resolution of 0.1 similar to the temperature above, but without an offset, which makes it a bit easier than the temperature from above.
if you use divisor 10 then you will receive your speed in full kph units, but be aware that in case you go faster than 255 kph then the PDM will interprete this wrong, it may start from zero once the overflow happens.
So depending on which systems you want to switch ON/OFF by speed this could lead to terrible misbehaviour in the worst case.
If your car will go faster than 255 then you need to choose a higher divisor, so to not run into trouble.
For example if you choose divisor 20 then it will result in "kph/2", meaning your PDM value of 1 = 2 kph, 2 = 4 kph, 3 = 6 kph and so on... this way you could go up to a PDM value of 255 = 510 kph before the overflow would happen.
If you still go faster than this, ... well... take care then.
Good luck!
Last edited by
MikeD on Wed Mar 01, 2023 2:47 pm, edited 1 time in total.