Colleaugues,

I hope somebody can solve this mistery of mine:

I experienced an unusuall behaviour by the "Read File.vi" in context it had
already worked OK before. In short, I have 2 small apps:

* DAQ - implements continuous acquisition in buffered blocks of
  500 scans (multiple channels in general) where the last block
  can be shorter
* BinRead - meant to reproduce the the continuosly acquired
  channel(s) with a single "Read File.vi" inside a loop

Problem description on concrete example:
If I set the DAQ as follows:

# of Channels = 1
Sampling Rate [S/s] = 900
DAQ Duration [s] = 3

It performs the continuos acquisition and streams to BIN file in 6 blocks
because obviously the DAQ will last 2700 (3x900) scans saved in 6 blocks
(5x500 & 1x200). I decided to put header for every block produced and saved
for better reconstruction in the presentation part. Following the "offset"
output of the "Write File.VI" it is obviously working perfectly:

after iteration #1 =>  2008 (500 doubles x 4 bytes + 8 header-bytes)
after iteration #2 =>  4016
after iteration #3 =>  6024
after iteration #4 =>  8032
after iteration #5 => 10040
after iteration #6 => 10848 (200 doubles x 4 bytes + 8 header-bytes)

The problem is in the BinRead app when it tries to retrieve BIN data from
the file. Logically I would expect it to read out all the data in 6
iterations with no need to wire "pos mode", "pos offset" and "offset",
since each block is saved with a corresponding header and the "data type"
is correctly wired to an 2D empty array. However, after the 1st iteration
its "offset" says 4008 instead of the expected 2008! So everything is wrong
afterwards. I have wired lot of indicators to control every step that is
being made, even tried to force the "pos offset" to read in steps of 2008,
but the read data is 4008 bytes in length and I cannot comprehend why?!

Can some of you see what is wrong in this simple (by-the-book) wiregram
that I am overlooking and explain how does saved block of 2008 bytes
increase when read to size of 4008? The header-ing with "Write File.vi"
works OK in other apps I have tested ...

Thanking you in advance I look forward to hearing from you,


Roman Golubovski, MSc Dipl-EEng
[EMAIL PROTECTED]


Reply via email to