Quantcast
Channel: DIAdem topics
Viewing all 3209 articles
Browse latest View live

Error in function DDC_CreateChannelPropertyString (Matlab)

$
0
0

Hi community, 

I try to parse a .r64/.dat file (exported from DEWESoft) in MatLab. 

 

Online I found a function which was implented exclusively for this usecase. 

If I run this script I get a critical error. The function needs to know where a channel begins/ends (listed below). 

 

elseif strcmp(ImpExp,'IMPLICIT') && step > 0
            % Kanal mit konstanter Schrittweite (z.B. Zeit)
            variable.(name) = [] ;
            variable.(name)(:,1) = wert_start:step:wert_ende ;

Belong to this Article I saw that I have to change the Parameters to get the Start-Pointer of the first value in the channel (Index 240,221,...). 

 

My exported .dat-file does not store the end-value of the channel. 

 

end
            % --------- IMPLICIT oder EXPLIZIT ---------
            if strncmp(zeilen(nn),'210',3)
                ImpExp = zeilen{nn}(5:end);
            end
            % --------- Kanallaenge ---------
            if strncmp(zeilen(nn),'220',3)
                laenge = str2double(zeilen{nn}(5:end));
            end
            % --------- Startzeile ---------
            if strncmp(zeilen(nn),'221',3)
                channelstart = str2double(zeilen{nn}(5:end));
            end
            % --------- Schrittweite ---------
            if strncmp(zeilen(nn),'241',3)
                step = str2double(zeilen{nn}(5:end));
            end
            % --------- Startwert ---------
            if strncmp(zeilen(nn),'250',3)
                wert_start = str2double(zeilen{nn}(5:end));
            end
            % --------- Endwert ---------
            if strncmp(zeilen(nn),'251',3)
                wert_ende = str2double(zeilen{nn}(5:end));
            end            
#BEGINCHANNELHEADER
200,Time
201,Data
202,s
210,IMPLICIT
220,137
240,0
241,1
253,increasing
260,Numeric
#ENDCHANNELHEADER

Does anyone know how to solve this problem?

 

Regards
Daniel


Error in parsing .dat with Matlab

$
0
0

Hi community, 

I try to parse a .r64/.dat file (exported from DEWESoft) in MatLab. 

 

Online I found a function which was implented exclusively for this usecase. 

If I run this script I get a critical error. The function needs to know where a channel begins/ends (listed below). 

 

elseif strcmp(ImpExp,'IMPLICIT') && step > 0
            % Kanal mit konstanter Schrittweite (z.B. Zeit)
            variable.(name) = [] ;
            variable.(name)(:,1) = wert_start:step:wert_ende ;

Belong to this Article I saw that I have to change the Parameters to get the Start-Pointer of the first value in the channel (Index 240,221,...). 

 

My exported .dat-file does not store the end-value of the channel. 

 

end
            % --------- IMPLICIT oder EXPLIZIT ---------
            if strncmp(zeilen(nn),'210',3)
                ImpExp = zeilen{nn}(5:end);
            end
            % --------- Kanallaenge ---------
            if strncmp(zeilen(nn),'220',3)
                laenge = str2double(zeilen{nn}(5:end));
            end
            % --------- Startzeile ---------
            if strncmp(zeilen(nn),'221',3)
                channelstart = str2double(zeilen{nn}(5:end));
            end
            % --------- Schrittweite ---------
            if strncmp(zeilen(nn),'241',3)
                step = str2double(zeilen{nn}(5:end));
            end
            % --------- Startwert ---------
            if strncmp(zeilen(nn),'250',3)
                wert_start = str2double(zeilen{nn}(5:end));
            end
            % --------- Endwert ---------
            if strncmp(zeilen(nn),'251',3)
                wert_ende = str2double(zeilen{nn}(5:end));
            end            
#BEGINCHANNELHEADER
200,Time
201,Data
202,s
210,IMPLICIT
220,137
240,0
241,1
253,increasing
260,Numeric
#ENDCHANNELHEADER

Does anyone know how to solve this problem?

 

Regards
Daniel

changing font of a report TextObject

$
0
0

Hello,

in many reports I have the same TextObject1(a small table).
how can i change the font of this table to Arial by script?

Diadem 2017 script recording mode does not record calculator formulas

$
0
0

We've recently purchased Diadem 2017. In previous versions, with the script recording mode enabled, all calculator formulas were recorded on the script. I've tried to do this with Diadem 2017 and the formulas were not recorded. Any tips?

C# wrapper error code 6211

$
0
0

I am writing a wrapper in C# to read TDM files too.

But I met the error code 6211 using OpenFileEx.

 

using System.Runtime.InteropServices;

namespace MyTDMSTest_CSharp
{
   class Program
    {
 
