please forget my post #12, not inherent.
what is PW162 input? try to insert an L PW 162 in OB1 as first instruction.
Code:
OB1 / segment 1
0003 DBA1 : DB 40 // assign 40 to param. DBA1
0006 ADR. : KF +160 // assign 160 to param. ADR.
FB65
0021 :B =DBA1 // open DB40 data block
Segment 2
002E :LW =ADR. // Load ADR. parameter, 160
002F :T FW 252 // store to FW252
0030 :I 2 // increase + 2, then 162
0031 :T FW 250 // store to FW250 word: FW250 = 162
........
004C :DO FW 250 // indirect addressing: using FW250 data, 162
004D :L PW 0 // load peripherie L PW 162
004E :T DW 100 // store to DW100 of DB40