batMON smartCORE module
Description
The batmon module is the interface between the smartIO batMON battery monitoring system and the smartCORE. Various battery parameters are
- written to smartCHANNELS in the form of live data if the system is running
- recorded as historical data during the system's idle phase and downloaded from batMON during the system's switch-on phase and stored in a file provided for this purpose.
Operating states
The following diagram illustrates the operating states of the batMON.
Interfaces & protocols used
- CAN bus
- OSF format
JSON configuration
The following section describes the entire JSON configuration of the module and explains the individual parameters.
Example configuration (minimum)
{
"module": "batmon",
"factory": "batmon",
"config":{}
}
Example configuration (maximum)
{
"module": "batmon",
"factory": "batmon",
"config":{
"priority":80,
"timeoutMs":1000,
"readBufferSize":8192,
"writeBufferSize":8192,
"canInterface": "can1",
"fileName":"/sde/<tag>/<date>/<date>_<time>.osf",
"fileTag": "preview",
"measurementTimeChannelName": "Batmon.Parameter.MeasurementTime",
"shutDownTimeChannelName": "Batmon.Parameter.ShutDownTime",
"bootTimeChannelName": "Batmon.Parameter.BootTime",
"wakeUpTimeChannelName": "Batmon.Parameter.WakeUpTime",
"voltageDropDelayTimeChannelName": "Batmon.Parameter.VoltageDropDelayTime",
"vAlwaysOffChannelName": "Batmon.Parameter.VAlwaysOff",
"vAlwaysOnChannelName": "Batmon.Parameter.VAlwaysOn",
"powerSupplyVoltageChannelName": "Batmon.PowerSupplyVoltage",
"powerSupplyCurrentChannelName": "Batmon.PowerSupplyCurrent",
"temperatureMOSFETChannelName": "Batmon.TemperatureMOSFET",
"temperatureChannelName": "Batmon.Temperature",
"resistanceChannelName": "Batmon.Resistance",
"operatingModeChannelName": "Batmon.OperatingMode",
"configurationErrorChannelName": "Batmon.ConfigurationError",
"batteryStatusChannelName": "Batmon.BatteryStatus",
"terminal15StatusChannelName": "Batmon.Terminal15Status",
"shutDownCounterChannelName": "Batmon.ShutDownCounter",
"bootCounterChannelName": "Batmon.BootCounter",
"wakeUpEventChannelName": "Batmon.WakeUpEvent",
"shutDownEventChannelName": "Batmon.ShutDownEvent",
"requestEnergySaveChannelName": "Batmon.RequestEnergySave",
"aboutToShutDownChannelName": "Batmon.AboutToShutDown",
"criticalPowerStateChannelName": "Batmon.CriticalPowerState",
"lowPowerStateChannelName": "Batmon.LowPowerState",
"firmwareVersionsChannelName": "firmwareVersions",
"wakeUpTime":3600,
"measurementTime":60,
"shutDownTime":90,
"bootTime":900,
"voltageDropDelayTime":10,
"voltageAlwaysOnMV":23000,
"voltageAlwaysOffMV":20500,
"canIdValues123":120,
"canIdValues456":121,
"canIdStatus":125,
"canIdSetRtcRXD":10,
"canIdSetRtcTXD":11,
"canIdRXD":128,
"canIdTXD":129,
"canIdParameter1":130,
"canIdParameter2":131,
"canIdParameter3":132
}
}
Parameter list
Parameter name | Required | Data type | Meaningful value range | Default | Description |
---|---|---|---|---|---|
priority | No | INT | 1 ... 99 | 80 | Scheduling priority of the CAN bus interface |
timeoutMs | No | INT | 1 ... | 1000 | Interval between periodically executed parts of the module |
readBufferSize | No | INT | 1 ... | 8192 | Number of buffered CAN bus messages (read direction) |
writeBufferSize | No | INT | 1 ... | 8192 | Number of buffered CAN bus messages (write direction) |
canInterface | No | STRING | "can0", "can1", ... | "can1" | CAN bus interface |
fileName | No | STRING | valid OSF path template | "/sde/<tag>/<date>/<date>_<time>.osf " | Historical OSF file |
fileTag | No | STRING | "preview" | Tag attributes of the historical OSF file | |
measurementTimeChannelName | No | STRING | "<module> .Parameter.MeasurementTime" | Channel with set measurement interval Parameter | |
shutDownTimeChannelName | No | STRING | "<module> .Parameter.ShutDownTime" | Channel with set shutdown time Parameter | |
bootTimeChannelName | No | STRING | "<module> .Parameter.BootTime" | Channel with set boot time Parameter | |
wakeUpTimeChannelName | No | STRING | "<module> .Parameter.WakeUpTime" | Channel with set wake-up time Parameter | |
voltageDropDelayTimeChannelName | No | STRING | "<module> .Parameter.VoltageDropDelayTime" | Channel with set voltage drop tolerance time parameter | |
vAlwaysOffChannelName | No | STRING | "<module> .Parameter.VAlwaysOff" | Channel with set parameter of the lower switching threshold | |
vAlwaysOnChannelName | No | STRING | "<module> .Parameter.VAlwaysOn" | Channel with set parameter of the upper switching threshold | |
powerSupplyVoltageChannelName | No | STRING | "<module> .PowerSupplyVoltage" | Supply voltage (U_Sup) | |
powerSupplyCurrentChannelName | No | STRING | "<module> .PowerSupplyCurrent" | Supply current (I_Sup) | |
temperatureMOSFETChannelName | No | STRING | "<module> .TemperatureMOSFET" | Temperature of the MOSFET (T_MOS) | |
temperatureChannelName | No | STRING | "<module> .Temperature" | Temperature of the batMON (T_bM) | |
resistanceChannelName | No | STRING | "<module> .Resistance" | Resistance of the batMON (R_bM) | |
operatingModeChannelName | No | STRING | "<module> .OperatingMode" | batMON operating mode | |
configurationErrorChannelName | No | STRING | "<module> .ConfigurationError" | batMON configuration error | |
batteryStatusChannelName | No | STRING | "<module> . "BatteryStatus" | batMON BatteryStatus | |
terminal15StatusChannelName | No | STRING | "<module> .Terminal15Status" | batMON Status of terminal 15 | |
shutDownCounterChannelName | No | STRING | "<module> .ShutDownCounter" | batMON Countdown within which the shutdown must be completed | |
bootCounterChannelName | No | STRING | "<module> .BootCounter" | batMON Countdown within which the system startup must be completed | |
wakeUpEventChannelName | No | STRING | "<module> .WakeUpEvent" | batMON Wakeup event | |
requestEnergySaveChannelName | No | STRING | "<module> .RequestEnergySave" | BOOL batMON channel for requesting the sleep state | |
aboutToShutDownChannelName | No | STRING | "<module> .AboutToShutDown" | BOOLesche batMON channel for notification of imminent shutdown | |
criticalPowerStateChannelName | No | STRING | "<module> .CriticalPowerState" | BOOLesche batMON channel for notification of a critical power state | |
lowPowerStateChannelName | No | STRING | "<module> .LowPowerState" | BOOLesche batMON channel for notification of a low power state | |
firmwareVersionsChannelName | No | STRING | "<module> .FirmwareVersion" | STRING Channel with FW and PIC FW version information | |
wakeUpTime | No | INT | 600 ... 7200 | 3600 | batMON Wake-up time [s] |
measurementTime | No | INT | 30 ... 300 | 60 | batMON Measuring interval [s] |
shutDownTime | No | INT | 30 ... 120 | 90 | batMON Shutdown time [s] |
bootTime | No | INT | 60 ... 120 | 900 | batMON Boot time [s] |
voltageDropDelayTime | No | INT | 10 | batMON Voltage drop-in tolerance time [s] | |
voltageAlwaysOnMV | No | INT | (voltageAlwaysOffMV + 2000) ... 150000 | 23000 | batMON Switch-on threshold for continuous operation [mV] |
voltageAlwaysOffMV | No | INT | 18500 ... (voltageAlwaysOnMV - 2000) | 20500 | batMON Switch-off threshold [mV] |
canIdValues123 | No | INT | valid/unique CAN ID | 120 | batMON CAN bus ID for message (U_Sup,I_Sup,T_MOS) |
canIdValues456 | No | INT | valid/unique CAN ID | 121 | batMON CAN bus ID for message (T_bM) |
canIdStatus | No | INT | valid/unique CAN ID | 125 | batMON CAN bus ID for status message |
canIdSetRtcRXD | No | INT | valid/unique CAN ID | 10 | batMON CAN bus ID for setting the RTC |
canIdSetRtcTXD | No/Discarded | INT | valid/unique CAN ID | 11 | batMON CAN bus ID for setting the RTC (acknowledgement) |
canIdParameter1 | No | INT | valid/unique CAN ID | 130 | batMON CAN bus ID for the first parameter report frame |
canIdParameter2 | No | INT | valid/unique CAN ID | 131 | batMON CAN bus ID for the second parameter report frame |
canIdParameter3 | No | INT | valid/unique CAN ID | 132 | batMON CAN-Bus ID for the third Parameter Report Frame |
Parameter Enums
Operating mode
Value | Meaning |
---|---|
0 | Start |
1 | Normal operation |
2 | Initialization of shutdown |
3 | Shutdown |
batMON smartIO device status
Value | Meaning |
---|---|
0 | initial after a cold start / reset |
1 | Standby (monitoring idle state timer, voltages, terminal 15, ...) |
2 | Switched on (MOSFET switched on, monitoring of input voltage |
3 | System start (waiting for the system to start up) |
4 | Monitoring (waiting for system shutdown condition) |
5 | Switching off (waiting for the system to switch off) |
6 | Switched off (MOSFET switched off, capacitors are discharged) |
Configuration error
Value | Meaning |
---|---|
-3 | voltageAlwaysOnMV too high |
-2 | voltageAlwaysOnMV too low |
-1 | voltageAlwaysOffMV too low |
0 | OK |
1 | incorrect measurementTime |
2 | wrong shutDownTime |
3 | wrong bootTime |
4 | incorrect wakeUpTime |
5 | wrong voltageAlwaysOnMV |
6 | wrong voltageAlwaysOffMV |
Battery status
Value | Meaning |
---|---|
0 | unknown |
1 | permanently switched on |
2 | energy saving mode |
3 | permanently switched off |
4 | permanently switched off (below power supply switch-on voltage) |
Status of terminal 15
Value | Meaning |
---|---|
0 | unknown/not available |
1 | switch-on edge |
2 | switch-off edge |
Wake-up event
Value | Meaning | following operating mode |
---|---|---|
0 | unknown | undefined |
1 | Terminal 15 Switch-on edge | Retrieval of historical data + continuous operation |
2 | permanently switched off | alarming + shutdown |
3 | permanently switched on | retrieval of historical data + continuous operation |
4 | (generally periodic) CAN bus command | Retrieval of historical data + energy-saving mode |
5 | Energy-saving mode | Retrieval of historical data + energy-saving mode |
6 | Woken up by CAN bus message | Retrieve historical data + continuous operation |
Shutdown event
Value | Meaning | Description |
---|---|---|
0 | none | no event |
1 | Terminal 15 | Shutdown via terminal 15 (e.g. ignition key) |
2 | Voltage level "always off" | Shutdown because the voltage has fallen below the limit value "always off" |
3 | CAN bus message | Shutdown due to a CAN bus message |
4 | Overcurrent | Shutdown due to exceeded current |
5 | Overtemperature | Shutdown due to exceeded temperature |
6-8 | RESERVED | |
9 | MOSFET failure | Shutdown due to MOSFET failure |
10 | Terminal 15 and voltage level "always off" | Shutdown because the voltage has fallen below the "always off" limit (if terminal 15, e.g. ignition key, is present) |
11 | Eco mode | Shutdown after completed measurement, as the voltage is below the "always on" limit value |
12 | undershoot | undershoot of the MOSFET switch-on voltage |
15 | unknown | unknown shutdown event |
Call interface functions
requestDelayedShutdown
Function for the shutdown delay
Parameters | Type | Description |
---|---|---|
sender | STRING | Unique sender identifier (e.g. module instance) |
delay | INT | Delay [ms] < 64k |
Module information
Information | Value |
---|---|
Author | optiMEAS Measurement and Automation Systems GmbH |
since smartCORE | 0.101 |
module type | producer & consumer (request energy save) |
Dependencies | "canbus" or "candbc" smartMODULE (on smartDEVICES), functioning CAN bus interface (on other platforms) |