Hello everyone. I'm new to node-red and need help.
I am creating an interface for the management of two production lines. At the end of this line there is a networked printer (Zebra) that will have to label the pallets.
Once I have created the label with the necessary information, how can I send it to the printer?
Node red is installed on a Siemens Simatic Comfort panel (assuming the OS is Linux)
You need to find out how prints can be sent to that printer. If, for example, it supports lp
prints then it should be pretty easy.
Otherwise, you may need to report back what print methods it supports.
A quick search gave me this page:
A CUPS driver that supports Zebra printers is included with some Linux distributions and Mac OS X 10.6 Snow Leopard and later
so it would seem that the printer is supported by linux.
If you find the command under linux to make the printer print, then you can use the exec node to do that via Node-RED.
Not really clear but this article implies that lp
could also be used?
Whatever floats your boat - if the drivers are there then it works!
More that I'm just not sure how much you can do with that unit. You might not be able to install CUPS and the appropriate driver.
I doubt very much a company buys components that don't work together, usually you would ask the supplier if what you want to do with their gear will actually work.
And if not, then return to sender.
Thank you all for the replies. The printer in question is a ZE511 Industrial Printing engine Supporto e download del motore di stampa di ZE511 | Zebra
It's a HMI, it's not really used for making photocopies (but it's possible)
Take a look at this support and try to connect your printer.
I don't know how you should configure NR
OK, then it sounds like days of trying to get it to work and then making the realisation that it can't work.
Next question: has it ever worked before? Or is this a first time installation? Ie was there something else other than Node Red already working?
Good find. That shows that CUPS is indeed supported.
SO if you have access to the admin setup yourself, you should be able to do it using the docs shown. If not, you will need to find someone with admin rights for the system.
Thanks, i 'm the administrator of the system, I shouldn't have any other problems than figuring out how Siemens makes it possible
Can you edit PLC code?
-
aciesielski84 user gives quite good explanation how it is handled.
Basically you can send TCP/IP telegrams either from PLC or from NR into template that is loaded into Zebra printer
unfortunately i have only S7-300, old version of PLC
S7-300 also have library function blocks dedicated for TCP/IP communication, but I would suggest using S7 nodes. Read data from PLC, construct a string like it is shown in the forum link I posted:
a string that I send to the printer :
Version 1 only DMC and TEXT - I print the number once as text and once as DMC
'^XA^XFE:ETYKIET1.ZPL^FN11^FD691234567444443221^FS^FN12^FD691234567444443221^FS^XZ'Version 2 -> DMC, text and time stamp
'^XA^XFE:ETYKIET1.ZPL^FN11^FD561234567444443221^FS^FN12^FD677123456744443221^FS^FO40,420^A0N,30,30^FC%^FDDATA: %d/%m/%Y^FS^FO350,420^A0N,30,30^FC^FD %H:%M:%S^XZ'
And send it via TCP/IP out node. Assuming you have Ethernet and not RS232 printer
Thanks KarolisL, do you think that via PLC is more simple? Send data from Node-red to PLC is also simple, then PLC print directly to Zebra. This is definitely a viable alternative.
I don't know your Siemens programming skills, but working on S7-300 strings I would say is kind of pain. Doing it via PLC is definitely not simple, but you don't need nodered.
Also I assumed that you have label template creating tool - Zebra Designer (If I remember correctly they are licensed)
How did you install nodered into Comfort HMI?
For testing purposes I would try and establish TCP/IP connection between zebra printer and nodered. And try to send static strings to label template. If i works then worst part is behind you:
Either stick with Nodered and read from PLC to create dynamic strings, or transfer TCP/IP communication into PLC and drop NR.
(I would stick with nodered)
The plcs manage the automation, with node red installed on the panel I would like to develop an MES and also print production labels. So, can I use the exec node to send a template built with zebra designer via tcp?
Do you have nodered installed in HMI already or do you plan to do it?
In all printers I've seen templates were passed by USB stick. They were .zpl files like shown in example post above: ETYKIET1.ZPL - is a name of template already on printer.
In templates you create dynamic fields and you name them FN11, FN12 or whatever and then you pass data into those variables:
'^XA^XFE:ETYKIET1.ZPL^FN11^FD691234567444443221^FS^FN12^FD691234567444443221^FS^XZ'