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

DIAdem Data plugin different files, but both .csv

$
0
0

Hello,

 

I have the next problem. I have different recorder files (different layouts), but it are both .csv files. When I create the URI plug-in only one of the .csv files is correctly imported.

 

I tried to adjust the VBS script behind the URI file (old URI file < DIAdem 2012) to make it possible that the file is recognized by checking cell values in the file and than decide to run 1 of the 2 import procedures while dragging a file into the data portal, but till now I even have problems with understanding all the sentences in the VBS behind the URI file.

 

See attached the 2 example data files.

 

Caltem =>

-  Delimiters = ","

- Decimals = "."

- Channel names row 8,  units row 9, row 10 must be ignored and the data starts from row 11

  The channel name row is not always 8, so this must also be included in the script!

- Search for the word 'Calterm' and run then the Calterm plug in part

 

Puma =>

- Delimiters = vbTab

- Decilmals = "."

- Channel names row 1, Unit row 2 and the Data starts in row 3

- Search for the word 'recorder_time' and run then the Puma plug in part

 

With kind regards,

Stijn


Converting files with a Script

$
0
0

Hi,

 

I am new to Diadem Scripting and I need to import bulk of data to Diadem as TDM files.

 

I found a example code on http://zone.ni.com/reference/en-XX/help/370858K-01/dlgcanconverter/dlgcanconverter/dlgcanconv_example_script/. It is really what I am looking for.

 

I make my small changes. New code is below. Now I get the error below;

 

****

 

Bus Log Converter note: Started converting the following logfile: E:\AV8\AWS\kvaser_data\MDF\Kvaser_ob_2015-06-12_09-06-54.log
277  Bus Log Converter note: List of signal databases for this/these bus number(s) is empty: 2 
278  8:39:07 AM Error:
     Error in <batch_log2tdm.VBS> (Line: 43, Column: 5):
     Bus Log Converter error: Cannot open the signal description database: E:\AV8\AWS\kvaser_data\MDF\Kvaser_ob_2015-06-12_09-06-54.logE:\AV8\AWS\kvaser_data\DBCCANdb_small_OB.dbc

 

****

 

Some how my dbc file is changes into "logfilename + dbc file name". Do you have any suggestion for this? I am working on Diadem 2014.

 

Regards,

 

Onur BUTUN

 

 

'-------------------------------------------------------------------------------
'-- VBS script file
'-- Created on 07/28/2015 16:38:20
'-- Author:
'-- Comment:
'-------------------------------------------------------------------------------
Option Explicit  'Forces the explicit declaration of all the variables in a script.
 
Dim aFoundFiles       'Array of logfiles
Dim iCount            'Counter for existing logfiles
Dim sLogFileFolder    'Logfile folder
Dim sDbcFileFolder    'Dbc file folder
Dim sResultFileFolder 'Result file folder (tdm)
Dim sLogFileExt       'Logfile extension
Dim sLogFileName      'Currently converted logfile

'Settings
Call BusLogToTDM.Clear()
BusLogToTDM.BusDbConfig.Name = "CAN converter configuration"
BusLogToTDM.BusDbConfig.Description = "Convert logfiles of one folder"
BusLogToTDM.ResultSettings.TimeFilter.Active = False
BusLogToTDM.ResultSettings.BusFilter.Active = False
BusLogToTDM.ResultSettings.SequenceChannel = True
BusLogToTDM.ResultSettings.EnumSubstitution = True

sLogFileFolder = "E:\AV8\AWS\kvaser_data\MDF"
sDbcFileFolder = "E:\AV8\AWS\kvaser_data\DBC"
sResultFileFolder = "E:\AV8\AWS\kvaser_data\TDM"
sLogFileExt = "*.log"
BusLogToTDM.LogSettings.FileType = eLogFileTypeVLOG
Call BusLogToTDM.BusDbConfig.Buses.Add("CANBus", 1)
Call BusLogToTDM.BusDbConfig.Buses("CANBus").DbFiles.Add("E:\AV8\AWS\kvaser_data\DBCCANdb_small_OB.dbc")
' End of settings

