S7-1500 Instance DB addressing

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...
3
Replies
5,326
Views
On my SmartLine 360 Factory I/O simulation, clearing a gripper fault with the panel reset also reset shift OEE and availability to zero. The KPI...
1
Replies
145
Views
Hello all, I have a customer with the thread name setup on a machine, the PLC died and I am bench testing so when I ship everything to them I...
11
Replies
370
Views
Hi all! I am looking for a simple datalogger, that can connect to our Siemens ET200SP PLC and log 50-100 values, with a 10 second resolution, up...
9
Replies
453
Views
Hello everyone, I am working on a winder machine for extruded plastic film using an S7-1500 PLC and SINAMICS S120. I have a web accumulator...
17
Replies
632
Views
Top