Positive edge triggers

JOLTRON

Lifetime Supporting Member
Join Date
Aug 2006
Location
MI
Posts
692
Quick question on positive edge triggers.

since plc scans inputs, then solves logic, and last writes outputs. If you have a positive edge in your program, is it your next single scan that the output is ON for. I remeber someone telling me it is on from that point of the program to the end, so if you have something triggered off of the positive edge but placed before it in the program it will never be triggered?????

I'm confused.
-Joel
 
The edge is evaluated when the instruction is executed. It may be that the edge is detected on the next scan. The edge detection will stay on until the instructions are executed again.
 
Well are memory locations just like outputs, they only get wrote at the end after solving all the logic?

That is what I assume.
 
The I, Q and M are storage areas. You can read/write them as you wish, they change immediately.
The I area will be overwritten at the start of the scan by the values from the input cards (but you can modify it after this if you want to).
The Q area is controlled by your program. The values are copied to the output cards at the end of the scan.
 
also on 300's as far as DB's are they written after solving logic or right away like the M bits.
 
it's the same for s7-200, except about the DBs. You don't have DBs in s7-200. for one scan you have:
1. the controler reads the PII (process image inputs)
2. executes the OB1 and so on.
3. writes the PIQ (process image outputs)
so .. if you have a change of the input during the program execution, the system will not be triggered.
first, i think that you don't have to be afraid of this because one scan takes several [ms]. if your process is faster or something ...
1. you can use hardware interupt
2. you can use high speed counter
3. you can use immediate contact
but this is only my opinion, the decision is yours!!!
 
JOLTRON said:
Quick question on positive edge triggers.

since plc scans inputs, then solves logic, and last writes outputs. If you have a positive edge in your program, is it your next single scan that the output is ON for. I remeber someone telling me it is on from that point of the program to the end, so if you have something triggered off of the positive edge but placed before it in the program it will never be triggered?????

I'm confused.
-Joel

Quite easy to test tbh.

Code:
AN M 0.0
FP M 0.1

A M 0.1
S Q 0.0

A M 0.2
S Q 0.1

AN M 0.0
FP M 0.2

Put that in your PLC.

If only Q0.0 gets turned on, then your positive edge flag gets reset at the end of the scan. Important where you use your edge flag
If both Q0.0 and Q0.1 turned on, then the positive edge flag gets reset at the moment the PLC scans the trigger again. Not really that important where you use the edge flag.
 
i never use positive (or negative) edge triggers because some plc's use the bit just to memorize the last status of the rlo. so it is not reliable to have a one scan signal.
i recommend using two bits, one of them is an auxiliary bit used to disable the pulse bit in the next scan:

..RLO... Maux Mpulse
--| |----|\|---[ ]
.......|
.......| Maux
........----[ ]
 
Last edited:
Which specific plc's are you referring to that will not produce a reliable one scan signal using their edge triggers ?
 
the s7-300 and s7-400 (step 7).
the trigger bit can be used once in a ladder network, but not anywhere else in the program...
 
Which is the trigger bit in my example below ?
Both networks produce the same results.

trigger00a.JPG
 
Last edited:

Similar Topics

Hello I have got a problem with positive edge from "system clock memory byte" in Tia Portal. I would like to change byte"system clock memory"...
Replies
27
Views
3,537
Can anyone see why i am not getting an output on this? it is detecting a rising edge and saying that it is true but going any further to the...
Replies
5
Views
2,369
I am using Portal for the first time and I am simply trying to do a one shot. My code wasn't working so I made a new network with all new tags so...
Replies
7
Views
2,441
Hello, I wish everyone the best for the new year. I am working with FATEK and winproladder. I want to build a project that has 8 DI and 1 DO. At...
Replies
2
Views
2,802
How to make in STL(S7-300) potivite or negative bridge. I want to start pump only on positive edge of the bit "start_pump"
Replies
7
Views
4,259
Back
Top Bottom