Added D_ReferenceAddress

Added function to work out the ref address to send to PLC through Modbus
function