I am setting up a sample project in OpenPLC + FactoryIO.

In particular, among other things I need to update a counter every time a piece interrupts an infrared beam.

Now, I noticed that at the start up the system seems to catch a spurious pulse which makes the counters start at 1 (instead of 0), so I tried a few solutions to solve this. However, something is still puzzling me.
I set my initial values for the sensors to 1 (the associated variables are normally true), and when debugging I see the problem. So I added the block in the figure so that a pulse is generated only when the sensor goes down and then up. It works perfectly in the debugger, but whenever I try with factoryIO I still get the same problem.

Any hint?


Quote 0 0