DM2_Read (FB)ΒΆ
FUNCTION_BLOCK DM2_Read EXTENDS DM1_Read
This function block reads DM2 messages from a given device (itfSourceECU) as long as xEnable is TRUE.
In principal a DM2 message contains lamp information and all previously 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 previously active DTCs(output:
udiDTCCount)Information about if DM2 message was received in the current PLC cycle (
xReceived).
For detailed information about received DTC data one or more DTC Handlers can be connected with this function block (optionally). For example:
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
xEnableBOOLTRUE: Action startsFALSE: Action stops, outputsxDone,xBusy,xErrorare resettedLTrig
Output
xDoneBOOLTRUE: Action successfully completedLTrig
xBusyBOOLTRUE: Function block activeLTrig
xErrorBOOLTRUE: Error occurred, function block aborts actionFALSE: No errorLTrig
Input
itfSourceECUIJ1939RemoteECUECU which sends this message
Output
itfDTCHandlerListIDTCHandlerListTHIS^
mainly for graphical programming: output for optional connection to DTC Handler
udiDTCCountUDINTContains number of received Diagnostic Trouble Codes.
MalfunctionIndicatorLampMalfunction Indicator Lamp: Lamp to indicate when there is an emission related trouble code active.
RedStopLampRed Stop Lamp: Lamp to indicate a problem that is severe enough to warrant stopping the vehicle.
AmberWarningLampAmber Warning Lamp: Lamp to indicate a problem with the vehicle system but the vehicle does not need to be stopped immediately.
ProtectLampProtect 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.)
xReceivedBOOLIf a DM message was received xReceived is TRUE for one cycle.
eErrordetailed error information if xError is TRUE