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.
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.
10-27-2014 03:07 PM - edited 10-27-2014 03:17 PM
LV2013, Win7, LVRT 2013, PharLap ETS 13.1
I have some code that works OK on Windows that I would like to move to the RT box.
I'm using the TDMS function, but don't need high performance for this (I will for other things later).
Here's the OPEN FILE code. Again, with the exception of how the NAME LIST comes to be, this is a copy of working code on Windows desktop.
Here is the code that actually writes the data. Nothing fancy, just see if the buffer is full and write it out if so.
The trouble is, I get an error -2545 at the WRITE function:
It says to "make sure the enable asynchronous? input of the TDMS Advanced Open function is TRUE".
Well, the default value is listed as TRUE, and I'm not wiring it. I tried wiring a TRUE to it with no change.
But it also qualified the HELP text with a "(WIndows)" qualifier. What if you use it elswhere? The HELP doesn't bother to say.
It says to "make sure the TDMS Configure Aysnchronous Writes function exists". By "exists", I assume it means "is called", but that it is in the OPEN procedure above.
The help here is also qualified with a "(Windows)" qualifier. What if you use it elswhere? The HELP doesn't bother to say.
Did I miss something that says "you can't use TDMS on non-WIndows platforms", or you have to set the "don't-be-stupid" property to TRUE, or something?
EDIT: Here is the help text:
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Solved! Go to Solution.
10-27-2014 08:24 PM
(windows) suffix means that these modes are only supported on windows platform.
In your case, TDMS doesn't suppport asynchronous or buffering disabled I/O on RT. If you don't care about high performance, I suggest you using TDMS standard functions on RT.
10-28-2014 07:04 AM - edited 10-28-2014 07:05 AM
OK, thanks, deppSu.
I didn't realize I was using a limited feature.
I would have expected something like "asynchronous operation is not supported on non-Windows platforms" in the help, but they chose not to say so explicitly.
I would also have expected the error to occur when I opened the file for asynchronous writes, not later.
So, basically, I can't use the asynch modes under RT. Seems like that's where they would be the most useful.
If you don't care about high performance, I suggest you using TDMS standard functions
So.... what if I DO care about high performance? Is there a better option on RT than the synchronous tools?
Thanks again.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-28-2014 08:52 PM
I agree the error message is confusing in this case.
The best performance you can get on RT is using the synchronous mode of TDMS Advanced API. Corresponding example in LabVIEW is very good to get started
10-29-2014 05:17 AM
OK, thanks. I wired a FALSE into the DISABLED BUFFERING and the ENABLE ASYNCHRONOUS inputs, removed the CONFIGURE ASYNCHRONOUS WRITES call, and used the ADVANCED SYNCHRONOUS WRITE where writing the data.
Everything works, though I haven't checked performance.
Blog for (mostly LabVIEW) programmers: Tips And Tricks