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: 

Using TDMS WRITE on RT system

Solved!
Go to solution

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.

 

 

Open.PNG

 

 

Here is the code that actually writes the data.  Nothing fancy, just see if the buffer is full and write it out if so.

Write.PNG

 

 

The trouble is, I get an error -2545 at the WRITE function:

Err -2545.PNG

 

 

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:

Help.PNG

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 5
(2,784 Views)

(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.

0 Kudos
Message 2 of 5
(2,753 Views)

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.

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 5
(2,728 Views)
Solution
Accepted by topic author CoastalMaineBird

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

Message 4 of 5
(2,699 Views)

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. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 5
(2,672 Views)