Step7 - Is there an easy way to create large DBs?

So its an array then
Yup! :D

If its the same as S5, it would wait until the end of the current block.

This could still effect AR2 as the block could be a stat in another block.
The 64,000$ question - is it the same? Berger doesn't seem to be too clear on this, just saying that the "main program" gets interrupted, but whether this is only OB1, as the diagram in chapter 3.1 implies, and not FBs or FCs called from OB1, is not clear.

This project is pretty small, so I'm not using any multi-instance blocks this time, so at least that won't be a problem!
 
Last edited:
Interrupts can happen after every statement (so thats any time any place any where, [that's Martini]). An interrupt must do a full CPU context save (or we may as well give up and go home).
 
You don't need to save anything yourself, the accumulators status word, address registers and DB registers are saved in the I stack for you and then restored at the end of the interrupt. Note also that at the start of an OB, the registers are set to zero and no DB's are open, so even if you opened say DB1 in OB1, it will not be open at the start of OB35.
 
Nice to know that some things are easier than one might expect. I'm pretty sure that I've seen discussions over the need to save at least the ARs under some circumstances - is this not true, or are there certain, special circumstances where it would be necessary?
 
Sometimes, the interrupts can cause strange radiation patterns to be emitted from the CPU memory areas. These rays are particularly pronounced in the address registers, and for these special cases they are known as AR rays.
 
AR2 is used as the base address in the instance DB for function blocks (function blocks that are multi-instance capable). If you change AR2, all references to STAT data in the function block will access the wrong area.

AR1 is used to access FC parameters that are complex, for example UDTs or structures. So, for example if you load AR1 with a value and then access a parameter of type UDT, AR1 will change.

If you want some examples then I'm sure I can find some later.

Here's one for AR1 http://www.plctalk.net/qanda/showpost.php?p=104628&postcount=8
 
Last edited:
OK, I think I've got that. In this case, I'm using neither multi-instances nor UDTs, so it looks like I can use S7Guys FC103 substitute with impunity.

That's nice, now I can start trying to fathom out how to speak to a Bürkert valve block over Profibus - something else I haven't had to do up till now. I expect I'll be back tomorrow with the first questions! :)

Cheers

Roy
 

Similar Topics

or should that be how difficult? We've been asked to quote for a small project (control of 3 compressors. There's not a lot of IO and the control...
Replies
12
Views
4,193
Hello. I need your help. I work at STEP7. There are two CPU 317-2 PN/DP controllers (317-2EK14-0AB0), working on PROFIBUS, as Master (CPU_1) and...
Replies
2
Views
69
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
168
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
157
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
153
Back
Top Bottom