LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

strange problem with unflatten from string

Hi all,

 

Attached are the VIs that make me crazy.

The problem is simple, Creat fake signal creats datas and uses a strict type def control (cluster) then this cluster is flatten to a string and written into a text file.

 

Test read opens one of that file and unflatten the datas with the same stric type def. There is the problem it does not work!

 

If I wire a cst arry into the data terminal of the bundle by name, then there is no problem. By if I wire other array it does not work always... It seems random.....

 

I hope that somebody can help me. Even people reproducing the error are welcome, to know if it comes from my computer.

 

Thanks a lot for the help

0 Kudos
Message 1 of 8
(3,505 Views)
This one seems to work. If I understand what you are trying to do here.
Tim
GHSP
0 Kudos
Message 2 of 8
(3,498 Views)
This one is better.
Tim
GHSP
0 Kudos
Message 3 of 8
(3,492 Views)

Thanks, for the help.

 

The thing I don't understand is that: I wrote a software to acquire signals from a daq card, and I use the same way to same the data and the same way to recover it. It works perfectly.

 

Now I just want to creat fake signal to validate a piece of software to detect some features. 

 

The way I use unflatten from string always worked (in many projects) and now it does not...

 

I must confess that your method works but I want to use the type def in order to keep the possibility to make my program evolve.

 

If you have an other idea....

 

Again thank you.

0 Kudos
Message 4 of 8
(3,486 Views)
I changed the write to binary sting file with write to binary file and it seemed to fix the problem. I had to change it in your gen fake data file too.
Tim
GHSP
0 Kudos
Message 5 of 8
(3,466 Views)
The reason why your original code wasn't working is due to the fact that you were using the Write to Text File with "Convert EOL" turned on. Thus, it was changing the string you were actually trying to write to file.
0 Kudos
Message 6 of 8
(3,452 Views)
Hi, the EOL convert is now disable, it does not solve the problem
0 Kudos
Message 7 of 8
(3,403 Views)
When I opened up your original code and unchecked the "Convert EOL" from all writes and reads the VIs worked without error.
0 Kudos
Message 8 of 8
(3,390 Views)