2/8/2017 10:56 AM | |
Posts: 69 Rating:
|
Btw you can write IF S THEN Q:=true; end_if; you dont need write in if operator true for bool vars bit if false you need write s=false. |
This contribution was helpful to
1 thankful Users |
2/8/2017 11:12 AM | |
Joined: 12/9/2016 Last visit: 1/13/2022 Posts: 243 Rating:
|
Hello, i make it as follows : Using the Rising edge detecting operation the #output will be True for just one cycle.
--------------------- If you find this helpful please Rate it Best Regards |
If you find my contribution helpful please RATE it :)) |
|
This contribution was helpful to
2 thankful Users |
5/24/2022 3:34 PM | |
Joined: 6/24/2013 Last visit: 9/3/2024 Posts: 1618 Rating:
|
Hi ---() is equivalent to assign i.e. q:=<logic> ---(S) is equivalent to IF <logic> THEN q:=True; end_if; ---(R) is equivalent to IF <logic> THEN q:=False; end_if; Edges: POSITIVE IF Bit AND NOT Bit_Previous THEN // code executed at raising edge END_IF; Bit_Previous:=Bit; NEGATIVE IF Bit_Previous AND NOT Bit THEN // code executed at falling edge END_IF; Bit_Previous:=Bit; BOTH IF Bit_Previous <> Bit THEN // code executed at falling edge END_IF; Bit_Previous:=Bit; BTW if you skip coil () in Ladder with a jump it will not be processed and affected bit will not be changed. |
This contribution was helpful to
1 thankful Users |
2/9/2024 5:41 PM | |
Joined: 1/10/2020 Last visit: 7/24/2024 Posts: 25 Rating:
|
Hi everyone, how can I write in scl a start and stop of an output using the same button exploiting the rising and falling edge? Thank you
|
2/12/2024 2:43 PM | |
Joined: 7/7/2010 Last visit: 9/10/2024 Posts: 15166 Rating:
|
What have you already tried?
This is completely untested. If it works, it means over the last 12 years since I submitted the original topic's post, I learned something along the way. If it does not, it means I am not perfect and in fact simply human and typed faster than my brain can think
|
science guy |
|
Follow us on