You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old March 7th, 2018, 03:54 PM   #1
doomsword
Member
Croatia

doomsword is offline
 
Join Date: Aug 2016
Location: Zagreb
Posts: 120
S7-1500 reinitialization of data blocks & tag tables

I have very annoying and potentially dangerous problem with S7-1500 PLCs and TIA Portal.
Whenever I add a tag to a data block or even change a name of a tag inside DB and download it to a PLC, I must click that I allow reinitialization of all data blocks.
Which basically resets everything to initial values, destroying anything I modified with variable value.
I want to avoid this if possible, is there any way?

Another problem I have is that another person working on 1500 cannot upload my tags in tag table, if I add a tag and another guy uploads (we often have more than one guy on a PLC) he will upload a tag but if he has no tag with same name is his offline tag table it will be unrecognized, basically you can't upload a tag and its address.
I want to upload tags and address of a tag from 1500, is it possible?
  Reply With Quote
Old March 7th, 2018, 10:52 PM   #2
moggie
Lifetime Supporting Member
England

moggie is offline
 
moggie's Avatar
 
Join Date: Apr 2002
Location: Devon, England.
Posts: 617
Look here
https://support.industry.siemens.com...dti=0&lc=en-AT
  Reply With Quote
Old March 7th, 2018, 11:31 PM   #3
spaderkung
Member
Sweden

spaderkung is offline
 
Join Date: Aug 2007
Location: A flat type "4"
Posts: 341
Siemens definition of "simple" just open every DB, PID controller. I think extra simple is to note that iec timers are also created with unique DB's as default.

I wonder if this only applies to the new DB type without absolute adresses.
__________________
Jon Bolmstedt, Inspired Automatician.
  Reply With Quote
Old March 8th, 2018, 06:33 AM   #4
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,300
If you have a machine that is already running, and you want to change the declaration of FBs, UDTs or shared DBs, then you have to do as this:

1. Take snapshots of all the DBs that may be affected.
2. Copy snapshot values to the start values.
3. Do the changes to the declarations.
4. Compile the changes.
5. Download the changes.

It can be done on a running machine, but since the actual values may change in the time you have done steps 1-5, it is best if it can be done when the machine is stopped.
__________________
Jesper
3 strikes and you're out
  Reply With Quote
Old March 8th, 2018, 06:39 AM   #5
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,300
To the other question, you must setup your project as a multi-user project.
In this way the project is stored on a server, and any changes are reflected automatically to all users.
TIA multi-user costs an extra license.

edit:
The above is for when you must work simultanously on the same machine.
If you dont need to work simultanously, then you dont need multiuser.
The scenario must NEVER be that someone tries to go online with a program that is not uptodate. What you describe is just unprofessional.
Instead, the proper procedure is to have a strict regimen of always making backups (every time a change is made, no matter how small), and the backups must be stored centrally.
When you want to go online with a machine you retrieve the latest backup, then verify that the backup if the same as is running in the PLC. Only if they are the same do you proceed with going online.
If they are not the same, then someone has f****d up. And that someone must be punished. You will then have to investigate what has happened and why, and then decide what to do.
__________________
Jesper
3 strikes and you're out

Last edited by JesperMP; March 8th, 2018 at 06:46 AM.
  Reply With Quote
Old March 8th, 2018, 07:02 AM   #6
mk42
Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 1,868
For the first part, using snapshots is a great way to make initial values something useful. The trick is that you need to snapshot then transfer to initial values BEFORE you make changes to the DB. You won't be able to take the snapshot one a change has been made.

Another option is to utilize the "Download without reinitialization" feature. This creates a memory reserve that allows you to add new tags without reinitializing the rest of the DB. The trade-off is that you can't modify/delete the existing tags in the DB.

https://support.industry.siemens.com.../view/76278125

For the 2nd topic, tag uploading, I believe this is possible with v15 and the new FW.

Multi user is a great way to collaborate on am offline project, but I wouldn't recommend it unless you're in V15. The v14 version is rev 1, and is missing some basic features that make it impractical.
  Reply With Quote
Old March 8th, 2018, 11:17 AM   #7
m_turk
Member
Croatia

m_turk is offline
 
Join Date: Jan 2008
Location: ZG
Posts: 174
1. - I think you would have an even more dangerous problem if it wasnt as it is. What values should the changed block have? Some random old values? Well that would be dangerous as hell...
- What are you doing wrong so all data blocks have to be reinitialised? It asks only for the changed ones.
- Guys told you how to do it right, just to add (@spaderkung too), you can take a snapshot individually, on a selected group of DBs, or on the whole PLC..

