Sei sulla pagina 1di 48

Rationalisierung • Entwicklung • Automation

Elektronische Geräte und Systeme REA Elektronik


GmbH

Communication between the

REA Piezo printer

"PK", “LK”,

the REA-JET input terminal

“ST 200”

and a Host computer

Version: 3.1

Valid for:
REA-JET PK version 6.0 and higher
REA-JET LK version 3.1 and higher
REA-JET ST200 version 3.1 and higher

REA Elektronik GmbH


Teichwiesenstraße 1, D-64367 Mühltal-Waschenbach
Telephone: + 49 6154/638-0 • Telefax: + 49 6154/638-195 April 16, 2004

Copyright © 1996-2004 REA Elektronik


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Table of contents

1 CONVENTIONAL DENOMINATIONS .......................................................................... 3

2 DESCRIPTION OF THE INTERFACE .......................................................................... 3

3 CONFIGURABLE ACKNOWLEDGMENTS ................................................................. 4

4 CONFIGURABLE HANDSHAKES ............................................................................... 5

5 CHARACTER SET USED BY REA-JET SYSTEMS .................................................... 6

6 MODE 1: ....................................................................................................................... 7

6.1 Direct assignment of variables ............................................................................................................................7

Configurable parameters..................................................................................................................................................7

6.2 Text selection by name.........................................................................................................................................9

Configurable parameters..................................................................................................................................................9

6.3 Acknowledgment modes ....................................................................................................................................10

6.4 Error messages ...................................................................................................................................................10

6.5 Examples of sequences for Mode 1 ...................................................................................................................11


6.5.1 Direct assignment to Variables .........................................................................................................................................

7 MODE 2: ASCII TELEGRAM COMMUNICATION...................................................... 14

7.1 Basic structure of the telegrams........................................................................................................................14

7.2 Configurable termination strings .....................................................................................................................14


7.2.1 Transmission with check sum ...........................................................................................................................................
7.2.2 Transmission without check sum ......................................................................................................................................

7.3 Commands ..........................................................................................................................................................16


7.3.1 Request configuration.......................................................................................................................................................
7.3.2 Configuration message .....................................................................................................................................................
7.3.3 Request status ...................................................................................................................................................................
7.3.4 Status message ..................................................................................................................................................................
7.3.5 Configuration of the print and status message ..................................................................................................................
7.3.6 Print message....................................................................................................................................................................
7.3.7 Set / report basic parameters.............................................................................................................................................
7.3.8 Request basic parameters..................................................................................................................................................
7.3.9 Print disable / enable ........................................................................................................................................................
7.3.10 Error messages..................................................................................................................................................................
7.3.11 Transmit Script line ..........................................................................................................................................................
This telegram transmits the script command p5 (beep for 5 * 55ms) to line zero. And executes it. ...................................................
7.3.12 Assignment of variables and text ......................................................................................................................................
7.3.13 Request variables..............................................................................................................................................................

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 1


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.14 Set / request date and time ................................................................................................................................................


7.3.15 Set / release print go .........................................................................................................................................................
7.3.16 Start / release purging .......................................................................................................................................................
7.3.17 Request device parameter .................................................................................................................................................
7.3.18 Set / Report device parameter...........................................................................................................................................
7.3.19 Set partial device parameter..............................................................................................................................................
7.3.20 Direct text assignment (only ST 200) ...............................................................................................................................

7.4 Examples of sequences for Mode 2 ...................................................................................................................47

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 2


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

1 Conventional denominations

In this User's Manual the denomination "Terminal" will stand either for the PK, LK (Piezo printer) system,
or for the ST 200 system.
Control functions and parameters which are not valid for both systems are marked accordingly.
Furthermore, the denomination "Host" will stand either for the Host computers respectively for the units
which are connected.

2 Description of the interface

The REA-JET systems can be equipped with a serial interface in order to be able to communicate with a Host
system or with units such as scales, measuring systems, etc.

The interface meets the following specification:


RS 422, alternatively RS 232 / V 24 (RS 485 Bus is in preparation)

The parameters of the interface can be configured on the REA-JET systems:


Baud rate 300 – 115.2 K Baud
Number data bits 7 or 8
Number stop bits 1 or 2
Parity none, even, odd

The interface can be configured in different modes for the communication with Hosts or other units (scales,
measuring systems, etc.).

Mode 1 is the direct assignment of variables or text selection by name. This mod is mainly destined for the
connection of units like scales, measuring systems, etc. In this mode the systems do not need to deal with
transmission protocols.
The units will just have to send the data string to be printed (weight, measuring value) to the terminal.

As for the communication with Host systems, Mode 2 (ASCII - Telegram communication) will mainly be
used.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 3


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

3 Configurable acknowledgments

Independently of the transmission mode the terminals can be configured for the following
acknowledgments:

1. None
2. Echo
3. <ACK> / <NAK>
4. <ACK> <CR> <LF> / <NAK> <CR> <LF>

If the interface is used without acknowledgment (none), there is no possibility to check whether a telegram
has been received properly.

If the interface is used with echo, each character which has been received will immediately be transmitted
again on the interface. The sender of a telegram can then check the transmission since it will automatically
get back each character which has been sent. If telegrams are sent to the terminals, the Host will be
responsible of evaluating the echo and of possibly repeating the transmission. In order to avoid the system
being blocked by wrong telegrams, we recommend to have a transmission repeated at most 3 times and then
to have an error message be generated.
If characters which are received are defective (Framing, Parity or Overrun error), these will not be sent back
by the terminal.
If the terminal sends telegrams, it will also be waiting for the echo on the interface. If the telegram which
has been sent will not have been received completely within 500 ms after the transmission has been
completed, the transmission will be repeated. A transmission will be repeated up to 3 times.

If the interface is used with ACK/NAK and with ACK/NAK acknowledgment followed by a CR/LF
sequence, each telegram received has to be acknowledged.
An ACK or NAK confirmation will be carried out only on the basis of telegram framing and check sums
which are valid. The contents of the telegrams will not be checked at this stage.
If the reception is correct the receiver will have to acknowledge with

<ACK> [<CR><LF>]

Upon reception the terminals will send an ACK in the following cases:

• If the transmission contained a check sum, all characters, the telegram framing and the check sum were
OK.
• If the transmission contained no check sum, all characters and the telegram framing were OK.
• If variables have been assigned, all characters were OK and the transmission termination string has been
received.

A NAK [<CR><LF>] will be sent by the terminals only if a transmission error (Framing, Parity or Overrun
error) has occurred on the receiver's side, or - if the transmission mode has been set to "with check sum" - a
defective check sum has been received.
If the sender gets a NAK or no answer after a 500 ms time out, it will repeat the telegram. A telegram will
be repeated up to 3 times. If no ACK is received after the telegram has been repeated for 3 times, the
telegram will be rejected and an error message will be generated.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 4


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

4 Configurable handshakes

The terminal can be stopped when it is sending data. Even if a handshake has been activated, the terminal
will never stop the Host since the terminal is able to process immediately any data quantity which is allowed
according to the specification.

The terminals may be set to the following handshakes over the menu:

1. No
The terminal will not react to any handshake signal. It cannot be stopped as long as it sends data.

2. Hardware (only PK)


The terminal watches the CTS line. If the CTS line is active, the terminal sends data. If the CTS line
becomes inactive, the terminal will still terminate properly the transmission of the digit it is just now
sending. Depending at which time the signal will be inactivated, the next digit might also be sent. Once
the CTS signal has been blocked, up to 2 digits might therefore still be sent. The terminal will send no
data as long as the CTS line has not again been activated. The RTS line of the terminal is always active.

3. Software
The terminal checks the digits which are received on the serial interface. If it receives
XOFF = DC3 = 13Hex it will be blocked as described for the hardware handshake. The terminal will
begin to send again data only after it has received XON = DC1 = 11Hex.
After power on, the terminal assumes that a XON status is given; it will therefore send data as long as it
will not have received a XOFF signal.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 5


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

5 Character set used by REA-JET systems

This character set is used in all REA-JET printers. The character set is based on MS-DOS code page 850.
The graphical characters are replaced with eastern European characters. Characters which differ from code
page 850 are marked gray.

001 101 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0
0 0 @ P ` p Ç É á č š ð Ó 0

1 ! 1 A Q a q ü æ í Č Š Ð ß ± 1

2
↕ “ 2 B R b r é Æ ó ě ž Ê Ô 2

3 # 3 C S c s â ô ú Ě Ž ˾ Ò 3

4 $ 4 D T d t ä ö ñ ů ȶ õ 4

5 % 5 E U e u à ò Ñ Á Ů ı§ Õ 5

6
— & 6 F V f v å û ª  ã Í÷ µ 6

7
↕ ‘ 7 G W g w ç ù º À à Î≈ Þ 7

8
↑ ( 8 H X h x ê ÿ ¿ © ť Ï° þ 8

9
↓ ) 9 I Y i y ë Ö ⌐ ň Ť ŁĆ Ú 9

A
→ * : J Z j z è Ü ¬ Ň Ą łć Û A

B
← + ; K [ Ä k { ä ï ø ½ ř ą ŃŚ Ù B

C , < L \ Ö l | ö î £ ¼ Ř Ę ńś ý C

D
↔ - = M ] Ü m } ü ì Ø ¡ ¢ ę Ź Ý D

E . > N ^ n ~ ß Ä × « ¥ Ì ź E

F @ 2 / ? O _ o ∆ Å ƒ » Ÿ ¤ ś ´ Ŝ F

00 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0

1 = The characters from 00 Hex to 1E Hex are used in the ST200 only, they can not be printed.
2 = Character 1f Hex is used in the print head driver KT1b to substitute the unprintable character 40 Hex.

The LC system only can print characters from 20 Hex to 7F Hex. The characters 5B Hex to 5D Hex and 7B
Hex to 7E Hex are used for the special German characters.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 6


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

6 Mode 1:

This mode has been created in order to be able to receive information from simple data recording units such
as scales, measuring units, etc. The transmitted data can be stored in a variable or used as a text name.

6.1 Direct assignment of variables

In this communication mode one or several contents of variables (texts) can be assigned. After transmission
a designed texts will be assigned to the print heads.

The simplest way to send text to the terminal is to send the printable text terminated by a transmission end
character (for example CR).
VARIABLE_1<Transmission end character>

If several variables are transmitted, they must be separated by a text end character:
VARIABLE_1<Text end character>VARIABLE_2[<Text end character>]<Transmission end character>
The text end character following the last variable does not absolutely need to be sent.

In order to fix the beginning of a transmission you may send a start character.
<Start character>VARIABLE_1[<Text end character>VARIABLE_2]<Transmission end character>

Only once the transmission end character has been received, the data will be transmitted into the variables.
As long as no text end character has been sent, the transmission can be started again with a start character.

If no character has been received for more than 500 ms, the receive buffer will be cleared and the
transmission can start again at any time.

Configurable parameters

The following parameters can be configured on the terminals:

All values in this menu must be inputted in decimal notation.


Remark

Start character The start character means the character which will initiate the transmission.
You may enter a character between 1 and 255 (01Hex and FF Hex). 0
means no starting character used. The character will cause the transmission
to be reset and the characters being possibly available in the buffer to be
cleared. The start character will not be printed.
If no start character has been set, the transmission will begin with the first
character which is received.
If your unit is able to send a start character in front of the text, you should
make use of that opportunity since the start character guarantees a defined
start of the transmission.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 7


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Text end character The text end character shows at which time the transmission of a variable is
completed. If further characters, except for the text end character, will
follow, these characters will be assigned to the next variable. Values
between 1 and 255 (01 Hex to FF Hex) can be entered as a text end
character. If 0 is entered, no text end character will be configured. The text
end character will not be printed. Once the last variable has been
transmitted, the text end character must not absolutely be transmitted. The
last variable may be completed directly with the transmission end character.

Transmission end Once the transmission end character has been received, the transmission is
character completed. The texts which have been preset will be assigned to the print
heads. A value between 1 and 255 (01 Hex to FF Hex) can be entered as a
transmission end character. The transmission end character will not be
printed. A transmission end character has to be specified.

Start variable No At this stage you will have to enter the number of the variable to which the
first text has to be assigned. If more than one variable is transmitted, the
texts will each time be assigned to the next higher-order variable.

Text No. Head 1: At this stage you will have to define which texts will have to be assigned to
Text No. Head 2: the printheads once the transmission end character has been received. If you
........ enter 0, no text will be assigned to the corresponding print head. The
variables
Text No. Head n: which are transmitted should be contained in the texts which are
transmitted. The setting can be defined for all print heads which are
available.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 8


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

6.2 Text selection by name

In this mode a name string can be transmitted to the terminal. The transmitted string is taken as a text name.
One or more text names can be transmitted in on telegram. The text with the transmitted name is searched in
the actual library and assigned to the appropriate print head. The names must match exactly. Any differences
between small and capital letters will be ignored.

Configurable parameters

The following parameters can be configured on the terminals:

Remark All values in this menu must be inputted in decimal notation.

Start character:
Text end character:
Transmission end character: Those parameters are as described in chapter 6.1 on page 7.

Assignment: Here you can specify whether you want to have text assignment or line
text assignment. If line text assignment is selected, only one name can be
transmitted.

Head 1: In those fields the position of the text names in the telegram must be
Head 2: specified. If zero is inputted for a print head no text will be assigned to the
…… print head.
Head n: In Line text mode those fields are not used.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 9


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

6.3 Acknowledgment modes

The described acknowledgment modes can be used for both mode 1 communication modes.

No: You will need no acknowledgment protocol.

Echo: The terminals will send back over the serial interface each character they have properly
received.

ACK/NAK: and ACK/NAK CR/LF. If this acknowledgment mode is activated, the terminals will send
an ACK once the transmission end character has been received.
If a defective character (Framing, Parity or Overrun error) is received, the terminal will send
a NAK.

6.4 Error messages

Error messages cannot be sent over the serial interface in this transmission mode.
Only such error messages will be generated which cannot be turned off. All settings in the "Interface" menu
will be ignored.
If one of the following errors occurs, the print heads to which a text has to be assigned after the
transmission, will be assigned an empty text. Printing is therefore stopped!

The following errors are possible:

The text which is transmitted is longer than the variable:


You have tried to assign to a variable a text which is longer than the variable.

Variable No is greater than 99:


During a numerous assignment you have tried to assign a text to a variable, the number of which was
greater than 99.

Printing can be restarted only by:


⇒ The assignment of a variable, with a correct length.
⇒ A manual text assignment to the print head.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 10


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

6.5 Examples of sequences for Mode 1

The following conventions are valid for the examples:


<40> = 1 Byte in Hex representation (40 Hex)
12 = Two byte ASCII string "12"

6.5.1 Direct assignment to Variables

The following configuration has been set for the next example:

Parameter Value Comment


Start character 00 Dec No start character will be transmitted.
Text end character 00 Dec No text end character will be transmitted.
Transmission end 10 Dec The transmission will be completed by 10 Dec. = 0AH = LF.
character
Start variable 01 Dec The first text transmitted will be assigned to Variable 1.
Text No. Head 1 10 Dec Once the transmission has been completed, Text No. 10 will be
assigned to Printhead 1.
Text No. Head 2 00 Dec Printhead 2 will not be assigned to after the transmission.

A connected unit sends to the terminal:


200,00 kg<0A>

Variable number 1 gets the content "200,00 kg". Text number 10 will afterwards be assigned to print head
number 1.

The following configuration has been set for the next example:

Parameter Value Comment


Start character 00 Dec No start character will be transmitted.
Text end character 13 Dec Variables are separated by 13 = 0D Hex = CR.
Transmission end 10 Dec The transmission will be completed by 10 Dec. = 0AH = LF.
character
Start variable 01 Dec The first text transmitted will be assigned to variable 1.
Text No. Head 1 10 Dec Text number 10 will be assigned to print head number 1 after
transmission.
Text No. Head 2 00 Dec No text will be assigned to print head number 2.

A connected unit sends to the terminal:


200.00 kg<0D>Size A<0D><0A>
or
200.00 kg<0D>Size A<0A>

The content “200.00 kg” is assigned to variable number 1.


The content “Size A” is assigned to variable number 2. Then text number 10 is assigned to print head
number 1.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 11


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

The following configuration has been set for the next example:
Parameter Value Comment
Start character 02 Dec 2 = STX will be transmitted as start character.
Text end character 03 Dec Variables will be separated by 3 = ETX.
Transmission end 04 Dec The transmission will be completed by 4 = EOT.
character
Start variable 12 Dec. The first text transmitted will be assigned to Variable number
12.
o
Text N Head 1 01 Dec Text number 1 will be assigned to print head number 1 after
transmission.
Text No Head 2 04 Dec Text number 4 will be assigned to print head number 2 after
transmission.

A unit sends to the terminal:


<02>200,00 kg<03>Size A<03><04>
or
<02>200,00 kg<03>Size A<04>

The content "200,00 kg" is assigned to variable number 12.


The content "Size A" is assigned to variable number 13.
After the transmission text number 1 is assigned to print head number 1 and text number 4 is assigned to
print head number 2.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 12


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Text selection by name

The following configuration has been set for the next example:
Parameter Value Comment
Start character 02 Dec 2 = STX will be transmitted as start character.
Text end character 03 Dec Variables will be separated by 3 = ETX.
Transmission end 04 Dec The transmission will be completed by 4 = EOT.
character
Start variable 12 Dec. The first text transmitted will be assigned to Variable number
12.
o
Text N Head 1 01 Dec Text number 1 will be assigned to print head number 1 after
transmission.
Text No Head 2 04 Dec Text number 4 will be assigned to print head number 2 after
transmission.

A unit sends to the terminal:


<02>200,00 kg<03>Size A<03><04>
or
<02>200,00 kg<03>Size A<04>

The content "200,00 kg" is assigned to variable number 12.


The content "Size A" is assigned to variable number 13.
After the transmission text number 1 is assigned to print head number 1 and text number 4 is assigned to
print head number 2.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 13


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7 Mode 2: ASCII telegram communication

In this mode the data exchange between the terminals and a Host computer is carried out in form of
telegrams. Each telegram consists of a frame (start and termination string), a command character and
command parameters which depend on the corresponding command.

The interface is fixed to 8 data bits in this mode.


The number of stop bits and the parity can be set on the respective Host which is connected.

7.1 Basic structure of the telegrams

<STX><Telegram counter><Command>[Command parameter]<Termination string>

<STX> = 02 Hex
<Telegram counter> = ASCII number from "0" to "9". Each time a telegram is transmitted the telegram
counter will be increased by one. The receiver realizes over the telegram
counter that a telegram has already been received. If a station receives a
telegram twice with the same number, the receipt must be acknowledged,
however, the telegram must not be evaluated. The error may occur in case the
acknowledgment of a telegram is not or unproperly received. After a reset the
terminals will begin counting from "0". They will afterwards continue counting
up to "9" and begin again with "1".
"0","1","2",...."9","1","2",...."9","1",......
<Command> = An ASCII byte (please refer to the command table).
[Command parameter] = Additional parameter. The number and the content depend on the command.
Only ASCII characters > 20 Hex or specified control characters may be used as
command parameters.
<Termination string> = Depends on the chosen mode, whether the transmission will be terminated with
or without check sum.

7.2 Configurable termination strings

The following termination strings can be set on the terminals:

In principle you may select whether the transmission has to be carried out "with check sum" or "without
check sum".

<ETX>
<ETX>< BCC>

Both transmission forms can be configured in such a way that the sequence <CR><LF> will have to be sent
at the end of each transmission.

<ETX> <CR> <LF>


<ETX> <BCC> <CR> <LF>

This possibility has been created since some terminal servers will send the data string only once they have
received that sequence.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 14


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.2.1 Transmission with check sum

If you have selected the transmission form "with check sum" the <Termination string> will have the
following format:

<ETX> pz [<CR><LF>]

<ETX> = 03 Hex
pz = Check sum. The check sum is the XOR'ing of all digits, from <STX> to
<ETX> inclusively. The check sum may contain values from 00H to FFH. The
check sum will be sent as two bytes. First the high-order nibble is sent, then the
low-order nibble. 30 Hex are added to each nibble.
0 - 9 = 30H - 39H = "0" - "9" ASCII
A - F = 3AH - 3FH = ":", ";", "<", "=", ">", "?" ASCII

Example:
pz = 0EH
The following bytes will be transmitted: 30H, 3EH = "0>"
<CR> = 0DH
<LF> = 0AH

If you have selected the transmission "with check sum", you should in any case select the <ACK><NAK>
mode of acknowledgment.

7.2.2 Transmission without check sum

If you have selected the transmission form "without check sum" the <Termination string> will only consist
of:

<ETX>[<CR><LF>]

<ETX> = 03H
<CR> = 0DH
<LF> = 0AH

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 15


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3 Commands

The command is an ASCII character beginning with "0" (30H)

Command ST PK Command Direction Parameters Answer from See


character LK remote
ASCII HEX 200 HOST-TERM station page
0 30   Request ---------> None Configuration message 18
configuration
1 31   Configuration <--------- Version number, 19
message number of printheads
2 32   Request status ---------> Printhead number Status message 20
3 33   Status message <--------- Printhead number, status 21
4 34   Configuration of ---------> Printhead number, 23
the print message configuration
5 35   Print message <--------- Printhead number, status 25
6 45  Set / report basic <---------> Printhead number, basic 26
parameters parameters
7 46  Request basic ---------> Printhead number Basic parameters 29
parameters message
8 38   Print disable / ---------> Printhead number, 30
enable action
9 39   Error message <--------- Command, error number 31
; 3B   Transfer script ---------> Line number, content 33
line
A 41   Assignment of <---------> Variable number(s), 34
variable and text content
printhead number, text
number
B 42   Request variable ---------> Variable number(s) Variable content 36
C 43   Set / request date ---------> Date and time 37
and time
D 44   Set / release print ---------> Printhead number, mode 38
go
E 45  Start / stop ---------> Printhead number, mode 39
purging
F 46   Request system ---------> Print head number, report system counter
counter counter number
G 47   Set / report <---------> Print head number,
system counter counter number,
counter value
H 48   Request device ---------> Head number Report device parameter 40
parameter
I 49   Set / report device <---------> Head number, parameter 40
parameter
J 4A   Set device ---------> Head number, parameter
parameter partial
K 4B   Configure text ---------> Head number, parameter
selection and
FiFo
Z 5A  Direct text ---------> Text parameters, 43
ESC* 1B* assignment printhead texts

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 16


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

* = The command ESC has only been implemented for compatibility reasons with the input terminal ST100.
For new developments the command "Z" should be used.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 17


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.1 Request configuration

This function requests the configuration of the system which is connected.

The request configuration message has the following format:

<STX><Z>0<Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
0 = Command (30 Hex)
<Termination string> = Termination string corresponding to the selected mode.

Example:

Request configuration of the connected system:

ASCII <STX> 0 0 <ETX>...


Hex 02 30 30 03
Remark Telegram counter Command character: Termination
(“0” to “9”) request configuration

The terminal will respond to the configuration request with a configuration message.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 18


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.2 Configuration message

The terminal will indicate its configuration with the configuration message.

The configuration message has the following format:

<STX><Z>1vv.rrAAxxx/yy[XXX/YY][xxx/yy]<Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
1 = Command (31 Hex)
vv.rr = Version number of the software in the format Version.Release (example: 02.01)
AA = Number of the printheads which are controlled by the system
xxx/yy = Printhead type of Head 1 (please refer to the table below)
[XXX/YY] = Printhead type of Head 2, if available (please refer to the table below)
[xxx.yy] = For each printhead which can be run with the system a printhead type will be
indicated.

<Termination string> = Termination string corresponding to the selected mode.

The printhead type will be indicated as a 6 Byte ASCII string with slash (2F Hex).
The following printhead types are possible:

ST 200 PK LK Message Printhead type


✓ ✓ 000/00 = No head connected
✓ 032/32 = REA-JET PK 32 dots
✓ 096/32 = REA-JET PK 96 dots
✓ 192/32 = REA-JET PK 192 dots
✓ 224/32 = REA-JET LK 224 dots
✓ 256/32 = REA-JET PK 256 dots
✓ ✓ 352/32 = REA-JET PK/LK 352 dots
✓ REA/07 = REA-JET DOD 7 dots
✓ REA/16 = REA-JET DOD 16 dots
✓ REA/32 = REA-JET DOD 32 dots

Example:

Configuration message from the ST200 terminal as an answer to a configuration request.

ASCII <STX> 0 1 01.10 01 REA/07 <ETX>...


Hex 02 30 31 30 31 2E 31 30 30 31 52 45 41 2F 03
30 37
Remark Telegram Command ST 200 1 printhead Head type Termi-
counter character: Software version connected to REA-JET DOD nation
(“0” to “9) configuration the system 7 nozzles
message

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 19


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.3 Request status

This function requests the status of a printhead.

The status request has the following format:

<STX><Z>2<Printhead number><Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
2 = Command (32 Hex)
<Printhead number> = Printhead number. Two byte ASCII from "01" to "99"
<Termination string> = Termination string corresponding to the selected mode.

Example:

Request status for printhead number 1.

ASCII <STX> 0 2 01 <ETX>...


Hex 02 30 32 30 31 03
Remark Telegram counter Command Printhead № 1 Termination
(“0” to “9”) character:
request status

The terminal will respond to the status request with a status message.

The following error messages are generated (please also refer to Chapter "Error messages"):
Wrong head number: You have tried to request the status of a printhead which is not available.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 20


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.4 Status message

The status message is the response of the terminal to a status request. If the status message has been
configured automatically, this message will be sent automatically as soon as a status which is marked by "*"
will change.

The status message has the following format:

<STX><Z>3<Printhead number><STATUS 1><STATUS 2><Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
3 = Command (33 Hex)
<Printhead number> = Printhead number. Two byte ASCII from "01" to "99"
<STATUS 1> = Status byte 1 (please refer to the table below)
<STATUS 2> = Status byte 2 (please refer to the table below)
<Termination string> = Termination string corresponding to the selected mode.

Two bytes are given for the status.


Bit 8 is always "1" so that the value which is valid will always be > 80H.

The single bits in the status bytes have the following meaning:

Status byte 1

PK Bit
ST 200 LK number Meaning 0= 1=
✓ ✓ 8 always 1
✓ ✓ 7 Printhead No printhead connected Printhead is connected
(the remaining parameters have
no meaning)
✓ 6 Heating element Heating OFF Heating ON
✓ ✓* 5 + Text assignment No text assigned Text is assigned
✓ ✓ 4 Basic parameters No basic parameters available Basic parameters
available
✓ 3 * + Print voltage Print voltage defective Print voltage OK
✓ 2 * + Temperature Temperature out of admissible Temperature OK
range
✓ 1 * + Ink No ink available (ink out) Ink available

The bits marked by "*" will generate an automatic status message on change, if this has been configured.
If the bits marked by "+" will be 0 at the time a print go signal is detected, printing will be rejected. If a print
message has been configured, an error message will be sent.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 21


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Status byte 2

PK/ Bit
ST 200 LK number Meaning 0= 1=
✔ ✔ 8 always 1
✔ ✔ 7 * Print stop Printing has been stopped on the Printing is enabled
terminal terminal
✔ 6 * Print stop Printing has been stopped by a Printing is enabled
counter counter
5 Ink Low Ink OK Ink low
4 Waste full Waste OK Waste bottle full
3 0
✔ 2 00 = ready for printing
1 01 = Bitmap generating running
10 = Print delay running (from now on new texts can be assigned).
11 = Printing process running

Example:

a) Printhead ready, text assigned:

ASCII <STX> 0 3 01 <D8> <C0> <ETX>...


Hex 02 30 33 30 31 D8 C0 03
Remark Telegram counter Command Printhead Status Status Termination
(“0” to “9”) character: №1 Byte 1 Byte 2
status message

a) No text assigned to the printhead:

ASCII <STX> 0 3 01 <C8> <C0> <ETX>...


Hex 02 30 33 30 31 C8 C0 03
Remark Telegram counter Command Printhead Status Status Termination
(“0” to “9”) character: №1 Byte 1 Byte 2
status message

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 22


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.5 Configuration of the print and status message

This function defines at which positions of the printing the terminal will have to send a print message to the
Host.
The print and status messages will be sent to the interface on which the configuration has been received.

The configuration of the print message has the following format:

<STX><Z>4<Printhead number><Configuration byte><Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
4 = Command (34 Hex)
<Printhead number> = Printhead number. Two byte ASCII from "01" to "99"
<Configuration byte> = With this byte it is possible to code at which time during the printing
process automatic print messages have to be sent to the Host. If the bit is
cleared (0), no messages will be sent, if a bit is set (1), the respective messages
will be sent. It is furthermore possible to configure several messages. (see table
listed below)
<Termination string> = Termination string corresponding to the selected mode.

Configuration byte:

ST 200 PK / LK Bit Meaning


✓ ✓ 8 Always 1
✓ ✓ 7 Automatic status message ON. If one of the bits which are marked by "*" in the
status message changes, a status message will automatically be generated.
6 0
5 0
✓ 4 Send print message upon receipt of sensor signal (photocell).
✓ ✓ 3 Send print message at the end of the bitmap generating (from now on new texts
can be assigned to the printhead).
✓ 2 Send print message once the printing begins.
✓ 1 Send print message once the printing has been completed.

This configuration can also be defined over a menu in the terminals.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 23


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Example:

Send a print message after bitmap generation:

ASCII <STX> 0 4 01 <48> <ETX>...


Hex 02 30 34 30 31 48 03
Remark Telegram counter Command character: Printhead Configuration Termination
(“0” to “9”) configure print and №1 Byte
status message

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong head number: You have tried to configure a printhead which is not available.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 24


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.6 Print message

The terminal sends the print status to the Host by the print message.

<STX><Z>5<Printhead number><Configuration byte><STATUS 1><STATUS 2><Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
5 = Command (35 Hex)
<Printhead number> = Printhead number. Two byte ASCII from "01" to "99"
<Configuration byte> = The content of the message is coded in this byte.
If Bit 7 is set, the printing could be carried out successfully up to now. If Bit 7
is cleared, an error occurred and the printing cannot be carried out. As for Bits
1 to 4, only one Bit can be set since own messages will be generated for each
printing period, if these are configured (see table below).
<STATUS 1> = Status byte 1 (for description please refer to "Status message")
<STATUS 2> = Status byte 2 (for description please refer to "Status message")
<Termination string> = Termination string corresponding to the selected mode.

Configuration byte:

ST 200 PK / LK Bit Meaning


✓ ✓ 8 Always 1
✓ 7 0 = Printing could not be carried out
1 = Printing could be started respectively carried out successfully
6 0
5 0
✓ 4 Print message upon receipt of sensor signal (photocell).
✓ ✓ 3 Print message at the end of the bitmap generating (from now on new texts can
be assigned to the printhead).
✓ 2 Print message once the printing begins.
✓ 1 Print message once the printing has been completed.

The print message is send by the REA-JET systems automatically during print, if it has been turned on in the
menu or using the configuration of the print and status message.

Example:

The REA-JET system sends a print message after the bitmap generation:

ASCII <STX> 0 5 01 <84> <D8> <C0> <ETX>...


Hex 02 30 35 30 31 84 D8 C0 03
Remark Telegram Command Printhead Configu- Status Status Termination
counter character: №1 ration Byte 1 Byte 2
(“0” to “9”) print message Byte

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 25


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.7 Set / report basic parameters

The basic parameters of a printhead can be modified with this telegram. If certain values of the basic
parameters should not change, these can be left out by entering "x" in the corresponding positions.
The terminals send this message in response to a basic parameters request.
The exact description and the ranges of the various parameters may be obtained from the User's Manual of
the system you are using.

The telegram "Set / report basic parameters" has the following format:

<STX><Z>6<Printhead number>RLThhhddaaaarrrrtttgggggDD<Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
6 = Command (36 Hex)
<Printhead number> = Printhead number. Two byte ASCII from "01" to "99"
R = Direction of the product
"R" = 52 Hex = Product is moving from the left to the right
"L" = 4C Hex = Product is moving from the right to the left
"x" = 78 Hex = Do not change direction
L = Print direction
"N" = 4E Hex = Normal
"K" = 4B Hex = Upside down
"x" = 78 Hex = Do not change direction
T = Encoder
"I" = 49 Hex = Internal
"E" = 45 Hex = External
"x" = 78 Hex = Do not change encoder type
hhh = Print height. Character height (in mm) to be printed, which is depending on
the respective printhead type. The printhead will have to be mechanically
positioned accordingly. Values ranging from "001" to "999" are allowed.
Enter "xxx" to leave the existing parameter unchanged.
dd = Print density (compression)
This parameter defines the compression of the dot spaces.
"00" = normal spacing to "99" = compressed representation.
The permissible range depends on the system you are using (for example KT
1A "00" to "09") and is contained in the User's Manual of your system.
Enter "xx" to leave the existing parameter unchanged.
aaaa = Sensor gap
Specification of the distance (in mm) between the product sensor and the
product to be printed.
Values ranging from "0000" to "9999" are allowed.
Enter "xxxx" to leave the existing parameter unchanged.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 26


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

rrrr = Text margin


This parameter defines the distance (in mm) between the product edge and print
start.
Values ranging from "0000" to "9999" are allowed.
Enter "xxxx" to leave the existing parameter unchanged.
ttt = Pulse rate
If the pulses are given by an external encoder, this parameter indicates the
number of pulses per mm. If the pulses are given by an internal encoder, this
value will be ignored.
Values ranging from "000" to "999" are allowed.
Enter "xxx" to leave the existing parameter unchanged.
ggggg = Conveyor speed
If the pulses are given by an internal encoder, this parameter indicates the
conveyor speed. The speed in m/min is to be set with three places in front of the
decimal point and two places behind the decimal point, for example:
"00525" = 5.25 m/min.
Values ranging from "00000" to "99999" are allowed.
Enter "xxxxx" to leave the existing parameter unchanged.
DD = Dot size
On systems where the dot size is made by software you can control the dot size
with this parameter.
On the REA-JET PK and on the ST 200 in conjunction with KT 1A this
parameter is ignored.
Values ranging from "00" to "99" are allowed.
Enter "xx" to leave the existing parameter unchanged.
<Termination string> = Termination string corresponding to the selected mode.

Example:

Set the basic parameters to specified values:

ASCII <STX> 0 6 01 L N x
Hex 02 30 36 30 31 4C 4E 78
Remark Telegram Command character: Printhead Product Print Encoder
counter set basic parameters № 1 movement direction no change
(“0” to “9”) right to left normal

024 xx 0476 xxxx xxx


30 32 34 78 78 34 34 37 36 78 78 78 78 78 78 78
Print height Print density Sensor gap Text margin Pulse rate
24 mm no change 476 mm no change no change

00525 xx <ETX>...
30 30 35 32 35 78 78 03
Conveyor speed Dot size Termination
5,25 m/min no change

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 27


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

If a REA-JET system sends a basic parameter message, all parameters are set to the actual values. The
REA-JET systems will not send don’t care values (xx..).

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong head number: You have tried to configure a printhead which is not available.
Wrong telegram length: The length of the telegram does not correspond to the format as described
above. The basic parameters have not been evaluated.
Wrong content: A verification of the telegram showed that either non-admissible characters
have been used in one of the parameters, or that the parameter has been set
out of the permissible range. The telegram processing will be interrupted,
the basic parameters will not be assigned. The number of the wrong
parameter will be handed over.
The parameters are numbered consecutively in order:
"01" = Direction of the product, "02" = Print direction, ......"10" = Dot size.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 28


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.8 Request basic parameters

This telegram requests the basic parameters of a printhead. The terminal responds with the message "Report
basic parameters".

The basic parameters request has the following format:

<STX><Z>7<Printhead number><Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
7 = Command (37 Hex)
<Printhead number> = Printhead number. Two byte ASCII “01” to “99”
<Termination string> = Termination string corresponding to the selected mode.

Example:

Request the basic parameters for printhead number one:

ASCII <STX> 0 7 01 <ETX>...


Hex 02 30 37 30 31 03
Remark Telegram Command character: Printhead № 1 Termination
counter request basic
(“0” to “9”) parameters

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong head number: You have tried to request the basic parameters of a printhead which is not
available.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 29


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.9 Print disable / enable

The telegram "Print disable / enable" will stop a printhead from printing or enable it to print.

The telegram has the following format:

<STX><Z>8<Printhead number>S<Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
8 = Command (38 Hex)
<Printhead number> = Printhead number. Two byte ASCII from "01" to "99"
S = Stop flag
"0" = All conditions for stopping the printhead from printing will be
cleared. Printing is enabled.
"1" = The stop condition "Print stop from terminal" will be set. Printing is
stopped.
<Termination string> = Termination string corresponding to the selected mode.

Example:

Enable printing on printhead number 1:

ASCII <STX> 0 8 01 0 <ETX>...


Hex 02 30 38 30 31 30 03
Remark Telegram Command character: Printhead № 1 Enable printing Termination
counter enable / disable printing
(“0” to “9”)

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong head number: You have tried to enable/disable printing of a printhead which is not
available.
Wrong content: The stop flag is not "0" or "1". The number of the wrong parameter will
always be "01".

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 30


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.10 Error messages

The acknowledge (ACK) only confirms that the frame of the telegram was correct. The content of the
telegram is not checked at this stage. If an error in a content of a telegram is detected, an error message will
be generated.

The error message has the following format:

<STX><Z>9<Command><Error><Parameter><Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
9 = Command (39 Hex)
<Command> = Command which has been received and is responsible for the error
<Error> = Error number. Two byte
Generally applicable error numbers may be taken from the table below.
<Parameter> = Additional information in ASCII, depending on the error message.
<Termination string> = Termination string corresponding to the selected mode.

List of the error messages:

Will disable printhead


Cannot be turned off
№ Error Parameter Description
"00" Unknown Unknown command You have sent an unknown command to the
command 1 character terminal.
"01" Wrong Unknown printhead The telegram was addressed to a printhead
printhead number which is not available.
number 2 characters
"02" Wrong telegram Nominal length A telegram with a fixed length has been
length 3 characters + received in a wrong length.
Actual length
3 characters
03 Variable № > 99 Variable number The increment of the variable number on a
2 characters direct variable assignment, results in a
number > 99.
04 Command not Printhead number The command is not supported by the
supported 2 characters printhead.
✔ "10" Variable too Variable number You have a content assigned to a variable
long 2 characters which is longer than the variable.
✔ ✔ "11" Text too long Printhead Nr. You have tried to assign a text to a printhead
2 characters + which is too long.
Text number
3 characters
"20" Wrong content Number of the wrong The verification of the telegram showed that
parameter either wrong characters have been entered in
2 characters one of the parameters, or that it is out of the
permissible range.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 31


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Error messages which cannot be turned off are always displayed on the screen. If the option "Send errors to
the serial interface" is turned on, the terminals will send these error messages to the serial interface as well.

A print stop can be cancelled as follows:


1. A valid text assignment is sent to the terminal.
2. A manual text assignment of a valid text is carried out on the terminal.
3. A printing is enabled on the terminal or over the serial interface. The text, however, is undefined thereby.

Example:

Error message to the telegram “enable / disable printing” addressed to the unknown printhead number three.

ASCII <STX> 0 9 8 01
Hex 02 30 39 38 30 31
Remark Telegram counter Command Received command Error number 01 =
(“0” to “9”) character: which caused the wrong head number
error message error: 8

03 <ETX>...
30 33 03
additional info: Termination
head number 3 unknown

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 32


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.11 Transmit Script line

With this telegram a script line can be transmitted to the terminals. A Script is a simple programming
language to program the terminals. For a detailed documentation on the script language see the manual
“Working with script language on the REA-JET terminals ST200, LK, PK”
Script lines are transmitted to the single texts. If a script line is transmitted, the old contend of this line is
cleared and overwritten with the new content.
If a script line is transmitted to line number zero, the script is executed immediately. To execute a multi line
script you must first transmit all the lines and then start the script by sending a “go line number” command
to line zero.

The telegram transmit script line has the following format:

<STX><Z>;ll<Script line><Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
; = Command (3B Hex)
<DC4> = Start assignment of variables (14 Hex)
ll = Line number in the single texts to put the script line in.
Two byte ASCII ("00"to "99")
<Script line> = Script commands.
<Termination string> = Termination string corresponding to the selected mode.

Example:

ASCII <STX> 0 ; 00
Hex 02 30 3B 30 30
Remark Telegram counter Command Store the script in line zero
(“0” to “9”) transmit script
line

p5 <ETX>...
70 35 03
Beep for 275ms (5 * 55ms) Termination

This telegram transmits the script command p5 (beep for 5 * 55ms) to line zero. And executes it.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 33


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.12 Assignment of variables and text

The assignment of variables assigns contents for variables to the terminals. The terminals dispose of
99 variables (from 01 to 99). The variables can be used in any print-out.
This telegram assigns new contents to one or to several variables.

The assignment of variables has the following format:

<STX><Z>A<DC4>vvttttt....<DC4>vvttttttttttt......<Termination string>

The assignment of text assigns a text to a printhead.

The assignment of text has the following format:

<STX><Z>A<DC2>KKNNN<DC2>KKNNN......<Termination string>

Assignments of variables and texts may be combined in any order in one telegram.

The combination of text- and variable assignment has the following structure:

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
A = Command (41 Hex)
<DC4> = Start assignment of variables (14 Hex)
vv = Variable number. Two byte ASCII ("01" to "99")
tttttttttt... = New content. Any ASCII string. All characters from 20 Hex to FF Hex can
be used, as long as they belong to the character set of the system you are using.
The text may be followed by either further assignments which will begin with
<DC4>, or by the termination string. If the text you enter is longer than the
variable, the text will be shortened according to the length of the variable and
an error message will be generated. The length of the whole telegram, start and
termination strings included, must not exceed 255 Bytes.
<DC2> = Start of the text assignment (12 Hex)
KK = Printhead number. Two byte ASCII ("01" to "99")
NNN = Number of the text to be assigned to the printhead. Three byte ASCII
("001" to "999")
<Termination string> = Termination string corresponding to the selected mode.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 34


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Example

Assign the text “hello” to variable number 1, the text “world” to variable number 2. Assign text number 1 to
printhead number 1 and text number 4 to printhead number 2

ASCII <STX> 0 A <DC4> 01 hello


Hex 02 30 41 14 30 31 68 65 6C 6C 6F
Remark Telegram Command character: Start Variable Content =
counter variable and text assignment number: 1 “hello”
(“0” to “9”) assignment of variable

<DC4> 02 world <DC2> 01


14 30 32 77 6F 72 6C 64 12 30 31
Start assignment Variable Content = Start of Head
of variable number: 2 “world” Text- number: 1
assignment

001 <DC2> 02 004 <ETX>...


30 30 31 12 30 32 30 30 34 03
Text number 1 Start of Head № 2 Text number 4 Termination
text assignment

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong head number: If several printhead numbers are wrong in the telegram, an error message
will be generated for each printhead number.
Variable too long: If several variables are too long in the telegram, an error message will be
generated for each variable.
Text too long: If several text assignments are too long in the telegram, an error message
will be generated for each assignment.
Wrong content: No DC2 or DC4 was contained in the telegram.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 35


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.13 Request variables

This telegram requests the contents of variables from the terminals.


The terminal will respond to the variable request by the telegram "Variable content". This telegram is
identical with the assignment of variables.

The telegram variables request has the following format:

<STX><Z>Bnnmmxx..<Termination string>

<STX> = 02 Hex
<Z> = Telegram counter, ASCII number from "0" to "9"
B = Command (42 Hex)
nn = Any number of variable numbers, the contents of which are to be sent to the
Host.
mm The numbers of the variables must be entered as a two character ASCII number
xx. from "01" to "99".
<Termination string> = Termination string corresponding to the selected mode.

Example:

ASCII <STX> 0 B 01 03 08 <ETX>...


Hex 02 30 42 30 31 30 33 30 38 03
Remark Telegram counter Command Request variables number Termination
(“0” to “9”) Request variables one, three and eight.

All requested variables are sent back by the terminals in one telegram. If the number of digits exceeds 255,
the terminals will send several telegrams.

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong telegram length: The number of characters for the variable numbers is not dividable by 2.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 36


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.14 Set / request date and time

With this telegram the date and time of the controller and the printheads can be set or requested.

The telegram set date and time has the following format:

<STX><Z>Cf[YYYYMMDDhhmmss]< Termination string >

<STX> = 02 Hex
<Z> = Telegram counter ASCII-character number "0" to "9"
C = Command (43 Hex)
f = Flag. The flag controls, which clock to set. Since the PK system only has one
clock the flags “0”, “1”, “2” and “9” are identical.
„0“ = 30 Hex = set date and time on the ST200 and all connected printheads.
„1“ = 31 Hex = set date and time on the ST200 and printhead 1.
„2“ = 32 Hex = set date and time on the ST200 and printhead 2.
„9“ = 39 Hex = set date and time on the ST200 only.
“A” = 41 Hex = request date and time. This telegram does not require date and
time information. The controller answers this request with the same
telegram. The flag is set to “9”.
YYYY = Year four digit number „0001“ – „9999“.
MM Month two digit number „01“ – „12“.
DD Day two digit number "01" – „31".
hh = Hour two digit number in 24 hour format „00“ – „24“.
mm = Minute two digit number „00“ – „59“
ss = Second two digit number „00“ – „59“.
<Termination string> = Termination string corresponding to the selected mode.

Example:

Set date and time to December 3rd 2000 14:30:00 (2:30 PM)

ASCII <STX> 0 C 0 20000312143000 <ETX>...


Hex 02 30 43 30 32 30 30 30 30 33 31 03
32 31 34 33 30 30 30
Remark Telegram Command Flag: Set date and Set date and time to: Termi-
counter set date and time time on the ST200 03.12.2000 14:30:00 nation
(“0” to “9”) and all connected
printheads

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong telegram length: The number of characters is not as specified.
Wrong contents: Date and/or time are out of range.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 37


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.15 Set / release print go

This command can activate or release a print go signal. The command has the same effect than the photocell.
On the ST200 the telegram addresses directly the printheads. On the PK / LK systems the telegram
addresses the sensor inputs. A print go to a sensor input starts printing on all printheads assigned to sensor
input.

The telegram set / release print go has the following format:

<STX><Z>Dkku< Termination string >

<STX> = 02 Hex
<Z> = Telegram counter ASCII-character number "0" to "9"
D = Command (44 Hex)
kk = Printhead or sensor number. two digit ASCII “00” to “99”
If “00” is set, print go is activated on all connected printheads or sensor inputs.
u = Subcommand:
„0“ = 30 Hex = Release print go.
„1“ = 31 Hex = Set print go for one print.
„2“ = 32 Hex = Set print go. Print go will remain, until .it is released by a
release command. This command only has effect, if continuos
printing is activated.
<Termination string> = Termination string corresponding to the selected mode.

Example:

ASCII <STX> 0 D 00 1 <ETX>...


Hex 02 30 44 30 30 31 03
Remark Telegram Command Affect all connected Set print go for one Termination
counter set / release printheads or sensor print
(“0” to “9”) print go inputs

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong telegram length: The number of characters is not as specified.
Wrong head number: You have tried to address printhead which is not available.
Wrong contents: Date and/or time are out of range.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 38


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.16 Start / release purging

With this command a purge function can be activated on the printhead. The command is differently handled
by the ST200 and the PK / LK systems.
REA-JET ST200: This command provokes the same function than the purge button on the backside of the
printhead.
REA-JET PK / LK: The printing of a black area is initiated. The REA-JET system switches over to internal
clock and prints with an intermediate print frequency. After purging, the parameters are
switched back to the original values.

The telegram start / release purging has the following format:

<STX><Z>EKKU< Termination string >

<STX> = 02 Hex
<Z> = Telegram counter ASCII-number from "0" to "9".
E = Command character (45 Hex).
KK = Printhead number. Two digits ASCII from „01“ to „99“. If „00“ is used, the
purge function is initiated on all connected printheads.
U = Sub command
„0“ = 30 Hex = Stop purging .
„1“ = 31 Hex = Start purging for all nozzles.
„2“ = 32 Hex = Start purging for the upper half of nozzles.
„3“ = 39 Hex = Start purging for the lower half of nozzles.
<Termination string> = Termination string corresponding to the selected mode.

Remark: If no stop is transmitted after 10 seconds, Purging is released automatically.

Example:

Stop purging on printhead number one:

ASCII <STX> 0 E 01 0 <ETX>...


Hex 02 30 45 30 31 30 03
Remark Telegram counter Command Printhead Subcommand: Termination
(“0” to “9”) start / release purging №1 release purging

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages"):
Wrong telegram length: The number of characters is not as specified.
Wrong head number: You have tried to address printhead which is not available.
Wrong contents: Date and/or time are out of range.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 39


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.17 Request device parameter


With this telegram the device parameter can be requested. The terminals send the telegram “Report device
parameter” as an answer.

The telegram request device parameter has the following format:

<STX><Z>HKK< Termination string >

<STX> = 02 Hex
<Z> = Telegram counter ASCII-number from "0" to "9".
H = Command character (48 Hex).
KK = Printhead number. Two digits ASCII from „01“ to „99“.
<Termination string> = Termination string corresponding to the selected mode.

7.3.18 Set / Report device parameter

With this telegram, the device parameter can be set. The terminals send this telegram upon a “Request
device parameter” telegram.

With this telegram, all parameters have to be send. Unsent parameters will be set to their default values.

The telegram set device parameter has the following format:

<STX><Z>IKK P P P< Termination string >

<STX> = 02 Hex
<Z> = Telegram counter ASCII-number from "0" to "9".
I = Command character (49 Hex).
KK = Printhead number. Two digits ASCII from „01“ to „99“.
PPP = any number of device parameters.
<Termination string> = Termination string corresponding to the selected mode.

Device parameters:
The device parameters are transmitted in the format: <code letter><value> the parameters are delimited by a
space character. If a code letter is transmitted without value, it is set to the default value.
Not transmitted parameters are also set to the default value.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 40


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

The following parameters can be set:


Default-
PK / LK

Kommand
Letter Parameter Possible values, comment value
ST200

  k Print head Type The ID of the connected Print head


must be entered here.
1 = 7 Nozzle 27mm
2 = 16 Nozzle 67mm
3 = 32 Nozzle 140mm
4 = 2*7 Nozzle an 16 Nozzle
Controller

  h Print height Depending on print head Maximum


height
  r Print direction space = Normal left Normal
R = Normal right left
K = Upside down left
KR = Upside down right
d Print density 0 to 9 3
 z Additional blackness 0 to 9 1
  q Clock source space = Internal Intern
E = External
  t Encoder resolution 0,01 to 999,99 (Pulses / mm) 500
  v Conveyer speed 0,01 to 299,99 (m/min) 20
  a Sensor gap 0 to 9999,99 (mm) 100
  x Text gap 0 to 9999,99(mm) 20
 l Product length 0 to 9999,99(mm) 0
 b Justification Space = Justified left Justified
R = Justified right left
s Auslassen 0 to 9
  w Print repeat N = Normal
E = Single
D = Continuous End, no break
B = Continuous Begin, no break
X = Continuous End, cut
Y = Continuous Begin cut
  j Number of prints 0 to 9999
  n Continuous gap 0 to 9999,99(mm)
 e Boxmark 0 = Boxmark off 0
1 = Boxmark on
 c Boxmark number of 0 to 0
strokes
 o Boxmark gap 0 bis 0
 i Boxmark activation 0 bis 0
time

Example:
<STX>0I01_q_v20,5<ETX>> (Blank characters are shown as “_”)

This telegram will set Clock source to internal and conveyer speed to 20.5m/min. All other parameters are
set to their default value.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 41


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.19 Set partial device parameter

With this telegram, only a certain number of values can be set.

With this telegram, all unsent parameters will stay at the current values.

The telegram set partial device parameter has the following format:

<STX><Z>JKK P P P< Termination string >

<STX> = 02 Hex
<Z> = Telegram counter ASCII-number from "0" to "9".
J = Command character (4A Hex).
KK = Printhead number. Two digits ASCII from „01“ to „99“.
PPP = any number of device parameters.
<Termination string> = Termination string corresponding to the selected mode.

Device parameters:
The device parameters are transmitted in the format: <code letter><value> the parameters are delimited by a
space character. If a code letter is transmitted without value, it is set to the default value.

The code letters and their allowed values are described in section: 7.3.18 on page 40.

Example:
<STX>0I01_qE_t15<ETX> (Blank characters are shown as “_”)

This telegram will set Clock source to external and encoder resolution to 15 pulses/mm. All other
parameters are left at their current values.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 42


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.3.20 Direct text assignment (only ST 200)

The direct text assignment is a possibility to send, over the REA-JET terminal ST 200, texts as well as
formatting characteristics to the controller drivers KT 1A. The terminal will not check whether the texts
which are sent are correct, it will just transmit them to the drivers. A description of the texts and text fields
is contained in the User's Manual "Data communication to the REA-JET printhead driver KT 1A" in the
version which is valid for the driver you are using.

The direct text assignment has the following format:

<STX><Z>ZkkRLddrrrrttttttt....<Termination string>
or
<STX><ESC>Kttttttt....<Termination string>

<STX> = 02 Hex
<Z> = Telegramm counter, ASCII number from "0" to "9"
Z = Command (5A Hex)
kk = Printhead number. Two byte ASCII "01" to "99"
R = Direction of the product
"R" = 52 Hex = Product is moving from the left to the right
"L" = 4C Hex = Product is moving from the right to the left
"x" = 78 Hex = Take the direction from the basic parameters
L = Print direction
"N" = 4E Hex = Normal
"K" = 4B Hex = Upside down
"x" = 78 Hex = Take the direction from the basic parameters
dd = Print density (compression)
This parameter defines the compression of the dot spaces.
"00" = normal spacing to "99" = compressed representation.
The permissible range depends on the system you are using (for example KT
1A "00" to "09") and is contained in the User's Manual of your system.
Enter "xx" to take the value from the basic parameters.
rrrr = Sensor gap
This parameter defines at which distance (in mm) from the product sensor
printing has to start.
Values ranging from "0000" to "9999" are allowed.
Enter "xxxx" to take the value from the basic parameters.
ttttttt.. = One or several print texts or print fields which have to be transmitted to the
printheads. Each text block must be completed with "@" = 40H. See the
documentation “Data communication to the REA-JET printhead driver KT1” for
details
<Termination string> = Termination string corresponding to the selected mode.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 43


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

Example:

<02>1Z01RN02xxxxA0AS´REA-JET@B0AS´Testdruck@<03>

Produces the two line text::

REA-JET
Testdruck

ASCII <STX> 1 Z 01 R N
Hex 02 31 5A 30 31 52 4E
Remark Telegram counter Command Printhead Right to Direction:
(“0” to “”9”) character: №1 left Normal
Direct text
assignment

02 xxxx A0AS‘ REA-JET @


30 31 78 78 78 78 41 30 41 53 27 52 45 41 2D 40
4A 45 54
Print Sensor gap: Small characters 1st line Text to print Text
density: 2 no change 2 x blank strokes termination
Text 5x7
resp. 10x16
Single density

B0AS‘ Testdruck @ <ETX>...


42 30 41 53 27 54 65 73 74 40 03
64 72 75 63
6B
Small characters 2nd line Text to print Text Termination
2 x blank strokes termination
Text 5x7
bzw. 10x16
Normalschrift

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 44


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

or

<STX> = 02 Hex
<ESC> = Command (1B Hex). Instead of the command "Z" it is also possible to use an
"ESC" (1B Hex) as a command. In the command <ESC> the printhead number
has to be transmitted only as a one character number. The telegram counter is
dropped. This option has been implemented for compatibility reasons with the
input terminal ST 100. For new developments the command "Z" should be used
in any case, since the command <ESC> will possibly no longer be supported in
a future version without notice.
K = Printhead number ("0" = 30H or "1" = 31H)
ttttttt.. = One or several print texts or print fields which have to be transmitted to the
printheads. Each text block must be completed with "@" = 40H. See the
documentation “Data communication to the REA-JET printhead driver KT1” for
details
<Termination string> = Termination string corresponding to the selected mode.

Example:

<02><ESC>1A0AS´REA-JET@B0AS´Testdruck@<03>

Produces the two line printout:

REA-JET
Testdruck

ASCII <STX> <ESC> 1 A0AS‘ REA-JET


Hex 02 1B 30 41 30 41 53 27 52 45 41 2D 4A
45 54
Remark Command- Printhead № 1 Small font 1st line Text to print
character 2 x blank strokes
Direct text Text 5x7
assignment resp. 10x16
single density

@ B0AS‘ Testdruck @ <ETX>...


40 42 30 41 53 27 54 65 73 74 40 03
64 72 75 63
6B
Text Small font 2nd line Text to print Text Termination
termination 2 x blank strokes termination
Text 5x7
resp. 10x16
single density

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 45


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

The following error messages are generated (please refer to Chapter 7.3.10 "Error messages")
Wrong printhead number: You have tried to send a text to a printhead which is not available.
Wrong content: A verification of the telegram showed that either non-admissible characters
have been used in one of the parameters, or that the parameter has been set
out of the permissible range. The telegram processing will be interrupted,
the texts will not be assigned. The number of the wrong parameter will be
handed over.
The parameters are numbered consecutively in order:
"01" = Direction of the product, "02" = Print direction, ......"04" = Sensor
gap.
Text too long: You have tried to assign a text which is too long to a printhead.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 46


Rationalisierung • Entwicklung • Automation
Elektronische Geräte und Systeme REA Elektronik
GmbH

7.4 Examples of sequences for Mode 2

These examples show a communication between a Host computer and the REA Piezo printer PK.
In these examples you will find the representation of a transmission without check sum.

The following conventions will be valid for these examples:


<40> = 1 Byte in Hex representation (40 Hex)
12 = Two byte ASCII string "12"

1. Check over configuration request whether the PK system is available


Host sends to PK
<02>00<03>

2. The terminal sends a configuration message


PK sends to HOST
<02>010103.01 032/32 000/00<03>
The PK system is designed for 2 printheads. Printhead 1 is a 32/32 printhead, printhead 2 is not
equipped, the software version is Version 3 Release 1.

3. Configure the print and status messages on the PK system


Host sends to PK
<02>1401<84><03>
Printhead 1 will be configured to send a print message at the end of the print processing. The
automatic status message is turned off.

4. Load texts into the PK system


Host sends to PK
<02>2A<14>01This is a test<14>021234567890<03>
The text "This is a test" will be assigned to Variable 1 and the text "1234567890" will be assigned to
Variable 2.

The product sensor will send a signal and the PK system will begin to print.

5. The PK system will send the print message to the Host after the print processing
PK sends to Host
<02>1501<C4><FF><C2><03>
C4 = This is a print message at the end of the processing.
Printing was until now successful.
FF = All parameters are OK
C2 = Print is not stopped
Print delay running.

From now on the PK system is in a position to receive new texts..

6. Load new texts into the PK system


Host sends to PK
<02>3A<14>01This is a second test<14>02987654321<03>
The text "This is a second test" will be assigned to Text variable 1 and the text "987654321" will be
assigned to Text variable 2.

Copyright © 1996-2004 REA Elektronik File: SER1E-31.DOC Page: 47

Potrebbero piacerti anche