Hopefully someone can validate my thoughts on the following:
I'm looking at a proposed program design for a line which will be with us early next year, The style of programming is very similar to S7Guys concept.
Each Station has 9 FB's and 1 DB containing a Master UDT made up of smaller UDT's.
e.g Station 1 FB10 - 19, DB10
Station 2 FB20 - 29, DB20
in FB10 the call is structured as follows
FB11 to 19 contain The Master UDT in the STAT area so it seems the station data is available to all blocks.
Now to the questions!!
FB11 "Datenlesen" is where Inputs are Mapped, however under what conditions could AR2 be screwed up?
I thought at first if i loaded a different DB variable and transfered it to Station Data that would mess with the IDB number? but it would be ok i think because the different DB number would be stored in the global DB register not the instance leaving AR2 in tact.
Other than the recompilation of UDT's in the event of change and the loss of goto location i don't see any problems - what do the Guru's think?
Thanks for taking the time to read this and any advice offered.
I'm looking at a proposed program design for a line which will be with us early next year, The style of programming is very similar to S7Guys concept.
Each Station has 9 FB's and 1 DB containing a Master UDT made up of smaller UDT's.
e.g Station 1 FB10 - 19, DB10
Station 2 FB20 - 29, DB20
in FB10 the call is structured as follows
Code:
OPN DI10
LAR2 P#0.0
UC FB11 - St1DatenLesen
UC FB12
to
UC FB19 - St1DatenSchreiben
Now to the questions!!
FB11 "Datenlesen" is where Inputs are Mapped, however under what conditions could AR2 be screwed up?
I thought at first if i loaded a different DB variable and transfered it to Station Data that would mess with the IDB number? but it would be ok i think because the different DB number would be stored in the global DB register not the instance leaving AR2 in tact.
Other than the recompilation of UDT's in the event of change and the loss of goto location i don't see any problems - what do the Guru's think?
Thanks for taking the time to read this and any advice offered.