LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem retriving 1D array from binary file

HI There..

I am Saving File in Binary format after aquiring data from my 8186 PXI sytem with 5122 Card..

I am doing Just a simple thing.. After Fetching data I immediatly save it in to Binary file...
I am Saving two channel simultaneously (2D DBL).... I Used "Read binary file" example to read data.. It works fine.. If I select only one channel.. then also It gives perfect data and size of file is also correct..

But when I save only one channel data (1D DBL format)... I can't retrive data using same example.. I don't understand why ?

Can some one help me?
0 Kudos
Message 1 of 7
(3,373 Views)
Looking at the examples for read and write binary file in the example finder, it is not clear what your problem is and what you are doing. The example reads and writes 1D DBL. What example are you using?
 
How did you modify it for 2D DBL data? I t would be much easier of you could attach your code. Thanks! 🙂
 
(Just reading between the lines, it might be easiest to simply read and write the 1D data also as a 2D array with only one channel (Nx1 or 1xN array size).
0 Kudos
Message 2 of 7
(3,366 Views)

Internet PC is Isolated from work pc.. VI will be difficult... But  I will try..


Now in Case of Reading between the line... U R right

I can read 2D DBL data easily using that read example but not 1D dbl data... If I use 2D dbl format for one channel.. then also it works fine.. but it gives me memory error when I aquire more data... I think it consumes more memory

I wonder if 2D array is easily readable by Binary read example.... then what is the problem in reading 1D array ..... I think no modification is required... but in 1D array I can not get the data... it gives garbage data....

0 Kudos
Message 3 of 7
(3,330 Views)

A 1D array with N elements does not consume more memory than a 1xN 2D array. I suspect that there are other things wrong, you simply need to carefully inspect the code. Do you have more details about the memory error?

You simply need to read it in an analogous way you wrote it earlier (1D or 2D).

0 Kudos
Message 4 of 7
(3,321 Views)
I am attaching the File...

Just try to save file in 2d Array and  read it with binary read file example
then reapeat it for 1d array (niFetch.vi).

u will find the problem

Thnks
0 Kudos
Message 5 of 7
(3,317 Views)

Sorry, I thought you were using standard file I/O functions.

I don't have anything NI scope related installed, so I cannot test. 😞

0 Kudos
Message 6 of 7
(3,313 Views)
Hey people...

Got the solution.. Problem solved when I ignored initial byte

thanks for respond anyway..
0 Kudos
Message 7 of 7
(3,259 Views)