'Convert files
aFoundFiles = DirListGet(sLogFileFolder, sLogFileExt, "filename", "FullFilenames")
If IsArray(aFoundFiles) Then
  For iCount = Lbound(aFoundFiles) to Ubound(aFoundFiles)
    Call BusLogToTDM.LogSettings.LogFiles.RemoveAll
    Call BusLogToTDM.LogSettings.LogFiles.Add(aFoundFiles(iCount))
    sLogFileName = FileNameSplit(aFoundFiles(iCount),"N")
    BusLogToTDM.ResultSettings.ResultFile = sResultFileFolder & sLogFileName & ".tdm"
    Call BusLogToTDM.Convert()
  Next
End If

 

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

How to create a time channel recognized by DIAdem

$
0
0

Hi All, many example files of DIAdem have a time channel called Time. Dragging and dropping the time channel and any other channel from the Data Portal to the View Tab and by selecting a 2D Axis System, DIAdem sets the Time channel as X and the other channel as Y, automatically. TDMS files created in my LV application have a time channel exactly as for many example files of DIAdem. However, when I create a 2D Axis System with one of my TDMS files, time channel is not recognized automatically. Here is the list of attributed of my channel: Name: Time Description: Time Channel Unit: s The only difference that I see between my filesl and example one is the data format. My time channel is a waveform while time channel in example files is numeric. Thanks all

Script to auto zero channels in a TDM file with multiple channel groups

$
0
0

Hi friends,

 

I am trying to process some data but am having trouble modifying a script to autozero channels across multiple channel groups. The following script works to zero channels across one group. I use this script to process data in a TDM file with only one channel group. I need to be able to zero channels across multiple groups (5 groups). But the amount of groups I will have may change so I might need an option to enter the amount of groups or have the script determine the amount of groups in my TDM file. 

 

Here is the code I use to zero the data. Thanks in advance for your help!

 

Sub UserDlg_Select
Call USERDLGINIT()
USERDLGCAPTION="Auto Zero Channel Based on Specified Points "
USERDLGTXT(5)="Number of points to Average"
USERDLGCOMMAND(5)="t1"
Call USERDLGOPEN()
End Sub

Call UserDlg_Select()

T2="1-"&T1

For I= 1 To ChnNoMax 'For all data channels except time
T4=CHNNAME(I) 'Create string for Channel name (I)
T3=ChnDim(T4) 'Create text variable for channel dimension

STATSEL(6)="Yes" 'Arith mean
STATCLIPCOPY="yes"
STATCLIPVALUE="No"
Call StatBlockCalc("Channel",T2,T4) 'Calculate Stats for Channel (I)

'Subtract Mean of first (T1) points for Channel (I)
Call FormulaCalc("Ch('temp1') := CH('"&T4&"') - statarithmean")
CHNCOMMENT("temp1")=("Channel zeroed over first "&T1)+"pts" 'Add Comment
ChnDim("temp1")=T3 'Add Dimension
CHNNAME("temp1")=T4+"-Z" 'Save updated data with -Z

'Delete Stat Channels
Call CHNDEL("ArithmeticMean")
Call CHNDEL("Sum")
Next 'End For loop

 

Zahlen in Skript formatieren

$
0
0

Hallo Miteinander,

 

kleines Problem und ich find in der sonst guten Hilfe keine Lösung:

Wie kann ich im Skript Zahlen formatieren, das ich statt 20 Nachkommastellen, nur noch 2 bekomm oder verhinder, das ein Ergebnis mit Exponent angezeigt wird? 

 

Gruß

R.Keller

Weird Property Problem

$
0
0

Hi all,

I'm using DIAdem 2014, and I'm running into a weird problem. Looking in the data portal the maximum value of a channel is listed as 1, however when I use ChnPropGet it returns NOVALUE. (pictures below)

Property.PNG   no value.PNG

I had a message box display the result from ChnPropGet to show what's going on.

 

Does anyone know why this would happen? Let me know if you need further information

Thanks,

Sadie

error 0xc000007b DIAdem cannot open after Window 10 upgrade

$
0
0

Hi, 

I have recently upgraded to Window 10 and have experienced difficulties in opening DIAdem. It started with error in finding msvcp100.dll and msvcr100.dll which i have resolved by reinstalling them in the system32 and syswow64 folders. However, i receive another error 0xc000007b now. How can I resolve this?

