Search Comments and Ratings

go

   
Date File Comment by Comment Rating
06 Mar 2015 FilterM A faster FILTER and FILTFILT: Speedup factor 2.5 to 25 Author: Jan Simon

Jan Simon (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hi Jan,

I'll be honest I'm always a bit nervous about your performance specs given updated Matlab versions and my use cases but in my very limited testing (single channel, 1 GB data, filtfiltM only) it seems to do much better. I'm getting a runtime that is 40% of the original and even better, the memory usage is roughly around 40% of the original. Given the large memory requirements of the original this feature is quite helpful.

Thanks,
Jim

5
19 Feb 2015 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hi Jeff,

Can you try defragmenting the file in Labview first? If that doesn't work, send an example to me and I'll look at it.

Jim

Comment only
22 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Francisco,

My apologies on PATCH not working. This is a problem with the underlying Java classes. I'll try to look into alternative Java classes.

Jim

Comment only
21 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Francisco,

Yes, both are. I've exposed the entirety of the HTTP request and response so you can do anything you want with it.

Jim

Comment only
20 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Francisco,

My apologies on the confusing documentation. When providing headers you also need to provide the body so that the order of the inputs is maintained. In this case providing an empty body is fine.

urlread2 (url,'GET','',header)

One day I'd like to rewrite this code base so that this is unnecessary and clearer ...

Best of luck and let me know if you have any other questions.

Jim

Comment only
13 Jul 2014 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Dan,

Usually problems arise due to the site using javascript. To get around this I'll usually use a program called "Fiddler" (In Windows). I'll go to the site in my web browser and then look at Fiddler to see what requests are being made to the server. Look for a request and subsequent response from the site that contains the information that you want. Then look more closely at the request to see how you would make the same request.

Best of luck.

Jim

Comment only
20 Jun 2014 MinMaxElem Min and max element and index - C-Mex faster than MIN/MAX Author: Jan Simon

Jan Simon (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hi Jan,

I'm using 64 bit 2014a with 4 processors (8 cores). Matlab uses multiple cores for min and max as seen in the Performance section of the Windows task manager. Also, with x64 SSE2 doesn't exist.

http://msdn.microsoft.com/en-us/library/vstudio/jj620901(v=vs.110).aspx

AVX provides a small speedup but sadly you really need multiple core code to compete.

Also, some of the unit tests fail now ... perhaps due to the fp:/fast flag.

Jim

Comment only
03 Jun 2014 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Benoît

I have no idea what would be causing the problem you are referencing. Can you send me an example file that has this problem? I'll send a private message with more details.

Jim

Comment only
14 Feb 2014 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@David

I've really wanted to change that interface for a while :/

The issue is that the input should be a structure ARRAY that contains strings.

getStruct.group = '6120';
getStruct.channel = 'Untitled 3';

Feel free to email if you need more help.

Jim

Comment only
21 Jan 2014 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Joe,

National instruments won't release the specs for their daqmx format (I've asked), so I don't know what their binary data means. They recently updated their dll to support reading version 2 files, so you might have luck using that. I've been meaning to look at the dll but it's really low on my priority list at this point.

The link to the dll can be found at this page:
http://digital.ni.com/public.nsf/allkb/A3663DE39D6A2C5A86257204005C11CA

There used to be a specific page for the dll (in which it said it supported only version 1, and then recently version 2) but I can't find it anymore.

Good luck and feel free to email me if you have any more questions.

Jim

Comment only
22 Oct 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Bob,

Sorry about the obtuse error message. In the new version I've been working on I am hoping to provide links to lengthy documentation on what each error message actually means. Each section of the tdms file starts with the characters tdsm (data file) or tdsh (if it is the index file). If those are not present, it indicates that there was either an error in parsing the file, or in writing the file. I think every time I've seen this error, the issue has been that the file is not closed properly (using tdms close in Labview) and the last segment is corrupted.

This problem can be fixed by replacing the error you are seeing with:
flags = [];
info = [];
eof_error = true;
return;

If you have any more problems feel free to contact me via email.

Jim

Comment only
17 Oct 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Kadir,

Please get in touch with me via email and perhaps send a complaint to NI.

Jim

Comment only
16 Oct 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Kadir,

That flag is updated on every segment, and is not constant throughout the file. The format of that type of data is not specified by NI even after I requested it. Alternatives include:
- trying the Excel TDMS reader
- trying their new dll code which might support Raw DaqMX code
- converting the data in Labview from Raw DaqMx into a regular array, and then using my code

Feel free to email me if you have any more questions.

Jim

Comment only
10 Oct 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Harry,

You need to add the tdmsSubfunctions folder to your path as well. I had originally placed those in a separate folder to try and make it more obvious which functions you would call and which ones you wouldn't. Sorry about the confusion.

Jim

Comment only
07 Oct 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hi all,

I recently came across a bug in my code which I expect impacts very few people and for the majority of people it impacts, the following error will most likely be thrown "The remaining data doesn't split evently into chunks." That being said, it is a bug and I'll try and get a fix out soon. From what I can tell it would cause a problem if you occasionally decide not to write a subset of a group of channels, and at other times you write the entire group. Something like:

If case1
channels = 1:3
else
channels = [1 3]
end

In my opinion this error actually goes against the NI documentation so I need to contact them to for clarification.

More details to follow.

Many thanks to Junghwan Kim for sending a sample file to me which allowed me to finally understand this problem.

Jim

Comment only
16 Sep 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Navid,

Given that NI won't release the data format specs for RawDaqMX data, your options are the following:
1) Tell NI you want the specs released
2) see 1)
3) Try this:
http://www.ni.com/white-paper/4906/en

