12-25-2008 04:09 AM
i have resived this binary file and i cant read it properly, i need your asistace in reding the file and telling me how.
this is what it contains:
The example file contains 2048 samples. We put the following test signals inside:
Analog input channel 1: One cycle sine wave over the full dynamic range of 12 bit.
Analog input channel 2: Two cycles of a sine wave over the full dynamic range of 12 bit.
Analog input channel 3: Signal starting at 0x000 and is increasing with every sample by one.
Analog input channel 4: Signal starting at 0xFFF and is decreasing with every sample by one.
Digital input channel 1: Digital signal which is toggling with the sample rate. Starting with 0.
Digital input channel 2: Digital signal which is toggling with the sample rate. Starting with 1.
Measurement data file format
The filename is <8-digit-serialnumber>-<6-digit-treatmentnumber>.REC (e.g.
"12345678-123456.REC"). All measured data is stored binary in this file. The following
table shows the data structure in the measurement data file.
Position Data Format
Byte 1 Analog channel 1 LSB value ,value Sample 1 ,Bit 1-8: Corresponding to Bit 1-8 of 12-bit A/D
Byte 2 Analog channel 1 MSB value, Sample 1, Bit 1-4: Corresponding to Bit 9-12 of 12-bit A/D value, Bit 5-8: not used
Byte 3 Analog channel 2 LSB value ,Sample 1, Bit 1-8: Corresponding to Bit 1-8 of 12-bit A/D value
Byte 4 Analog channel 2 MSB value, Sample 1, Bit 1-4: Corresponding to Bit 9-12 of 12-bit A/D value, Bit 5-8: not used
Byte 5 Analog channel 3 LSB value, Sample 1, Bit 1-8: Corresponding to Bit 1-8 of 12-bit A/D value
Byte 6 Analog channel 3 MSB value, Sample 1, Bit 1-4: Corresponding to Bit 9-12 of 12-bit A/D value, Bit 5-8: not used
Byte 7 Analog channel 4 LSB value, Sample 1, Bit 1-8: Corresponding to Bit 1-8 of 12-bit A/D value
Byte 8 Analog channel 4 MSB value, Sample 1,Bit 1-4: Corresponding to Bit 9-12 of 12-bit A/D value, Bit 5-8: not used
Byte 9 Digital input values, Sample 1, Bit 1: Digital input 1 (high active), Bit 2: Digital input 2 (high active), Bit 3-8: not used
Byte 10 Analog channel 1 LSB value, Sample 2,Bit 1-8: Corresponding to Bit 1-8 of 12-bit A/D value
Byte 11 Analog channel 1 MSB value, Sample 2, Bit 1-4: Corresponding to Bit 9-12 of 12-bit A/D value, Bit 5-8: not used
Byte 12.....
i have try a lot of things by now and gut a mees, and the "read binary file' dont work so much here.
thank you.
Dana
12-25-2008 08:44 AM
hello ,
you received or ou rezised ??? 
i tilt for first, don't you know if it has been recorded with another labview application , in this case you just have to
request the format of cluster used for this record and "game is played"
other wise it may take multiple tries to approch used pattern,
i'll take an eye on but try to know from where this files provided , LV or other ?
@+
Tinnitus
12-25-2008 09:09 AM
12-25-2008 10:17 AM - edited 12-25-2008 10:18 AM
The example file contains 2048 samples. We put the following test signals inside:Analog input channel 1: One cycle sine wave over the full dynamic range of 12 bit.
Analog input channel 2: Two cycles of a sine wave over the full dynamic range of 12 bit.
Analog input channel 3: Signal starting at 0x000 and is increasing with every sample by one.
Analog input channel 4: Signal starting at 0xFFF and is decreasing with every sample by one.
Digital input channel 1: Digital signal which is toggling with the sample rate. Starting with 0.
Digital input channel 2: Digital signal which is toggling with the sample rate. Starting with 1.
also you said: one cycle ....but at witch sampling rate or how many data does it results for analog in chan 1 ?
same question for 2,,3,4 i don't understand Digital 1,2 definition ...
@+
Tinnitus
12-25-2008 03:10 PM
hello you can try thing like that
i can't see sinus waves ?
@+
Tinnitus
12-26-2008 08:12 AM
12-30-2008 11:43 AM
hey
Can you tell me how you know which one of the bytes did you put with which one?
And way I can’t generate from that the digital channel?
01-05-2009 08:43 AM - edited 01-05-2009 08:44 AM
The byte order is determined by the information posted above about how the signal is saved. The 16 bit data in the VI is unsigned, but it may be signed in the original. The posted format is unclear on this.
Here is a direct, but inefficient, method to convert boolean arrays to digital waveform datatypes, which can then be plotted. This is done inefficiently so you can see the steps involved. You could probably do this more efficiently as you read the data in.
01-05-2009 01:49 PM
tinnitus: your solution is the most accurate from all but I have problem with the digital signal it should be 2 channels of digital one that starts from 0 and follow 1 and the other that starts from 1 and flow 0 - what I get is only one channel that starts from 2 and flow 1.
What am I doing wrong? Can you help to get this 2 channels of digital signales?
01-05-2009 03:42 PM
DFGray:
Thanks a lot I for this I approach but some of it don't give me the right data.