P or POS in S7 question

apetkov5

Member
Join Date
Aug 2007
Location
x
Posts
101
Hello!

What is the best way to detect positive (or negative) edge of signal?

In "--[P]--" and "POS" (or N, NEG) functions from "Bit logic" group i must use memory bite, what will happend in first cycle? If i try to detect negative edge and memory bite is 0?

Can I use this:

'''''''''''''''''I 0.1
'''''''''''+---------------+
'''''''''''I NEG I
M0.0 ----- I M_BIT Q I------ ....
'''''''''''+---------------+

My goal is to get Q triggered when I0.1 is turned off

M0.0 is never used if program.

?
 
Last edited:
There is no big difference between the "simple" (P) and (N) oneshots, and the "boxed" ones POS and NEG. I always use (P) and (N).

Switch to STL and you see that a BLD gets inserted when a POS is used in sted of a (P). The BLD has no other function than affecting how the code is displayed in ladder.
A I0.0
BLD 100 //only inserted when POS is used.
FP M0.0
= M0.1
 
the P works fine but I was caught out when I tried to use one as a temporary variable in a function they need to be global markers as you lose the memory when a function stops being called. Hans Berger has a very useful explanation in his book. I can really reccomend them, after years of struggling as a self-taught Siemens programmer I finally got them recently and they are great help to me.

To detect when a bit is turned off use (N).

The RLO only stays on for one scan after the (P) or (N) use this to set a bit with (S). You don't need to use the edge detect at a counter input as a counter does it automatically.
 
The operation of (P) and POS are not quite the same.

For (P) the edge detection is applied to the all of the logic prior to the (P) using the RLO, this means that any of the logic bits feeding the (P) will be detected as a rising edge (in effect the last bit that rises will cause the edge to be detected)

For POS, the edge detection is only applied to the one bit that you specify.

If you only use one bit, they do indeed reduce to the same, but, as Jesper points out, POS shows a BLD to allow the correct ladder to display.

....to answer apetkov5 - Yes.
 
Last edited:

Similar Topics

I have a machine which is undergoing upgradation. As part of the process two SEW drives are being replaced., existing Gen B with new Gen C. The...
Replies
3
Views
185
Hello, I'm trying to test Acopos multi using Automation Studio. Ready LED is green blinking, how can i know what error of Acopos on Automation...
Replies
1
Views
120
Hello all, i am new to the servo drive and this brand also. i installed the automation studio v4.12. i have to configure drive with plc B and R...
Replies
0
Views
365
hi goodday to all, i have acopos 1320 as below title my acopos not driven a servo motor,. please help me,.
Replies
0
Views
434
Hello, Does anybody have experience with ACOPOS drives? One of the machines at my plant uses B&R system with three ACOPOS 1016 drives. All three...
Replies
1
Views
1,434
Back
Top Bottom