Good luck

Comment only
15 Sep 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Navid,

It seems like you might be using different code:
http://www.mathworks.com/matlabcentral/fileexchange/28771-converttdms-v9

I would recommend you using my code instead. Let me know if you still have problems.

Jim

Comment only
05 Sep 2013 Get Dependent Files This function returns a list of dependent files called by scripts, functions, and classDef files. Author: Mark

Mark (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Thanks for posting this. I look forward to checking it out.

Comment only
04 Aug 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Jane

The short answer is that there is no solution. The format of Raw Daq MX data is proprietary and NI has refused my request for documentation.

The easiest way to get around this if you are still looking to use my code is to read the data file using Labview and to resave the data not using Raw Daq MX.

Comment only
13 Jul 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Jury

Please send me an email regarding this problem.

Comment only
21 Jun 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Cole ??? - What fix? Please contact me via email to discuss specifics.

Thanks,
Jim

Comment only
30 May 2013 EditorMacro - assign a macro to a keyboard key-stroke in the Matlab Editor and Command Window EditorMacro assigns a macro or action to requested key-binding in the Matlab Editor & Command Window Author: Yair Altman

Yair Altman (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Yair
Any plans to update this code to work with Matlab 8?

Comment only
04 Mar 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Amrita,

Please add the tdmsSubfunctions directory to your path as well.

Jim

Comment only
22 Feb 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

René,

TDMS doesn't contain time unless you explicitly save it as a channel. This is most often only done if you are sampling something periodically, such that the timing between events is not constant. Otherwise time is usually implied from a known sampling rate. If you are saving the time as a timestamp, I currently return the timestamp array as a numeric vector in Matlab's time format instead of converting each element to a string (like datestr). This makes it easier to do computations on the time (note that a difference of 1 in this vector represents a difference of 1 day, divide by 86400 to go to seconds). If you still have questions feel free to contact me via email.

Jim

Comment only
08 Jan 2013 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hi Anthony,

Yes this problem is solved. I tend to send emails offline.

This is the email I sent to Kevin. Let me know if you need anything else:

EMAIL TO KEVIN:
Whoever is giving you the data is most likely not closing the files properly. In addition they are writing the files really inefficiently.

In general every time you write to the file a additional index header is created. It is more efficient to write 100k values to a file than to write 1 value, 100k times with 100k headers. In this case the NAV info is being written in one sample, then the TANDEM is being written for 200 samples. It would be more efficient to write these to some queue in memory and then dump them to file occasionally.

That being said you can read a portion of your files if you change the following:
Assuming you are not doing any fancy reading:
- TDMS_readFileHelper_v1 - comment out near line 187 which says if eofPosition ~= ftell(fid)
- In TDMS_processLeadIn - around line 34, comment out the error and add the following:
flags = [];
info = [];
return
- In TDMS_preprocessFile - around line 180, write the following:
if isempty(flags)
nSegs = nSegs - 1;
break
end

Essentially you are just stopping the code when you get to the error and returning only what you have up until that point. What you have in that file is alot already. My guess is you are only missing a bit of data at the end but I haven't bothered to check that ...

A few others have had similar errors but there is a flag in the header which is specifically for ending too early. This is the first time I have seen the header itself be corrupt like this. Perhaps that is due to working with the tdms file and not the index file.

Good luck and let me know if those changes get things working for you or not.

Comment only
09 Oct 2012 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Farhan: Sorry about the delayed response. I'm getting ready for a conference and I'm in a bit of a rush to finish things up. I'm glad you got things working. I'll add a check for your error so that others get a more obvious error message. Thanks!

Kevin: File size shouldn't be an issue. In fact I wrote the code specifically to support very large files in which you can do partial reads and process the data before reading more. See my private message on how we might be able to resolve your issue.

Comment only
28 Jul 2012 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Dedric Xu recently reported observing a problem with the code which turned out to be a bug. If I really think hard, I convince myself that it might be possible to have the bug he was observing occur without any noticeable code failure. I would recommend updating the code to V2.5 when you can (once it posts). The bug came from interpreting NI documentation too literally. They have acknowledged the poorly worded documentation and said they will update it. My apologies to anyone else this effected, although I sincerely expect that it was basically no one.

More details can be found in the version info file.

Although I am currently working on other things, I still have in mind the following updates:

1) Port of the code to an object oriented nature. Part of this involves creating more functions. I stayed away from this due to speed concerns with function call overheads and data passing but my decision obviously makes debugging and updating more difficult, as well as potential "optional" mex substitutions at key bottleneck points.
2) A TDMS viewer GUI
3) Support to optionally read data directly into a double vector, instead of the format it was written in and converting after the fact.

