Storage bit in OSF and best way to detect falling edge
I don't know what those OSF,XIO,...meana, through I do ladder PLC more than 20 years.
So, falling edge:

Out = /IN &amp; flag
flag = IN

   IN    flag    out
--|/|----| |----()

  IN            flag
--| |-----------()


No matter what system functions on falling edge is, it does the same calculation behind, so that's why you need store one aux variable - flag.