Arduino Code to PLC Ladder Logic

@picavr,
Thanks for that. I didn't know if anyone had done that.
I take it from your handle that you are working both sides of the street ?
Robert