S7-1215C data is being reset even when retain box is checked

RonJohn

Lifetime Supporting Member
Join Date
Jul 2013
Location
NE Ohio
Posts
535
Good day folks. I have a suspicion that my issue is self inflicted but wondered if someone could help me figure the source of my troubles. I'm using S7 Basic V13 to program an S7-1215C V3.0 PLC. I am currently testing my program & hardware prior to shipping to my customer.

My setpoint entry data come from a third party HMI. Setpoint min/max values are stored in the PLC. The PLC performs a limit check and updates the actual setpoint. All of this data are in DBs and I have checked the retain box.

On occasions where I've made changes, save the program and downloaded to the PLC, I will sometimes be prompted to stop the program scan to download. Upon restarting, I see min/max values reset to 0 as well as setpoints.

I'm still learning the ropes with Siemens. o_O Other posts involving similar issues were of some benefit, but I know many issues are PLC/software version specific. I'm wondering if I'm doing something out of order when it comes to saving my program / making changes / downloading. Please advise as to proper procedure if this is the case.

Or is my issue with initial values (which if not set, default to 0) overwriting my retained values? I wouldn't think so as this would make the retain checkbox a moot point. I'll stop pondering at this point and wait for answers.

Thanks in advance.
 
you maybe initialize the block upon downloading. in tia 13 there's option to download without initialization i think. try that.

or to see if retention is problem try to put some code in OB_Retentive_Lost or something similar (ob that executes when retentive data is lost)
 
you maybe initialize the block upon downloading. in tia 13 there's option to download without initialization i think. try that.

or to see if retention is problem try to put some code in OB_Retentive_Lost or something similar (ob that executes when retentive data is lost)

Thanks for the reply. Do you have any idea where the "download without initialization" option may be? I am unable to find it and my search of the help file came up empty.

I am examining the retentive loss bit in my startup OB. So far it has not turned on.
 
I can get you part way there, but then I hit a brick wall.

Right click a database and go to properties, one of the tabs is 'Download without initialization', there is a nice tick box to enable download without initialization, but.... on an S7-1214 with V4 firmware, there are no bytes available. I have been searching for where I can allocate bytes but have so far come up empty. And it looks as though because there are no bytes available you can't select the nice tick box. To make things more frustrating, if you right click on the tick box you get an offer of help, but then the help takes you to the main help menu where there is no mention 'memory reserve' or 'download without initialization'.
 
Last edited:
Thanks Bryan. That must be an exclusive V4 feature as I have no such check box in my DB properties.

I did find out thru Siemens Tech Support that they have a "snapshot" feature which can be utilized while viewing a DB online. On the toolbar inside the DB window, one of the icons is for "Snapshot of the monitored values" clicking this icon moves the current data into a newly created snapshot column.

Then clicking one of the two icons to the right will update all initial values with the snapshot data or update all initial values of tags with the setpoint box checked.

This works fine, I suppose, provided one remembers to perform this snapshot prior to modifying the program. This must be Siemens' idea of "engineering efficiency".

Sorry, but I can't figure out how to post pictures, or else I'd show where the icons are and what they look like.
 
On occasions where I've made changes, save the program and downloaded to the PLC, I will sometimes be prompted to stop the program scan to download. Upon restarting, I see min/max values reset to 0 as well as setpoints.
first i'm not familiar with tia and/or the 1200 series, but my questions are; what exactly do you download, one part of the program, everything?
You say you are prompted for interruption of program scan? that seems weird cause as far as I know S7 plc's (but the 200's) can change program blocks without interrupting.
And unless some things changed I believe DB's are retentive anyway? unless you change the structure and download them again things may get weird.
 
first i'm not familiar with tia and/or the 1200 series, but my questions are; what exactly do you download, one part of the program, everything?

Typically, I'm downloading software changes only. I cannot remember exactly when I'm prompted to stop the PLC, but I believe it was when I changed a UDT within the DB.

You say you are prompted for interruption of program scan? that seems weird cause as far as I know S7 plc's (but the 200's) can change program blocks without interrupting.
And unless some things changed I believe DB's are retentive anyway? unless you change the structure and download them again things may get weird.

I'm getting ready to perform another download soon. It's a hardware config change so I'll have to stop the PLC scan. I took a snapshot of the DBs and moved all "Setpoint" values to Start values. We'll see how that works.
 
Typically, I'm downloading software changes only. I cannot remember exactly when I'm prompted to stop the PLC, but I believe it was when I changed a UDT within the DB.

Yes, when changing UDT you change DB structure, or at least TIA treat this like that so yes, that initializes the values to its defaults.

I'm getting ready to perform another download soon. It's a hardware config change so I'll have to stop the PLC scan. I took a snapshot of the DBs and moved all "Setpoint" values to Start values. We'll see how that works.

if it not a minor change in hwconfig update, values might be saved even when you download hardware config.
 
Yes, when changing UDT you change DB structure, or at least TIA treat this like that so yes, that initializes the values to its defaults.
So yes, this. even, when I recall (S7 manager, not TIA) everything is 0 after that, you have to "initialize" to load the default values in the DB. apparently _that_ can be done automaticaly with a switch in TIA...


if it not a minor change in hwconfig update, values might be saved even when you download hardware config.
I really suspect the thing of changing/downloading the [new] DB is the cause of the problem. and as said... if it is based on UDT and you change UDT...
 

Similar Topics

Hi all, I am trying to do Modbus communications via the CB1241 RS485 Communication Board on a Siemens S71200 PLC. I am using a 1215C CPU. After...
Replies
6
Views
253
Hi, I am programming an S7 1215C to function in a sudo SCADA demo. I am running the 120V supply for the 1215 through a voltage and current...
Replies
9
Views
2,523
hi every one,i am a new member. in my working factory,our device does not work. i chose the interface and subnet ,but system does not work and...
Replies
11
Views
3,568
Good day all. I need to determine how much time has elapsed since the previous ladder scan in order to ramp a value based on time. I'm on my...
Replies
9
Views
5,961
Hi There, I want some help as i am having difficulty connecting the Siemens CPU 1215C 6ES7215-1HG31-0XB0 with my laptop.I have TIA V12 how i can...
Replies
2
Views
2,079
Back
Top Bottom