TCP/IP processing

Post Reply
MathewS
Posts: 5
Joined: Fri Oct 05, 2007 1:51 pm
Location: UK

TCP/IP processing

Post by MathewS »

Hi I am trying to write a small prog to read data from a socket transmitted using your actiview server. I understand in what order the channels are transmitted and that the samples are 3 bytes long and little endian. So:

For 8388607
byte_buffer[0]=-1;//Last element
byte_buffer[1]=-1;
byte_buffer[2]=127;//first element

For -8388608
byte_buffer[0]=0; //Last element
byte_buffer[1]=0;
byte_buffer[2]=-128;//first element

The above is encoded in the byte format so -128=10000000
and 127=11111111

Now how do I translate say 8388607 to a micro volt range or a trigger value or as a value redorded directly to the bdf files?

Thanks

Mathew

MathewS
Posts: 5
Joined: Fri Oct 05, 2007 1:51 pm
Location: UK

Post by MathewS »

Ok after searching the whole forum and analysing the header file I think it is as follows

The value translated is say 8388607

For electrodes
Cal=0.0312
Offset=-0.4844

Foir Status and event signals
Cal=1
Offset=0

On electrodes
So (8388607*Cal)+Offset=261724.054 microvolts ?

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Post by Coen »

The LSB of the 24-bit word is scaled at 1/32th uV. So, a value of 8388607 (2^23-1) is equal to 262144 uV.

Note: on systems for ECG applications, the LSB is scaled at 1/8th uV (check the BDF header)

Best regards, Coen (BioSemi)

Post Reply