Blocks and code to allow connecting to PLCSim