
100-M0105X1
13
of
23
www.cobham.com/gms
5.0
Control Protocols
5.1
Remote Control
The following section describes the control protocol employed on the RS232 link for controlling VNA.
The physical interface is RS232 but this can be converted to RS 485 with an external adapter where
multiple units are controlled over one RS 485 bus. Normal operation involves sending a packet from
the control device (normally a PC) to the device being controlled. If the packet satisfies an address
integrity check, then the controlled device will action the command and send a reply. For compatibility
with modems an ASCII style protocol is used. Ports are set for 8 bits, No parity, and 1 stop bit.
Table 4 Packet Structure from PC
ASCII
Value
STX
02h Start
byte
0-9
30h-39h
4 byte unit address. In range 0-9999
R
20h-7Eh
1 byte command type. r read, w write or m misc
I
20h-7E
1 byte indicator of internal data block
ABC
20h-7Eh
Command –three byte mnemonic
;
3Bh Separator
PQR
20h-7Eh
Data –Optional, variable length
;
3Bh Separator
X
20h-7Eh Sum
Check
ETX
03h End
byte
Table 5 Packet Structure Reply from controlled device
ASCII
Value
STX
02h Start
byte
0-9
30h-39h
4 byte unit address. In range 0-9999
Z
20h-7Eh Status
Byte
PQR
20h-7E
Data –Optional, variable length
;
20h-7Eh Separator
X
3Bh Sum
Check
ETX
20h-7Eh End
byte
The Sum check byte is the summation of all bytes in the packet, not including the start and end bytes.
Higher order bytes are ignored and the final byte result is modified to prevent ASCII control characters
being sent. Bit 7 (highest) is forced high. Status byte will indicate command performed OK, or indicate
an error:
ASCII
Meaning
1
All
OK
E
General error, Command could not be auctioned.