K8055 + micro optical sensor

Hi
I want to count the pieces passing between my 2 micro optical sensors (Keyence PZ2-51P)
I connected the sensor on the digital input 1
With AGL Windev, I called the DLL
Link to the card is ok
I can read the counter when I press on the buttons
But when I try to read the digital channel 1, I can’t see any modification of the value returned (0)
Do I miss something ?
Thank you for your help

The optical sensor Keyence PZ2-51P has PNP transistor output.
It can’t work with the positive pull up of the K8055 digital input.
Maybe it works if you invert its connection wires.

You should use NPN transistor output type sensor: Keyence PZ2-51.
medibix.com/runsearch.jsp?vi … _id=456704

Thank you !