The CPU 315 2DP/PN change from RUN to STOP and it give's me the next error in diagnostic: "FB1,210 / Error when accessing a datablock with the DI-register" . What i'm doing wrong? Thank you!
FB1 program
OB1 program
FB1 program
Code:
// vector
FUNCTION_BLOCK FB1 // main function FB1;
VAR
i : INT := 1;
j : INT := 1;
cutii : ARRAY[1..15] OF BOOL;
END_VAR
// input parameters
VAR_INPUT
cutie_mica : BOOL ;
cutie_mare : BOOL ;
END_VAR
// output parameters
VAR_OUTPUT
temp1 : BOOL;
END_VAR
BEGIN // main program
temp1 := cutie_mica AND cutie_mare ;
IF temp1 = TRUE THEN
// Statement Section_IF
cutii[i] := TRUE ;
i := i + 1 ;
ELSIF
temp1 = FALSE THEN
// Statement Section_ELSIF
cutii[i] := FALSE;
i := i + 1;
END_IF;
END_FUNCTION_BLOCK
DATA_BLOCK DB1 FB1
//
// Block Comment...
//
BEGIN
END_DATA_BLOCK
Code:
CALL FB 1 , DB1
cutie_mica:=I0.0
cutie_mare:=I0.1
temp1 :=Q0.0
Last edited: