You are on page 1of 13

Rationalisierung • Entwicklung • Automation

Elektronische Geräte und Systeme REA Elektronik


GmbH

Setting up the serial interface

of the

REA-JET ST200

Published by REA Elektronik GmbH, D-64367 Muehltal-Waschenbach, Germany. All rights reserved.
Any duplication of this document, in whole or in part, may only be granted with the written permission of the
publisher.
Although this documentation has been compiled with the greatest care, some information may be incorrect or
may contain errors. REA Elektronik accepts no responsibility for damages which might be caused due to
such incorrect information.
As we are continuously striving to improve our products, REA Elektronik GmbH reserves the right for
modifications, document amendments and software updates subject to change without prior notice.

Version 1.1 R.Dörrmann

REA Elektronik GmbH


Teichwiesenstraße 1, D-64367 Mühltal-Waschenbach
Telephone: + 49 6154/638-0 • Telefax: + 49 6154/638-191 November, 2008

Copyright © 1997 -2008 REA Elektronik


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

Content:

1. COMMUNICATION MODES: ..............................................................................................................................3


1.1. MODE: OFF .........................................................................................................................................................3
1.2. MODE: TEXT ASSIGNMENT BY NAME ..................................................................................................................3
1.3. MODE: DIRECT ASSIGNMENT TO VARIABLE ........................................................................................................5
1.4. MODE: TELEGRAM COMMUNICATION .................................................................................................................6
1.5. MODE: TEXT SELECTION BOX .............................................................................................................................7
2. GLOBAL PARAMETERS:.....................................................................................................................................8
2.1. BAUD RATE : ......................................................................................................................................................8
2.2. PARAMETER: ......................................................................................................................................................8
2.3. HANDSHAKE .......................................................................................................................................................8
2.4. ACKNOWLEDGE:.................................................................................................................................................9
3. USING THE ST200 WITH PRINTCOMMANDER:..........................................................................................10

4. INTERFACE MONITOR......................................................................................................................................10
4.1. THE INTERFACE MONITOR (DOT):....................................................................................................................11
4.2. THE COMPRESSED INTERFACE MONITOR (COMMA) .........................................................................................12

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 1


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

The REA-Jet ST200 may be equipped with a serial interface destined for the data exchange with another
controller or any Host computer.

The serial interface can either be RS232, RS422 or a combined RS232/RS422 interface.

For a detailed description about the data communication in the different modes please refer to the
documentation:
Communication between the REA Piezo printer "PK", “LK”,the REA-JET input
terminal “ST 200” and a Host computer.
Further referenced as: “SER1E-xx” in the actual version (SER1E-31).

A basic acknowledge about serial communications is recommended. The user must know how to send and
receive serial data from his computer, PLC, or other system. He also must know how Decimal or Hex
numbers and ASCII characters have to be interpreted.

All parameters must be set to the same parameters than the external communication device, or to meet your
communication requirements.

To set the parameters of the serial interface select “SETUP” form the main menu.
Then select “INTERFACE” from the Setup menu.

INTERFACE
Mode: Telegram communicat.
Baud rate:>38400
Parameter: 8,even,1
Handshake: None
Acknowledge: None
Format: STX,Data,ETX

With this function the interface can be adapted to most of the parameters and protocols commonly in use.

If a combined RS232 / RS422 interface is installed, the interface can be switched to RS422 or RS232.

INTERFACE
Mode: Telegram communicat.
Interface:>Via external RS-232
Baud rate: 38400
Parameter: 8,even,1
Handshake: None
Acknowlledge: None
Format: STX,Data,ETX

Use the cursor up <↑> and down <↓> keys to select the parameter you want to change.

All available combinations can be selected by striking the <Space key>, the <+> or <-> key.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 2


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

1. Communication Modes:

One of the five following modes of operation modes can be selected:

“Off"
"Text assignment by name"
"Direct assignment to variable"
"Telegram communication"
“Text selection box”

1.1. Mode: off

