File Exchange

image thumbnail

sie2mat

version 2.1.0.0 (217 KB) by Joachim Stallmann
The program sie2mat reads binary SIE files and loads the data into the MATLAB workspace.

1 Download

Updated 05 Jan 2016

View License

Latest version v2.1.0
The program sie2mat reads binary SIE files and loads the data directly into the MATLAB workspace.
Supported data formats:
- SEQUENTIAL
- MESSAGE
Unsupported data formats:
- BURST
- HISTOGRAM
- RAINFLOW
mat2sie.cpp and all required dll's can be downloaded from:
http://sourceforge.net/projects/sie2mat/

Please read the readme files for installation instructions if you have problems.

How do I compile sie2mat:
- Run "setup -mex" to ensure a supported and compatible compiler has been setup.
( A list of suported compilers: http://www.mathworks.com/support/compilers/R2015b/index.html)
- Download the latest sie2mat.cpp code (located in the source_code folder).
- Download the latest libsie and libapr libraries( located in the lib folder - all files in the x86/x64 subfolder)
- Make sure that the source code and the necessary libaries are in the same folder.
- Run compile_sie2mat (located in the Matlab_code folder)

Error compiling sie2mat.cpp
- This could be due to various problems. Please read the error message carefully.
- A error massage that seems to be happening quite often is :
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\intrin.h(26) : fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory
-This is a Microsoft Bug see http://www.mathworks.com/matlabcentral/answers/90383-fix-problem-when-mex-cpp-file
-Download the ammintrin.h header file (located in the ammintrin folder) and place it into:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\"

Error running sie2mat.mex
- This could be due to various problems. Please read the error message carefully.
- A error massage that seems to be happening quite often is :
Invalid MEX-file sie2mat:
The specified module could not be found.
- This module cannot find its dependent libraries. See http://www.mathworks.com/matlabcentral/answers/92362-how-do-i-determine-which-libraries-my-mex-file-or-stand-alone-application-requires
- A quikfix might be to download and install the Microsoft Visual C++ 2012 Redistributable Package. The libsie and libapr-1 libraries were built with Visual Studio 2012.

If you have any other/new problems feel free to contact me.

Program is based on the libsie SIE reader library found at:
http://www.hbm.com/en/menu/support/software-firmware-downloads/data-acquisition-systems/somat/

Comments and Ratings (23)

I have a problem regarding the maximum variable size.

"Error using sie2mat
Maximum variable size allowed by the function is exceeded.

Error in compile_sie2mat (line 21)
data2=sie2mat(file2read);"

I have sie. data which are up to 1 GB. Is it possible to adapt the script in some way, so it can format such big data size?

Jeff

Thank you for this tool, works great!

Bryan Essig

I finally go the mex function installed. The example runs fine. When I try to run a sie2mat on my .sie files I crash or run out of memory. They are short time duration files. The size on one is 9,366 KB and the other 27,789 KB. What is the maximum size I can convert?

The program can run after I install Visual Studio 2012.
But It can only read 'example.sie' file.
When I read other '.sie' file (size is 1.5GB), out of memory.
If only the programme could choose a channel or some channels , it's good.

Excellent works! But I can't run "mex sie2mat.cpp libsie.lib libapr-1.lib" because I haven't the files :
"mex.h" <stdlib.h> <string.h> <windows.h> <sstream> <vector>, can you share these files? Thank you very much!

paul harder

I appreciate all the effort that went into this, but it blows my mind that it's so complicated to bring a binary somat data file into matlab. After an hour of messing around (visiting this site, downloading weird files from sourceforge, installing matlab add-ons, etc), I'm still getting "Error using mex" in the output window. I'll just go back to using txt files from the somat software and saving the data to a binary mat file from there.

Eli DeGroff

I get the same error as stefano... Invalid MEX-file, the specified module could not be found.
Is there a solution?

Hello again, this time i hope to find some help.
I get this problem, all the libraries have been updated to the latest version, but i'm still in stuck.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Invalid MEX-file 'C:\Users\stefa\Desktop\MATLAB\Converter\sie2mat_V2_1_everything\sie_complete\x64\sie2mat.mexw64':
Impossibile trovare il modulo specificato. (The specified module could not be found)

Error in compile_sie2mat (line 21)
data=sie2mat(file2read);

TKS

Hi to everyone, it doensen't seems to me to have red any error like this:
Building with 'Microsoft Windows SDK 7.1 (C++)'.
Error using mex
sie2mat.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\intrin.h(26) : fatal error C1083: Cannot open include file:
'ammintrin.h': No such file or directory
Error in compile_sie2mat (line 16)
mex sie2mat.cpp libsie.lib libapr-1.lib
Any suggestion?
Tks

John Just

nevermind it works when i used your pre-compiled ones. When I compiled it no dice.

John Just

I can compile it without error but Matlab encounters a fatal error and crashes everytime i run it on the example file. I've got Matlab 2016b and using on windows 10 64bit. Any ideas?

John Just

I can compile it without error but Matlab encounters a fatal error and crashes everytime i run it on the example file. Any ideas?

Please visit:
http://sourceforge.net/projects/sie2mat/

to download the required files.

Chad

Am I mistaken or are there no .exe files included in the download? I've looked here and the sourceforge.net files and can't find the sie2mat.exe file.

Hi Aaron, thanks for the comment.

I had some problems to compile the 32bit version. The 32 bit computers still run Matlab 2007, which I suspect might be the problem. Will try to compile it with the MCR of Matlab R2013b( just guessing here). I will look into it this weekend.

I will upload the source code this weekend. Maybe there is a skilled coder out there that can take a look at it.

Happy that the 64bit version works, had no time to test it yet.

Aaron

The standalone version is working great! I am having some trouble working with the old 32 bit version for a friend. It keeps opening a new instance of matlab despite opening matlab using the "-automation -desktop" setting. Any thoughts? Or any way to get a 32 bit version of the standalone?

Hi Jari,
Yes no problem. Please send me an email and I will send the code.

I updated the code, maybe it works better now. See version 1.2.0

Aaron

Is it possible to see the source code for the sie2mat exe file? I'm a novice at this stuff too but I think it would be a good learning experience.

Hello Jari

Chances are that you are correct. I am still a novice programmer but it makes sense to look into it. I will see what I can figure out and let you know. Thanks

Jari

Hello Joachim,

I tried to run sie2mat for smaller file (size about 1.1 MB) and it worked. I can not open file which size is 70 MB. I found that the 1.1 MB file took in Matlab about 4.5 MB. I think that data in the .sie file is in single (32 bit) or even half (16 bit) precision. In Matlab the signals were in the double precision. Is it possible to make sie2mat program which gives signals in single precision to Matlab? This would be handy for bigger files.

I have 32 bit- Windows 7 so I think that the problem in opening the bigger file is the memory.

Thanks

Hi Jari

I have not tied to run the program on 2010b. But I don't think it should be a problem. As to the size of the file, this is dependent on the memory of your computer. If you don't mind, send me an email with the SIE file and I can look into it.

I am busy with an update so that the program saves the SIE file as a MAT file. Then the Matlab version should not be a problem.

Jari

Hello. I have release 2010b and I can run the demo run_sie2mat_sample.m. But when I try to open my own .SIE file it will give Visual C++... debug error.
Is version 2012b needed or are there size limits for opened .SIE file?

Aaron

Awesome, awesome, awesome! I've been looking for something like this forever. Thanks for sharing, took a little tweaking but it's running like a champ.

Updates

2.1.0.0

Latest version v2.1.0
Runs faster and more stable. v2.1.0 uses the latest libsie and libapr libraries.

1.5.0.0

Version 1.3.0 is backward compatible with sie2mat_sa.exe . To use the previous versions modify the sie2mat_loc parameter in the sie2mat.m file accordingly.

1.4.0.0

Updated the MATLAB code.

1.3.0.0

Version 1.3 combines the two executables:
sie2mat_ws.exe
sie2mat_sa.exe
into a single executable sie2mat.exe

1.2.0.0

Source code available at http://sourceforge.net/projects/sie2mat/

1.1.0.0

Updates v1.2.0:
sie2mat_ws.exe - reduced precision to single.
sie2mat_sa.exe - New standalone version.

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux