Bronkhorst RS232 interface User Manual

Page 17

Advertising
background image

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

start character

Length 

Message length

Node 

Node address

01 or 02 

Command write, for type 01 a status message (00) will be returned

Process 

cppppppp

c Process chained

p Process number

Parameter 

 

cttppppp

c Parameter chained

t Parameter type

p Parameter number (FBnr.)

Value 1 

Value for all types. For ‘strings’ this field contains the string length.

Value 2 

Value for type ‘integer’, ‘float’ or ‘long’.

Value 3 

Value for type ‘float’ or ‘long’.

Value 4 

Value for type ‘float’ or ‘long’.

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

 

start character

Length 

 

Message length

Node 

 

Node address

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

Process 

‐ppppppp 

‐ Not used (use a zero)

p Process number

Parameter 

‐ttppppp 

‐ Not used (use a zero)
t Type parameter
t Parameter number (FBnr.)

String length 

 

For parameter type ‘string’ this field contains the expected string length.

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

 

Advertising