TIA v14 LAD - Read access to parameter is invalid

ohlylo

Member
Join Date
Apr 2020
Location
USA
Posts
13
Hello, I'm working on a program I migrated from S7 v5.6 to TIA v14. I am failing the consistency checks on my safety program with the following error:

Code:
Read access to parameter 'param' is invalid because it is also used for write access in the safety program. Data from standard user program may only be read or written.

The error pops up within the safety program itself at an S-coil. Cross-referencing the param tag shows no read accesses anywhere - only writes. So, I'm stumped as to why the program is complaining about reads, especially since the error is located at an S-coil.

Any ideas what I may be overlooking here?
 
Is the tag part of a structure?

I'm not an expert on LAD or PLCs by any means here so bear with me if I'm not understanding. The tag is in the STEP7 classic symbols table within a station in the project. It is referenced in an FC and a couple FBs as well as in the safety program - as mentioned, all writes.

Does that answer the question?
 
Wait, the tag isn't read anywhere in the program at all? What is the point of it then?


What kind of tag is it? DB? M? I? Q?


I'd recommend running those same consistency checks in Simatic Manager. Do a Compile from the Safety Editor, see if it reports the same issue.
 
Wait, the tag isn't read anywhere in the program at all? What is the point of it then?


What kind of tag is it? DB? M? I? Q?


I'd recommend running those same consistency checks in Simatic Manager. Do a Compile from the Safety Editor, see if it reports the same issue.

It's an M. Again, I'm completely winging this, so apologies if I sound clueless, because I am :)

The tag is an indicator as to whether a fault reset is required. When I open the cross-reference info for the tag in TIA, the only entries in the list are Write. Is there somewhere else I should check?

The program compiles without errors in Simatic Manager. One thought that occurred to me is that I didn't have Distributed Safety set up in Simatic Manager when I did the migration to TIA. DS was installed, but I had to add the library manually to SM on this computer to do the safety compile just now. It's probably not the issue but I thought I'd call it out just in case.
 
When do you get the consistency check error, before, during, or after conversion?

Try the following:

Before conversion, right click in the blocks folder in STEP 7 V5.6 and do a "Check block consistency". Then convert the project.
 
When do you get the consistency check error, before, during, or after conversion?

Try the following:

Before conversion, right click in the blocks folder in STEP 7 V5.6 and do a "Check block consistency". Then convert the project.

Only after conversion. I will try to do that now and report back. It'll be a few hours, the migration takes forever.
 
Logic that compiles ok in S7 v5.6 does not necessarily compile in TIA, you will have to change the logic in the TIA project. Without sight of your blocks it will be difficult to advise what to do. The message is trying to convey (not very well) that you must have a coil for the M flag, not a set or reset

s1.jpg
 
Last edited:
There's like 20 of them, but this is where the consistency check says the problem is. Is there an easier way than trying to capture all 20 different locations?

ETA: If I change this one instance to a coil instead of a set, it compiles with no errors. Seems pretty clear that this one instance is the culprit for some reason. Maybe because this is the only instance in the safety program.
 
Last edited:
I went through them all. There are 14 sets and 1 reset. Only the one set is in the safety program. Most of the rest are in a huge FC for errors and warnings.

ETA: I fibbed, there's one read (normally open contact) in the errors and warnings FC as well. I forgot I had changed it to a temp parameter to test that.
 
Last edited:
Take out a new M flag tag called say 'bModeResetReqFromSafety' and use that as a coil in the safety program instead of the Set that you have.


In the FC for warnings and errors, add a rung at the start that has a N/O contact using bModeResetReqFromSafety and a Set for the existing flag.
 

Similar Topics

Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
5
Views
171
Had a project a few years back done in v14 of TIA. Very similar job has come up for the same company with different PLC and HMI hardware. I...
Replies
1
Views
243
Hello PLC Friends, I'm starting my final year project with a given rig and I'm thinking about incorporating a remote access feature where I can...
Replies
2
Views
375
Hi everyone. Please help me to upload program from S7-1200 with TIA v14. I created new project, go to Online tab, select Upload devices as new...
Replies
0
Views
1,092
I am beatin gmy head against the wall trying to get my modbus comms working. I have a s7-1200 running tia v14, a cm-1241 comm card. I have...
Replies
22
Views
7,420
Back
Top Bottom