DM1_Read (FB)ΒΆ
FUNCTION_BLOCK DM1_Read EXTENDS CBM.LTrig IMPLEMENTS IBroadcastHandler, IDTCHandlerList
This function block reads DM1 messages from a given device (itfSourceECU
) as long as xEnable
is TRUE
.
In principal a DM1 message contains lamp information and currently active diagnostic trouble codes (DTC).
Following information is provided by this function block:
Lamp information for following lamps:
Malfunction Indicator Lamp(MIL)
Red Stop Lamp (RSL)
Amber Warning Lamp (AWL)
Protect Lamp
Number of active DTCs(output:
udiDTCCount
)Information about if DM1 message was received in the current PLC cycle (
xReceived
).
DTCBufferWriter: Writes DTC data to a given memory buffer
DTCLogger: Writes DTC data to the PLC log.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xEnable
BOOL
TRUE
: Action startsFALSE
: Action stops, outputsxDone
,xBusy
,xError
are resettedLTrig
Output
xDone
BOOL
TRUE
: Action successfully completedLTrig
xBusy
BOOL
TRUE
: Function block activeLTrig
xError
BOOL
TRUE
: Error occurred, function block aborts actionFALSE
: No errorLTrig
Input
itfSourceECU
IJ1939RemoteECU
ECU which sends this message
Output
itfDTCHandlerList
IDTCHandlerList
THIS^
mainly for graphical programming: output for optional connection to DTC Handler
udiDTCCount
UDINT
Contains number of received Diagnostic Trouble Codes.
MalfunctionIndicatorLamp
Malfunction Indicator Lamp: Lamp to indicate when there is an emission related trouble code active.
RedStopLamp
Red Stop Lamp: Lamp to indicate a problem that is severe enough to warrant stopping the vehicle.
AmberWarningLamp
Amber Warning Lamp: Lamp to indicate a problem with the vehicle system but the vehicle does not need to be stopped immediately.
ProtectLamp
Protect Lamp: Lamp to indicate a problem with a vehicle system that is most likely not electronic subsystem related (e.g. Coolant Temperature has exceeded its defined range.)
xReceived
BOOL
If a DM message was received xReceived is TRUE for one cycle.
eError
detailed error information if xError is TRUE