PEUOSRUSPOSR Rising edge contact
Also called: positive transition contact, P contact, OSR (One Shot Rising), one-shot, rising edge detection
Passes power for one scan when the variable goes from 0 to 1.
What it does
The P / OSR contact detects a rising edge: it passes power for a single PLC scan, when its variable goes from 0 to 1.The P contact detects a rising edge: it passes power for a single PLC scan, when its variable goes from 0 to 1.The OSR contact detects a rising edge: it passes power for a single PLC scan, when its variable goes from 0 to 1.
When to use it
To react once to a press: count, toggle a state, start a step.
Operands
| European mnemonic | American mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|---|
| Variable | Variable | Variable (bit) | BOOL | Input | Yes | BOOL variable read: input, output, internal bit or instance bit (T1.Q, C1.DN…). |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| Variable | Variable (bit) | BOOL | Input | Yes | BOOL variable read: input, output, internal bit or instance bit (T1.Q, C1.DN…). |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| Variable | Variable (bit) | BOOL | Input | Yes | BOOL variable read: input, output, internal bit or instance bit (T1.Q, C1.DN…). |
Timing diagram
Timing diagram checked against the simulator (the same engine as the editor).
Example
M1 is 1 for a single scan each time S1 is pressed.
Try it in the simulatorThe example opens in the free simulator; your own program stays as it was.
Behaviour in detail
- The contact remembers the previous scan's value (initially 0); if the variable is already 1 on the first scan, it gives a pulse.
- The pulse lasts exactly one scan: a normal coil driven by this contact stays 1 for one scan only.
- The edge is detected on the contact's variable, not on the power flow reaching the contact.
European (IEC) and American styles
European: P contact.
American: OSR (one-shot rising), shown here as a ↑ contact on the variable; on an American PLC the OSR uses a visible storage bit, here the memory is internal.