EasyManua.ls Logo

Siemens S7-1200 - Page 211

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic instructions
7.1 Bit logic operations
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
211
Table 7- 17 Data types for the parameters (P and N contacts/coils, P=, N=, P_TRIG and N_TRIG)
Parameter
Data type
Description
M_BIT
Bool
Memory bit in which the previous state of the input is saved
IN
Bool
Input bit whose transition edge is detected
OUT
Bool
Output bit which indicates a transition edge was detected
CLK
Bool
Power flow or input bit whose transition edge is detected
Q
Bool
Output which indicates an edge was detected
All edge instructions use a memory bit (M_BIT: P/N contacts/coils, P_TRIG/N_TRIG) or
(instance DB bit: R_TRIG, F_TRIG) to store the previous state of the monitored input signal.
An edge is detected by comparing the state of the input with the previous state. If the states
indicate a change of the input in the direction of interest, then an edge is reported by writing
the output TRUE. Otherwise, the output is written to FALSE.
Note
Edge instructions evaluate the input and memory
-bit values each time they are executed,
including the first execution. You must account for the initial states of the input and memory
bit in your program design either to allow or to avoid edge detection on the first scan.
Because the memory bit must be mainta
ined from one execution to the next, you should use
a unique bit for each edge instruction, and you should not use this bit any other place in your
program. You should also avoid temporary memory and memory that can be affected by
other system functions, s
uch as an I/O update. Use only M, global DB, or Static memory (in
an instance DB) for M_BIT memory assignments.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals