ambarish_trivedi
Member
Dear All ,
I have written a small program in SCL as below .
/////////////////////////////////////////////////////////////
FUNCTION FC1:VOID
VAR_INPUT
GEA1_TO_T, GEA2_TO_T, NPL_TO_T :ARRAY[1..3] OF BOOL ;
END_VAR
VAR
I:INT;
END_VAR
VAR_OUTPUT
G1,G2,NPL:ARRAY[1..3] OF BOOL ;
END_VAR
FOR I:= 1 TO 3 BY 1 DO ;
IF GEA1_TO_T=1 AND G2=0 AND NPL=0
THEN
G1:=1 ; // Statement section IF
ELSE
G1 := 0 ; // Statement section IF
END_IF;
END_FOR;
END_FUNCTION
//////////////////////////////////////////////no error//////////////////////////////
I have defined array in db2 as shown in attachment .
Please let me know how to write address in OB1 while calling FC1 as shown
CALL FC 1
GEA1_TO_T:= ??????
GEA2_TO_T:=???????????
NPL_TO_T :=????????????
G1 :=??????
G2 :=??
NPL :=??
I have written a small program in SCL as below .
/////////////////////////////////////////////////////////////
FUNCTION FC1:VOID
VAR_INPUT
GEA1_TO_T, GEA2_TO_T, NPL_TO_T :ARRAY[1..3] OF BOOL ;
END_VAR
VAR
I:INT;
END_VAR
VAR_OUTPUT
G1,G2,NPL:ARRAY[1..3] OF BOOL ;
END_VAR
FOR I:= 1 TO 3 BY 1 DO ;
IF GEA1_TO_T=1 AND G2=0 AND NPL=0
THEN
G1:=1 ; // Statement section IF
ELSE
G1 := 0 ; // Statement section IF
END_IF;
END_FOR;
END_FUNCTION
//////////////////////////////////////////////no error//////////////////////////////
I have defined array in db2 as shown in attachment .
Please let me know how to write address in OB1 while calling FC1 as shown
CALL FC 1
GEA1_TO_T:= ??????
GEA2_TO_T:=???????????
NPL_TO_T :=????????????
G1 :=??????
G2 :=??
NPL :=??