Right before starting to think about what kind of indirect adressing suits best my needs, I'd like to ask for your advice on finding the best how to structure my code...
The case is next: If I have to, for instance, count the number of hours my motors are on, I'll create a code for it and put it into an FB. Then after I'll create as many DB's as motors I want to control. In each DB I will store (among other data), a variable containing the number of hours. The FB will call to all those associated DB's by means of a loop instruction with indirect addressing.
This is how I've been doing in Allen-Bradley (multiinstancing)....my question is: is this way I've just described above the most efficient one in Siemens in order to take best advantage of the use of the CPU's memory for a S7-300?
The case is next: If I have to, for instance, count the number of hours my motors are on, I'll create a code for it and put it into an FB. Then after I'll create as many DB's as motors I want to control. In each DB I will store (among other data), a variable containing the number of hours. The FB will call to all those associated DB's by means of a loop instruction with indirect addressing.
This is how I've been doing in Allen-Bradley (multiinstancing)....my question is: is this way I've just described above the most efficient one in Siemens in order to take best advantage of the use of the CPU's memory for a S7-300?