2.- You can do it even from V13 or V12 I believe. It just isn't considered a part of program, it is in the HW part, so you have to upload the PLC, not Program blocks.
  Reply With Quote
Old March 8th, 2018, 01:25 PM   #8
doomsword
Member
Croatia

doomsword is offline
 
Join Date: Aug 2016
Location: Zagreb
Posts: 120
We're keeping track of online changes, but Tia Portal is making it problematic.
Imagine going online and you see some blocks are different. You upload said blocks and Tia Portal still shows they're different. You do compare and Tia Portal says they're identical.
Makes you go nuts. We think it's something with timestamps.
What we do is that we have one project that is common for all, which we all share between other every 1-2 days. Idea is to pick up changes with synchronize option of TIA Portal, but that doesn't work most of the times, Tia requires manual synchronization. We do this manually but then, like I said, still sometimes shows blocks as different.
Also, you can only download all blocks, you cannot download one block only, and then you have to reinitialize, in process messing up something that other guy set for his testing.

We try to avoid uploading entire PLC because it messes our folder structure (you cannot upload folder structure from PLC) we split up FBs/Fcs into folders and one guy works on FCs/FBs inside that folder.
Besides, it's very slow way of doing it for just one tag. We thought about exporting tags to Excel and adding tags there and importing them back, and Excel could be on one server.

About multi-user, we know for this, company won't buy it. So yeah, we have to work around it.
  Reply With Quote
Old March 8th, 2018, 01:39 PM   #9
janner_10
Supporting Member
United Kingdom

janner_10 is offline
 
Join Date: Dec 2014
Location: Tewkesbury
Posts: 633
Keeping track of PLC changes with PLC software (without spending big) is going to be tricky as the software isn't really designed for that.

There is some great version control software out there which will do it very well indeed and for free. However, it requires discipline from all users, if you check something out, change it then check it back in without comments, you may as well not bother.

When I worked for an OEM, it was a constant source of headaches, trying to find out who did what and when and where the bloody-hell they saved it!!
  Reply With Quote
Old March 8th, 2018, 01:54 PM   #10
Thomas_v2
Member
Germany

Thomas_v2 is offline
 
Join Date: Apr 2009
Location: Ger
Posts: 367
If your datablock is not-optimized, you can write your own function which restores the actual values.
I'm using this in my projects where I save the data of my HMI interface datablock which contains several parameters.

You need a backup datablock with min. the same size of the DB you want to backup.
Inside the data-db I have a variable "init" with default-value false.
At the beginning of my main task (OB1 or OB3x) I call my backup-function.
This function checks the "init" flag in the DB:
- if false: blockmove the backup-db to data-db and set "init" to true.
- if true: blockmove data-db to backup-db

So If you download the data-db with init=false, the data from the last cycle are restored.

If you want to relocate variables inside the data-db, you must disable the backup-function before the download,
otherwise you may get non-conforming data restored.
  Reply With Quote
Old March 8th, 2018, 02:32 PM   #11
doomsword
Member
Croatia

doomsword is offline
 
Join Date: Aug 2016
Location: Zagreb
Posts: 120
Yeah, I spent some time googling after work and it seems optimised blocks are much better than standard ones.
We avoided them since we used older STep7 projects as references, we migrated them and we copied useful parts, and lot of things use pointers which don't work with such blocks.
Now I think solution is to switch to optimised blocks and activate memory reserve where possible and get rid of pointers as much as possible in our library functions.
We anyways had a lot of spare tags in standard DBs, now we can kick those out and activate memory reserve or leave them inside and use smaller memory reserve.
I presume we'll have maybe enough time to use optimised blocks in most critical parts (most likely to be changed, which are usually HMI blocks).

Thanks all for help!
  Reply With Quote
Old March 9th, 2018, 03:35 AM   #12
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 13,300
Quote:
Originally Posted by doomsword View Post
We're keeping track of online changes, but Tia Portal is making it problematic.
Imagine going online and you see some blocks are different. You upload said blocks and Tia Portal still shows they're different. You do compare and Tia Portal says they're identical.
Makes you go nuts. We think it's something with timestamps.
What we do is that we have one project that is common for all, which we all share between other every 1-2 days.
Yes, TIA is known to be way too finicky about declaring blocks "different".

