Indirect addressing required. Add the following code to the end of your block, and add "outdb" as an INT to your temp area.
Code:
L P##DTOUT
LAR2
L W [AR2,P#0.0]
T #outdb
L D [AR2,P#2.0]
LAR2
OPN DB [#outdb]
LAR1 P##DT_1
L D [AR1,P#0.0]
L D [AR1,P#4.0]
T D [AR2,P#4.0]
TAK
T D [AR2,P#0.0]
I think that "DT" is just a shorter way to write DATE_AND_TIME.
Create a variable in a global DB with type DATE_AND_TIME.
Your BLKMOV can then point to the variable. Just type the symbolic name, i.e. "MyDB".My_DT_var
You also need to check that outdb is not zero, and when it is, not open the db! And that when di is accesed you need to use opn di or replace the di address marker with the one for a db!
No. A DT data type parameter is passed to an FC as a DB pointer. Even if the calling block is an FB and the DT is in the STAT area, the db pointer passed will contain a global DB number and the absolute address of the STAT variable.