Comment only
13 Jul 2012 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

You need to add the subfunction folder to your path as well. I eventually want to make this a class which makes some methods private and hidden, but in the mean time the sub functions folder just helps delineate between functions you should call and functions you shouldn't.

Comment only
26 Jun 2012 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

John:

Thanks for the helpful comments. I started writing this file in late 2010 since v2 TDMS files weren't supported by the NI driver, as well as because it meant Mac users in the lab were asking me to read files. I thought for sure NI would be rolling out a driver for v2 but after enough waiting I decided to create my own version. I was quite surprised when I was done with writing the code that there was another version already available. I am not sure how I missed this is in my numerous online searches. There are actually multiple versions of the code you mentioned available. The first version I tried I believe was v2 (still available online) and the enumeration of data types was (is?) wrong. That's a HUGE mistake and the code is still posted. I've looked at the other files and I believe with v6 those implementing the code didn't realize that multiple reads of data are possible within a single "header" (for lack of a better word). This means you may write 2000 values to file and only get 100 back, when in reality you need to read the file 19 more times to get all 2000 samples. Version 9 is much better although it doesn't have the same functionality that mine does, particularly the ability to read only a part of a file, or to read interleaved data. At the time of this writing I believe that is the case, obviously this may change.

I think there are a few key points here though:
1) Posting multiple versions of the same file is not a good idea. Versions 2 & 6 shouldn't exist on the file exchange, unless perhaps as links to some website for archival purposes, or with big warning signs saying "This code doesn't work."
2) More importantly, I think this points out the need for better code integration between files on file exchange, both in terms of shared authorship and in terms of the ability to create entry points to data. Imagine if on the Mathworks website we could create a section titled "File processors" and under it there could be a link to TDMS (National Instruments). On that page there could be a short description about the format along with the various solutions that people have offered. In general I think the File Exchange is outdated and not effective. I believe there have been some attempts to write wrappers around the file exchange but that these have been shut down by TMW. Even now I'm moving my new code to github where although it loses its association with the language/program, I feel there is a better chance that someone can contribute to my code and help to make community software.

Comment only
22 May 2012 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Dedric, please check my email. Thanks.
Jim

Comment only
20 Apr 2012 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Laura, you are pointing out an issue that I thought would be good to address but that I just haven't gotten to yet. In general I have found it is good to respect the data type so as to prevent memory overflow for a user, but there are obviously times when you want things read in as a double.

