Get device number on Profinet/Profibus from PIW address

doomsword

Member
Join Date
Aug 2016
Location
Zagreb
Posts
201
Is there any way to get diagnostics info on device connected over Profinet/Profibus (communication with device fault) from PIW assigned to that device?

I see there's DeviceStates function which reads fault status on devices on Profibus/Profinet and puts it into DB based on those device's device number on Profinet/Profibus.
What we'd like is to the same but to use PIW address as input, since we have electrical schemes which give us pretty much fixed addresses for devices, but device numbers on Profibus/Profinet are dependent on how we define it in hw configuration, we'd like to link it to PIW addresses which are pretty much unchangeable parameters for us.
 
Is there any way to get diagnostics info on device connected over Profinet/Profibus (communication with device fault) from PIW assigned to that device?

I'm assuming we're in Portal with 1200's/1500's, based on the context.

I've always thought the way those diagnostics blocks like Device States worked was a bit weird. Every user I've met wants an instruction that says "get me the diagnostics for this module". Instead you get an instruction that returns an array of ALL the statuses, and then uses the device number as the index. In Profinet, these status arrays is literally the only use I'm aware of for the device number.

However, there is a way to have the PLC tell you what the device number is, based on the IO address. The instruction IO2MOD gives you the HW identifier based on the IO address. The instruction LOG2GEO takes the HW Identifier and gives you the data type GEOADDR, which contains Station number and slot, among a few other values.
 
you can use FB126 diagnostic, but you need look to proibus or profinet address instead of PIW

https://support.industry.siemens.co...-and-profinet-io-(step-7-v5-x)?dti=0&lc=en-WW

FB126 isn't supported in the newer PLCs. DeviceStates is pretty much the 1500 equivalent.

Also, I forgot about it when I wrote the original post, but there is also a GET_DIAG instruction, which works for a single device. It uses HW_ID instead of IO address, but it is a step better than the device number. However, it returns a whole slew of information, and parsing through it all is a bit complicated. It tells you EVERYTHING, and some of the bits depend on the state of other bits.

DeviceStates tells you one thing about EVERY device in the IO system. Module states tells you one thing about EVERY slot in a device. Get_Diag tells you EVERYTHING about one device.
 
Thanks for your help, I managed to get device number from IW, and read device state for that device number.
Still I can't say I fully understand this, I need clarification on slot/subslot, from what I see slot is IW address assigned to data which is being read/written on Profibus/Profinet, and we need 2 slots for read/write if we read and write data to device on Profibus.
What is subslot then?

I don't have that much experience with Siemens. And yeah, we use S7-1500.
 
Thanks for your help, I managed to get device number from IW, and read device state for that device number.
Still I can't say I fully understand this, I need clarification on slot/subslot, from what I see slot is IW address assigned to data which is being read/written on Profibus/Profinet, and we need 2 slots for read/write if we read and write data to device on Profibus.
What is subslot then?

I don't have that much experience with Siemens. And yeah, we use S7-1500.

Slot refers to where in the rack a module is. Sometimes there are subslots for pretend/virtual/extra data. As an example, a CPU will occupy one slot (slot 1), but might have a subslot defined for its Profinet Interface (1 X1), and another subslot for another interface (1 X2). The first IO card would then still be "slot 2". Drives may sometimes use them for different parts of telegrams as well.

When you're doing peer to peer communication between PLCs (PN/PN or DP/DP couplers, I-Device, etc), you can also get into things like VIRTUAL slots and subslots, but it's mostly just playing pretend to fit new stuff into an existing structure.

Does that help?
 
One thing to consider (which may not suit everyone's application) is to do this on the OB100 (or 102, I'm a bit fuzzy at the moment) and fill out a DB with the data from the installation.

If your software is to be used in a variety of gear from Siemens whilst remaining functionality that could save some time in the long run... or maybe not, but it's something to consider at least.

This isn't new by the way, I realised this when I worked with PCS7 and a lot of it is created automatically.
 

Similar Topics

We are trying to poll data coming from a PLC for remote monitoring we have the IP address of the PLC and the default port number and the path is...
Replies
25
Views
427
I'm adding an IAI Gateway with 2 axes connected to it. To an ethernet network on my PLC. So, I think the math is correct on the Input and Output...
Replies
0
Views
72
We have some very old technology in my plant that needs adjusted but I don’t have the equipment. Can anyone tell me what I need to program this IO...
Replies
13
Views
295
Hello all, I am a college student currently working on my senior year engineering capstone project. As part of this project, I have been given an...
Replies
6
Views
204
Hello, friends, I am trying to upgrade a system that uses an Onrom incremental encoder (E6B2-CWZ6C) connected to a Danfoss VFD (FC360), but now...
Replies
4
Views
249
Back
Top Bottom