Window Correction FFT

$
0
0

Hello,

 

In the FFT function in DIADEM there are two possible window corrections: Periodic and Random. The help doesn't give much information about the difference between the two.

 

I have read in the forum that the general idea is that if you are looking for a periodic wave then you should use "Periodic" and if you aren't sure about the signal you should use "Random".

Also there is a document called FFT Use in NI DIAdem that shortly explains the window correction, but only says that for the Hanning window the factors are: Periodic 2, and Random 1.63299.

 

My questions are:

Why exactly are there two different correction factors?

Is there a correction factor table for the two corrections for each window?

How is the Random correction factor calculated?

 

Thank you and best regards,

 


Standard deviation in Diadem - Population or Sample formula?

$
0
0

Hi all, 

I am an Applications Engineer here at NI and I have been working with a customer on the following issue:

DIAdem-Idea-Exchange/DIAdem-Standard-Deviation-Weighting

Essentially you are unable to specify which formula the standard deviation function uses. Attached to this post is an example VBScript that reads data from a column in Excel and calculates the standard deviation using the Population formula. I hope this serves as a useful starting point to anyone looking to add this functionality. 

Kind regards


Event Search...but not quite!

$
0
0

I was excited to see the Event Search function in 2015, but unless I'm missing something it's only 50% completed!

You can do a nice filtering out, but for the result, your only option is a static value??????  HUH?  Maybe I'm missing something, but that's silly and incomplete. Why can't I have it input the actual value when true from the dialog box input?

And while it looks like something like this is supported via script, I DEFINITELY don't feel I should have to write a script for something like. Do you have to write a macro every time you want to do a search/replace in your word processor????

 

Sorry, but this just got to me, as I thought this was an awesome new feature, spent my morning upgrading for it and then am horribly disappointed.

 

--Scott

How to make DataPlugin that create wavefrom

$
0
0

I would like a Data Plugin for a custom data format. Example of data follows: 

$ (name) some_name_1
$ (id) 1
$ (Color) 1.000000 0.000000 1.000000
$ (X axis) time [ms]
$ (Y axis)                 [kN]                
  0.00000000E+00 ,  -4.30788916E-09
  1.0112.999E-01 ,  -2.26056017E-02
  4.99011459E+01 ,   3.88890062E-23
  5.00010223E+01 ,   2.55677929E-23
$ (name) some_name_2
$ (id) 2
$ (Color) 1.000000 0.000000 0.000000
$ (X axis) time [ms]
$ (Y axis)                 [mm]                
  0.00000000E+00 ,   4.53233423E-10
  1.01121999E-01 ,  -2.85587949E-03
  4.99011459E+01 ,   7.13293237E-24
  5.00010223E+01 ,   2.88725773E-23
$ (name) some_name_3
$ (id) 2
$ (Color) 1.000000 0.000000 0.000000
$ (X axis) time [ms]
$ (Y axis)                 [g]                
  0.00000000E+00 ,   4.53233423E-10
  1.01121999E-01 ,  -2.85587949E-03
  4.99011459E+01 ,   7.13293237E-24
  5.00010223E+01 ,   2.88725773E-23
*END

 

 

File always come with bunch of channels. Channels allways have two column - time and values.

 

I have working Data Plugin whitch loads the data for me, but I have plenty of useless time channels. So I would like to create a waveformat channels rather than set of double numeric.

 

Easy approach that I just add waveform properties doesn't work.

 

Please how can I create waveform from this data format?

 

The code, that I'm using is attatched

 

Thank you.

Radek

Import channel names when starting a script.

$
0
0

Have tried looking around commands and discussions, but i haven't found anything on this so far.

I am looking to form a script around the basis of selecting a certain data channel in the NAVIGATOR window, then hitting say F3 to run a script that will take the names of the highlighted channels and recognize them, is this possible?

Any hints would be appreciated, thank you in advance!

script to make chanel name a variable

$
0
0

HI,

I'm pretty new to writing script but am totally stuck on this. 

I'm trying to write a spript to create a time channel based on sampe rate (the equation is simple) but the part where i get stuck is every time i load a different set of data my script is stiff refererencing "channel group2" so what i need is an input button/drop down box.....etc to sellect what channel group it should be using. 

