Just one further question on this.
I am now using ZPCO_AGENT_COMMAND to send the command to our scale to get the reading from the scale, It sends the command successfully, I can check the log in PCO and see the scale value, but all that is returned by the ABAP code is a success message.
So, what I am trying to do is decompile the existing socket agent which I created in PCO take most of that code, and then just add in extra logic to wait for the value to be returned from the scale.
Does that sound like the right approach?