pointers/indexing in S7 for guy coming from Allen-Bradley

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?

OB,DB,DB.JPG
 
Which CPU will you be using 315/7/9 ?

No need for indirect addressing with what you have shown so far. Create an instance for each motor.
 
Last edited:
I'll be using a 315, I think. My main concern was about whether I'm running a project with , let's say 50 or even more motors, it would be convinient or not to handle such amount of DB's ... I mean, the FB making 50 calls to each of them.

...In any event, as far as I've got to know the size limit per DB is 80kb so I'll work out the calculations for my project and look up into the technical documentation of the CPU's more info about this subject.
 

Similar Topics

Hello, I've just came out of a call where a program that was modified two weeks ago threw the processor into fault. The program has been done...
Replies
9
Views
3,470
I'm trying to get a 5069-L306er to talk to a Automation Direct ProSence Controller by using RA's AOI for modbus client but its stuck not getting a...
Replies
9
Views
1,881
The last time I did anything with Wonderware was just after the dot com bust. Boy, I feel old. Anyway, it looks like I will get the chance to...
Replies
3
Views
1,516
Hi guys, Some pointers needed: Having PC with WIN7 pro X64 and Amsamotion clone of 6ES7 972-0CB20-0XA0 cable and need to backup VIPA cpu...
Replies
14
Views
3,121
Is there any form of Reference Type or Pointer Type like Codesys has? I am aware that you can nut a tag in the index of an array reference. but...
Replies
7
Views
1,892
Back
Top Bottom