S7-300 Interface variables not uploading?

mass89

Member
Join Date
Oct 2017
Location
England
Posts
77
Hi,
I am updating an FB (S7-300 using V5.5), I added positive edge and added a stat variable to local interface, upload, I receive an "area length error when writing" message in diagnostics.
I remember at some point the PLC warned me about uploading the FB with updated interface as can cause PLC to enter STOP, maybe what I clicked turned off the setting to in future not upload the interface?

Please advise what the problem may be and when altering the local interface variables would cause PLC to enter STOP?

Many thanks
 
If you change the FB interface, for example adding a variable in stat area, and then download the FB without the new instance datalblock, then there may be an access error, because the code in the FB is accessing a non existing datablock variable. For example if you add an integer in stat area at address 100.0, and the instance DB is only 98 bytes long, then you'll get an access error.

On such error, the corresponding error OB is called. If this error OB is not existent in the plc, then it goes into stop mode.

To prevent such errors, after making your changes in the FB, refresh the instance datablocks of each FB instance. Remind the DB numbers which are renewed.
Them from the Simatic Manager select the FB and all the instance DBs and download them together with a single download transfer.
 
Thanks for your response,
Ob1 calls fc1 which calls numerous fbs,
For example it calls fb200, fb200 is only called once in the program but fb200 calls other fbs.
If i open fb200 and add new stat variable at end of address list, and use it in fb200, i should only need to download fb200 as you normally would?
Or must other fbs be downloaded? For example select fc1 and download that aswell?

Edit* i think i understand your meaning. When i update fb200, save but not download, then select fb200 and its instance db in the manager and download. That way the db is download together with fb and the area error does not occur?
 
Last edited:
If you change the interface of an FB, you must update blocks where the interface is used. In your example after editing FB200 you would open FC1 (where it is called from) where you will find the instance DB is shown in red as it is out of date. Update the instance DB (check and update accesses from the File menu).
I "normally" save FC1 as it has changed.
Download FC1, FB200 and its' instance DB
 

Similar Topics

Hi, I'm new to Siemens and having issues connecting to a S7-315 CPU over ethernet. I can ping it, I can see it in my TIA V12 portal, but mt S7...
Replies
24
Views
11,437
Hey all, I'm looking for a solution to interface a couple of S7-300's to an ethernet network so we can collect some data. We will be using...
Replies
2
Views
1,491
hi, i was called in to help one of our customers with their PLC. it is a siemens which i'm not very familiar with. i typically work with GE...
Replies
2
Views
6,105
Hello Friends I have a question and would like to have your helps. I have 1 PLC s7-300 and a temparature device that uses the modbus protocol...
Replies
0
Views
1,858
hello, i have a big problem, about siemens s5 system. there is a wf300 interface card which controlled the sk2l-330 wöndler panel. when i push...
Replies
0
Views
2,785
Back
Top Bottom