        [DllImport("nilibddc.dll")]
        static extern int DDC_OpenFileEx(string filePath, string filetype, int readOnly, out IntPtr pfile);
        [DllImport("nilibddc.dll")]
        static extern string DDC_CloseFile(out IntPtr pfile);
        [DllImport("nilibddc.dll")]
        static extern string DDC_GetLibraryErrorDescription(int errorCode);

        private const string FILE_PATH = "testtdms.tdms";

       static void Main(string[] args)
        {
            int ret;
            IntPtr pfile;

            ret = DDC_OpenFileEx(FILE_PATH, "TDMS", 1, out pfile);
            if (ret < 0)
            {
               string buff = DDC_GetLibraryErrorDescription(ret);
               Console.WriteLine("\nError:{0:D} {1}",ret,buff);
               Console.ReadKey();
            }
            else
            {
               DDC_CloseFile(out pfile);
             }
        }
    }
}

 

This code shows bellow message.

"Error:-6211 The storage could not be opened."

 

I'm using VS2010 with Win7(32bit) . 

How to solve this error?

 

Thanks for any help.

Round every item in a channel

$
0
0

Hello,

I have a bunch of groups with a Column called "Angle" and each of these have about 2000 items. My issue is that each of these has 8 decimal points, but I want none. I'm planning on using the Round() function to just round all these to an integer, but am not sure the best way to do this. Is there a way I can do something like:

 

