From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with "Write waveforms to file"

Solved!
Go to solution

Hi folks,

 

I'm having trouble with "Write waveforms to file." Attached is a very simple vi that gives the error message: "Error 4 occured at open file ... LabVIEW: end of file encountered ... NI-488: invalid argument or arguments to function call." 

 

It gives this message whether I put in a new file name or one that already exists. 

 

The last part is rather puzzling since I'm not doing anything with GPIB.

 

I found this KnowledgeBase article, but this is not the same case, since it happens the first time I address the file:

http://digital.ni.com/public.nsf/websearch/0576444C8FD4DC0F86256E83007FA540?OpenDocument

 

This is Windows 7, LV 2013 SP1.

 

Any advice would be much appreciated!

Download All
0 Kudos
Message 1 of 6
(3,374 Views)

That error is a little misleading, but basically it means you are not giving the waveform data that it is expecting.

0 Kudos
Message 2 of 6
(3,369 Views)

Thanks for your reply! 

 

So... what does it expect? I can grab a waveform constant from the palette, put some values in, wire it up, and get the error. Or I can get a waveform from an instrument, same thing.

0 Kudos
Message 3 of 6
(3,362 Views)
Solution
Accepted by topic author AllisonAFM

In the examples that ship with LabVIEW there is one that should be useful  Waveform - Write Waveforms to FIle.vi

Message 4 of 6
(3,356 Views)

Ah, found it, thanks. Starting with a functional one and a non-functional one, and working toward the middle, I traced the problem to the Open/Create/Replace. I guess with that in the code, the write function is not actually the first time I address the file-? Anyway, I've got a working bit of code now.

0 Kudos
Message 5 of 6
(3,327 Views)

Glad you got it working!

 

 

0 Kudos
Message 6 of 6
(3,304 Views)