Something difficult to explain, but I'll try. I have a data buffer where data enters of 4 serially connected devices. DB130 is my buffer, so far so good, data arrives in ASCII.
I get data every 2 seconds in this buffer of adress 1, 2, 3 and 4.
When adress 1, then DB130 has to be transmitted to DB81
When adress 2, then DB130 has to be transmitted to DB82
When adress 3, then DB130 has to be transmitted to DB83
When adress 4, then DB130 has to be transmitted to DB84
Data transmitting:
FC30:
What's my problem:
In monitor I have seen that DB81 gets data from box 3, so, the data is nog given in a good way from DB130 to DB81, 82, 83 or 84.
Could it be my code ?
I get data every 2 seconds in this buffer of adress 1, 2, 3 and 4.
When adress 1, then DB130 has to be transmitted to DB81
When adress 2, then DB130 has to be transmitted to DB82
When adress 3, then DB130 has to be transmitted to DB83
When adress 4, then DB130 has to be transmitted to DB84
Data transmitting:
Code:
L DB130.DBB 32
L B#16#6
==I
FP #MEMBITS._2
JCN NOC
L #BOX_ADDR
L 80
+I
T #DoelDB
CALL FC 30
BronDB :=#REC_DB
BronByte :=32
DoelDB :=#DoelDB
DoelByte :=32
Lengte_Bytes:=35
Fout :=#DB_DB_FLT
L 0
T DB130.DBB 32
NOC: NOP 0
FC30:
Code:
L P##Bron
LAR1
L P##Doel
LAR2
L B#16#10
T LB [AR1,P#0.0]
T LB [AR2,P#0.0]
L B#16#2
T LB [AR1,P#1.0]
T LB [AR2,P#1.0]
L #Lengte_Bytes
T LW [AR1,P#2.0]
T LW [AR2,P#2.0]
L #BronDB
T LW [AR1,P#4.0]
L #DoelDB
T LW [AR2,P#4.0]
L #BronByte
SLD 3
L DW#16#84000000
OD
T LD [AR1,P#6.0]
L #DoelByte
SLD 3
L DW#16#84000000
OD
T LD [AR2,P#6.0]
CALL SFC 20
SRCBLK :=#Bron
RET_VAL:=#RET
DSTBLK :=#Doel
What's my problem:
In monitor I have seen that DB81 gets data from box 3, so, the data is nog given in a good way from DB130 to DB81, 82, 83 or 84.
Could it be my code ?