MXR Serial Protocol
MXR Serial Protocol
[email protected]
Broomers Park, Pulborough,
W. Sussex, UK. RH20 2RY
Product:
MXR Series
Title:
Serial Communications Protocol
Document Number:
81318-21
Issue:
1
Date:
15/November/2021
Change History
ISSUE DATE NAME SECTION CHANGE
1 Nov 21 JS All Created from 47811-21 issue C
3 Multiple outputs option removed
3.1 Ramp rate and polarity set command removed (not present in firmware)
3.1 Internal fault request (FT?) - list of responses corrected
Contents
1. Introduction ................................................................................................................................................3
2. General message format ...........................................................................................................................3
2.1 Message Structure ............................................................................................................................3
2.2 Checksum Calculation ......................................................................................................................4
3. Command Protocol ....................................................................................................................................5
3.1 Command set ...................................................................................................................................5
3.2 Command Examples ........................................................................................................................6
Spellman High Voltage Electronics Limited | +44 (0)1798 877000 | [email protected] | Broomers Park, Pulborough, W. Sussex, UK. RH20 2RY
TEMPLATE: 40776 ISS B | ECN I-10887 | DATE: 05/11/2021 QA/ENG/SAL © 2021 Spellman High Voltage Electronics Corporation
Page 3 of 6
1. Introduction
The Series protocol is based on the general protocol used with Spellman HV Electronic Ltd power
supplies which is described in this document. At the hardware level the protocol runs over an RS232
two wire interface. A provision to include an address character has been included such this protocol can
be used on a multi device RS485 system. On an RS232 system the address character will always be 0.
The first character of any message is an STX character followed by the characters that make up the
data in the message, which usually comprises a command and command argument, the exact format
of this depends on the type of command but generally the command is three characters followed by a
six character argument. The command itself comprises a two character identified followed by a single
character operator. The next character is a checksum followed by a line feed to indicate the end of the
message.
The general message format for communication in both directions is shown below :-
<STX><ADDR>< DATA><CSUM><LF>
Where:
<STX> = 1 ASCII 0x02 Start of Text character.
<ADDR> = 1 ASCII address character for RS485 bus usage (always 0 in RS232 operation for both
directions of communication).
<DATA> = Command Argument, up to 7 ASCII characters.
<CSUM> = Checksum (see below for details)
<LF> = 1 ASCII 0x0A Line Feed character
Spellman High Voltage Electronics Limited | +44 (0)1798 877000 | [email protected] | Broomers Park, Pulborough, W. Sussex, UK. RH20 2RY
TEMPLATE: 40776 ISS B | ECN I-10887 | DATE: 05/11/2021 QA/ENG/SAL © 2021 Spellman High Voltage Electronics Corporation
Page 4 of 6
For I = 1 To Len(message)
CheckSum += Asc(Microsoft.VisualBasic.Mid(message, I, 1))
Next I
CheckSum = &H100 - CheckSum
CheckSum = CheckSum And &H7F
CheckSum = CheckSum Or &H40
End Function
Spellman High Voltage Electronics Limited | +44 (0)1798 877000 | [email protected] | Broomers Park, Pulborough, W. Sussex, UK. RH20 2RY
TEMPLATE: 40776 ISS B | ECN I-10887 | DATE: 05/11/2021 QA/ENG/SAL © 2021 Spellman High Voltage Electronics Corporation
Page 5 of 6
3. Command Protocol
Spellman High Voltage Electronics Limited | +44 (0)1798 877000 | [email protected] | Broomers Park, Pulborough, W. Sussex, UK. RH20 2RY
TEMPLATE: 40776 ISS B | ECN I-10887 | DATE: 05/11/2021 QA/ENG/SAL © 2021 Spellman High Voltage Electronics Corporation
Page 6 of 6
<STX>0VA=3000.0#<LF> Where “0” is the unit address (always 0 in RS232), “VA=3000.0” is the
command to set 3kV and “#” (0x5B) is the checksum
Response:
<STX>0VA=3000.0#<LF> Where “0” is the unit address (always 0 in RS232), “VA=3000.0 is the echo of
the command and “#” (0x5B) is the checksum.
<STX>0VA?#<LF> Where “0” is the unit address (always 0 in RS232), “VA?” is the command and
“#” (0x7A) is the checksum
Response:
<STX>0VA =600.0#<LF> Where “0” is the unit address (always 0 in RS232), “600.0” is the demand
voltage and “#” (0x48) is the checksum.
<STX>0PA?#<LF> Where “0” is the unit address (always 0 in RS232), “PA?” is the command and
“#” (0x40) is the checksum
Response:
<STX>0PA=0#<LF> Where “0” is the unit address (always 0 in RS232), “PA=0” is the polarity and “#”
(0x52) is the checksum.
<STX>0EA1#<LF> Where “0” is the unit address (always 0 in RS232), “EA1” is the command and
“#” (0x59) is the checksum
Response:
<STX>0EA1#<LF> Where “0” is the unit address (always 0 in RS232), “EA1” is the echo of the
command and “#” (0x59) is the checksum.
Spellman High Voltage Electronics Limited | +44 (0)1798 877000 | [email protected] | Broomers Park, Pulborough, W. Sussex, UK. RH20 2RY
TEMPLATE: 40776 ISS B | ECN I-10887 | DATE: 05/11/2021 QA/ENG/SAL © 2021 Spellman High Voltage Electronics Corporation