For me the following method worked well:
1) use Zebra designer to set up your label which you need to print
2) try to print it using the Zebra designer to see the result
3) then print to file the prepared label, in file you can find the exact ZPL code which has to be sent to printer via TCP
4) in the ZPL code identify the field you need to change
5) try to use terminal application (e.g. like I mentioned Hercules setup utility worked well for me) and test TCP connection to printer
6) try to print the ZPL code using terminal app, if working ok you are ready to use TCP connection in PLC
(check the printer config via web interface, I used the port 6101)
7) the worst work is to compose the complete ZPL code in PLC as it is string.
See the pictures ...
For support u can contact me one
[email protected] (also Google hangouts chat possible)