
07/04 AWB2700-1428GB
Function block DiagGetState
61
In the status display, the individual elements of EXTENDEDINFO
are shown after the simulation of an error (short-circuit on the 1st
output module):
Diagstate_CAN.DRIVERNAME:=ADR(CANDrvName);
Diagstate_CAN.DEVICENUMBER:=1;
Diagstate_CAN.BUSMEMBERID:=Adresse_CAN;
Diagstate_CAN.ENABLE:=TRUE;
Diagstate_CAN();
(* Call the FB DiagGetState*)
END_IF
END_IF
END_IF
END_IF
(*--------------------------------------------------from XSoft V2.3.1--------------------------------------------------------*)
IF Diagstate_CAN.BOLDENABLE=TRUE AND Diagstate_CAN.READY=FALSE THEN
(*BOLDENABLE=internal function variable, Type: BOOL*)
Diagstate_CAN();
(*BOLDENABLE=1: FB DiagGetState active*)
END_IF
(*--------------------------------------------------------------------------------------------------------------------------*)
IF Diagstate_CAN.ENABLE = TRUE THEN
(* Cyclical call if the FB is active*)
IF Diagstate_CAN .READY THEN
(* FB ended? / Are diagnosis data available?*)
IF Diagstate_CAN .STATE=NDSTATE_DIAGINFO_AVAILABLE THEN
(*Diagdataabfrage_can:=1*)
(*Set aux. marker:
If Diagdataabfrage=0->1, then the diagnosis data are
valid and can be accessed. The marker must be reset in
the application program.*)
FOR wHelp_can:=0 TO 23 BY 1 DO
(*23 bytes: length of CAN diagnosis*)
FeldDiag_can[wHelp_can]:= Diagstate_CAN.EXTENDEDINFO[wHelp_can];
(*Copy the array EXTENDEDINFO -> FeldDiag_can*)
END_FOR
END_IF
Diagstate_CAN.ENABLE:=FALSE;
(* Activate FB*)
Diagstate_CAN();
(* Call FB *)
END_IF
END_IF
Summary of Contents for XControl XC600
Page 4: ...II...
Page 8: ...07 04 AWB2700 1428GB 4...
Page 30: ...07 04 AWB2700 1428GB 26...
Page 40: ...07 04 AWB2700 1428GB 36...
Page 74: ...07 04 AWB2700 1428GB 70...
Page 78: ...07 04 AWB2700 1428GB 74...