LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write and Read binary files?

Hello all,

I am currently trying to load a waveform to an agilent 33025a function generator that consists of 16k points.  Each time I try to load the waveform the visa session times out.  After some reading I discovered that if I use a binary file the machine will trasnfer the data 5 times as fast. I then tried converting my SGL 1D array to a binary but have had no success.  I have attached altered versions of the "Example" vis about writing and reading binary files.  I can get the original vi's to work fine but when I enter my data it gets all screwy.  I believe the data is saving ok but when I try to load the file, it does not produce my original waveform. Any suggestions?  On a side note how does one increase the amount of time that a VISA session stays open?

Thanks for all the help,

Azazel

Message Edited by Azazel on 10-27-2005 09:13 AM

Message Edited by Azazel on 10-27-2005 09:15 AM

Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
Download All
0 Kudos
Message 1 of 3
(2,940 Views)

Azazel,

Looks like you are just being an over achiever.  There are VI's specifically written for reading and writing binaries.  I would guess that the VISA timeout is caused by the way you are calculating the size of the file.  Since it is too big the VISA session will time out.  See attached example for the easy way to do this.

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
Message 2 of 3
(2,924 Views)
I was making the problem way to hard...lol. 

Thanks,

Beau

Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
0 Kudos
Message 3 of 3
(2,921 Views)