MWA_DATA[MWA_STA_DST] := MWA_DATA[MWA_STA_SRC] ;
That is very simple. I was wondering how it would be done since there isn't a OPNDB command like STL
As far as the symbolic names, I'm not a fan either
True, that is why I kinda liked the STL version with the input of the Array,First Element, and then the Source and Dest. Makes for a nice re-usable block Thanks again for that LD!!!It also might be that they have over simplified it, that block might be easy to use incorrectly. Also it might be that it is case depended. Atleast that block cant move udt if size of that udt aint hardcoded inside the block.
So you dont have that SCL source? In that case, if you can, maybe post stl source of that block.
If you feel like looking thru it more power too ya
It made me dizzy just looking at it, that's when I figured I would ask the pro's at this site
It won't let me genereate the source, I'm guessing since it is already genereated by SCL but here is the pasted code from the block
INPUTS:
MWA_STA_SRC = INT
MWA_STA_DST = INT
IN/OUT:
MWA_DATA = Array[0..100] Struct
-String[10]
-Byte
TEMP:
i = INT
match = BOOL
Code:
SET
SAVE
= L 2.2
L #MWA_STA_DST
ITD
L L#112
*D
L L#96
+D
L #MWA_STA_SRC
ITD
TAK
T LD 4
TAK
L L#112
*D
L L#96
+D
L P##MWA_DATA
LAR1
TAK
T LD 8
TAK
L W [AR1,P#0.0]
T LW 12
OPN DB [LW 12]
L D [AR1,P#2.0]
L LD 8
+D
LAR1
L B [AR1,P#0.0]
T LD 8
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 12
OPN DB [LW 12]
L D [AR1,P#2.0]
L LD 4
+D
LAR1
L LD 8
T B [AR1,P#0.0]
L #MWA_STA_DST
ITD
L L#112
*D
L #MWA_STA_SRC
ITD
TAK
T LD 4
TAK
L L#112
*D
L P##MWA_DATA
LAR1
TAK
T LD 8
TAK
L W [AR1,P#0.0]
T LW 12
OPN DB [LW 12]
L D [AR1,P#2.0]
L LD 8
+D
LAR1
L D [AR1,P#1.0]
T LD 16
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 20
OPN DB [LW 20]
L D [AR1,P#2.0]
L LD 4
+D
LAR1
L LD 16
T D [AR1,P#1.0]
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 16
OPN DB [LW 16]
L D [AR1,P#2.0]
L LD 8
+D
LAR1
L D [AR1,P#5.0]
T LD 16
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 20
OPN DB [LW 20]
L D [AR1,P#2.0]
L LD 4
+D
LAR1
L LD 16
T D [AR1,P#5.0]
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 16
OPN DB [LW 16]
L D [AR1,P#2.0]
L LD 8
+D
LAR1
L W [AR1,P#9.0]
T LD 16
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 20
OPN DB [LW 20]
L D [AR1,P#2.0]
L LD 4
+D
LAR1
L LD 16
T W [AR1,P#9.0]
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 16
OPN DB [LW 16]
L D [AR1,P#2.0]
L LD 8
+D
LAR1
L B [AR1,P#11.0]
T LD 16
L P##MWA_DATA
LAR1
L W [AR1,P#0.0]
T LW 20
OPN DB [LW 20]
L D [AR1,P#2.0]
L LD 4
+D
LAR1
L LD 16
T B [AR1,P#11.0]
= L 2.2
SAVE
BE