Hi, i've came across this code:
Status_profi_read is an array of bools [0..127]
PointerWrite is Temp Dword. Code is in FB.
Function reads profibus nodes status and puts them into addressed array.
My question is: How does it work ?
No loop, no limitation for pointer ( if loop exceedes 32 DWORDS -> Start from DWORD 0 ), and yes - this function is working properly.
Can You point me in right direction ?
Code:
AN #STATUS.R_REQ
AN #STATUS.R_BUSY
S #STATUS.R_REQ
CALL "RDSYSST"
REQ :=#STATUS.R_REQ
SZL_ID :=W#16#292
INDEX :=W#16#1
RET_VAL :=#STATUS.RET
BUSY :=#STATUS.R_BUSY
SZL_HEADER:=#STATUS.SZL_HEADER
DR :=#Status_Profi_read
A #STATUS.R_REQ
AN #STATUS.R_BUSY
R #STATUS.R_REQ
L P##Status_Profi_read
T #PointerWrite
L DID [#PointerWrite]
L #PointerWrite
L P#4.0
+D
T #PointerWrite
Status_profi_read is an array of bools [0..127]
PointerWrite is Temp Dword. Code is in FB.
Function reads profibus nodes status and puts them into addressed array.
My question is: How does it work ?
No loop, no limitation for pointer ( if loop exceedes 32 DWORDS -> Start from DWORD 0 ), and yes - this function is working properly.
Can You point me in right direction ?