Profinet Newb.... NEED HELP

timryder

Member
Join Date
Feb 2007
Location
Macomb MI
Posts
176
First time ever doing profinet or profibus or anything on a siemens. I've only ever used discrete IO with it.

So when I add a servo drive to the profinet master network I created, the profinet device Inputs say they're mapped to I 256-257 and O 256-257.

So why then when I go to the LAD and add a contact for I256.0 does NOTHING happen? Why can't I get that data there? I have full communication to the drive, I know that there are no communication errors. I stumbled upon an article and found that I can create a variable table and add PIW 256 and see the data there... but I can't add PI 256.0 as a bit in ladder... WHAT do i need to do? Why is it so dang confusing.

Allen-Bradley has spoiled me. If I add EtherNet/IP device the tags are just there and they just work!

315-2-DP/PN talking Profinet to a RexRoth IndraDrive servo controller.

Anyone have some sample logic using profinet? ANYTHING I can reference so I can learn how to get the data out....
 
How big is your PLC's process image on PLC properties?

If IO addresses are outside of process image table, PLC can't see IO directly without SFC-blocks
 
yeah. PI 128, make it bigger. You need at least 256 or bigger (512)

Then download hardware configuration to PLC, and you should see also value of I256. (Which is readed from process image)

PLC reads beginning of scan values of IO to process image. (with your settings I0.0..I127.7 automatically without any code)


Some others can explain this better, but Siemens have two different addressing.

IW100 is readed from process image (Inputs are updated to table on start of scan and outputs last thing before next scan)

PIW100 is readed directly from card and PIW addresing can be outside of process image
PIW addresses are also updated on that time when code is executed, so PIW address can have different values than process image which is updated on beginning of PLC scan.

For profibus/net you need to change process image bigger or use SFC-block (For profinet it was maybe SFC14/15)
 
What kind of drive exactly ?
Since you dont have any errors (SF or BF on the CPU), then I guess that the basic connection between the Profinet IO Controller (the CPU) and the Profinet IO Device (the drive) is working OK. But that is not enough.
It is most likely that you have to configure something on the drive in order for it to exchange data with the Profinet IO Controller.
If you care to describe yout system in details, maybe someone can help.
 
Hi!
You don't need to change size of P-area in CPU.
Try this:
In OB1 write:
L PIW256
T MW100 //any spare address in merker area memory

Or use Move instruction in LAD or FBD.
source: PIW256
dest: MW100

Then you can use address M100.0-M100.7 and M101.0-M101.7 in you further program. Pay attention on the case that bytes may change their order when Most Significant Byte writes to MB101 and Less Significant Byte - to MB100.
 
Last edited:
So why then when I go to the LAD and add a contact for I256.0 does NOTHING happen? Why can't I get that data there? I have full communication to the drive, I know that there are no communication errors. I stumbled upon an article and found that I can create a variable table and add PIW 256 and see the data there... but I can't add PI 256.0 as a bit in ladder... WHAT do i need to do? Why is it so dang confusing.

Think of PIW (peripheral io read or write) as the asynchronous bus scan in a Logix. It reads it right from the card. The PLC also buffers some of it for you as the process image(iw256), which is what you highlighted in the screenshot below. For legacy reasons, this is limited to a small amount of memory but is adjustable. In the newer plcs (1200/1500) this is simplified and the PLC buffers all the addressable io.

Downside of the peripheral reads and writes is that it can only be done in chunks (byte, word, double word). Having the buffered process image allows for bit level access, but only if the address is actually in the process image. As others have said, you can increase that number in the config settings. You can also potentially change the assigned address to something lower (like I/qw 100, if unused), to put it in the existing process image. Another option others have mentioned is to buffer it yourself and copy it from the PIW to a DB or M memory, and then use it from there.

So why then when I go to the LAD and add a contact for I256.0 does NOTHING h
Allen-Bradley has spoiled me. If I add EtherNet/IP device the tags are just there and they just work!
The way I understand it, the vendors have also essentially paid AB for the privilege of having those tags built into the AOP. It's a great feature, but I think it's part of the software package, not part of the EIP standard. I really wish that sort of stuff could be built into the gsd file for Profibus/net, but nobody listens to me. I'm sure it always gets derailed in different vendors idea of data types and compatibility beurocracy.

On the plus side, there ARE standard drive telegrams defined by PN that drive vendors can use. On the down side, many of them don't. Also, the telegrams are named telegram 1, telegram 3, etc, and you need to remember which numbers go with which functions (speed control, position control with encoder feedback, etc).
 

Similar Topics

Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
4
Views
48
Hello Guys, I want to establish profinet communication between siemens plc and my system using python programming. Which python lib can i use to...
Replies
12
Views
361
I want to establish a Profinet network in my production plant to connect multiple devices, including a PLC, HMI, and multiple Profinet-based...
Replies
19
Views
675
Hi, I have a customer with a S7300 from around 2013 which they link to approx 25 inverters, 3 DP to DP converters and 5 IM153 remote I/O units...
Replies
8
Views
320
Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
43
Views
2,852
Back
Top Bottom