Studio 5000 - Zebra Printer ASCII Special Characters

worseltes

Member
Join Date
Oct 2010
Location
Windsor, Ontario
Posts
15
Hello all,

Have an interesting problem today. My PLC program is building the content of a 2d matrix barcode and sending the data to a Zebra 105SL Plus printer. Almost everything works well, the label is printed properly and all data is readable.

However, the customer spec calls for ASCII record and group separators to be visible to their system in the string data at specific locations, as well as an ASCII EoT. I am inserting HEX values of these characters into my string before sending, and the printer properly recognizes and includes the Group separators ($1D) in the code, but not the record separator ($1E) or EoT ($004). I believe the problem is that printer sees these characters as a print formatting instruction, rather than a special character to be printed, and as such, when I structure the string as per their spec, it is truncated and an empty 2d matrix is printed.

Here is what I am doing:

Example 1 - customer spec for code content

[)>[RS]06[GS]Yyyyyyyyyyyyyyyy[GS]Pxxxxxxxxx[GS]zzzzzzzzzz[GS]4D16286[GS]Ssssssssssssssss[RS][EOT]

Example 2 - Actual data sent, according to Customer Spec. Reads as an empty Data Matrix.

FD[)>$1E06$1DYyyyyyyyyyyyyyyy$1DPxxxxxxxxxxxxxx$1Dzzzzzzzzzzzz$1D4D16286$1DSssssssssssss$1E$004


Example 3 - Actual Data sent, Slightly modified from spec, but produces readable label

$1EFD[)>06$1DYyyyyyyyyyyyyyy$1DPxxxxxxxxxx$1Dzzzzzzzzzzzzzz$1D4D16286$1DSsssssssssssss$1E$004

Example 4: Content of Example 3 Label, as read by customer. Not accepted.


[)>06[GS]Yyyyyyyyyyyyyyyy[GS]Pxxxxxxxxx[GS]zzzzzzzzzz[GS]4D16286[GS]Ssssssssssssssss


Additionally, this string is preceded by a "$1EXA" and human readable data, then ended with a "$1EXZ". Also, I am using an Allen Bradley L33ER PLC, with ASCII card to send the data over serial connection.

Can anyone help? Hopefully this isn't too confusing.

Thanks in advance!
 
I found this note and your string structure is ok. Are you creating the full string in a tag and then sending it to the printer? Did you check the string tag to see if the separators are correct?
 
Hmmm. Thank you, I found similar articles. Does this mean I need to send the ASCII characters to the printer as "<$1E>" rather than just "$1E"? Example 2 and 3 that I provided are copy/pasted directly from the Studio 5000 string (with a little editing for simplicity).
 
Does this mean I need to send the ASCII characters to the printer as "<$1E>" rather than just "$1E"?
No, your string is ok. I guess the controller is not able to manage that special character and is just dropping it. Can you put a PC instead of the printer and capture the transmitted data? Maybe you can use hyperterminal to receive the serial data.

In your example 3, what happens if you delete $1E from the beginning? Does the printer produce a readable label? If the answer is yes, maybe my theory of the dropped character is not so wrong.
 
So, not knowing anything about your label(sounds like maybe Serialization), One thing you could do is store the base label as a format in the Printer itself and just pass in field data through your Ascii command.

Otherwise, I believe the Code 128 character for FNC1 is >8 , and for the Data matrix i believe it is _1

FNC1 is both the RS and GS, depending on where it is used per the GS1 standard.

(If you aren't doing Serialization, disregard :D )
 
Last edited:
Thanks guys. Adding a PC is not an option in this case, and unfortunately, neither is changing the way the printer handles the label.

My customer currently has multiple systems printing labels that are acceptable. I'm even using the same logic, and have confirmed it rung by rung.
 
Dumb question, Is this a new printer and does it have a different firmware rev? I know there are some changes around default escape characters between FW revs.
 
No, your string is ok. I guess the controller is not able to manage that special character and is just dropping it. Can you put a PC instead of the printer and capture the transmitted data? Maybe you can use hyperterminal to receive the serial data.

In your example 3, what happens if you delete $1E from the beginning? Does the printer produce a readable label? If the answer is yes, maybe my theory of the dropped character is not so wrong.
I just re-read your question about using a PC and Hyperterm. I have done that - and found that the data going to the printer is what it should be, as shown in example 2
 
Hey Guys. Problem solved...Here's what I found:

The problem lies in the fact that Zebra printers will interpret an incoming Record Separator ($1E) as the beginning of a command (equivalent to the “^” character used in ZPL programs). Therefore not having it present at the beginning of the transmission before FD (Zebra field definition), results in a blank 2D matrix being printed. Having it at the beginning of the string and after the [)> Header tells the printer that the string contains only “[)>” and therefore, that is the only information encoded in the 2D Matrix.

Solution:

There is an additional Zebra command available (^FH) that when used at the beginning of the string, tells the printer to interpret anything preceded by a “_” as an ASCII hex value to be encoded in the print data. In the following example, the entire field definition is preceded by $1EFH (^FH), and all $1E (Record Separators) have been replaced by “_1E”.

$1EFH$1EFD[)>_1E06$1DY6619700000000V$1DP23165756$1D12V079644747$1D4D16292$1DS4702010716091022_1E$04

Thanks for your help guys! Hopefully somebody else finds this solution helpful.

~w~
 

Similar Topics

Hi All, I currently have an issue to establish connection between my PLC to Zebra Printer. On my side don't have the ASCII card Module to use...
Replies
9
Views
743
Hi folks: Recently I received a new software package for my ZT410 zebra printer, this package includes firmware for printer port (EIP) , AOP (add...
Replies
147
Views
212,503
Hi everyone, I have an issue with installation of Studio 5000 33.00.02 DVD Media disc 2 with View Designer on Windows 11. After installation...
Replies
0
Views
67
Anyone have problems/solutions with Rehosting Studio 5000 to a new computer. Our IT department successfully Rehosted 2 laptops, but the other 2...
Replies
1
Views
117
Hi, I'm quite new to Rockwell PLC and currently trying to implement the following if Sw1 then for i:=1 to 20 by 1 do xEnable := 1...
Replies
4
Views
140
Back
Top Bottom