If the mode has been set to "Off" the interface will not react to any incoming data and will
furthermore not send any data or messages to this interface. This may be useful if no data
exchange is necessary and if (for example in an environment with high electrical interferences)
unintentional, accidental influences must definitely be avoided.
In the mode "Off" no further selection fields are available.

1.2. Mode: Text assignment by name

In this mode a texts can be assigned to the print heads by sending the name of the text.

INTERFACE
Mode: Text select. By name
Baud rate:>38400
Parameter: 8,even,1
Handshake: None
Acknowledge: None
Configuration

Please see section 2 for the settings of the global parameters.

Entering the Configuration menu will show the following screen:


TEXT SELECTION BY NAME
Starting character: 0
Separating character: 0
Ending character: 13
Assignment: Text
Head 1: 0
Head 2: 0

The transmitted string is taken as a text name. One or more text names can be transmitted in one
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. The names are not case sensitive.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 3


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

The simplest way to select a text to the print head is to send the name of the text terminated by a
ending character (for example CR = 0DH = 13).
TEXT_NAME<Transmission end character>
If several text names are transmitted, they must be separated by a separating character:
TEXT_NAME_1<Text end character> TEXT_NAME_2[<Text end character>]<Transmission
end character>
The separation character following the last name is not absolutely required.

Configurable parameters

The following parameters can be configured on the terminals:

Remark All values must be entered in decimal notation.

Starting 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.

Separating character The separating character shows at which time the transmission of a name 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.

Ending character Once the transmission end character has been received, the transmission is
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.

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. In Line text mode those fields are not used.

Please refer to the SER1E-xx “Mode 1” documentation for details.


Please refer to the ST200 users manual for a description in how to create text, linetext
and how to setup and insert variable in the text.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 4


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

1.3. Mode: Direct assignment to variable

TEXT SELECTION BY NAME


Starting character: 0
Separating character: 0
Ending character: 13
Assignment to Variable: 1
Assignment: Text
Head 1: 0
Head 2: 0

or:
TEXT SELECTION BY NAME
Starting character: 0
Separating character: 0
Ending character: 13
Assignment to Variable: 1
Assignment: Linetext
Nr.: 0

In this communication mode the content of one or more variables can be assigned. After
transmission selected 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 ending
character (for example CR).
VARIABLE_1<Ending character>

If several variables are transmitted, they must be separated by a separating 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>

After the ending character has been received, the data will be stored 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.

After reception of variables a text or linetext assignment to the print head(s) is executed. The
assigned text should include the transmitted variables.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 5


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

Configurable parameters

The following parameters can be configured on the terminals:

Remark All values must be entered in decimal notation.

Starting character: Please see section: 1.2 for the description.

Separating character: Please see section: 1.2 for the description.

Ending character: Please see section: 1.2 for the description.

Assigment to Variable: Enter the number of the variable to which the first text has to be assigned.
If more than one variable is transmitted, the content is stored in the
following variable(s) (next higher number).

Assignment: In this field you have to select whether a text assignment or a linetext
assignment is executed after the reception of variables.

Head 1: If text assignment is selected, you have to specify the text number assigned
Head 1: to the print had(s) after reception of the variable(s). If 0 is entered, no text
assignment is executed for the desired print head.

Nr.: If linetext assignment is selected, you have to specify the linetext number
assigned to the print heads.

Please refer to the SER1E-xx “Mode 2” documentation for details.


Please refer to the ST200 users manual for a description in how to create text, linetext
and how to set up and insert variables in the text.

1.4. Mode: Telegram communication

In this mode communication telegrams are send between the terminal and the external
communication device.

Please refer to the SER1E-xx “Mode 2” documentation for details.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 6


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

1.5. Mode: Text selection box

In this mode a REA-Jet text selection box can be connected to the ST200 terminal. The text
selection box can either be a TWS (Text selection from PLC) or a TWM (manual text selection).
The text selection box will send a telegram to assign a text or linetext to the print head(s).

INTERFACE
Mode:>Text selection box
Configuration

Entering the Configuration menu will show the following screen:

TEXT SELECTION BOX


