Professional Documents
Culture Documents
RS232 Interface E v2xx
RS232 Interface E v2xx
RS232 Interface E v2xx
© Copyright 2007
Hotline: Hotline:
Phone: ++49/6201/3941-14 Toll free: ++1/888 412 7327
Fax: ++49/6201/3941-24 Fax: ++1/248 299 4913
E-Mail: hotline@q-das.de E-Mail: hotline@q-das.com
2 RS232 Interface
Table of Contents 3
Table of Contents
Table of Contents ................................................................................... 3
1 Import DLL files ................................................................................ 5
1.1 Implementation of Import DLL files into qs-STAT / procella...... 5
2 Communication flow between procella / qs-STAT
and measurement device for the standard DLL (IMP_000.DLL) ... 6
2.1 Initialization of the device.......................................................... 6
2.2 Receiving the measurement values .......................................... 7
3 Types of measurement devices ...................................................... 8
4 Operating modes of the measurement devices ............................. 8
5 Command syntax in the RS232DEF.INI file .................................... 9
5.1 Commands in the RS232DEF.INI ........................................... 10
6 Decoding of the received data by the IMP_000.DLL.................... 15
6.1 Individual measurement value transfer ................................... 15
6.2 Transfer of multiple parameters in blocks ............................... 17
7 Control of the selection menu in the Characteristics Mask ....... 18
8 Trouble shooting ............................................................................ 18
4 RS232 Interface
Import DLL files 5
qs-STAT / procella
IMP_XXX.DLL
external interface
e.g. RS232
6 RS232 Interface
RS232 device
One-time
device INITSTR
initialization
DEINICH
Characteristic
switch /
Channel selection
INICH
All
configured
channels
initialized?
Start
of the
measurement
Communication flow between procella / qs-STAT and measurement 7
device for the standard DLL (IMP_000.DLL)
Request
REQSTR
by software
x
Measured value
Measured
value
Confirmation? REQACK
1. \d
Control character, followed by 3-digit ASCII code for the desired
control character.
Example: \d013 adds a carriage return <CR> at the specified
position
2. \k
Channel number, additional parameters: Fill up characters,
alignment, and number of digits.
Example: \k2r0 adds the channel number at the specified
position, (formatted with 2 digits, right alignment, with
“0” as the fill up character if required).
Parameters following “k”:
1. Parameter: Number of digits in the channel string.
The entry will be formatted to x digits
according to this.
2. Parameter: alignment “r” or “l” for right or left
alignment
3. Parameter: Fill up character “0” or “_”
\k00A, \k00a : Channel number will be sent as capital
letter (channel 1 = A, channel 2 = B...).
3. *
Wildcard (only for responses from the gage, not commands sent)
4. \L<conductor wire><level><time>
The \L command has to be located at the beginning of the string
always and cannot be used in combination with sending of character
strings! Switches the DTR or RTS conductor wires to 0 or 1 for a
certain period of time.
Example:
\LDTR0250: sets the DTR conductor to level 0 for 250 ms.
<conductor> DTR or RTS
<level> 0 = off , 1 = on
<time> time in ms, 3 digits
10 RS232 Interface
Special commands
Menu control
1. Decoding starts after the last sign of a data transfer has been
received. The last sign has to be defined using the ENDCH parameter
(-> trigger sign).
2. Now the measured value is determined from within the string between
POS1 and POS2. Setting POS2 to 0 has the effect that all characters
between POS1 and ENDCH are used.
3. After this, the channel number is determined from within the string
between CH1 and CH2. This determination is optional that means the
parameters can be set to 0 which will deactivate the channel decoding
(default setting).
Example:
2. The character string that has been received until now is now
separated into blocks. The separation takes place wherever in the
string the separator sign as defined with the SEP1 parameter is found
(after the last block, the separator sign can be omitted).
8 Trouble shooting
1. Enter test=YES in the RS232DEF.INI file:
The data transfer will be protocolled in the C:\QSTERMX.TRC file
(X= number of the used interface, e.g. OSTERM2.TRC if the device
is connected to COM2) (ASCII file).
3. Interface tester.