Step 7 instance DBs

Join Date
Aug 2002
Location
Manchester
Posts
527
Hi
Does the instance data block get updated as the FB is being processed, or does the FB use the local data then update the instance DB at the end of the FB?

Thanks

pp
 
Paraffin,

I am certain that it gets updated immediately, just as if you were using a regular FC and pointing indirectly to a global DB. An instance DB is just another way of using indirect addressing (sort of).

As a test to verify this, try this: Write a test FB where you change some of the values in the instance DB. Part way through the FB, include a loop that forces the PLC into stop mode before the FB reaches the Block End. Then, change OB 1 so that it doesn't execute any code at all after the re-start. If you then look at the instance DB online, you should see that the values that changed just before the PLC crashed.
 
I agree with S7Guy.
The instance DBs are manipulated directly from within the FB.

Local data is used for the TEMP variables in both FBs and FCs.
You can see it this way:
Create a TEMP Test BOOL
Then try to assign L0.0 to a coil. STEP7 will exchange L0.0 with #Test .
(assuming that there are no other TEMP variables).
 

Similar Topics

Hi, I have a simple function block that does not function when I use multi instance SFB4 IEC Timer On Delay. I could not attached a zip of the...
Replies
7
Views
9,089
When you create a Function Block in step 7 there is a ticky box for Multiple Instance Capability. I understand what it is but wondered why you...
Replies
2
Views
2,012
Hi, I'm doing some experimentation to try and expand my knowledge of Step 7 (specifically multi-instance stuff). I've created an FB with two...
Replies
2
Views
2,218
Is it possible to view online an multi-instance FB ? How do I now that I see the correct values?
Replies
9
Views
6,342
I am having a step7 v5.4 program where the blocks are encrypted and locked. And the manufacturer is stopped the support. Is there any ways to...
Replies
2
Views
177
Back
Top Bottom