DTCBufferWriter (FB)ΒΆ
FUNCTION_BLOCK DTCBufferWriter EXTENDS DTCHandlerBase
This function block can be connected to a DM1_Read or DM2_Read function block. As long as xEnable is TRUE
it receives DTCs and writes it to a memory buffer provided by pDTCBuffer.
If a complete diagnostic message was received output xReceived becomes TRUE for one cycle and pDTCBuffer contains received DTCs.
If buffer is too small DTCs can be lost (see output udiDTCLostCount).
Note
Output values and Data in pDTCBuffer is only valid as long as xReceived is TRUE (for one cycle).
- InOut:
Scope
Name
Type
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
itfDTCHandlerListIDTCHandlerListDMx_Read instance
DTCHandlerBase
Output
eErrordetailed error information if xError is TRUE
DTCHandlerBase
Input
pDTCBufferPOINTER TO DTC
Pointer to ARRAY OF DTC. IfxReceivedisTRUEbuffer contains received DTC information. Note: Data is only valid as long as xReceived isTRUE.udiDTCBufferCountUDINTNumber of DTCs fitting into
pDTCBufferOutput
udiDTCReceiveCountUDINTNumber of DTCs written to
pDTCBuffer. Only valid ifxReceivedisTRUE.udiDTCLostCountUDINTNumber of dismissed DTCs. If greater 0 buffer is too small.
xReceivedBOOLTRUEfor one cycle if a diagnostic message was received. pDTCBuffer contains DTC information.