Assignment: Text

In the configuration you have to set up whether the number transmitted from the text selection box
is taken a as text number or lintext number.

Please refer to the ST200 users manual for a description in how to create text, linetext
and how to set up and insert variables in the text.
Please refer to the manual of the text selection box for details.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 7


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

2. Global parameters:

2.1. Baud rate :

The following baud rates are selectable:


1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200
The setting must match the setting in the external communication device.

2.2. Parameter:
With this setting the number of data bits, parity and number of stop bits are set. The setting must
match the setting in the external communication device.
Number of data bits: 7 or 8 (in mode telegram communication only 8 is available)
Parity: None, Even or Odd
Number of stop bits: 1 or 2

2.3. Handshake

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. XON / XOFF
The terminal checks the characters received from the serial interface. If it receives
XOFF = DC3 = 13Hex it will stop transmission.
The terminal will restart the transmission only after reception of 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 © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 8


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

2.4. Acknowledge:

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 © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 9


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

3. Using the ST200 with PrintCommander:

If the ST200 is to be used wit the REA-Jet PrintCommander software the following settings must
be made:
INTERFACE
Mode: Telegram communicat.
Baud rate:>Same as RJ-Server
Parameter: 8,Even,1
Handshake: None
Acknowledge: ACK/ NAK
Format: STX,Data,ETX,BCC

4. Interface Monitor

The interface monitor is a very helpful tool for the development of your own serial application. In
the monitor all received and transmitted characters are shown on the screen. The monitor shows
the characters even if there were communication errors.

If the shown characters do absolutely not mach with the characters you have transmitted the setting
of the Baud Rate, Number of Data bits or Parity is set to a wrong value.
If the characters are shown right but the telegram is not accessed, the parity might be wrong. The
serial monitor shows all received characters, even if there were communication errors.
It is a good idea to set “Acknowledge” to “ACK/NAK” to control that the characters were received
correct. If the terminal sends ACK (06H) after transmission there were no communication errors.
If the terminal sends NAK (15H) communication errors occurred. If the terminal sends nothing, the
“Ending Character” was not received.
If no characters are shown on the screen the hardware may be wrong or defect maybe you are
using a wrong cable.

To enter the serial monitor press “.” (Dot) or “,” (Comma) key for the standard or compressed
serial monitor, in the “Setup / Interface” menu.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 10


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

4.1. The Interface Monitor (Dot):


In this interface Monitor always one line is used to display the received characters and the next
line is used to show the transmitted characters. All viewable characters are shown normal. All
control characters (from 00Hex to 1FHex) are shown with the Hex value in angle brackets. <02>
means that 02Hex was received.

Example:

INTERFACE-MONITOR
<02>123456<03> <02>654321<03>
<06> <06>

The terminal has received: STX = 02 Hex the ASCII String “123456” and ETX = 03Hex. Then the
terminal has send ACK = 06Hex
Then the terminal has received: STX = 02 Hex the ASCII String “654321” and ETX = 03Hex.
Then the terminal has send ACK = 06Hex
After the screen is filled it starts to overwrite from the upper left corner without clearing the
screen.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 11


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

4.2. The compressed Interface Monitor (Comma)

In this serial monitor a special font is used to display the control characters. Those characters are
shown with their Hex value in one character from 00 to 1F .
For example: 02 = STX= 02Hex

Al received characters are leaded by a space (one space per received string). All transmitted
characters are leaded by an upper angle “^” (one angle per transmitted string)

Example:

_ 0212345603^06 _ 0265432103^06

For better representation the space characters are shown as underlines.

The terminal has received: STX = 02 Hex the ASCII String “123456” and ETX = 03Hex. Then the
terminal has send ACK = 06Hex
Then the terminal has received: STX = 02 Hex the ASCII String “654321” and ETX = 03Hex.
Then the terminal has send ACK = 06Hex

After the screen is filled it starts to overwrite from the upper left corner without clearing the
screen.

Copyright © 1997 - 2008 REA Elektronik File: COMST_E.DOC Page: 12

You might also like