3/21/2022 11:07 PM | |
Joined: 7/26/2016 Last visit: 8/20/2024 Posts: 20 Rating:
|
Hi, I cannot understand the logic behind the code attached. However, this code is working properly. It is been made to output profibus DP slave. I have OB1 calling FB199 (DB199), which call FB194. //DECLARATION FB194/ In: ACT as bool ;DPMasterID as word; SZL_ID as word; DIAG as Any Out:STATUS as integer; DIAGLNG as word Temp:Diag_intern as Any; T_AR1 as Dword; T_AR2 as Dword;count as Int; RET_VAL_1 as Int;BUSY_1 as bool; SZL_Header_1 as Struct FB194
I cannot unerstand how rdsysst is outputting in DIAG_INTERN (type any,declaration as temp), and somehow it is ending up in DB194.DBX0.0 (byte 16), which is the input of DIAG. From my understood of the code, the loop send a pointer which is built (for me DB199.DBX10.0 (instance DB)) into DIAG_INTERN on 10 bytes. For me it should be reverse. Also the loop is on 10 bytes (5x2), so I am wondering how my full 16 bytes are written in. Thanks in advance for your help. alexlub AttachmentTest_lar.zip (265 Downloads) |
Follow us on