Oxford Cryosystems 700 series serial line communications    home | protocols | wiring diagram

Cryostream | Cobra | PheniX | HeliX   status packets | command packets

Phenix 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:

PHCOMMAND_RESTART=10,  /* Restart a PheniX which has shutdown */
PHCOMMAND_RAMP=11,     /* Ramp command identifier - parameters follow */
PHCOMMAND_PLAT=12,     /* Plat command identifier - parameter follows */
PHCOMMAND_HOLD=13,     /* Hold command identifier - enter programmed Hold */
PHCOMMAND_COOL=14,     /* Cool command identifier - parameter follows */
PHCOMMAND_END=15,      /* Not used by PheniX  */
PHCOMMAND_WARM=16,     /* Warm command identifier */
PHCOMMAND_PAUSE=17,    /* Pause command identifier - enter temporary Hold */
PHCOMMAND_RESUME=18,   /* Resume command identifier - exit temporary Hold  */
PHCOMMAND_STOP=19,     /* Stop command identifier */
PHCOMMAND_SPEED=20,    /* Speed 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 PheniX would be created as follows:

char buf[2] = { 2, PHCOMMAND_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.

Example commands

/* 
 * The PHCOMMAND_SPEED command packet, size = 3
 * The Params[] array consists of a single char taking the value either 0 
 * (switch Speed Boost off) or 1 (switch Speed Boost on) 
 */
char buf[3] = { 3, PHCOMMAND_SPEED, 1 };        /* Switches Speed Boost 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 PHCOMMAND_PLAT command packet, size = 4
 * The Params[] array consists of a short containing the duration of the  
 * Plat in minutues 
 */
char buf[4] = { 4, PHCOMMAND_PLAT, HIBYTE(720), LOBYTE(720) }; /* 720 minute plateau */

/* 
 * The PHCOMMAND_COOL command packet, size = 4
 * The Params[] array consists of a short containing the end temperature in centi-Kelvin 
 */
char buf[4] = { 4, PHCOMMAND_COOL, HIBYTE(9000), LOBYTE(9000) }; /* Cool to 90 K */

/* 
 * The PHCOMMAND_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, PHCOMMAND_RAMP, HIBYTE(120), LOBYTE(120), /* Rate = 120 K/hour */
                   HIBYTE(25050), LOBYTE(25050), /* Final temp = 250.5 K */ }; 

HIBYTE 

#define HIBYTE(w) ((unsigned char)(((unsigned short)(w) >> 8) & 0xFF))

LOBYTE

#define LOBYTE(w) ((unsigned char)(w))

Parameter units and ranges

Command Parameter Units Min Max
PHCOMMAND_RAMP RampRate K/hour 1 360
PHCOMMAND_RAMP TargetTemp cK 1100 31500
PHCOMMAND_PLAT Duration minutes 1 1440 (=24 hours)
PHCOMMAND_COOL TargetTemp cK 1100 The current temperature - Cools must be downwards
PHCOMMAND_SPEED 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.