Code for monitoring sensor's heartbeat

Hi all,
I am trying to monitor heartbeat of the sensor. The sensor will send signal 1 or 0 as a signal that it is active. And I am currently using Edge Controller, how do I write the code for the sensor to send signal to my PLC. Is there anybody has experience with this? The heartbeat is Y00.
Thank you in advance.

Best regards,