Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let printLabel = 0;
- //ZPL Code to print
- let zpl = "^XA^PW600^LL400^PON^FO100,75^A0N,50,50^FDHello! My Name is^FS^FO120,150^A0N,85,85^FB380,1,20,C,0^FDFlexSCADA^FS^FO120,230^A0N,85,85^FB380,1,20,C,0^FDFlexsQ5^FS^FlexSCADA,FlexsQ5^FS^FO30,30^GB550,350,2,B,2^FS^FO150,340^A0N,30,30^FDZebra Technical Support^FS^FO550,150^A0B,20,20^FDwww.zebra.com^XZ";
- //URL for Printer ***Update with IP of Printer***
- let url = "http://172.16.0.22/pstprnt";
- while(run()){
- if(printLabel === 0){ //Only print a label if this variable is = to 0
- //Send ZPL Code to Printer
- let res = http.req(url,zpl,1000,false);
- //Log results of Request
- print("POST TEST: Received from server",JSON.stringify(res));
- printLabel = 1; // Set this variable to 1 so we don't get any more labels
- }
- waitMS(10000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement