Network Connect Automation Ug en
Network Connect Automation Ug en
FOR AUTOMATION
Developer Guide
P1096306-002 Rev. B
© 2018 ZIH Corp. and/or its affiliates. All rights reserved. ZEBRA and the stylized Zebra head are
trademarks of ZIH Corp., registered in many jurisdictions worldwide. All other trademarks are the property of their
respective owners.
For further information regarding legal and proprietary statements, please go to:
COPYRIGHTS: www.zebra.com/copyright
WARRANTY: www.zebra.com/warranty
END USER LICENSE AGREEMENT: www.zebra.com/eula
SOFTWARE: www.zebra.com/linkoslegal
Terms of Use
Proprietary Statement This manual contains proprietary information of Zebra Technologies Corporation and its
subsidiaries (“Zebra Technologies”). It is intended solely for the information and use of parties operating and
maintaining the equipment described herein. Such proprietary information may not be used, reproduced, or disclosed
to any other parties for any other purpose without the express, written permission of Zebra Technologies.
Liability Disclaimer Zebra Technologies takes steps to ensure that its published Engineering specifications and
manuals are correct; however, errors do occur. Zebra Technologies reserves the right to correct any such errors and
disclaims liability resulting therefrom.
Limitation of Liability In no event shall Zebra Technologies or anyone else involved in the creation, production,
or delivery of the accompanying product (including hardware and software) be liable for any damages whatsoever
(including, without limitation, consequential damages including loss of business profits, business interruption, or loss
of business information) arising out of the use of, the results of use of, or inability to use such product, even if Zebra
Technologies has been advised of the possibility of such damages. Some jurisdictions do not allow the exclusion or
limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you.
1 • Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Communications Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
EDS File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Supported Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Identity Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
TCP/IP Interface Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Ethernet Link Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
I/O Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Printer Input Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Printer Output Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
I/O Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Configuring Rockwell ControlLogix Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Add the Printer to the I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Create I/O Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1/24/20 P1096306-002
4 Contents
This section provides you with contact information, document structure and organization,
and additional reference documents.
Contents
Who Should Use This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
How This Document Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1/24/20 P1096306-002
6 About This Document
Who Should Use This Document
Section Description
Introduction on page 7 This guide provides information on the use of
Network Connect for Automation (NC4A).
Designing and Exporting a Template This section describes how to use
in ZebraDesigner on page 25 ZebraDesigner, our label design application, to
create a label template, and then export it. We’ll
use an example template called “EIP” as an
example.
Raw Parser Data on page 39 This section describes how to utilize the raw
parser data section of the Printer Input
Assembly.
Introduction
This guide provides information on the use of Network Connect for Automation (NC4A).
Contents
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Communications Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
EDS File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Supported Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Identity Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
TCP/IP Interface Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Ethernet Link Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
I/O Assemblies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Printer Input Assembly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Printer Output Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
I/O Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Configuring Rockwell ControlLogix Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Add the Printer to the I/O Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Create I/O Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1/24/20 P1096306-002
8 Introduction
Setup
Setup
The following components are required for initial setup and a fully functional Zebra
Industrial Ethernet solution.
• Link-OS Ethernet/IP capable printer (such as a ZT400 printer)
• Special firmware SP004629A
• A PC running Windows 7, or higher
• An Industrial Ethernet PLC (Programmable Logic Controller) that supports
EtherNet/IP such as CompactLogix
• Ethernet switch or router (if not connecting directly to a PLC) and Ethernet cables
• Sample applications to help accelerate development.
Communications Profile
The EtherNet/IP interface on the printer supports CIP Adapter functionality. The device
can receive, or be the target of, I/O connections from a CIP Scanner, but is not able to
originate connections itself. The interface supports the Generic device profile. The
Generic profile provides for all CIP objects that are required by the EtherNet/IP
specification.
EDS File
The EtherNet/IP EDS file describes the Identity and I/O capabilities of the printer. The file
is used by PLC configuration tools to configure the I/O connections and data tags used to
communicate with the printer over the EtherNet/IP network.
The EDS file is keyed by Rockwell for EDS AOP usage (a custom Rockwell AOP will be
available from Zebra or in the latest version of Studio 5000). See Figure 1. The latest EDS
file can be acquired from the printer directly using RSLinx Classic – RSWho and uploading
the EDS file from the device.
Figure 1
Supported Objects
The EtherNet/IP interface will support the following CIP objects:
• Identity
• Message Router
• TCP/IP Interface
• Ethernet Link
Identity Object
The Identity object provides the ability to get device information, product name, product
code, revision, serial number, and the ability to reset the printer.
I/O Assemblies
The EtherNet/IP interface includes two Assembly object instances that hold parameters
and data used in printing forms, configuring the printer, and monitoring system status.
Access: Set
Table 1
Sequence Number 2 bytes
Format Number 2 bytes
XF Format Name (^XF) 24 bytes*
XF Field 1 (^FN1) 68 bytes*
XF Field 2 (^FN2) 20 bytes*
XF Field 3 (^FN3) 20 bytes*
XF Field 4 (^FN4) 20 bytes*
XF Field 5 (^XF5) 20 bytes*
Raw Parser Data 320 bytes*
*These ASCII NULL terminated strings contain 2 bytes of string
length data in the beginning of the SINT array, which are
ignored by the printer. When writing data as an array, start at
index 2 instead of index 0.
The sequence number is used to specify that new data is available for the printer to send
to the parser. This number must be incremented each time new data is present and ready
to process on the printer. When the limit is reached for the sequence number, reset the
value and roll it back to zero to begin incrementing again.
Access: Get
Table 2
Previous Sequence Number 2 bytes
Previous Format Number 2 bytes
System Status 44 bytes
Parser Return Data 52 bytes*
*These ASCII NULL terminated strings contain 2 bytes of string
length data in the beginning of the SINT array, which are
ignored by the printer. When writing data as an array, start at
index 2 instead of index 0.
The system status is the same format as the following Set Get Do command:
! U1 getvar "zpl.system_status"
with a result that looks like:
0,0,00000000,00000000,0,00000000,00000000
Each section is separated by commas for a total of 7 sections:
• Section 1 – 1 byte, denotes if the printer is paused (1 yes, 0 no)
• Section 2 – 1 byte, denotes if the printer has an error (1 yes, 0 no)
• Section 3 – 8 bytes, currently reserved
• Section 4 – 8 bytes, has the following bit values (those not specified are reserved):
MEDIA_OUT = 0x00000001
RIBBON_OUT = 0x00000002
HEAD_OPEN = 0x00000004
CUTTER_ERROR = 0x00000008
HEAD_OVERTEMP = 0x00000010
MOTOR_OVERTEMP = 0x00000020
HEAD_ELEMENT = 0x00000040
HEAD_DETECTION_PROBLEM = 0x00000080
THERMISTOR_OPEN = 0x00000200
PRINTER_PAUSED = 0x00010000
BASIC_RUNTIME_ERROR = 0x00100000
BASIC_FORCED = 0x00200000
RIBBON_AUTH_ERROR = 0x00400000
• Section 5 – 1 byte, denotes if the printer has a warning (1 yes, 0 not)
• Section 6 – 8 bytes, currently reserved
• Section 7 – 8 bytes, has the following bit values (those not specified are reserved):
PRINTHEAD_MAINT = 0x00000002
REPLACE_HEAD = 0x00000004
HEAD_UNDER_TEMP = 0x00001000
RIBBON_IN_DT_MODE = 0x00002000
BATTERY_LOW = 0x00004000
RFID_ERROR = 0x00008000
RIBBON_LOW = 0x00010000
I/O Connections
The EtherNet/IP interface supports a single I/O connection that is used to transfer printer
format and status to and from the PLC.
O -> T
T -> O
1. Expand the I/O Configuration tree in the Organizer pane to display the Ethernet
network.
2. See Figure 2. Right-click on the Ethernet node in the tree and select New Module…
Figure 2
3. See Figure 3. The Select Module Type dialog will be displayed. Search for ‘Zebra’ to
see only products from the Zebra Technologies vendor.
The Link_OS_Printer displays in the device list.
Figure 3
5. See Figure 4. The New Module dialog will be displayed. Enter the desired name and
IP address of the printer.
Figure 4
6. Press OK.
7. See Figure 5. The printer is added to the I/O configuration, and appears in the tree.
Figure 5
Figure 6
Figure 7
Both of which are fully described in I/O Assemblies on page 10. The only additional item is
in the Input side under the name ConnectionFaulted, which is active when the PLC is no
longer able to communicate with the printer (printer offline). Also, there are no
configuration tags used for this printer.
Example
Note • Some values will vary, based on the resolution (Dots per Inch, or DPI) of your
printer.
Example • The example shown here is for a 203 DPI printer.
1. Send a sample ZPL form to the printer which makes use of field number 1 and 2.
^XA
^DFE:EIP.ZPL
^FO10,10^XGZ:LOGO.PNG^FS
^FO125,10^A0,20,20^FDNetwork Connect^FS
^FO105,75^A0,20,20^FDFor Automation^FS
^FO50,100^A0,30,20^FN1^FS
^FO50,130^B3,,10^FN2^FS
^XZ
The above ZPL creates a form called EIP.ZPL and saves it on the E: FLASH drive of
the printer. It displays two text strings, and then has text for field number 1, and a
Code-39 barcode for field number 2.
2. Create a new Studio 5000 project, and add the printer to the I/O configuration as
described earlier (or feel free to use ZT400-Sample.ACD).
Note • All of the following strings input into arrays must begin at index 2 and not 0 as
the first two bytes are ignored.
3. See Figure 8. In the Controller Tags Output Connection for the printer, change the
XF_Format_Name to “E:EIP.ZPL”.
Figure 8
Figure 9
Figure 10
6. See Figure 11-Figure 13. Set the remaining fields (XF_Field_3,4,5) to ‘$00’ NULL for
the first SINT.
Figure 11
Figure 12
Figure 13
7. See Figure 14. Add a simple ZPL command to get return data back from the parser by
putting “~HI” in the Raw_Parser_Data section.
Figure 14
8. See Figure 15. In the MainRoutine, add an XIC (Examine On) ladder element to rung
0 and link it to the I.System_Status_0.0.
Figure 15
9. See Figure 16. Now, add an OTE (Output Energize) ladder element to rung 0, and link
it to one of the PLC’s LED lights.
Figure 16
Figure 17
11. Save the project, download it to the PLC, and switch into run mode.
12. See Figure 18. In the Controller tags, increment the Sequence_Number.
Figure 18
13. Now that the sequence number has been updated, the data will be sent to the printer.
In the steps above, this would be equivalent to sending the following ZPL.
^XA
^XFE:EIP.ZPL
^FN1^FDExample^FS
^FN2^FD12345^FS
~HI
^XZ
Figure 19
14. Press PAUSE on the printer and verify the LED lights up on the PLC. Press PAUSE
again to verify the LED on the PLC turns off.
15. See Figure 20. Verify that the return data from the ZPL command ~HI is in the
Return_Data controller tags section (remember that the first two bytes of data are
reserved and ignored).
Figure 20
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
This section describes how to use ZebraDesigner, our label design application, to create a
label template, and then export it. We’ll use an example template called “EIP” as an
example.
Contents
Download and Install ZebraDesigner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Download the Sample Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Modify the Template File in ZebraDesigner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Recalling and Printing with a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Create Your Own Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1/24/20 P1096306-002
26 Designing and Exporting a Template in ZebraDesigner
Download and Install ZebraDesigner
3. To download the software, you must review and agree to the terms of the End User
License Agreement.
If you agree, click the ACCEPT AND BEGIN DOWNLOAD NOW button.
4. On your computer, browse and locate the downloaded file and double-click it to start
the installation wizard.
Follow the on screen instructions to complete the ZebraDesigner installation.
1. In Acrobat, click the Attachments icon. This is usually located on the left side of
the window.
2. Right-click on the eip-label-template.zip file and select Save Attachment.
Specify the location where you want save the file.
4. Note the location of the downloaded file as this is the template file that will be modified
in ZebraDesigner in the next section.
1. First, it’s necessary to install the Windows printer driver that was used in the design of
the template.
a. From the Start menu browse to the Zebra Technologies program group and then
launch Printer install from the ZebraDesigner 2 folder.
b. If required, click yes on the User Account Control dialog.
The printer installation wizard will be displayed.
2. Click Next.
4. From the list of printers, select ZDesigner ZT410-203dpi ZPL, and click Next.
6. Uncheck all boxes on the Additional Install Options dialog and click Finish.
The driver installation will complete and the installation wizard will close automatically.
7. From the Start menu, browse to the Zebra Technologies program group and launch
ZebraDesigner 2 from the ZebraDesigner 2 folder.
The Welcome Wizard will be displayed.
8. Select the Open other existing label option and click Finish.
The Open dialog will be displayed.
9. Browse to the location of the template file that was downloaded in the previous
section. Select the eip.lbl file and click Open.
10. The template file should be displayed in ZebraDesigner. You will be adding a fixed
text “company name” field to the template. If you want to, you can use your mouse to
draw a box around the existing fields on the label, and then drag them downward to
create space for the new field.
11. Click the Create new Text object option, and then click in the space created at the
top of the template.
The Text Wizard will be displayed.
12. Enter your company name or some other text in the Content area and click Finish.
13. Adjust the position of the text field as necessary. To center the field relative to the
label, press and hold the CTRL key and click the Center button on the alignment
toolbar.
14. Click on the Picture icon on the left hand tool bar and then on the
label design area to add an image to the label.
15. Navigate the location of your image file and select the image – we recommend using a
.PNG file.
An example file is included on the previously mentioned Box site.
16. You can grab the edge of the image and drag to resize the image.
18. Select the Export to Printer option, and then click Internal Flash – and then OK.
This will send the template to your printer, storing it in the E memory location.
19. For your reference, using the eip.lbl file as described and edited here will result in the
following ZPL commands being sent to the printer.
Note • Some values will vary, based on the resolution (Dots per Inch, or DPI) of your
printer.
Example • The example shown here is for a 203 DPI printer.
^XA
^DFE:eip.ZPL^FS
~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR6,6^MD15^LRN^
CI0
^MMT
^PW812
^LL0406
^LS0
^FO672,0^GFA,02048,02048,00016,:Z64:
eJztlLFOwzAQhm3SqBUSTZHite1LIAUUxalEdldypPYt+gQ0iIGtvEIf
o0gMlRjY6NIVKYiNCTZLVAlXhvjOEwsL4O3r53N/
2+cw9j9+fhw4zFPKXkkw5YrMLj1DWPEJqTbUM03rWeV4Qf1scLXCrPwR
8VX7heTTfJxilpcfBVme5aQ+KOc7zL4SGsf3jKwRc65CPN1bm3iIy1MV
9rB/M3GE65UKyQI7Eyc4gJ6EIQ4gV3EicX6oFzg/1B8WDbb8CVn/
wAPfofnxBK8A38X5od5HfhnFSYDz98DbCdx0wLfL5oct2/u04Qu29/
aKBXjh2ysYFAn4quGjFNI92RNoL2H3tfVcwe5z6/
kuKFmNTnALf448m0P/
StRiAvob5WPBGsIX+ASQZPsbHBJ22hdu0GHtsHRYOBysKeNwXwGWlN33
yUqHXT9kf2jkIhspe0S8lpv3yn7CuD7Jxjk6wn7UPd1cN56FvdZxhvoz
An9/M2u4J7Ix9kZunuuFfeIqPJ/
qlv0ElFBfDZr+4ymsr+0nhr+eLW4fkzubT2TTzL5Qr4L8D6v+d7f/
q8Yn1KBy+w==:1C22
^FT403,165^A0N,45,45^FB0,1,0,C^FH\^FN12"EnterJobID"^FS
^BY2,3,61^FT263,311^BCN,,Y,N,N,A
^FN11"EnterOrderID"^FS
^FT48,147^A0N,28,28^FH\^FDJOB NUMBER:^FS
^FT48,221^A0N,28,28^FH\^FDORDER ID:^FS
^FT221,74^A0N,48,48^FH\^FDZebra Techologies^FS
^XZ
The next step is to create your PLC-based program so that it can recall the template
and populate it with data at print time. See the section of this document that details
Recalling and Printing with a Template on page 33.
Figure 21
3. See Figure 22. Set the XF fields (XF_Field_1,2,3,4,5) to ‘$00’ NULL for the first
SINT. The fields used in ZebraDesigner start with 11 and 12, so we cannot use the
ones built-in for support in the data model. (Only field 3 is shown below.)
Figure 22
4. See Figure 23. Set the Raw Parser Data section to fill in field number 11 with data
(^FN11^FD12345^FS).
Figure 23
5. See Figure 24. Set the remaining Raw Parser Data section to fill in field number 12
with data (^FN12^FD5^FS).
Figure 24
6. Save the project, download it to the PLC, and switch into run mode.
Figure 25
8. The effective ZPL this will produce internally on the printer looks like this:
^XA
^XFE:EIP.ZPL
^FN11^FD12345^FS
^FN12^FD5^FS
^XZ
9. See Figure 26. This should print out a label that looks like this:
Figure 26
1. Create your own template using ZebraDesigner based on tasks performed in the
Modify the Template File in ZebraDesigner on page 27.
a. To access the Software Tutorials tab, go to
http://www.zebra.com/zebradesigner
b. Click on ZebraDesigner.
c. Click on the Software Tutorials tab.
2. Transfer your template to your printer.
3. Create your PLC-based program to recall and populate the variable fields on your
label.
This section describes how to utilize the raw parser data section of the Printer Input
Assembly.
Contents
Embedded Parser Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Configuration Commands Inside Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Using More Than Five Field Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Sending Data More Than 500 Bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
1/24/20 P1096306-002
40 Raw Parser Data
Embedded Parser Commands
Figure 27
In this situation, the printer will only process what is in the Raw Parser Data section and
ignore all the other fields.
For example, if you input the data shown in Figure 28 in the raw parser data section
(! U1 getvar "appl.name"):
Figure 28
After incrementing the sequence number, you would receive the output shown in Figure
29 (SP75-004629A):
Figure 29
Figure 30
Figure 31
The seventh field would immediately follow the sixth and end with a NULL terminator as
shown in Figure 32:
Figure 32
2. Put as much of the ZPL data into the raw parser data section that will fit:
^XA… up to 320 bytes
3. Increment the sequence number to send that data to the parser.
4. Put the next chunk of ZPL data into the raw parser data section, and increment the
sequence number each time more data is sent to the parser until the end of the data.
remaining data…^XZ
Notes • ___________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________
__________________________________________________________________________