LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write 2d numeric array or string array into bin file

Can anyone pls help me to resolve this problem

0 Kudos
Message 1 of 4
(3,077 Views)

@hameedkdnl wrote:

Can anyone pls help me to resolve this problem


You should at least say what you think the problem is. You code make very little sense, so there are many problems.

 

"bin" is not a well known extension that fully defines a file structure. It can be anything. You have a 2D array of DBL that you format as a text formatted spreadsheet string of integers (%d, dropping all decimal digits), then you are trying to read it as a plain string.

 

We don't know how you want the file contents to look like. Please explain.

 

Why do you have three copies of the same file path. Use one and branch the wire. Much easier to maintain!

Why do you use a sequence structure? All you need is an error wire to define execution order.

0 Kudos
Message 2 of 4
(3,038 Views)

THANKS FOR YOUR INFO.

I have found the solutuion..i hav attached the vi.

0 Kudos
Message 3 of 4
(3,029 Views)
  • You are still using the wrong format.
  • Whatever you are doing has nothing to do with a binary file.
  • You are still using way too much duplicate code.
  • All you probably need is read/write from spreadsheet file, no need to reinvent the wheel.
  • Your code will fail if the numbers contain decimal digits (since your array is DBL, it could! If your array only contains integers, you are using the wrong numeric representation).
  • You string code will fail if the array elements contains tabs, for example.
  • You still don't need a sequence structure.
0 Kudos
Message 4 of 4
(3,014 Views)