Programming instructions
6.1 Basic instructions
P contact:
LAD
N contact:
LAD
P box:
FBD
N box:
FBD
P coil:
LAD
N coil:
LAD
P= box:
FBD
N= box:
FBD
P_TRIG:
LAD/FBD
N_TRIG
(LAD/FBD)
All edge instructions use a memory bit (M_BIT) to store the previous state of the input signal
being monitored. An edge is detected by comparing the state of the input with the state of
the memory bit. 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 FALSE.
98
The state of this contact is TRUE when a positive transition (OFF-to-ON) is
detected on the assigned "IN" bit. The contact logic state is then combined
with the power flow in state to set the power flow out state. The P contact can
be located anywhere in the network except the end of a branch.
The state of this contact is TRUE when a negative transition (ON-to-OFF) is
detected on the assigned input bit. The contact logic state is then combined
with the power flow in state to set the power flow out state. The N contact
can be located anywhere in the network except the end of a branch.
The output logic state is TRUE when a positive transition (OFF-to-ON) is
detected on the assigned input bit. The P box can only be located at the
beginning of a branch.
The output logic state is TRUE when a negative transition (ON-to-OFF) is
detected on the assigned input bit. The N box can only be located at the
beginning of a branch.
The assigned bit "OUT" is TRUE when a positive transition (OFF-to-ON) is
detected on the power flow entering the coil. The power flow in state always
passes through the coil as the power flow out state. The P coil can be
located anywhere in the network.
The assigned bit "OUT" is TRUE when a negative transition (ON-to-OFF) is
detected on the power flow entering the coil. The power flow in state always
passes through the coil as the power flow out state. The N coil can be
located anywhere in the network.
The assigned bit "OUT" is TRUE when a positive transition (OFF-to-ON) is
detected on the logic state at the box input connection or on the input bit
assignment if the box is located at the start of a branch. The input logic state
always passes through the box as the output logic state. The P= box can be
located anywhere in the branch.
The assigned bit "OUT" is TRUE when a negative transition (ON-to-OFF) is
detected on the logic state at the box input connection or on the input bit
assignment if the box is located at the start of a branch. The input logic state
always passes through the box as the output logic state. The N= box can be
located anywhere in the branch.
The Q output power flow or logic state is TRUE when a positive transition
(OFF-to-ON) is detected on the CLK input state (FBD) or CLK power flow in
(LAD). In LAD, the P_TRIG instruction cannot be located at the beginning or
end of a network. In FBD, the P_TRIG instruction can be located anywhere
except the end of a branch.
The Q output power flow or logic state is TRUE when a negative transition
(ON-to-OFF) is detected on the CLK input state (FBD) or CLK power flow in
(LAD). In LAD, the N_TRIG instruction cannot be located at the beginning or
end of a network. In FBD, the P_TRIG instruction can be located anywhere
except the end of a branch.
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02
Need help?
Do you have a question about the SIMATIC S7 and is the answer not in the manual?