Any ideas? 

 

Steve

How to automatically highlight a band in a 2D axis system of a report

Diadem 2014 --> 2011 (DOWNGRADE)

$
0
0

Hello,

 

we bought DIADEM 2014 (1xBASE/2xAdvanced) and our customer is using DIADEM 2011.

 

As a result of this, we got different problems and like to downgrade our DIADEM version.

 

Is this possible? How do I get the old version and is my license also working?

 

Thanks and greetings

Alex


Convert string channel to time channel

$
0
0

Hello,

 

Is there a method to change a channel that has time data sored as a strings into a date/time channel (data are saved as tdms from LabVIEW)? My timing data is coming from a NI9467 GPS Timestamping and Synchronization Module and we have been successful at outputting the timing data as a date/time but it is locked into the timezone where the unit is located (we would prefer to record the data in the GMT time zone because we are syncing the data with a separate unit). However, when the timing data are saved as a string the timezone used follows the timezone setting on the cRIO which is what we would like. The problem occurs when importing the data into diadem because it is not possible to create waveforms using a string channel.

 

Arbeiten mit Objekten - Verständnisschwierigkeiten

$
0
0

Hallo Miteinander,

 

es gibt Momente, das scheint mir das Arbeiten mit Objekten im Skript logisch oder aber auch nicht und es gibt grosses Kopfzerbrechen. Gibt es seitens NI eine Literatur (ausser die Hilfe) die einem speziell zu dem Thema weiter helfen kann?

 

 

Bsp 1:

Dim oMyChn
Dim oMyChannels
Set oMyChannels = Data.GetChannels("Example/D*")
For Each oMyChn in oMyChannels
  Call MsgBoxDisp(oMyChn.Name)
Next

 

Bsp 2:

Dim oMyElementList, oMyChannelgroups, Channelgroup, oMyChannels, Channel
Set oMyElementList = Data.CreateElementList
Set oMyChannelgroups = Data.Root.ChannelGroups
For Each Channelgroup in oMyChannelgroups
  Call oMyElementList.Add(Channelgroup)
  Set oMyChannels = Channelgroup.Channels
  For Each Channel in oMyChannels
    Call oMyElementList.Add(Channel)
  Next
Next
Call MsgBoxDisp(oMyElementList.Count)

 

Wie kann ich im Beispiel mir die Namen der Element anzeigen lassen? Im Beipsiel 1 schaut das plausibel und verständlich aus.

 

Danke für Literaturtipps

Gruß

R.Keller

Classification error. The class begin is higher than the class end.

$
0
0

Hello,

 

I'm searching for a solution to an error that does not make much sense to me:

 

Error in <NoName(2).VBS> (Line: 75, Column: 3):

Classification error. The class begin is higher than the class end.

 

It appears when I call the attached VBS on the also attached TDMS. Diadem 2012. The index file did not make it thru the upload system here.

 

It seems to be triggered by funtion ChnHistogram() and the help page says something about ClassBegin/End being "Global Parameters". What are these? Where does one set them.

 

Thanks in advance for clues.

 

Torsional Vibration Analysis

$
0
0

Hi,

I have speed Vs Time data from one end of shaft and also from other end of shaft. I want to do torsional vibration analysis in Diadem. Could anyone help with the step by step procedure?

In the results, I would need the angular displacements (°) vs the shaft speed at various orders. Also there should be campbell plot showing critical frequency (having highest angular displacement at particular order of vibration)

 

Thanks,

Vishnu

I need a stp file converted to a dataplugin

$
0
0

Hello,

 

With the new version of Diadem. I am tring to import a text file and assign a registerval1 variable to a value.

Previously it appears to be using a STP file.

 

The txt file looks like this:

 

Firing Pressure
17/08/2015 16:18:47
122.223


Final Reservoir Pressure
17/08/2015 16:18:50
92.014


Sled Velocity
17/08/2015 16:18:47
14.945


0.000
  Kg

 

And would like to read the file into Diadem, then record the Sled Velocity value as a variable.. 14.945

I would also like to record the date and time as a variable.

 

Thanks

 

Stagsden

Viewing all 3198 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>