The compiled SCL :
Code: Select all
L D [AR1,P#128.0]; <-------point to DB1.Err.Err0, structure with 32 bool
T #Err_DW;<-----------------Dword data type
Code: Select all
Err_DW := which_convert_function(DB1.Err.Err0)
Code: Select all
L D [AR1,P#128.0]; <-------point to DB1.Err.Err0, structure with 32 bool
T #Err_DW;<-----------------Dword data type
Code: Select all
Err_DW := which_convert_function(DB1.Err.Err0)
Code: Select all
A7d6: L #Restweg
T #ziel
L #aufl
/R
T #ZielStrich
L DIW [AR2,P#22.0]
T LW 90
TAK
OPN DB [LW 90]
L DID [AR2,P#24.0]
LAR1
TAK
L D [AR1,P#128.0]
T #Err_DW
CLR
= L 84.0
= L 84.1
Code: Select all
VAR_TEMP
........
Err_DW : DWORD ; //internal use
Err_DW_Bit AT Err_DW: ARRAY [0..31]OF BOOL; //BIT VIEW OF DWORD
END_VAR;
ziel := Restweg;
ZielStrich := Restweg/aufl;
Err_DW := Axis.Err;//*******NEED CORRECTION!*************
Err_DW_Bit[0] := FALSE;
Err_DW_Bit[1] := FALSE ;
Code: Select all
TEMP_VAR
....
Err_DW : DWORD ;
Err_Struct AT Err_DW :STRUCT // ADDED same as DB1.Err;
....
END_STRUECT;
END_VAR;
Err_Struct := DB1.Err;
Code: Select all
L D [AR1,P#128.0]
T #Err_DW