S7 Reading DB/M flags during Scan Loop

adfox

Member
Join Date
Jun 2006
Location
Poland
Posts
334
Hi, I've been wondering when DB an M areas of S7 PLC are read during scan loop. I want to block some of the events coming from WinCC ( DB -> M ).

First example

A db102.dbx0.0
R db102.dbx0.0

A db102.dbx0.0
S M10.0

The second statement in this example will never occur.

Second example:

A db102.dbx0.0
S M10.0

A db102.dbx0.0
R db102.dbx0.0

The M10.0 flag will be always set whenever dbx=1.

Are DB and M flags read the same way as PI area, that is on the beginning of the scan ?
Is there any chance of setting the M10.0 in the first example ?
Any help on this would be very appreciated.

Regards.
 
No, M and DB data are not processed as IO, these are processed during the scan.

In your first example the M flag will never be on, your 2nd example corrects your fault.
 
I think the question adfox asks is if WinCC writes are only updated outside the program scan, or if it could happen during the program scan.

It is not consistent. For some communication methods, the comms is updated after the program scan. I believe this is the case for MPI and the onboard PN interfaces. For other communication methods I believe that reads and writes can happen during the program scan. Not exactly sure what hardware falls into which category.

Send/receive is always handled after the normal program scan.

I sometimes uses an intermediary buffer to avoid 'flickering' of HMI visualisation.
 
Yes, I'm using a DB as a buffer for WinCC / OP communication.
And i've got function that reads the WinCC control byte and rewrites statuses of commands into markers like the example above.

My question is just like JesperMP writes:
when the rewrite takes place? On the beginning end or in the middle of the scan, and for example how to block incoming WinCC bits from getting rewrited to M flags, and why above the call :)

Regards.
 

Similar Topics

Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
163
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
3
Views
110
Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
89
Trying to setup a message read via Ethernet. I have the path setup as 1, 1, 2, 192.168.66.10 I get an error code 1, ext err 315. I am beating...
Replies
9
Views
237
Dear all, I don't know why setup of password became challenging and weird. After setting up the password and try to upload the ladder from the plc...
Replies
3
Views
178
Back
Top Bottom