LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EDF plugin write error 2570

Solved!
Go to solution

Hi guys,

 

I'm having trouble with the EDF (European Data Format) plugin: reading EDF files works fine, but writing a valid EDF file results in an error.
I have attached two VIs to explain the problem. The first VI, 'Waveform-array-to-EDF-file.vi', simulates three EEG channels and writes the data to an EDF file. The file is almost a valid EDF file, but it lacks a proper header because properties like 'EDF_PatientInfo' and 'EDF_Version' are not there.

 

EDF-error.jpg


You can 'repair' the EDF with the header editor from the free program 'EDFbrowser' (http://www.teuniz.net/edfbrowser/). Then you can read the EDF file just fine in EDFbrowser and other programs.

 

EDF-file-in-EDF-browser.jpg

 

To create the header in LabVIEW I created 'Waveform-array-to-EDF-file-with-header.vi'. This VI should write the proper strings to the channel group, but it results in error 2570.

 

EDF-datastorage-error.jpg

 

Am I doing something wrong or is there a bug in the EDF plugin? You can download the plugin from http://www.ni.com/example/27642/en/ and try it yourself.
Thanks in advance for your help.

 

Paul

0 Kudos
Message 1 of 3
(3,463 Views)
Solution
Accepted by topic author Perreijn

Hi Paul,
“EDF_StartDateTime” is Time type but not String type. The VI throws error out when wiring invalid type.
Making the following change should work.

StartDateTime.png

Message 2 of 3
(3,421 Views)

Hi Fuhuan,

 

That's it! I assumed 'EDF_StartDateTime' was a string datatype because you can read it as string when you open an .edf file in LabVIEW.

Thank you very much for you help.

 

Paul

0 Kudos
Message 3 of 3
(3,394 Views)