Instance DB Address confused me

S7PP

Member
Join Date
Sep 2010
Location
Toronto
Posts
134
Hi friends, found a problem this morning. I used FB to do the drive control and use a UDT as in-out data. The address starts from 62.0, and the UDT occupaied 46 bytes. But why the next address starts from 68.0, not 62+46=108.0?
Please see the pictures. Thanks a lot.

INS_DB1.jpg INS_DB2.jpg
 
There are a lot of adresses in use above the ones that can be seen in your second screenshot. You can see that next to each address it says "+" something meaning that the STRUCT in question takes up so and so many bytes, but these adresses have to be added to the adresses before them.

I prefer the classical DB view, with "actual values". That shows the absolute adresses.
 
The Instance DB includes the IN, OUT parameters etc. Also addresses also always start on an even number.
 
Last edited:
It's the same thing if I open the Data View. I just don't know if I want to monitor oone of the word inside this struct, let's say the 20th word, what the address suppose to be? for my understanding, it should be 62+40=104, but the address 104.0 is something else.

INS_DB3.jpg
 
It may look odd as the bytes seems to jump 6 bytes from 62 to 68.
But it is only natural as a pointer takes up 6 bytes.

edit: An ANY pointer is 10 bytes.
 
Like I said before, switch to classical DB view with actual values turned on (CTRL+4). That shows you both symbols and absolute addresses so you can easily figure out which adresses to monitor.

Another tip. If you need to monitor something in a VAT table, then just type in (or copy-paste from somewhere else) the complete symbolic name. The VAT editor then automatically finds the absolute address.
 
As your instance DB does not contain any symbolic names it must be out of date - rectify this first.
 
This is updated one. still not showing the address.

I don't really know ANYPOINTER, what's that means? Please~~

INS_DB4.jpg
 
OK, I think I understand now.

You have made an FB with one in_out parameter defined by a UDT.
That will not reserve an area in the IDB by the size of the UDT. It will mean that the parameter is passed by pointer. All program accesses in the FB that uses the in_out parameter uses the pointer.
 

Similar Topics

Hey guys, I am looking for advice on the use of AR1 or AR2 from a multi instance FB (defined as static memory within another FB). I don't...
Replies
6
Views
4,198
Exposing shades of “newbie”…. I haven’t used arrays much, and I think using one for multi-zone temperature control is probably the solution I...
Replies
12
Views
825
Hello, PLCS.net guys. I'm learning about MSG for TCP communication recently. I'm trying to use CIP Generic. And the main flow is like the one...
Replies
6
Views
1,287
Is there any way to use a tag value in the Instance Name field? I would like to have an array of strings with my module names that I can loop...
Replies
2
Views
984
I'm hooking up a scale to an EWEB card on a 1756 PLC through ethernet/IP sockets, and I've run into an issue that seems to defy ladder logic. See...
Replies
9
Views
2,708
Back
Top Bottom