| Oxford Cryosystems 700 series serial line communications | home | protocols | wiring diagram |
| Cryostream | Cobra | PheniX | HeliX | status packets | command packets |
The structure of a valid command packet is as follows:
char Size; /* The variable size of the command packet */
char Id; /* The command packet identifier */
char *Params; /* Possible variable number of parameters */
The Size parameter must reflect the size of the command packet, as listed below. The Id parameter must be one of the following values:
CBCOMMAND_RESTART=10, /* Restart a Cobra which has shutdown */
CBCOMMAND_RAMP=11, /* Ramp command identifier - parameters follow */
CBCOMMAND_PLAT=12, /* Plat command identifier - parameter follows */
CBCOMMAND_HOLD=13, /* Hold command identifier - enter programmed Hold */
CBCOMMAND_COOL=14, /* Cool command identifier - parameter follows */
CBCOMMAND_END=15, /* End command identifier - parameter follows */
CBCOMMAND_WARM=16, /* Warm command identifier */
CBCOMMAND_PAUSE=17, /* Pause command identifier - enter temporary Hold */
CBCOMMAND_RESUME=18, /* Resume command identifier - exit temporary Hold */
CBCOMMAND_STOP=19, /* Stop command identifier */
CBCOMMAND_TURBO=20, /* Turbo command identifier - parameter follows */
The Params[] array contains the parameters associated with the particular command. In most of the above cases no parameters are required, and thus the command packet is a simple two-byte one in which Size=2. For example, a command packet to stop the Cobra would be created as follows:
char buf[2] = { 2, CBCOMMAND_STOP }; /* Create a Stop command packet */
For those commands requiring parameters, the Params[] array takes various forms, illustrated by the following examples. The valid parameter ranges for these commands are indicated below. If the command is unrecognised (Id invalid or Size inappropriate), illegal (parameter out of range) or inappropriate (eg the machine has shutdown), then it is simply ignored.
/*
* The CBCOMMAND_TURBO command packet, size = 3
* The Params[] array consists of a single char taking the value either 0
* (switch Turbo off) or 1 (switch Turbo on)
*/
char buf[3] = { 3, CBCOMMAND_TURBO, 1 }; /* Switches Turbo on */
The Ramp, Plat and Cool commands are a little more complicated, because the parameters which are passed are shorts - 16 bit integers. These need to be assembled as illustrated in the following examples, which use the standard HIBYTE and LOBYTE macros reproduced below.
/*
* The CBCOMMAND_RAMP command packet, size = 6
* The Params[] array consists of a short containing desired ramp rate in K/hour,
* followed by a short containing the end temperature in centi-Kelvin
*/
char buf[6] = { 6, CBCOMMAND_RAMP, HIBYTE(120), LOBYTE(120), /* Rate = 120 K/hour */
HIBYTE(25050), LOBYTE(25050), /* Final temp = 250.5 K */ };
/*
* The CBCOMMAND_PLAT command packet, size = 4
* The Params[] array consists of a short containing the duration of the
* Plat in minutes
*/
char buf[4] = { 4, CBCOMMAND_PLAT, HIBYTE(720), LOBYTE(720) }; /* 720 minute plateau */
/*
* The CBCOMMAND_COOL command packet, size = 4
* The Params[] array consists of a short containing the end temperature in centi-Kelvin
*/
char buf[4] = { 4, CBCOMMAND_COOL, HIBYTE(9000), LOBYTE(9000) }; /* Cool to 90 K */
/*
* The CBCOMMAND_END command packet, size = 4
* The Params[] array consists of a short containing desired ramp rate in K/hour
*/
char buf[4] = { 4, CBCOMMAND_END, HIBYTE(360), LOBYTE(360) }; /* End rate = 360 K/hour */
#define HIBYTE(w) ((unsigned char)(((unsigned short)(w) >> 8) & 0xFF))
#define LOBYTE(w) ((unsigned char)(w))
| Command | Parameter | Units | Min | Max |
|---|---|---|---|---|
| CBCOMMAND_RAMP | RampRate | K/hour | 1 | 360 |
| CBCOMMAND_RAMP | TargetTemp | cK | 8000 | 40000 (50000 for Plus) |
| CBCOMMAND_PLAT | Duration | minutes | 1 | 1440 (=24 hours) |
| CBCOMMAND_COOL | TargetTemp | cK | 8000 | The current temperature - Cools must be downwards |
| CBCOMMAND_END | RampRate | K/hour | 1 | 360 |
| CBCOMMAND_TURBO | TurboOn | none | 0 | 1 (any value other than 1 is treated as 0) |
If the command is unrecognised (Id invalid or Size inappropriate), illegal (parameter out of range) or inappropriate (eg the machine has shutdown), then it is simply ignored.