| 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:
CSCOMMAND_RESTART=10, /* Restart a Cryostream which has shutdown */
CSCOMMAND_RAMP=11, /* Ramp command identifier - parameters follow */
CSCOMMAND_PLAT=12, /* Plat command identifier - parameter follows */
CSCOMMAND_HOLD=13, /* Hold command identifier - enter programmed Hold */
CSCOMMAND_COOL=14, /* Cool command identifier - parameter follows */
CSCOMMAND_END=15, /* End command identifier - parameter follows */
CSCOMMAND_PURGE=16, /* Purge command identifier */
CSCOMMAND_PAUSE=17, /* Pause command identifier - enter temporary Hold */
CSCOMMAND_RESUME=18, /* Resume command identifier - exit temporary Hold */
CSCOMMAND_STOP=19, /* Stop command identifier */
CSCOMMAND_TURBO=20, /* Turbo command identifier - parameter follows */
CSCOMMAND_SETSTATUSFORMAT=40, /* Set status packet format. Parameter follows */
CSCOMMAND_CRYOSHUTTER_START_AUTO=80, /* Shut the CryoShutter for the specified length of time. - parameter follows */
CSCOMMAND_CRYOSHUTTER_START_MAN=81, /* Shut the CryoShutter until a CSCOMMAND_CRYOSHUTTER_STOP is received */
CSCOMMAND_CRYOSHUTTER_STOP=82, /* Open the CryoShutter */
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 Cryostream would be created as follows:
char buf[2] = { 2, CSCOMMAND_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 CSCOMMAND_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, CSCOMMAND_TURBO, 1 }; /* Switches Turbo on */
The Ramp, Plat, Cool and End 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 CSCOMMAND_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 CSCOMMAND_PLAT command packet, size = 4
* The Params[] array consists of a short containing the duration of the
* Plat in minutes
*/
char buf[4] = { 4, CSCOMMAND_PLAT, HIBYTE(720), LOBYTE(720) }; /* 720 minute plateau */
/*
* The CSCOMMAND_COOL command packet, size = 4
* The Params[] array consists of a short containing the end temperature in centi-Kelvin
*/
char buf[4] = { 4, CSCOMMAND_COOL, HIBYTE(9000), LOBYTE(9000) }; /* Cool to 90 K */
/*
* The CSCOMMAND_END command packet, size = 4
* The Params[] array consists of a short containing desired ramp rate in K/hour
*/
char buf[4] = { 4, CSCOMMAND_END, HIBYTE(360), LOBYTE(360) }; /* End rate = 360 K/hour */
Cryoshutter commands work as follows
/*
* The CSCOMMAND_CRYOSHUTTER_START_AUTO command packet, size = 3
* The Params[] array consists of a short containing the duration of the
* anneal time in tenths of a second
*/
char buf[3] = { 3, CSCOMMAND_CRYOSHUTTER_START_AUTO , 100 }; /* Shut for ten seconds */
/*
* The CSCOMMAND_CRYOSHUTTER_START_MAN command packet, size = 2
*/
char buf[2] = { 2, CSCOMMAND_CRYOSHUTTER_START_MAN }; /* Shut until CSCOMMAND_CRYOSHUTTER_STOP */
/*
* The CSCOMMAND_CRYOSHUTTER_STOP command packet, size = 2
*/
char buf[2] = { 2, CSCOMMAND_CRYOSHUTTER_STOP}; /* Open */
The CSCOMMAND_SETSTATUSFORMAT switches between normal and extended status packets. Pass 0 for the default status packets, or 1 to generate extended status packets
/*
* The CSCOMMAND_SETSTATUSFORMAT command packet, size = 3
*/
char buf[3] = { 3, CSCOMMAND_SETSTATUSFORMAT , 1 /* Switch to extended status packets */ };
#define HIBYTE(w) ((unsigned char)(((unsigned short)(w) >> 8) & 0xFF))
#define LOBYTE(w) ((unsigned char)(w))
| Command | Parameter | Units | Min | Max |
|---|---|---|---|---|
| CSCOMMAND_RAMP | RampRate | K/hour | 1 | 360 |
| CSCOMMAND_RAMP | TargetTemp | cK | 8000 | 40000 for standard Cryostream, 50000 for Plus and Compact |
| CSCOMMAND_PLAT | Duration | minutes | 1 | 1440 (=24 hours) |
| CSCOMMAND_COOL | TargetTemp | cK | 8000 | The current temperature - Cools must be downwards |
| CSCOMMAND_END | RampRate | K/hour | 1 | 360 |
| CSCOMMAND_TURBO | TurboOn | none | 0 | 1 (any value other than 1 is treated as 0) |
| CSCOMMAND_SETSTATUSFORMAT | NewFormat | none | 0 | 1 (any value other than 1 is treated as 0) |
| CSCOMMAND_CRYOSHUTTER_START_AUTO | AnnealTime | ds | 0 | 255 |
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.