VSP-G1 Remote control guide
Introduction
The VSP-G1 supports remote control using the RS232 serial communication protocol. This enables you to remotely and/or programmatically set and retrieve the operational parameters of the system, e.g. to implement logging or implement controlled operational routines. This guide discusses setting up the connection as well as the command and control structure and possible errors. Additionally, libraries implementing the API for various languages are available upon request.
Connecting to the VSP G1
The VSP-G1 can be controlled remotely via a female 9 pin D-SUB connector on the back panel of the device. It implements the RS232 communication protocol for serial communication. Use a straight through serial cable or a RS232-to-USB dongle for connecting the system. Only pins 2,3 (RX,TX) and 5 (ground) need to be connected for successful communication between two systems.
Settings
Parameter | Setting |
---|---|
Baud rate | 19200 bps |
Data bits | 8 |
Stop bits | 1 |
Parity | None |
Flow control | Off |
Control character | Carriage return (\r) |
API reference
Scope
The VSP-G1 accepts the commands described in the table below. Not all commands are available during the various states of operation of the machine. E.g. during calibration of the electrodes, remote control is unavailable and when the system encounters an interlock error, the remote control is limited. All commands are terminated using the carriage return as control character (\r
). The VSP-G1 echoes the command in response and optionally the requested set point or status terminated by \r
.
Resolving errors
If an error is encountered, the system will reply ?
. This indicates a specific error code is available. Before any new commands can be executed, the error needs to be cleared using the E
command.
Command reference
Command | Description | Input | Return | Example |
---|---|---|---|---|
V |
Retrieves or sets (if input was provided) the spark voltage in kV. | Optional: a floating point number with 2 decimal precision between 0.00 and the maximum value determined by the carrier gas setting (e.g. 1.36kV when using Argon) . | The command and the (new) value of the spark voltage setpoint. | To set a new value Input: V1.05
Answer: |
I |
Retrieves or sets (if input was provided) the spark current in mA. | Optional: a floating point number with 1 decimal precision between 0 and 10.4. | The command and the (new) value of the spark current setpoint. | To set a new value Input: I1.05
Answer: |
M |
Retrieves or sets (if input was provided) the motor position. | Optional: a integer number between 2 and the maximum value 40. Send 1 to enable remote motor control or 0 to disable the remote motor control. | The command and the (new) value of the motor position. | To set a new value Input: M20
Answer: |
C |
Returns the carrier gas settings. | Optional: Send 0 to set the carrier gas as Nitrogen or 1 to set carrier gas as Argon | The command and the new set value if it is in the valid range. Otherwise an error code will be raised. | Input: C1 Answer: C1
|
G |
Starts sparking when in idle mode. | N.A. | G
|
Input: G Answer: G
|
A |
Aborts sparking when in spark mode. | N.A. | A
|
Input: A Answer: A
|
S |
Returns the current status. | N.A. | A JSON formatted string indicating the spark status, spark current and voltage setpoints and the current reading of the spark voltage and current. The S element has values 0 and 1, indicating whether the system is sparking (1) or not (0). The SET element contains the spark voltage (V) and spark current (I) set points and, when sparking, the MON element contains the current monitor values of the spark voltage (V) and current (I). All monitor values are refreshed approximately every 10ms. | Input: S Answer when sparking: {"S":1,"SET":{"I":6.5,"V":1.05},"MON":{"I":6.4,"V":1.04}}
Answer when idle: |
! |
Returns the version number of the software. | N.A. | A string containing the command followed by the version description of the software. | Input: ! Answer: !1.0-10HV
|
E |
If an error was encountered, this retrieves the error code. | N.A. | An integer as error code. Refer to Error codes for details on the possible error codes. | Input: E Answer: E2
|
W |
Enable or disable glow mode | Optional: An integer value of 1 to enable glow mode or 0 to disable the glow mode. | The command and the new set value if it is in the valid range. Otherwise an error code will be raised. | Input: W1 Answer: W1
|
@ |
Enable or disable data streaming | Optional: An integer value of 1 to enable data streaming or 0 to disable the data streaming. | The command and the new set value if it is in the valid range. Otherwise an error code will be raised. | Input: @1 Answer: @1
|
# |
Remote homing sequence procedure | This command can be used to allow the homing sequence procedure and the start of the G1 to be executed remotely | The command is echoed. | Input: # Answer: #
|
$ |
Remote locking or unlocking spark button | This command can be used to lock (send integer value 1) or unlock (send integer value 0) the usage of the spark button. Command can be used only in stand by mode of the G1. | The original command is echoed and the state of the locking. | Input: $1 Answer: $1
|
F |
Start of remote update procedure. If command is executed successfully G1 should be in power off state. | N.A. | N.A
|
Input: F Answer: N.A |
Error codes
The table below lists the possible error codes returned by the E
command.
Error code | Reason |
---|---|
0 | No error. This is returned when you send E , but no error was present.
|
1 | The last command is not a valid command or it was improperly formatted. |
2 | The last command exceeded the maximum length for a valid command and is not valid. |
3 | Invalid input provided with the command. E.g. only numeric input is allowed for the I and V commands, but alphanumeric input was encountered.
|
4 | The command is not valid in the current mode. E.g. a command to start sparking was issued while the device was already in spark mode. |
3x | The system is in interlock mode and is not functional. In interlock mode, only the E command can be used. The interlock error encountered is given by x. Refer to the table of interlock error codes in the troubleshooting section to identify the precise interlock error. Any interlock error can only be cleared by pressing both dials on the front panel of the VSP G1.
|