I eventually wanted to handle this more gracefully but you can try the following hack to get things to work:
1) in TDMS_initData, remove the string specification from zeros, in your case it sounds like you want case {9 25} to be:
output = zeros(1,nSamples) instead of output = zeros(1,nSamples,'single')
2) in TDMS_getTypeSeekSizes change the read specification to be "type" instead of "type=>type", in your case you want 'single' instead of 'single=>single'

These two changes should make it so that all doubles are read as singles. I eventually want to make a cleaner fix but I've been too busy lately with other things.

Comment only
03 Apr 2012 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Ah, that clarifies things a bit. That brings up a tricky issue. Your use case isn't necessarily envisioned by their server and you might be blocked temporarily. To minimize this possibility you can space out your queries in time, perhaps every 10 - 20 seconds. I've run into this case with Google Scholar where eventually they poppped up a Captcha to try and prevent me from making automatic queries. It is a bit frustrating that they don't provide a code interface which would minimize their server load while still allowing access to users.

It looks like you are making a GET request, which means that all of the parameters are attached to the URL during the request. I've described this briefly in:
http://undocumentedmatlab.com/blog/expanding-urlreads-capabilities/
Essentially the way to do what you are asking is to make an example request in your browser where you change the date ranges, see how those dates are placed into the request url. Then you learn to modify the request url appropriately. I have code which would help with this but it is not included in this package. I can work on including it. Basically the code first splits on '&' characters to get [property]=[value] pairs. Then you split on '=' to separate the property from the value. Then you want to take each property and value and decode them using the function urldecode. Once this is done it should be pretty obvious where your dates are in the request. You then just modify those dates, repackage all of the parameters, and add them onto the original url after the '?' symbol.

I'll try and post an example of this with new code by the end of the week.

Comment only
02 Apr 2012 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

When you mention different time intervals I assume you mean running the function multiple times over the course of many hours/days/weeks etc. If that is the case these links might be helpful:
http://www.mathworks.com/matlabcentral/answers/30481-how-to-automatically-run-a-matlab-function-at-a-particular-time-every-day
http://www.mathworks.com/support/solutions/en/data/1-361S45/index.html?product=ML&solution=1-361S45

Comment only
26 Mar 2012 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Doubtful, that error is coming because some router or Google server is blocking your ip address (like if you are using a computer in China). You would need to use a proxy to get around that. The fix I just uploaded may provide a more explicit error message than what it was previously giving you, but it should be just the same as if you entered that url in a browser. Note: with the fix the error message will be the output (instead of throwing an error), and the extras structure will have a status indicating that the error occurred and that the output is an error message.

Comment only
25 Mar 2012 urlread2 Generalizes HTTP requests, providing more control and access to input and output Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Well that stinks. It works for me. There are two issues going on here.
1) The example should work, I'll find a better one!
2) I made some last minute changes to try and directly handle errors instead of letting them cause code errors further down in the code which were harder to debug. What I didn't realize was that the handler recognizes HTTP status codes and processes them as errors as well. In other words, I thought the 403 error code you are seeing would go through just fine and that you would need to check the status and the output to see that something was wrong.
I'll address these changes and upload a new version ASAP.

Thanks!
Jim

Comment only
08 Mar 2012 RNEL_DB Object Oriented Database for Matlab RNEL_DB is a class definition that facilitates the user to develop a database in Matlab. Author: Joost Wagenaar Jim Hokanson

Jim Hokanson (view profile)

Development on this project has been discontinued. An improved version has been created, you might have some luck if you contact the author.

Comment only
30 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Regarding improvements in documentation, that is probably one area to improve. Raw DAQ MX data is a proprietary Labview format and I've been turned down in requests to get specifications on that type. I've managed to parse a couple of examples but since I have had so few examples to go off of I haven't tried implementing it. In my experience the raw format is really just read as a normal data type (int16 in my experience??) with properties that specify how to scale that raw data into measured data. I don't know how to extract the real data type from their meta information. I could technically just treat it as some data type, say uint8, but to parse the data generally (not always) relies on knowing the size of the data type. In addition there is some strange buffering of the meta information which I can manually hard code around but I am not sure if it is always present.

