Hi Fabrizio,
looking just a bit of your code, I think the set of u1 is done from w1 but on the branch below reset is done, so the result is zero.
if you place a contact false on the branch below, you see the set of u1.
I leave you an example of flip flop in ladder, hope this can help you.
Ciao.
In image two equivalent scheme of Flip Flop Toggle
In the upper image:
Sending pulse on "in1" i can't obtain set of "u1" if i prepare "u1=1" sending pulse return it to 0
In the lower image:
Sending pulse on "in1" i can't obtain reset of "u1" if i prepare "u1=0" sending pulse return it to 1
I hope i'm wronging.
Last edit: fabriziobarbato 2022-01-09
Hi,
1) There are several bi-stable functions implemented in Standard lib(!)
SR (SR FF)
RS (RS FF)
2) For well implemented ladder patterns I suggest you take a look at
* https://forge.codesys.com/prj/designpatterns/home/Home/#patterns-of-ladder-logic-programming
Last edit: hermsen 2022-01-09
Hi Fabrizio,
looking just a bit of your code, I think the set of u1 is done from w1 but on the branch below reset is done, so the result is zero.
if you place a contact false on the branch below, you see the set of u1.
I leave you an example of flip flop in ladder, hope this can help you.
Ciao.
Last edit: gatto 2022-01-11
An other ladder example of FF using xor.
Programming in ST create a FF is very easy π
Ti saluto ancora, ciao