Marek Tenerowicz
Member
- Join Date
- May 2004
- Posts
- 25
Is there any way to initialize variables in an Instance DB?
Example: In FB(X) I am using multiple instances of FB(Y). The Instance DB for FB(X) is DB(X). I would like to initialize the variables for each instance of FB(Y) in DB(X), but the initial values are not editable in either the Data View or the Declaration View. I am currently passing values to the addresses in the Instance DB for the variables I want initialized with move statements in OB100 (warm restart) or OB102(cold restart). This works, but makes a lot of extra code.
Example: In FB(X) I am using multiple instances of FB(Y). The Instance DB for FB(X) is DB(X). I would like to initialize the variables for each instance of FB(Y) in DB(X), but the initial values are not editable in either the Data View or the Declaration View. I am currently passing values to the addresses in the Instance DB for the variables I want initialized with move statements in OB100 (warm restart) or OB102(cold restart). This works, but makes a lot of extra code.