add sym2lib script
This commit is contained in:
parent
358a871493
commit
917e9140c5
19 changed files with 709 additions and 0 deletions
46
.gitignore
vendored
Normal file
46
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Ignore-Datei selbst ausschließen
|
||||
#.gitignore
|
||||
.gitmodules
|
||||
Thumbs.db
|
||||
|
||||
# Bestimmte Dateien ausschließen
|
||||
cache.dat
|
||||
|
||||
# Es können Wildcards (*,?) verwendet werden:
|
||||
*.exe
|
||||
*.dll
|
||||
*.dsbackup
|
||||
*.avrsln
|
||||
*.avrsuo
|
||||
*.avrgccproj
|
||||
*.aps
|
||||
*.atsln
|
||||
*.atsuo
|
||||
*.cproj
|
||||
*.aws
|
||||
*.xml
|
||||
*.xslt
|
||||
*.aux
|
||||
*.dvi
|
||||
*.lof
|
||||
*.log
|
||||
*.lot
|
||||
*.out
|
||||
*.synctex.gz
|
||||
*.toc
|
||||
*.pyc
|
||||
*.patch
|
||||
*.csv
|
||||
.project
|
||||
.pydevproject
|
||||
tmp?.dat
|
||||
|
||||
# Auch Verzeichnisse kann man ausschießen:
|
||||
*default/
|
||||
*Debug/
|
||||
*bin/
|
||||
*ADC/
|
||||
*CAN/
|
||||
*UART/
|
||||
.*/
|
||||
CANLibrary/
|
||||
140
CANLibrary/Sym2Lib.py
Normal file
140
CANLibrary/Sym2Lib.py
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
# -*- coding: UTF-8 -*-
|
||||
|
||||
'''
|
||||
Created on 12.12.2013
|
||||
|
||||
@author: Philipp Rauch
|
||||
@version: 1.0
|
||||
@attention: No support for multiplex; until now no motorola support
|
||||
'''
|
||||
from CanMessage import CanMessage
|
||||
from CanSignal import CanSignal
|
||||
|
||||
def readSym(symfile):
|
||||
sym = open(symfile, "r")
|
||||
|
||||
message = {}
|
||||
tmp = {}
|
||||
ignore = True
|
||||
name = ""
|
||||
|
||||
for line in sym:
|
||||
line = line.split("//")[0].strip()
|
||||
|
||||
if line == "":
|
||||
if ignore:
|
||||
continue
|
||||
if name == "":
|
||||
continue
|
||||
tmp["CycleTime"] = 0
|
||||
message[name] = tmp
|
||||
tmp = {}
|
||||
name = ""
|
||||
continue
|
||||
|
||||
if ignore and not line[0] == "{":
|
||||
continue
|
||||
|
||||
if line[0] == "{":
|
||||
ignore = False
|
||||
modus = line.strip("{} \n")
|
||||
if modus == "SEND":
|
||||
ignore = False
|
||||
elif modus == "RECEIVE":
|
||||
ignore = False
|
||||
elif modus == "SENDRECEIVE":
|
||||
ignore = False
|
||||
elif modus == "VIRTUALVARS":
|
||||
ignore = True
|
||||
|
||||
elif line[0] == "[":
|
||||
name = line.strip("[] \n")
|
||||
|
||||
elif line.find("ID") == 0:
|
||||
msg_id = line.split("=")[1].strip().rstrip("h")
|
||||
tmp["ID"] = int(msg_id, 16)
|
||||
|
||||
elif line.find("DLC") == 0:
|
||||
tmp["DLC"] = int(line.split("=")[1].strip())
|
||||
|
||||
elif line.find("CycleTime") == 0:
|
||||
tmp["CycleTime"] = int(line.split("=")[1].strip())
|
||||
|
||||
elif line.find("Var") == 0:
|
||||
arg = line.split("=")[1].strip().split(" ")
|
||||
signal = {}
|
||||
signal["factor"] = 1
|
||||
signal["data"] = 0
|
||||
signal["offset"] = 0
|
||||
|
||||
titel = arg[0]
|
||||
del arg[0]
|
||||
|
||||
signal["type"] = arg[0]
|
||||
del arg[0]
|
||||
|
||||
signal["begin"] = int(arg[0].split(",")[0])
|
||||
signal["length"] = int(arg[0].split(",")[1])
|
||||
del arg[0]
|
||||
|
||||
if "-m" in arg:
|
||||
signal["format"] = "motorola"
|
||||
arg.remove("-m")
|
||||
else:
|
||||
signal["format"] = "intel"
|
||||
|
||||
if "-b" in arg:
|
||||
signal["output"] = "binary"
|
||||
arg.remove("-b")
|
||||
elif "-h" in arg:
|
||||
signal["output"] = "hexadecimal"
|
||||
arg.remove("-h")
|
||||
else:
|
||||
signal["output"] = "decimal"
|
||||
|
||||
for i in arg:
|
||||
a = i.split(":")
|
||||
if a[0] == "/u":
|
||||
signal["unit"] = a[1]
|
||||
elif a[0] == "/f":
|
||||
signal["factor"] = float(a[1])
|
||||
elif a[0] == "/o":
|
||||
signal["offset"] = int(a[1])
|
||||
elif a[0] == "/d":
|
||||
signal["data"] = float(a[1])
|
||||
|
||||
tmp[titel] = signal
|
||||
return message
|
||||
|
||||
def Sym2Code(symfile, adapter = "pcan"):
|
||||
mes = readSym(symfile)
|
||||
for i in mes.keys():
|
||||
print "%s.addMessage(CanMessage(%s, %s, %s, %s)" % (adapter, hex(mes[i]["ID"]), mes[i]["DLC"], mes[i]["CycleTime"], i)
|
||||
for sig in mes[i]:
|
||||
if isinstance(mes[i].get(sig), dict):
|
||||
print "%s.Messages[%s].addSignal(CanSignal(%s, %s, %s, %s, %s, %s)" % (adapter, i, mes[i][sig]["begin"], mes[i][sig]["length"], mes[i][sig]["offset"], mes[i][sig]["factor"], mes[i][sig]["data"], sig)
|
||||
print ""
|
||||
|
||||
def Add2Adapter(pcan, symfile):
|
||||
'''
|
||||
@attention: not tested
|
||||
'''
|
||||
mes = readSym(symfile)
|
||||
for i in mes.keys():
|
||||
pcan.addMessage(CanMessage(mes[i]["ID"],
|
||||
mes[i]["DLC"],
|
||||
mes[i]["CycleTime"],
|
||||
i))
|
||||
print "add %s - %s to pcan" % (i, mes[i]["ID"])
|
||||
for sig in mes[i]:
|
||||
if isinstance(mes[i].get(sig), dict):
|
||||
pcan.Messages[i].addSignal(CanSignal(mes[i][sig]["begin"],
|
||||
mes[i][sig]["length"],
|
||||
mes[i][sig]["offset"],
|
||||
mes[i][sig]["factor"],
|
||||
mes[i][sig]["data"],
|
||||
sig))
|
||||
print "add sig %s to msg %s" (sig, i)
|
||||
return pcan
|
||||
|
||||
Sym2Code("symfiles/MAB_Module_BMS.sym")
|
||||
18
CANLibrary/symfiles/MAB_Module_ACC.sym
Normal file
18
CANLibrary/symfiles/MAB_Module_ACC.sym
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="MicroAutoBox Artega"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[Module_ACC]
|
||||
ID=513h
|
||||
DLC=4
|
||||
Var=Input_Enable bit 0,1
|
||||
Var=Input_RelayIsClosed bit 1,1
|
||||
Var=Accelerator1PositionFiltered unsigned 2,7 /u:normed /f:0.01 /d:0
|
||||
Var=Accelerator2PositionFiltered unsigned 9,7 /u:norm /f:0.01
|
||||
Var=PositionFilteredAverage unsigned 16,7 /f:0.01
|
||||
Var=Error_VoltageLimit bit 24,1
|
||||
Var=Error_Difference bit 25,1
|
||||
Var=Warning_AcceleratorsNotEnabled bit 26,1
|
||||
Var=SignalIsValid bit 23,1
|
||||
|
||||
74
CANLibrary/symfiles/MAB_Module_BMS.sym
Normal file
74
CANLibrary/symfiles/MAB_Module_BMS.sym
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="Untitled"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[MAB_Module_BMS_StateDemand]
|
||||
ID=31Fh
|
||||
DLC=1
|
||||
Var=Charge unsigned 0,1
|
||||
Var=Drive unsigned 2,1
|
||||
Var=Idle unsigned 3,1
|
||||
|
||||
[Module_BMS_ChargeState]
|
||||
ID=152h
|
||||
DLC=3
|
||||
Var=Voltage_Line1_CriticallyHigh unsigned 0,1
|
||||
Var=Voltage_Line2_CriticallyHigh unsigned 2,1
|
||||
Var=Charge_Stop_Line1 unsigned 1,1
|
||||
Var=Charge_Stop_Line2 unsigned 3,1
|
||||
Var=Current_Excess unsigned 8,8
|
||||
Var=Voltage_Excess unsigned 16,8
|
||||
|
||||
[Module_BMS_SOC]
|
||||
ID=352h
|
||||
DLC=1
|
||||
Var=SOC unsigned 0,8
|
||||
|
||||
[Module_BMS_State]
|
||||
ID=150h
|
||||
DLC=1
|
||||
Var=Init unsigned 0,1
|
||||
Var=Idle unsigned 1,1
|
||||
Var=Charge unsigned 2,1
|
||||
Var=Drive unsigned 3,1
|
||||
Var=DrivingPermitted unsigned 4,1
|
||||
|
||||
[Module_BMS_Voltage]
|
||||
ID=350h
|
||||
DLC=8
|
||||
Var=Voltage_Line1 unsigned 0,32 // in mV
|
||||
Var=Voltage_Line2 unsigned 32,32 // in mV
|
||||
|
||||
[Module_BMS_Current]
|
||||
ID=351h
|
||||
DLC=8
|
||||
Var=Current_Line1 unsigned 0,32 // in mA
|
||||
Var=Current_Line2 unsigned 32,32 // in mA
|
||||
|
||||
[Module_BMS_Temperature]
|
||||
ID=153h
|
||||
DLC=6
|
||||
Var=Temp_Max unsigned 0,16 // in Celcius
|
||||
Var=Temp_Min unsigned 16,16 // in Celcius
|
||||
Var=Temp_Average unsigned 32,16 // in Celcius
|
||||
|
||||
[Module_BMS_DischargeState]
|
||||
ID=151h
|
||||
DLC=8
|
||||
Var=OverCurrent unsigned 0,1 /ln:"Maximaler continous Entladestrom erreicht"
|
||||
Var=DeratePower unsigned 1,2 // Leistungdrosseln
|
||||
Var=InsolationFault unsigned 8,4
|
||||
Var=DeviceError unsigned 12,4
|
||||
Var=Voltage_Line1_Critically_Low unsigned 16,2
|
||||
Var=Voltage_Line2_Critically_Low unsigned 18,2
|
||||
Var=Voltage_Line1_LowerLimit unsigned 20,2
|
||||
Var=Voltage_Line2_LowerLimit unsigned 22,2
|
||||
Var=BatteryCells_Warm unsigned 24,2
|
||||
Var=BatteryCells_Hot unsigned 26,1
|
||||
|
||||
[Module_BMS_InfoDCDC]
|
||||
ID=353h
|
||||
DLC=1
|
||||
Var=DCDC_PowerOnPermitted unsigned 0,8
|
||||
|
||||
16
CANLibrary/symfiles/MAB_Module_CUR.sym
Normal file
16
CANLibrary/symfiles/MAB_Module_CUR.sym
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="MAB Artega"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[Module_CUR]
|
||||
ID=515h
|
||||
DLC=7
|
||||
CycleTime=50
|
||||
Var=SignalIsValid bit 0,1
|
||||
Var=Warning_CurrentOutOfBounds bit 1,1
|
||||
Var=Error_InvalidDutyCycle bit 2,1
|
||||
Var=CurrentFiltered signed 8,16 /u:A /f:0.0078 /d:0
|
||||
Var=ChargeBalance signed 24,32 /u:As /f:0.125 /d:0
|
||||
Var=Error_InvalidFrequency bit 3,1
|
||||
|
||||
21
CANLibrary/symfiles/MAB_Module_CoolantPump.sym
Normal file
21
CANLibrary/symfiles/MAB_Module_CoolantPump.sym
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="MicroAutoBox Artega"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[Module_CoolantPump]
|
||||
ID=514h // Debug info for module CoolantPump
|
||||
DLC=7
|
||||
CycleTime=50
|
||||
Var=Input_Enable bit 0,1
|
||||
Var=Input_PumpMotorsEnable bit 8,1
|
||||
Var=Input_SpeedMotorsDemand unsigned 9,7 /f:0.01
|
||||
Var=Input_ErrorMotorsExternal bit 1,1
|
||||
Var=Input_PumpBatteryEnable bit 16,1
|
||||
Var=Input_SpeedBatteryDemand unsigned 17,7 /f:0.01 /d:0
|
||||
Var=Input_ErrorBatteryExternal bit 2,1
|
||||
Var=ControllerMotors_State unsigned 24,8
|
||||
Var=ControllerBattery_State unsigned 40,8
|
||||
Var=ControllerMotors_DutyCycle unsigned 32,7 /f:0.01
|
||||
Var=ControllerBattery_DutyCycle unsigned 48,7 /f:0.01
|
||||
|
||||
20
CANLibrary/symfiles/MAB_Module_Dcdc14VMain.sym
Normal file
20
CANLibrary/symfiles/MAB_Module_Dcdc14VMain.sym
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="MicroAutoBox Artega"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[Module_DCDC14V]
|
||||
ID=512h // Status Information of Software Module DCDC14V
|
||||
DLC=8
|
||||
CycleTime=50
|
||||
Var=Controller_State unsigned 24,8
|
||||
Var=Error_CanReception bit 56,1
|
||||
Var=Error_Temperature bit 57,1
|
||||
Var=Warning_Temperature bit 58,1
|
||||
Var=Error_Voltages bit 59,1
|
||||
Var=Input_Enable bit 0,1
|
||||
Var=Input_ModeDemandActive bit 1,1
|
||||
Var=Input_VoltageSetValue unsigned 8,8 /u:Volt /f:0.1 /d:0
|
||||
Var=Input_CurrentLimit unsigned 16,8 /u:Ampere
|
||||
Var=Input_RelayDCDCIsClosed bit 2,1
|
||||
|
||||
49
CANLibrary/symfiles/MAB_Module_MCU.sym
Normal file
49
CANLibrary/symfiles/MAB_Module_MCU.sym
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="MicroAutoBox Artega"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[Module_MCU]
|
||||
ID=510h // Status Information of Software Module "Motor Control Unit"
|
||||
DLC=8
|
||||
CycleTime=50
|
||||
Mux=Input 0,4 0
|
||||
Var=Input_PowerOn bit 4,1
|
||||
Var=Input_EnableController bit 5,1
|
||||
Var=Input_TorqueDemandLeft signed 8,16 /u:Nm
|
||||
Var=Input_TorqueDemandRight signed 24,16 /u:Nm
|
||||
|
||||
[Module_MCU]
|
||||
DLC=7
|
||||
Mux=Internal 0,4 1
|
||||
Var=TorqueDemandPermittted bit 5,1
|
||||
Var=toRelaysPowerOnMCU unsigned 4,1
|
||||
Var=ControllerState unsigned 8,8
|
||||
Var=toMCU_StateDemand unsigned 16,8
|
||||
Var=IsEnabled bit 6,1
|
||||
Var=ControllerIsEnabled bit 7,1
|
||||
Var=TorqueAvailableMax signed 32,8 /u:Nm /f:2.5 /d:0
|
||||
Var=TorqueAvailableMin signed 40,8 /u:Nm /f:2.5 /d:0
|
||||
Var=McuStateActual unsigned 24,8
|
||||
|
||||
[Module_MCU]
|
||||
DLC=3
|
||||
Mux=Errors 0,4 2
|
||||
Var=ErrorSpeed unsigned 4,1 /u:bool
|
||||
Var=ErrorTemp unsigned 5,1 /u:bool
|
||||
Var=ErrorVoltage unsigned 6,1 /u:bool
|
||||
Var=ErrorSpeedMotorLeft unsigned 7,1
|
||||
Var=ErrorSpeedMotorRight unsigned 8,1
|
||||
Var=ErrorLimitTempCapacitorLeft unsigned 9,1
|
||||
Var=ErrorLimitTempCapacitorRight unsigned 10,1
|
||||
Var=ErrorTempT1Left unsigned 11,1
|
||||
Var=ErrorTempT1Right unsigned 12,1
|
||||
Var=ErrorTempT2Left unsigned 13,1
|
||||
Var=ErrorTempT2Right unsigned 14,1
|
||||
Var=ErrorTempT3Left unsigned 15,1
|
||||
Var=ErrorTempT3Right unsigned 16,1
|
||||
Var=ErrorVoltageDcLink unsigned 17,1
|
||||
Var=ErrorCanReceptionTime unsigned 18,1
|
||||
Var=ErrorCanMessageCounter unsigned 19,1
|
||||
Var=ErrorCan unsigned 20,1
|
||||
|
||||
21
CANLibrary/symfiles/MAB_Module_RLB.sym
Normal file
21
CANLibrary/symfiles/MAB_Module_RLB.sym
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="MicroAutoBox Artega"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[Module_RLB]
|
||||
ID=517h // Debug info for the module "Relay Board".
|
||||
DLC=2
|
||||
CycleTime=50
|
||||
Var=AcceleratorIsClosed bit 0,1
|
||||
Var=VacuumPumpIsClosed bit 2,1
|
||||
Var=MotorsIsClosed bit 3,1
|
||||
Var=BmsIsClosed bit 4,1
|
||||
Var=TriportIsClosed bit 5,1
|
||||
Var=DcdcIsClosed bit 6,1
|
||||
Var=ChargerConductiveIsClosed bit 8,1
|
||||
Var=CoolingSystemIsClosed bit 7,1
|
||||
Var=VacuumSensorIsClosed bit 1,1
|
||||
Var=ChargerAuxiliaryPowerIsClosed bit 9,1
|
||||
Var=ReverseLightIsClosed bit 10,1
|
||||
|
||||
62
CANLibrary/symfiles/MAB_Module_VBA.sym
Normal file
62
CANLibrary/symfiles/MAB_Module_VBA.sym
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="Adapterboard"
|
||||
|
||||
{SEND}
|
||||
|
||||
[Module_VAB_Relays_and_Lights]
|
||||
ID=2A3h
|
||||
DLC=2
|
||||
Var=MAB2AB_RelayH2OPumpOn_b bit 7,1 -b -m
|
||||
Var=MAB2AB_RelayRadiatorFanOn_b bit 6,1 -b -m
|
||||
Var=MAB2AB_RelayHazardLightOn_b bit 5,1 -b -m
|
||||
Var=MAB2AB_RelayRadiatorEMotorOn_b bit 4,1 -b -m
|
||||
Var=MAB2AB_RelayBackLightOn_b bit 3,1 -b -m
|
||||
Var=MAB2AB_RelayBrakeLightOn_b bit 2,1 -b -m
|
||||
Var=MAB2AB_RelayExcessCurrentOn_b bit 1,1 -b -m
|
||||
Var=MAB2AB_LightTempFaultOn_b bit 0,1 -b -m // LED in der Momentanverbrauchsanzeige
|
||||
Var=MAB2AB_LightChargingOn_b bit 15,1 -b -m
|
||||
Var=MAB2AB_LightBatDischargedOn_b bit 14,1 -b -m
|
||||
Var=MAB2AB_LightForwardSpeedOn_b bit 13,1 -b -m
|
||||
Var=MAB2AB_LightReverseGearOn_b bit 12,1 -b -m
|
||||
Var=MAB2AB_Light12VBatFaultOn_b bit 11,1 -b -m
|
||||
Var=MAB2AB_LightELFaultOn_b bit 10,1 -b -m
|
||||
Var=MAB2AB_LightStopOn_b bit 9,1 -b -m
|
||||
Var=MAB2AB_LightBatH2OLackOn_b bit 8,1 -b -m
|
||||
|
||||
[MAB_Module_VAB_Displays]
|
||||
ID=4A1h
|
||||
DLC=3
|
||||
Var=MAB2AB_DisplayResidualEnergy_U8 unsigned 0,8 -m
|
||||
Var=MAB2AB_DisplayConsumption_U8 unsigned 8,8 -m
|
||||
Var=MAB2AB_DisplaySpeedometer_kmh unsigned 16,8 -m /u:km/h
|
||||
|
||||
{RECEIVE}
|
||||
|
||||
[Module_VAB_Status]
|
||||
ID=2A1h
|
||||
DLC=4
|
||||
Var=AB2MAB_BootCheckOkay_b bit 7,1 -b -m
|
||||
Var=AB2MAB_EmergencyStopInactive_b bit 6,1 -b -m
|
||||
Var=AB2MAB_ErrorModeS1Inactive_b bit 5,1 -b -m
|
||||
Var=AB2MAB_ErrorModeS2Inactive_b bit 4,1 -b -m
|
||||
Var=AB2MAB_ErrorModeS3Inactive_b bit 3,1 -b -m
|
||||
Var=AB2MAB_OverallCheckOkay_b bit 2,1 -b -m
|
||||
Var=AB2MAB_ChargingCoverClosed_b bit 15,1 -b -m
|
||||
Var=AB2MAB_ChargingPlugConnected_b bit 14,1 -b -m
|
||||
Var=AB2MAB_SwitchRearGearActive_b bit 13,1 -b -m
|
||||
Var=AB2MAB_SwitchIgnitionIsOn_b bit 12,1 -b -m
|
||||
Var=AB2MAB_SwitchEngineStartIsOn_b bit 11,1 -b -m
|
||||
Var=AB2MAB_SensorFootBrakeIsOn_b bit 10,1 -b -m
|
||||
Var=AB2MAB_SensorHandbrakeIsOn_b bit 9,1 -b -m
|
||||
Var=AB2MAB_SensorBrakeFluidOkay_b bit 8,1 -b -m
|
||||
Var=AB2MAB_SensorDriversDoorClosed_b bit 16,1 -b -m
|
||||
Var=AB2MAB_TemperatureCoolant_C unsigned 22,10 -m /u:°C /f:0.1955034213 /o:-50 /d:0
|
||||
|
||||
[MAB_Module_VAB_AccPedal]
|
||||
ID=2A2h // Var=AB2MAB_AccPedalPosition unsigned 0,10 -m /f:0.00392157
|
||||
DLC=2
|
||||
Var=AB2MAB_AccPedalPosition unsigned 0,10 -m /f:0.097751710654
|
||||
|
||||
{VIRTUALVARS}
|
||||
Var=VV_Schalter_Ladeklappe bit -b
|
||||
|
||||
15
CANLibrary/symfiles/MAB_Module_VBB.sym
Normal file
15
CANLibrary/symfiles/MAB_Module_VBB.sym
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="Untitled"
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[MAB_Module_VBB]
|
||||
ID=516h
|
||||
DLC=4
|
||||
Var=SensorVoltage_internal unsigned 8,8 /u:V /f:0.02 /d:0
|
||||
Var=SensorPressure_out unsigned 16,8 /u:bar /f:0.02
|
||||
Var=RelayVacuumSensorCloseDemand_out unsigned 0,1 /u:bool
|
||||
Var=RelayVacuumPumpCloseDemand_out unsigned 1,1 /u:bool
|
||||
Var=VbbIsEnabled_out unsigned 2,1 /u:bool
|
||||
Var=PumpControllerState_internal unsigned 24,8 /u:uint8
|
||||
|
||||
227
CANLibrary/symfiles/MCU.sym
Normal file
227
CANLibrary/symfiles/MCU.sym
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
FormatVersion=5.0 // Do not edit!
|
||||
Title="Untitled"
|
||||
|
||||
{SEND}
|
||||
|
||||
[Receive_TorqueRequest]
|
||||
ID=131h // Requested motor torque
|
||||
DLC=8
|
||||
CycleTime=50
|
||||
Var=MessageCounter unsigned 0,4
|
||||
Var=CRC unsigned 8,8
|
||||
Var=TorqueDemand_Left signed 16,16 /u:Nm /f:0.0625 /d:0
|
||||
Var=TorqueDemand_Right signed 32,16 /u:Nm /f:0.0625 /d:0
|
||||
|
||||
[Module_VAB_AccPedal]
|
||||
ID=2A2h
|
||||
DLC=2
|
||||
Var=AB2MAB_AccPedalPosition unsigned 0,10 -m /f:0.1
|
||||
|
||||
[Module_VAB_Status]
|
||||
ID=2A1h
|
||||
DLC=4
|
||||
Var=AB2MAB_TemperatureCoolant_C unsigned 22,10 -m /u:°C /f:0.195503 /o:-50
|
||||
Var=AB2MAB_SensorDriversDoorClosed_b unsigned 16,1 -m
|
||||
Var=AB2MAB_ChargingHatchClosed_b unsigned 15,1 -m
|
||||
Var=AB2MAB_ChargingPlugConnected_b unsigned 14,1 -m
|
||||
Var=AB2MAB_SwitchRearGearActive_b unsigned 13,1 -m
|
||||
Var=AB2MAB_SwitchIgnitionIsOn_b unsigned 12,1 -m
|
||||
Var=AB2MAB_SwitchEngineStartIsOn_b unsigned 11,1 -m
|
||||
Var=AB2MAB_SensorFootBrakeIsOff_b unsigned 10,1 -m
|
||||
Var=AB2MAB_SensorHandbrakeIsOff_b unsigned 9,1 -m
|
||||
Var=AB2MAB_SensorBrakeFluidOkay_b unsigned 8,1 -m
|
||||
Var=AB2MAB_BootCheckOkay_b unsigned 7,1 -m
|
||||
Var=AB2MAB_EmergencyStopInactive_b unsigned 6,1 -m
|
||||
Var=AB2MAB_ErrorModeS1Inactive_b unsigned 5,1 -m
|
||||
Var=AB2MAB_ErrorModeS2Inactive_b unsigned 4,1 -m
|
||||
Var=AB2MAB_ErrorModeS3Inactive_b unsigned 3,1 -m
|
||||
Var=AB2MAB_OverallCheckOkay_b unsigned 2,1 -m
|
||||
|
||||
{RECEIVE}
|
||||
|
||||
[MCU1_Energy]
|
||||
ID=334h // Energy related sensor data.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU1_MessageCounter unsigned 0,4
|
||||
Var=MCU1_VoltageDCLink unsigned 8,8 /u:V /f:2
|
||||
Var=MCU1_Current_Left signed 16,16 /u:A /f:0.0625 /d:0
|
||||
Var=MCU1_Current_Right signed 32,16 /u:A /f:0.0625 /d:0
|
||||
|
||||
[MCU2_Warning]
|
||||
ID=336h // Warning levels for various values. If possible, there should be an escalation over two levels before an error
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU2_MessageCounter unsigned 0,4
|
||||
Var=MCU2_Communication unsigned 8,2
|
||||
Var=MCU2_TemperatureDCLink unsigned 10,2
|
||||
Var=MCU2_VoltageDCLink unsigned 12,2
|
||||
Var=MCU2_TemperatureCooler unsigned 14,2
|
||||
Var=MCU2_Speed unsigned 16,2
|
||||
|
||||
[MCU3_TorqueAvailable]
|
||||
ID=335h // Currently available motor torques for normal and boost operation.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU3_TorqueNormal_Left signed 0,16 /u:Nm /f:0.125 /d:0
|
||||
Var=MCU3_TorqueNormal_Right signed 16,16 /u:Nm /f:0.125 /d:0
|
||||
Var=MCU3_TorqueBoost_Left signed 32,16 /u:Nm /f:0.125 /d:0
|
||||
Var=MCU3_TorqueBoost_Right signed 48,16 /u:Nm /f:0.125 /d:0
|
||||
|
||||
[MCU4_TorqueActual]
|
||||
ID=331h // Current actual motor torque values.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU4_MessageCounter unsigned 0,4
|
||||
Var=MCU4_TorqueActual_Left signed 8,16 /u:Nm /f:0.0625 /d:0
|
||||
Var=MCU4_TorqueActual_Right signed 24,16 /u:Nm /f:0.0625 /d:0
|
||||
|
||||
[MCU5_Temperature]
|
||||
ID=533h // Measured temperatures.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU5_TempCapacitorLeft unsigned 0,8 /u:Celsius /o:-50
|
||||
Var=MCU5_TempCapacitorRight unsigned 8,8 /u:Celsius /o:-50
|
||||
Var=MCU5_TempT1Left unsigned 16,8 /u:Celsius /o:-50
|
||||
Var=MCU5_TempT1Right unsigned 24,8 /u:Celsius /o:-50
|
||||
Var=MCU5_TempT2Left unsigned 32,8 /u:Celsius /o:-50
|
||||
Var=MCU5_TempT2Right unsigned 40,8 /u:Celsius /o:-50
|
||||
Var=MCU5_TempT3Left unsigned 48,8 /u:Celsius /o:-50
|
||||
Var=MCU5_TempT3Right unsigned 56,8 /u:Celsius /o:-50
|
||||
|
||||
[MCU6_StateActual]
|
||||
ID=333h // Current internal states indicators of the MCU firmware.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU6_MessageCounter unsigned 0,4
|
||||
Var=MCU6_SysState_Actual unsigned 8,8
|
||||
Var=MCU6_CtrlState unsigned 16,8
|
||||
Var=MCU6_SysMode unsigned 24,8
|
||||
Var=MCU6_SysEmergencyId unsigned 32,8
|
||||
Var=MCU6_SysRunModeAtErrorDetection unsigned 40,8
|
||||
Var=MCU6_StateRequested unsigned 48,8
|
||||
Var=MCU6_StateRequestAck unsigned 56,8
|
||||
|
||||
[MCU7_MotorSpeed]
|
||||
ID=337h // Motor speedes.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU7_MessageCounter unsigned 0,4
|
||||
Var=MCU7_Speed_Left signed 8,16 /u:rad/s /f:0.0625 /d:0
|
||||
Var=MCU7_Speed_Right signed 24,16 /u:rad/s /f:0.0625 /d:0
|
||||
|
||||
[MCU8_CtrlPar1]
|
||||
ID=339h // Feedback controller parameters.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Var=MCU8_MessageCounter unsigned 0,4
|
||||
Var=MCU8_TorqueReducedLeft signed 8,16 /f:0.0625 /d:0
|
||||
Var=MCU8_TorqueReducedRight signed 24,16 /f:0.0625 /d:0
|
||||
|
||||
[MCU9_Sense]
|
||||
ID=535h // Sensor values.
|
||||
DLC=8
|
||||
Var=MCU9_VoltageDcLink signed 0,16 /u:V /f:0.0625 /d:0
|
||||
|
||||
[MCU10_Diag]
|
||||
ID=539h // Diagnosis bitmasks.
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_0 0,8 0
|
||||
Var=ErrGeneralMsk_MessageCounter unsigned 8,4
|
||||
Var=ErrGeneralMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_1 0,8 1
|
||||
Var=ErrCtrlMsk_MessageCounter unsigned 8,4
|
||||
Var=ErrCtrlMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_2 0,8 2
|
||||
Var=ErrAdcMsk_MessageCounter unsigned 8,4
|
||||
Var=ErrAdcMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_3 0,8 3
|
||||
Var=ErrComMsk_MessageCounter unsigned 8,4
|
||||
Var=ErrComMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_4 0,8 4
|
||||
Var=WarnGeneralMsk_MessageCounter unsigned 8,4
|
||||
Var=WarnGeneralMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_5 0,8 5
|
||||
Var=WarnCtrlMsk_MessageCounter unsigned 8,4
|
||||
Var=WarnCtrlMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_6 0,8 6
|
||||
Var=WarnAdcMsk_MessageCounter unsigned 8,4
|
||||
Var=WarnAdcMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_7 0,8 7
|
||||
Var=WarnComMsk_MessageCounter unsigned 8,4
|
||||
Var=WarnComMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_8 0,8 8
|
||||
Var=DiagGeneralMsk_MessageCounter unsigned 8,4
|
||||
Var=DiagGeneralMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_9 0,8 9
|
||||
Var=DiagCtrlMsk_MessageCounter unsigned 8,4
|
||||
Var=DiagCtrlMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_10 0,8 0Ah
|
||||
Var=DiagAdcMsk_MessageCounter unsigned 8,4
|
||||
Var=DiagAdcMsk unsigned 16,32
|
||||
|
||||
[MCU10_Diag]
|
||||
DLC=8
|
||||
CycleTime=2
|
||||
Mux=MCU10_Diag_Mux_11 0,8 0Bh
|
||||
Var=DiagComMsk_MessageCounter unsigned 8,4
|
||||
Var=DiagComMsk unsigned 16,32
|
||||
|
||||
[VCU_Module_VAB_Displays]
|
||||
ID=4A1h
|
||||
DLC=3
|
||||
CycleTime=4
|
||||
Var=MAB2AB_DisplaySpeedometer_kmh unsigned 16,8 -m /u:km/h
|
||||
Var=MAB2AB_DisplayConsumption_U8 unsigned 8,8 -m
|
||||
Var=MAB2AB_DisplayResidualEnergy_U8 unsigned 0,8 -m
|
||||
|
||||
{SENDRECEIVE}
|
||||
|
||||
[Receive_StateRequest]
|
||||
ID=332h // Requested Motor Controller State
|
||||
DLC=8
|
||||
Var=MessageCounter unsigned 0,4
|
||||
Var=CRC unsigned 8,8
|
||||
Var=State_Request unsigned 16,8
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
pycrc/pycrc.pyc
BIN
pycrc/pycrc.pyc
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue