Bronkhorst RS232 interface User Manual
Page 17
BRONKHORST
®
Page 17
RS232 interface
9.17.027
3.7
S
END PARAMETERS
To write to a device command codes “01”and “02”must be used. “01” will give as result a status message for error
checking. Command “02” will give no reply from the device. In the table below the total command line is explained.
Sending a parameter
Nr
Byte
Layout
Description
0
:
start character
1
Length
Message length
2
Node
Node address
3
01 or 02
Command write, for type 01 a status message (00) will be returned
4
Process
cppppppp
c Process chained
p Process number
5
Parameter
cttppppp
c Parameter chained
t Parameter type
p Parameter number (FBnr.)
6
Value 1
Value for all types. For ‘strings’ this field contains the string length.
7
Value 2
Value for type ‘integer’, ‘float’ or ‘long’.
8
Value 3
Value for type ‘float’ or ‘long’.
9
Value 4
Value for type ‘float’ or ‘long’.
X
Value x
More value fields follow for type ‘string’ depending on string length. If given
string length is zero, the final field should also contain a zero.
X+1
\r
Carriage Return
X+2
\n
Line Feed
3.8
R
EQUEST PARAMETER
For each requested parameter an index number can be given. The answering node will return this index number with
the requested parameter. This can be used to check which parameter is returned when several parameters are
requested.
Requesting a parameter
Nr
Byte
Layout
Description
0
:
start character
1
Length
Message length
2
Node
Node address
3
04
Command read
4*
Process
cppppppp
c Process chained
p Process number
5*
Parameter
cttnnnnn
c Parameter chained
t Parameter type
n Parameter index 0…31
6
Process
‐ppppppp
‐ Not used (use a zero)
p Process number
7
Parameter
‐ttppppp
‐ Not used (use a zero)
t Type parameter
t Parameter number (FBnr.)
8
String length
For parameter type ‘string’ this field contains the expected string length.
9
\r
Carriage Return
10
\n
Line Feed
Advise:
Use the same process name for Nr 4 and 6. If no index is required, fill in the FBnr. so the return message
will return with the requested parameter number.