C-Link Protocol Commands
Keys/Display
Thermo Fisher Scientific
Partisol 2000
i
and Partisol 2000
i
-D Instruction Manual
B-19
These commands simulate pressing the front panel pushbuttons. The
numbers represent the front panel soft keys, from left to right.
Send:
push
enter
Receive:
push enter ok
isc
iscreen
These commands retrieve the framebuffer data used for the display on the
i
Series instrument. It is 19200 bytes in size, 2-bits per pixel, 4 pixels per
byte arranged as 320 by 240 characters. The data is sent in RLE encoded
form to save time in transmission. It is sent as a type '5' binary C-Link
response with no checksum.
The RLE encoding consists of a 0 followed by an 8-bit count of
consecutive 0xFF bytes. The following 'c' code will expand the incoming
data.
void unpackDisplay ( void far* tdib, unsigned char far* rlescreen )
{
int i,j,k;
unsigned char far *sc4bpp, *sc2bpp, *screen, *ptr;
ptr = screen = (unsigned char far *)malloc(19200);
//RLE decode the screen
for (i=0; i<19200 && (ptr - screen) < 19200; i++)
{
*(ptr++) = *(rle i);
if (*(rle i) == 0)
{
unsigned char rlecount = *(unsigned char *)(rle ++i);
while (rlecount)
{
*(ptr++) = 0;
rlecount--;
}
}
else if (*(rle i) == 0xff)
{
unsigned char rlecount = *(unsigned char *)(rle ++i);
while (rlecount)
{
*(ptr++) = 0xff;
rlecount--;
}
}
}
}
To convert this data into a BMP for use with Windows, it needs to be
saved as a 4-bit-per-pixel gray-scale image. Also note that BMP files are
upside down relative to this data, i.e. the top display line is the last line in
the BMP.