.. highlightlang:: us .. index:: TDM Files .. index:: Save As TDM File .. index:: Import of TDM Files .. _import-export-of-tdm-files: Import/Export of TDM Files ========================== The addin converts TDM and TDMS files to UniPlot-netCDF data files and netCDF files to TDM files. TDM files are created by DIAdem or Labview (National Instruments). The addin is based on the DIAdem Connectivity Library :file:`nilibddc.dll` of National Instruments. .. _installation_tdm: Installation ------------ * Choose :ref:`tools-add-in-manager`. * Check the "TDM-Import/Export" addin. * Choose OK. Restart UniPlot. .. _usage_tdm: Usage ----- TDM Import ^^^^^^^^^^ * Choose :ref:`fileimport-data`. * Choose Type "TDM File (\*.tdm; \*.tdms)". * Select one or more TDM files. TDM Export ^^^^^^^^^^ * Open an NC file using the :ref:`fileimport-data` command. * click on the ">>" button. * Right click in the data grid and choose **Export=>Save AS TDM File**. * Choose a name for the TDM file. .. _format_tdm: Configuration ------------- Use the :guilabel:`Tools=>TDM Import Configuration` to set the option for creating the channel names in the NC file. Format ------ In TDM format, channels are organized in groups. In netCDF files the group is replaced by a group number, for example: ``G1_ZWSTAT``. The group number is only used for TDM files containing more than one group. The following parameters are read from the Windows-Registry: .. list-table:: :header-rows: 1 * - Key - Type - Default Value - Description * - ``"Settings\TDM_StripGroupName"`` - Number - 0 - Flag for TDM import. If the flag is set to 1, the channel name in the netCDF files does not contain the group name, e.g. ``G1_``. :: WriteProfileInt("Settings", "TDM_StripDeviceName", 1) See also :ref:`uniplot's-use-of-the-windows-registry`. .. _programming-interface_tdm: Programming Interface --------------------- The programming interface is similar to the interface documented by National Instruments. The following table contains all supported functions. An example can be found in the :file:`uniplot\\addin\\rs_tdm\\rs_tdm.ic` file. .. list-table:: :header-rows: 1 * - Original-Function - UniScript-Function * - DDC_CreateFile - _DDC_CreateFile * - DDC_AddChannelGroup - _DDC_AddChannelGroup * - DDC_AddChannel - _DDC_AddChannel * - DDC_SaveFile - _DDC_SaveFile * - DDC_CloseFile - _DDC_CloseFile * - DDC_OpenFileEx - _DDC_OpenFileEx * - DDC_RemoveChannelGroup - _DDC_RemoveChannelGroup * - DDC_RemoveChannel - _DDC_RemoveChannel * - DDC_CloseChannelGroup - _DDC_CloseChannelGroup * - DDC_CloseChannel - _DDC_CloseChannel * - DDC_OpenFile - Verwenden Sie _DDC_OpenFileEx * - DDC_SetDataValues - _DDC_SetDataValues * - DDC_AppendDataValues - _DDC_AppendDataValues * - DDC_ReplaceDataValues - _DDC_ReplaceDataValues * - DDC_GetNumChannelGroups - ``-`` * - DDC_GetChannelGroups - _DDC_GetChannelGroups * - DDC_GetNumChannels - ``-`` * - DDC_GetChannels - _DDC_GetChannels * - DDC_GetNumDataValues - _DDC_GetNumDataValues * - DDC_GetDataValues - _DDC_GetDataValues * - DDC_GetDataType - _DDC_GetDataType * - DDC_SetFileProperty - _DDC_SetProperty * - DDC_GetFileProperty - _DDC_GetProperty * - DDC_GetFileStringPropertyLength - Not necessary. * - DDC_CreateFileProperty - _DDC_CreateProperty * - DDC_FilePropertyExists - _DDC_PropertyExists * - DDC_GetNumFileProperties - ``-`` * - DDC_GetFilePropertyNames - _DDC_GetPropertyNames * - DDC_GetFilePropertyType - _DDC_GetPropertyType * - DDC_SetChannelGroupProperty - _DDC_SetProperty * - DDC_GetChannelGroupProperty - _DDC_GetProperty * - DDC_GetChannelGroupStringPropertyLength - Not necessary. * - DDC_CreateChannelGroupProperty - _DDC_CreateProperty * - DDC_ChannelGroupPropertyExists - _DDC_PropertyExists * - DDC_GetNumChannelGroupProperties - ``-`` * - DDC_GetChannelGroupPropertyNames - _DDC_GetPropertyNames * - DDC_GetChannelGroupPropertyType - _DDC_GetPropertyType * - DDC_SetChannelProperty - _DDC_SetProperty * - DDC_GetChannelProperty - _DDC_GetProperty * - DDC_GetChannelStringPropertyLength - Not necessary. * - DDC_CreateChannelProperty - _DDC_CreateProperty * - DDC_ChannelPropertyExists - _DDC_PropertyExists * - DDC_GetNumChannelProperties - ``-`` * - DDC_GetChannelPropertyNames - _DDC_GetPropertyNames * - DDC_GetChannelPropertyType - _DDC_GetPropertyType * - DDC_GetLibraryErrorDescription - Not necessary. * - DDC_FreeMemory - Not necessary. .. _licensing-conditions: Licensing Conditions -------------------- Portions used under license from National Instruments Corporation; copyright (c) 2007 National Instruments Corporation. The complete license text can be found in :file:`EmbeddedUSICopyrights.chm` and :file:`license.rtf` in the :file:`addin/rs_tdm` directory. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2023.0 - Source library update - National Instruments TDM DLL (V17) * - R2012.11 - Group name can be added to channel name. * - R2012.9 - New DLLs with TDM Streaming (.tdms) 2.0 file format support added. * - 5.5.0 - New. :sub:`id-1404633`