For item in Range(Length("[group index]/Angle")):

  "[group index]/Angle/[i]" = Round("[group index]/Angle/[i]"

 

So for each element in the Angle channel it will replace it with a rounded number?

Datafinder Client .cab flagged as Spyware...

$
0
0

I recently ran a Malwarebytes scan of my test system and the Datafinder 2015 .cab file was flagged as spyware.  Here are the results from MWB:

 

---------------------------------

Malwarebytes
www.malwarebytes.com

-Log Details-
Scan Date: 10/25/17
Scan Time: 2:32 PM
Log File: f5771e38-b9cb-11e7-8c0d-00ff88c4a589.json
Administrator: Yes

-Software Information-
Version: 3.2.2.2029
Components Version: 1.0.212
Update Package Version: 1.0.3097
License: Free

-System Information-
OS: Windows 7 Service Pack 1
CPU: x86
File System: NTFS
-Scan Summary-
Spyware.Pony, C:\PROGRAMDATA\NATIONAL INSTRUMENTS\MDF\PRODUCTCACHE\NI DATAFINDER CLIENT 15.0.1 [15.0.16118]\NI-DATAFINDER1.CAB, No Action By User, [70], [450269],1.0.3097
Spyware.Pony, C:\PROGRAMDATA\NATIONAL INSTRUMENTS\MDF\PRODUCTCACHE\NI DATAFINDER CLIENT 15.0.1 [15.0.16118]\NI-DATAFINDER64.CAB, No Action By User, [70], [450269],1.0.3097

---------------------------------

 

What's going on?  Is this real or a false-positive?

Assigning values to GV DIAdem variable

$
0
0

Hello,

I'm using 2015.  Is there any way to assign values to the GV variable besides defining a GVVar.asc file?  I simply want to use a combobox in a Table in a SUDDialog.  It appears that a combobox for a Table in the SUDDialog only works when I define GV as a dynamic enumeration vector variable in the DIAdem Variables for the dialog box.

It would be nice if I could just assign:

GV(0) = "String" or GV = ("String1", "String2") etc.

thanks!


DDC_GetNumDataValues shows error code 6202

$
0
0

I am writing a wrapper in C# to read TDM files still.

But I met the error code 6202 using DDC_GetNumDataValues.

        [DllImport("nilibddc.dll", CallingConvention = CallingConvention.StdCall)]
        static extern int DDC_GetDataValues(IntPtr channel, ulong indexOfFirstValueToGet, ulong numberOfValuesToGet, IntPtr values);



IntPtr databuff = Marshal.AllocCoTaskMem((int)(sizeof(double) * numDataValues));
ret = DDC_GetDataValues(channels[i], 0, numDataValues, databuff);

Does Anyone know how to solve this error?

 

 

Thanks for any help.

Delete rows in Report 2DTable with script

$
0
0

Hello Everyone,

 

   I created a 2DTable in Report with script. The default number of rows in the table is 10, How can I delete some rows with script?

 

Thanks,

gq

 

 

Get list of usercommands

$
0
0

Hi,

i know about of commands to check if usercommand script is assigned, or to delete it, but i didnt find how to get list of loaded user commands. Is there some commands for it?

Thanks for info

Copying Settings Across PC's/Users

$
0
0

Am currently running Diadem v14 SP1, on Windows 7 64bit.

 

We have several PCs running Diadem, and a on some of the PCs Diadem that gets used by several different logins.

 

I continually update various scripts (VB auto sequences) that are stored on the network that are referenced by these copies.

 

Is there anyway to have all copies of Diadem use the same settings file (ideally stored on the network), so that if I change a setting it gets used by all users. Currently I need to update each PC, and each users setting via their logins, and this is time consuming. Failing that could I perhaps have any autosequence that on startup copies a master settings file for each user on startup?

 

 

ChnStatisticsChannelCalc

$
0
0

Hi,

 

I am new to DIAdem and it has been a while since I have used VB Script. I have some channels that I want to find the Arithmetic Mean of and am trying to use ChnStatisticsChannelCalc to get the mean of one channel (will be done for many data sets) and then place it into another channel. Currently I have not managed to get any data into the channel. Any ideas where I am going wrong.

Thanks Hannah 

 

OptionExplicit'Forces the explicit declaration of all the variables in a script.

Dim Stat_Result

CallData.Root.ChannelGroups(1).Channels.Add("Stat_Results",DataTypeChnFloat64)

Set Stat_Result = ChnStatisticsChannelCalc("[1]/TempAmb_Val",32,0,0,0,1,0,"IndexName")

 

ChnAreaDel deleting wrong rows in a string channel

$
0
0

Hi, I have a string channel. If the string channel row value doesn't match the expected string, I want to delete this row. I don't know the row number until the not match string is detected.

 

iloop is the row number I loop through. For example, iloop can be 1,2,3..

Here is the expression I use,

  Set oMyAssgnList = Data.GetChannels("[1]/"&cstr(CNoXGet(1,3*iloop-1)))
  Call Data.Remove(oMyAssgnList)

Data.GetChannels("[1]/"&cstr(CNoXGet(1,3*iloop-1))) doesn't work.

Is there a way to make this work?

Thanks,

delete rows in a string channel

$
0
0

Hi, I have a string channel. If the string channel row value doesn't match the expected string, I want to delete this row. I don't know the row number until the not match string is detected.

 

iloop is the row number I loop through. For example, iloop can be 1,2,3..

Here is the expression I use,

  Set oMyAssgnList = Data.GetChannels("[1]/"&cstr(CNoXGet(1,3*iloop-1)))
  Call Data.Remove(oMyAssgnList)

Data.GetChannels("[1]/"&cstr(CNoXGet(1,3*iloop-1))) doesn't work.

Is there a way to make this work?

Thanks,


DataFinder slowing DIAdem 2017 down

$
0
0

I never used to use DataFinder, but I decided to start using it recently. It is very convenient. However, recently loading and removing TDMs has become very, very slow. The software sits and spins for 30-45 sec before the file loads or removes, it used to be instant.

 

Any thoughts on this? Is the indexing slowing things down? 

Copy part of channel data and paste into excel worksheet

$
0
0

Hello,

  I want to copy part of channel data and paste into excel worksheet programmatically. I can copy data with "DataBlClpCopy" into clipboard, Does anybody can tell me what command I can use to paste data from clipboard into excel worksheet?

Thank you for your help!

GQ

Object required : 'navigator.display.currdataProvider'

$
0
0

Hello,

 

I have installed Diadem 2017 on my Professional computer this morning and after the end of the installation and the reboot of the computer, I got the error "Object required : 'navigator.display.currdataProvider'" appearing after the launch of Diadem.

 

I tried to reinstall but the same error appears.

 

Could someone help me to fix this ?

 

Thanks, regards

Count occurrence of text in channel

$
0
0

Hi,

I have got channel with "OK" and "NOK" text depending on values from other channels. I would like to count how many "OK" and "NOK" are in that channel but could not find anywhere how to do that.

Would anyone be able to help?

 

Thanks

Jan

Matlab dataplugin fails / crashes

$
0
0

I downloaded and installed the Matlab data plugin from NI.com MATLAB® DataPlugin.  

I am running DIAdem 2015 SP2 64bit

The .mat file I have is a version 5 matlab data file.

It is from a third party software suite.

The file opens fine in Matlab R2016B.

 

When I try to open it in DIAdem I get 2 different errors, depending on file size?

< 1 MB? I get, from filename.mat.log file:

ERROR: Exception: (86) in ToRootData::Initialize
The Data type 1101514747 isn't suppported.
> ~ 1MB I get (and this crashes the Navigator tab of DIAdem)

Error Type: ACCESS VIOLATION

Error address: 00003FEE

Module name: MATLAB.dll

 

My work around is if I open the file with Matlab, then save the file, I can open it in DIAdem with no issues.  

I attached 3 files.

The MatlabFile.mat is the verison that works in DIADem and is saved from Matlab of LargeFile.mat

 

Viewing all 3209 articles
Browse latest View live