Step7 - FB126 PNIODiag Data structure

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
This is probably one for Jesper or Daniel. I want to use FB126 to replace the FC125 that I used in an old project which is being used as the basis for a new project. The system comprises several identical modules but in most cases not all of them will be used so that some modules will be switched off. To avoid unneccessary errors I want to detect these modules at start-up and disable them using SFC12.

With FB125/FC125 this was pretty easy because the missing slaves are listed as Bits in 4 DWORDS starting at DBD52 in the IDB so it was only necessary to do an XOR to identify the missing modules.

Unfortunately the structure of DB126 is not visible (presumably because it's a protected block) and the help file gives the impression that it's priority is on maintenance or commissioning rather than fault detection at run time.

Whatever, at any rate I can't find anything in the help files which tells me what address to look at to find my missing modules.

Does anybody know if the structure (in the early part of the DB) is the same as FB125 or alternatively where I can find the structure of the IDB?
 
Hi Roy.

I havent had the opportunity to use the newer FB126 PNIO_DIAG.

It seems that the sample project automatically generates DB200 if it does not exist, and the list of station status in this DB200. The structure can be gleaned from the WinCC Flexible sample project.
It seems that for Profinet, in stead of DP station addresses, the "Device Number" is used to identify an individual station.

For activating and deactivating the individual stations, the tag "DB126\DB126.Stationsdiagnose\DB126.i_Current_Station_HMI" is used to identify the station, and then the tags "DB126\DB126.Stationsdiagnose\DB126.bo_Station_HMI" and "DB126\DB126.Akt_Deakt\DB126.bo_Act_HMI" must be set. Not sure what they both do exactly.

Some further detective word has to be done. It seems that Siemens wants us to import everything as it is into STEP7 and WinCC Flexible and we are not assumed to fiddle with it ourselves.
 
Hi Jesper,

I hadn't thought of looking in the Flexible program. The fact that DB126.dbw0 is initialised to 200 also seems to support your idea that FB126 creates DB200 (luckily I don't already have a DB200 in my program - I didn't see anything in the help file warning about that!).

I tried running the sample project in PLCSim but although the program runs with no errors showing in the diagnostic buffer, there's no DB200 visible if I go to the Online view in Simatic Manager - maybe FB126 doesn't like PLCSim ;) or alternatively doesn't like having no DP stations.

I should be getting some HW end of next week (more likely the week after) then I can try that out when I actually have an ET200 to hang on the bus.
I won't be using the PN capability (at least I don't think I will be), the modules will be on DP as with the last version.
 
Just thinking a little about what you are wanting to achieve.
How are you deciding to disable a station automatically ?
If you use SFB126 to detect missing stations and then disable them automatically, arent you just supressing an error ? How do you distinguish between that a station should be disabled because it is not meant to be there, or a station is missing but ought to be there ?
I would guess you would have to prompt the operator if he wants a station to be disabled.
 
What does this FB give you that RSE (report system errors)
Does or doesn't give?
I seem to get all that functionality with RSE
 
RSE gives you a list of problems, similar to the diagnostics buffer in STEP7.
FB126 gives you a more visual display of the status of distributed stations.
* and you can query the status in the user program and take action accordingly.

I am going another route btw.
With the new onboard webserver you get both the diagnostics buffer and the topology view with zero effort whatsoever. It is not integrated in the HMI, but that is the only issue there is with it. (and you can actually embed a webpage in the HMI, so it could even be made to look native to the application.).
I havent actually had the use for the toplogy view yet, but when we switch over to Profinet for good, it will be a great troubleshooting tool for the endcustomer.
 
Last edited:
Just thinking a little about what you are wanting to achieve.
How are you deciding to disable a station automatically ?
If you use SFB126 to detect missing stations and then disable them automatically, arent you just supressing an error ? How do you distinguish between that a station should be disabled because it is not meant to be there, or a station is missing but ought to be there ?
I would guess you would have to prompt the operator if he wants a station to be disabled.

The main reason is to detect modules which are not required for the experiment in question and this will usually be at power up, this is purely a case of preventing spurious alarms.

However, it can occasionally happen that in the course of a day a new research team could want to run with more or less modules, without the system being shut down in between, so that I then need to reactivate or deactivate the modules as required - modules that are deactivated are not available to configure in the HMI.

If a system drops out during an experiment then I do generate an alarm and jump to a fault screen showing the appropriate module - however, as far as I'm aware, this has never occurred with the existing system over the last five years.
 
Why don't you make them select modules they want to use in the hmi? Then you could disable all unselected ones.

I suppose the quick answer is that they want the new system to work identically to the existing system :D

Apart from that, there's also a safety issue - the modules connect to the magnetic coils in the labs via motor driven switches. If the modules are switched off the system cannot detect the state of these switches so the operators are prompted to check that they are open before they can proceed - we're playing with 25 kV and tens of thousands of Amps here. Even though it's only 10 MJ in the new labs rather than the first system's 50 MJ (and 360 kA!) it's still going to do some damage if something goes wrong!

By the way I just heard a couple of weeks back that the Rossendorf crew have set a new world record magnetic field of 91.4 Tesla, topping the 89 T or so that Los Alamos had previously reached.
 

Similar Topics

Hi, I use the FB126 in one of my projects to be able to visualise slave status on Scada. The questions I have: Isn't there a better method...
Replies
4
Views
8,031
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
136
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
141
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
127
Hi all, I am trying to convert RSLogix 5000 program to Step7. I need to bit shift left my array of double integers for tracking the product on...
Replies
2
Views
519
Back
Top Bottom