sherzaad:
so is psudo code:
I think that should work.
As to your English, I think a lot of the confusion would have been avoided if your Original Post had said
I have a project on which I would like to detect an emergency stop.
rather than
I have a project on which I would like to implement an emergency stop.
...R