That being said, if you have an example file I would be interested in looking at it so that I could eventually offer some workarounds. As I said I have had some luck in extracting the data.

Comment only
29 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

You can be as specific about reading data as you would like. See the documentation file TDMS_retrievingSubsets. You can get as fine grained in reading of the data as you would like, specifying down to the channel and sample numbers if you like. Please let me know if there is anything about the documentation you think should be clarified.

Looking over this more carefully it appears that I have made an error in my documentation related to the meta_struct. I will be updating that soon.

The main error is that subsequent calls is that if you read more more data and want to use the metaStruct from a previous call to reduce parsing time, you still need to pass in the filename again:

TDMS_readTDMSfile(filename,'META_STRUCT',metaStruct,etc)

I tend to recommend using TDMS_getStruct, in which case you would use:

TDMS_getStruct(filename,versionNumber,{'META_STRUCT' metaStruct etc})

Comment only
07 Nov 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Andreas, I am unaware of any bugs in the code at this time. Please check the message I sent you.

Comment only
12 Oct 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hi Andreas,

I've known about that bug for a while I just haven't uploaded a fix yet. I had been a bit slow since I wanted to incorporate some other changes and it is an error that will be thrown as opposed to failing silently and pretending to work. I'll upload a modification very soon but for now you just need to replace in that particular case structure (starting around line 100) in TDMS_readFileHelper_v1 the following:
dataType -> change to -> dataTypes(1)

Jim

Comment only
05 Aug 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

That shouldn't be a problem. The raw format is currently unsupported because its type is unspecified.

Comment only
14 Jul 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Craig has identified a 2nd bug that is present in v2.2. This bug effects all previous versions. Group names with "/" characters are currently incorrectly parsed. An update to v2.2 will be released soon that addresses this bug, and the getSubset,IgnoreSubset bug. NOTE: Both of these bugs will cause errors instead of failing silently. Thanks guys for letting me know you had a problem so I could improve the code.

Jim

Comment only
06 Jul 2011 (another) JSON Parser Parses JSON strings into structures and cell arrays. Author: François Glineur Jim Hokanson

Jim Hokanson (view profile)

I love the use of nested functions! Well written.

Comment only
06 Jul 2011 (another) JSON Parser Parses JSON strings into structures and cell arrays. Author: François Glineur Jim Hokanson

Jim Hokanson (view profile)

5
13 Jun 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Found bug for v2.2 effecting use of GET_DATA_OPTION with values 'getSubset' or 'ignoreSubset'
This bug will already throw an error to let you know the read was incorrect

If you get the error:
The # of requested values does not equal the # of returned values, error in code likely
Then this should be fixed by adding this line:
numValuesToGetActual(~keepDataArray) = 0;

after these lines: (around line 133)
useSubset = false;
subsetInfo = struct([]);
numValuesToGetActual = metaStruct.numberDataPoints;

This will be fixed in the next version.

Comment only
08 Jun 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hmmm,

In general the code looks fine. I would throw in the already parsed meta structure back into the function call to save processing time. I'll send some instructions on that later. As the code states when a problem like that happens it is most likely my fault. In general I try and throw in checks where possible because I'd rather have things not work and tell you than pretend to work. I'll send you an email with more instructions on how we can find a fix to this problem.

Jim

Comment only
07 Jun 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Hi Fiona,

Thanks for pointing out the issue. I'm really busy early this week but I might be able to look at this issue Thursday or Friday. See me email for more details.

Jim

Comment only
01 Jun 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Yes it does. I use it with 64 bit Windows and it has been tested with a 64 bit Mac.

Comment only
27 Apr 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

@Guosong Zhang
In 2009b the ~ was introduced as a way to ignore outputs. This can be especially useful if that output requires a lot of memory. I've gotten in the habit of putting those in although I realize not everyone may be using 2009b or later. I might upload a fix in which I put dummy variables back, although I'd be tempted instead to write a small script that allows checking the version and doing a replace in all the files if needed.

Comment only
02 Feb 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Jim Hokanson (view profile)

Jim Hokanson

Jim Hokanson (view profile)

Joacim,

I fixed the unicode bug. Ver. 1.1 should be up soon. I had misread some documentation regarding # of bytes vs # of characters. Thanks for pointing out my mistake.

Jim

Comment only

Contact us