S7-1500 Instance DB addressing

treellama

Member
Join Date
Jan 2016
Location
Delaware
Posts
39
I'm porting some Tia Portal V14 code from an S7-300 cpu to an S7-1500. I have a couple places where I've moved an input word (for example IW400:p) to a UDT, so that I can pick bits out of it that have real labels. I do this in a ladder FB, with UDT's in the static declarations.

My old code just MOV'd IW400:p to %DIW0
but that syntax doesn't work anymore.

Likewise, if I try to access that address directly (for example DB321.DBW0), it says that address doesn't exist. It looks like I can do it as P#DB321.DBX0.0 but I'm not sure why. If I needed my FB to be multi-instance, I'm not sure how I would do it.

Any explanations out there from the experts?
 
I'm porting some Tia Portal V14 code from an S7-300 cpu to an S7-1500. I have a couple places where I've moved an input word (for example IW400:p) to a UDT, so that I can pick bits out of it that have real labels. I do this in a ladder FB, with UDT's in the static declarations.

My old code just MOV'd IW400:p to %DIW0
but that syntax doesn't work anymore.

Likewise, if I try to access that address directly (for example DB321.DBW0), it says that address doesn't exist. It looks like I can do it as P#DB321.DBX0.0 but I'm not sure why. If I needed my FB to be multi-instance, I'm not sure how I would do it.

Any explanations out there from the experts?

In the 1500 you use a tag, instead of worrying about the addresses. Symbolic everything is the key. If you already have a UDT created, then you're halfway there.

Create a tag in the tag table of type [Your UDT] starting at bit I400.0. Create a tag in your instance DB also of that type. Move INPUT_TAG (or INPUT_TAG:p) to INSTANCE_TAG.

The other thing you can do to make bit access easy is to use "slice addressing". Access TAGNAME.X0 for the least significant bit, TAGNAME.X32 for the MSB of a double word, TAGNAME.B1 for the 2nd byte, etc. It takes care of all the byte swapping for you.
 

Similar Topics

Hi all, has anyone ever had success with amending (via PLC code) the Class, Instance, Attribute of an explicit message. Rockwell support...
Replies
3
Views
4,849
Can we use a Simotion D455 ethernet port x127 as a gate, to access S7-1500 plc Tia Portal program ? In the Simatic manager, we used Netpro to do...
Replies
2
Views
87
I have been working on this for a while now and I can't seem to get it. I was finally able to view the 1500 on the PanelView under the serial...
Replies
1
Views
81
Hello, I have a 1764 1500 LSP Series A that keeps failing with DTL_E_FAIL I/O error. Searching around it seems there's a weird issue specifically...
Replies
2
Views
104
Hi all Trying to remotely connect to a TIA Portal PLC. I can ping it without a problem but can't get my software to connect. I've opened port...
Replies
8
Views
326
Back
Top Bottom