Quote:
Originally Posted by doomsword View Post
What we do is that we have one project that is common for all, which we all share between other every 1-2 days. Idea is to pick up changes with synchronize option of TIA Portal, but that doesn't work most of the times, Tia requires manual synchronization. We do this manually [..]
I didnt even know there is a syncronization feature. I guess because we dont work many people on the same project.
But when I think about it, how the hell is that supposed to work. If TIA detects that a block in 2 projects is different (same project but worked on by 2 persons) how should TIA be able to automatically decide which one is the correct one !?
As I see it, the way you work you have to meticulously keep track off all changes, making a log of everything that has been done. And then someone has to integrate the changes into a master program.
When rolling out the updated master to all machines, there should be a procedure to backup and restore machine parameters.
We have a dedicated function in our HMI to backup and restore parameters. For this to work, all machine parameters must be stored in global-DBs that do not change (except for appending) between program updates.
__________________
Jesper
3 strikes and you're out
  Reply With Quote
Old March 9th, 2018, 01:49 PM   #13
doomsword
Member
Croatia

doomsword is offline
 
Join Date: Aug 2016
Location: Zagreb
Posts: 120
Yeah, one guy had to do integration before, sometimes he'd spend hours doing it, and then we'd still have problems that it wasn't done properly, you simply can't have 3-4 guys on a PLC without somebody messing up something somewhere when it's being done offline. We decided not to do offline integration, but to download project on a PLC and do online synchronization.
One guy (me for one PLC) has a master version, which means officially I have the master version, and other guys have to integrate their changes into master project.
We played with synchronization option but overall I'd says that thing doesn't work. Most of the times it requires manual synchronization and you can't upload tags without uploading entire PLC which destroys folder structure of a PLC (useful thing to organize FCs/FBs into units).
We decided to avoid using tags where possible, but now this reinitialization problem messes up with our progress, we're testing sw now, and any change resets test setup to original values.

I have no idea how we'll commission this, on site it's usual to have 2-3 guys online on a PLC when things get hectic. And it's nearly impossible to work online and do small online changes for various bugs.
And there is at least 3-4 PLCs (out of 10 1500s in this project) which will most likely have more than one person on them during commissioning, as they have hundreds of FCs/FBs.

For example one PLC I did has 388 AI and 195 AO, now imagine commissioning and just seeing if everything is OK with them.
  Reply With Quote
Old March 10th, 2018, 03:56 AM   #14
m_turk
Member
Croatia

m_turk is offline
 
Join Date: Jan 2008
Location: ZG
Posts: 174
Ah.. Folders and tag tables.. Now I understand why you have problems..
They are useful, but since you are doing it this 3 guys way, you will have to decide is it more useful to have folders and tag tables or upload without problems..
On a second note, since the thing is still not running, wouldn't you want the initial values to be ok values for the system?
  Reply With Quote
Old March 11th, 2018, 02:19 PM   #15
doomsword
Member
Croatia

doomsword is offline
 
Join Date: Aug 2016
Location: Zagreb
Posts: 120
Quote:
Originally Posted by m_turk View Post
Ah.. Folders and tag tables.. Now I understand why you have problems..
They are useful, but since you are doing it this 3 guys way, you will have to decide is it more useful to have folders and tag tables or upload without problems..
On a second note, since the thing is still not running, wouldn't you want the initial values to be ok values for the system?
We don't know all the values right now, and there are hundreds of initial values.
What also causes problems is that there are initial values in db, which you have to manually set. Usually we'd make init FC which would set up all values at startup/reset of PLC, now when you download changes it resets all values to init values written in DB, basically overriding our init FC (doesn't get called again)
Which means we'll have to go block through block to be sure start values are good.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Communicating and moving data from S5 to S7 PLC russg LIVE PLC Questions And Answers 33 March 18th, 2015 12:12 PM
s7 1200 multiple mb client blocks pauly LIVE PLC Questions And Answers 1 August 31st, 2014 01:11 AM
Retain Controller Data in an HMI tag (Allen-Bradley) Money4Nothing LIVE PLC Questions And Answers 16 July 19th, 2007 07:38 AM
MPI comunication Manuel Raposo LIVE PLC Questions And Answers 22 July 16th, 2007 06:24 AM
S7 Data block comparisons RheinhardtP LIVE PLC Questions And Answers 6 February 16th, 2005 07:38 AM


All times are GMT -5. The time now is 04:45 PM.


.