some work on the plc link, not yet debugged