11-12-2020 05:10 AM
We have our own C# app from which we want to export data to view in LabView. I have downloaded the C dll package and copied the bin folder's contents into our application directory. The version on the nilibddc.dll file is 17.0.1.
When I try and create a "TDM" file using the DDC_CreateFile method then the log content can be serialized to the file and that file can be viewed in LabView and using the Excel plugin.
If I try and create a "TDMS" file using the DDC_CreateFile method then I get a -6211 "The storage could not be opened" error.
This is a 32 bit application running on a 64 bit machine.
I have downloaded and installed the TDMS plugin and the Excel plugin although I doubt that would help as presumably they installed 64 bit versions of the artefacts to match the machine's architecture.
I have tried running our app as an admin in case there is the use of kernel mode drivers but that didn't help.
Note that I only copied the C dll artefacts, I have not registered any com servers on any of the accompanying dlls as there are no instructions to do so and it's not obvious which of them would require it.
Does anyone have any idea as to what the solution could be?
Thanks, Ian
11-14-2020 07:15 AM - last edited on 01-08-2024 11:00 AM by migration-bot
Hello Ian,
Have you seen this article?
11-27-2024 06:38 AM
Hello,
I have got the same issue.
I am working on C++ application and I would like to use TDMS format.
I have downloaded TDM C DLL (https://www.ni.com/en/support/documentation/supplemental/06/the-ni-tdms-file-format.html?srsltid=Afm...)
When I call this (based on example provided in TDM C DLL):
DDCFileHandle file = 0;
int retVal= DDC_CreateFile("C:/test/test1.tdm", "TDM", "Example", "", "", "", &file);
retVal = 0 and file is created.
But when I want to switch to TDMS:
DDCFileHandle file = 0;
int retVal= DDC_CreateFile("C:/test/test1.tdms", "TDMS", "Example", "", "", "", &file);
retVal = -6211 ( error code -> DDC_StorageCouldNotBeOpened) and file is not created.
Can anybody help? Why it is not working? Thank you.
11-27-2024 07:49 AM
@colubgo1 wrote:
I'm using TDMS files for logging raw vibration data, due to the cyclic nature of a test i'm currently working on I would like to have a new datasheet for each cycle. The above code is what I came up with. When the State machine vi says it is time for a new data sheet the "creating a new vibration file" case structure closes the old file, replaces the file name with the next count, and opens a new file. This should allow me to use the same reference wire through the shift register.
That wasn't even a try to answer my question but ok:)
11-28-2024 06:17 AM - edited 11-28-2024 06:19 AM
@michal_t wrote:
@colubgo1 wrote:
I'm using TDMS files for logging raw vibration data, due to the cyclic nature of a test i'm currently working on I would like to have a new datasheet for each cycle. The above code is what I came up with. When the State machine vi says it is time for a new data sheet the "creating a new vibration file" case structure closes the old file, replaces the file name with the next count, and opens a new file. This should allow me to use the same reference wire through the shift register.
That wasn't even a try to answer my question but ok:)
Colub .. new user, 1 post not related to the topic ... looks like a bot.
Yup, copied from here: Problems Replacing the active TDMS file : r/LabVIEW
11-28-2024 07:16 AM
There used to be LabWindows/CVI, which I believe did support TDMS read and writing. It may be possible to reuse the underlaying DLL for that but that is a brittle and cumbersome solution. Looking on the net I can find several open source libraries supporting reading TDMS files but not many that support writing them.
One notable exception seems to be: https://github.com/MahdaSystem/TDMS
I haven't used it nor tested it and only had a brief glance at the project, but it may be a starting point. I find the particular choice of API a bit strange but it's what it is.
11-28-2024 10:05 AM
@VA.KI wrote:
Hello Ian,
Have you seen this article?
That's a broken link?
11-28-2024 10:13 AM - edited 11-28-2024 10:16 AM
Sorry, this is also not an answer to your question 😁...
There's a F#\C# TDMS library on Github:
TDMS 2.0 File Support for F# and C# (follow "source repository" to https://github.com/mettekou/FSharp.Data.Tdms/)
Iff it's good, it seems like a more direct approach.
Haven't used it...