![Thermo Scientific Heracell Vios 160i CR Operating Instructions Manual Download Page 194](http://html1.mh-extra.com/html/thermo-scientific/heracell-vios-160i-cr/heracell-vios-160i-cr_operating-instructions-manual_1104558194.webp)
12
Data Communication
Examples of Data Logger Codes
12-16
Heracell Vios 160i / 250i CR
Thermo Scientific
Functions for Data Logger Queries
The following code example for reading the data logger uses six functions:
• ahex
// converts the received ASCII character into a hexadecimal number,
• send_telegramm
// sends a query to the data logger,
• get_telegramm
// receives a response data the data logger,
• time_2_str
// uses a hexadecimal value to create ASCII characters in time format,
• num_2_string
// uses hexadecimal values to create ASCII characters to be entered into a file,
• read_datalogger
// edits the received data and writes them into a file.
Example of a Code for a a Data Logger Query
char ahex (char a)
char ahex(char a)
{
char i;
char hexa[16]=“0123456789abcdef“;
for (i = 0; i < 16; i++)
if (a == hexa[i])
return (i);
return 0;
}
send_telegramm
void send_telegramm(char *p)
{
char string [15];
unsigned char bcc = 0xFF;
char i;
// copy telegram together
strncpy (&string[0], „?:xxxx:00::00\r“, 14);
// insert 4-digit address
strncpy (&string[2], p, 4);
// calculate checksum: inverted XOR of all bytes
// without checksum and <CR>
for (i = 0; i < 11; i ++)
bcc = (bcc^string[i]);
// copy checksum
string[11] = hexa(bcc/16);
string[12] = hexa(bcc%16);
Summary of Contents for Heracell Vios 160i CR
Page 8: ...Table of Contents 6 Heracell Vios 160i 250i CR Thermo Scientific...
Page 12: ...Figures 4 Heracell Vios 160i 250i CR Thermo Scientific...
Page 86: ...5 Operation Water Filling 5 6 Heracell Vios 160i 250i CR Thermo Scientific...
Page 138: ...6 Handling and Control Error Messages 6 52 Heracell Vios 160i 250i CR Thermo Scientific...
Page 178: ...11 Specifications Heracell Vios 250i CR 11 10 Heracell Vios 160i 250i CR Thermo Scientific...
Page 208: ...13 Device Log 13 2 Heracell Vios 160i 250i CR Thermo Scientific...
Page 212: ...14 Contact Information Thermo Scientific 14 4 Heracell Vios 160i 250i CR Thermo Scientific...