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

DIAdem Scripts Naming Conventions

$
0
0

Is there any recommended naming convention for scripts? I am mainly asking about variable names eg. should I include type prefix?


How to make a single array using script

$
0
0

 Hi. I am sungbae chi

 

Can anyone explain for me how I can make an array using script? I want know syntax to make.

ex) Make an string array into group2 channel1
2222.png

Like this
3333.png

How should I write in script file? I can't find any 'copy as script' functions.

VDV in diadem

$
0
0

Hi,

I have a time and acceleration channel. I compleated the acceleration weighing according to ISO 2631 and also calculate the RMS value of acceleration. But now I have a problem with calculating the VDV (Vibration dose value). This value is given by the integration of weighed acceleration VDV.JPG . Any suggestion how to calculate this precise value of definite integral?

Thank you for any idea. 

Execute .js file through cmd on DIAdem

$
0
0

Executing a python file works and returns an output as shown in the code. 

cmdVar = getCommandOutput("cmd.exe /c python C:\Temp\Hello.py")
MsgBox cmdVar 'Returns "Hello"

Function getCommandOutput(theCommand)

    Dim objShell, objCmdExec
    Set objShell = CreateObject("WScript.Shell")
    Set objCmdExec = objshell.exec(thecommand)
    getCommandOutput = objCmdExec.StdOut.ReadAll

End Function

However when trying to execute a node .js file by modifying the cmd command slightly it does not work even though the command actually works on command prompt.

cmdVar = getCommandOutput("cmd.exe /c node C:\Temp\Hello.js")

How do I fix this issue?

FFT Y-Output Values don´t correspond expactions regarding Input

$
0
0

Hi

i am quite stuck with this problem and could really need help:

 

my Situation right now:

- concatenated 121 files with each 21000 measurments each, to a torque channel ( MyR ) and a rpm channel( Rotspd ) via skript

- created a numerik time channel ( time ) starting a 0-72600s, with 2541000 number values based on the number of files and measurements.

- choose FFT (One Time Signal), Time channel: time, Signal channel: MyR, Window type: Retancle, FFT: Amplitudepeak, Average Amplitude:    None, Third/Oktave: No

( PIC: 1-3 )

 

my Problem:

after applying the FFT, i displayed the results and :

-the original measurment values&peaks do not correspond to the resulting amplitude peaks

 

i am using:

DIAdem 2015

15.0. (64 Bit)

 

How do i achieve the output values regarding peaks in my FFT output ?

Is there a better signal analyse funktion in Diadem besides FFT which results in Frequency(X) and Amplitude(Y) ?

 

Kind regards and big thanks in advance

Knicks

Diadem 2017 PDF Export Issues

$
0
0

I upgraded to Diadem 2017 from 2014 and PDF Export does not work.  It goes through the entire process: save file as, running wheel, and no errors.  Yet there is no file in the directory when I go find the file.  Is anyone having any other issue like this?

 

 

Export graph and cell data from DIAdem to Excel

$
0
0

Hello. I am sungbae chi

 

Is there any way I export 'Report sheets' to Excel. I know that Data portal can be saved as 'xlsx' using plugin. But, If I want to export some specific format like 'report in DIAdem', not a TDMS type, How should I do?. 

 

I attached pdf file what I made using script. My goal is make excel report file same as that. In detail,
1. I'm expecting a way to save 2D graph in Excel as a Image file
2. Is there any simple script function to save cell data in Excel from DIAdem.

I also attached other backup file(VBS,tdr, raw data..etc). It seems mass data. I feel sorry for that. But, I hope it helps understand my questions. 

Append Text To the End of File Name - Before the Extension

$
0
0

Hi,

 

I am writing a script to batch process data recorded during experiments. After I input the files through the file selection dialog box, I run a for loop in which in which I carry out the actual processing for the selected files. Before running the next iteration of the loop for the second selected file, I would like to append a suffix to the end of the file and save it. (e.g. if the selected files were "exp1.TDMS" and "exp2.TDMS" I would like it to rename the first file and save it as "Exp1_processed.TDMS" before starting the second iteration of the loop in which "exp2" is processed and saved as "exp2_processed.TDMS").

 

Has anyone got any suggestions on how to do this? I have pasted how my script looks like at the moment (which overwrites the old file). Hope I have been clear and thanks in advance!

 

 

 

if FileDlgShow("C:\Experiments\","TDMS Files,*.tdms","Data to be processed",true)= "IDOk" Then

For iCount = 0 to UBound(FileDlgNameList)
Call DataFileLoadRed (FileDlgNameList(iCount),"TDMS","","IntervalCount",62000,1,0,0)

... data processing ...

Call DataFileSave(DataFileName,"TDMS")

Next

 


Find text in channel values

$
0
0

Hi,

When searching for values in channels I would normally use the following code:

R1 = -0.2
L1=Find("Ch('Metrics/X Data')>=R1")

 

However, I now need to search for some text within the values of a text channel. I have tried the following but it doesn't seem to work:

T1 = "HW Grad [deg/g]"
L1 = Find("Ch('Metric Values/Metrics')= T1", 1)

 

The help files give the following example as an alternative method:

ChnFind("instr(1,ch(""Group1/Textchannel""),""meas"",1)<>0")

 

However, I was wondering why my first attempt didn't work and whether there is a method that is similar to my Find version that doesn't rely on InStr?

Thanks, Simon.

 

Modify the default VBS script

$
0
0

Hi

Every time I start a VBS script, I start with typing a plethora of Dims, such as

Dim oMyChn, oMyGroupIn, oMyGroupOut, oMyGod, i,j,k,l,m

etc.

This is, because the way my script design habits are such that I will most probably construct my algorithms along this objects.

Is there a way to have this as Default, instead of the Default

'-------------------------------------------------------------------------------

'-- VBS-Script-Datei

'-- Neu erstellt am 26.04.2018 14:10:32

'-- Ersteller:

'-- Kommentar:

'-------------------------------------------------------------------------------

OptionExplicit'Erzwingt die explizite Deklaration aller Variablen in einem Script.

?

 

Thank you for a hint

Michael

 

ChnOffset "mean of values"

$
0
0

Hi together,

 

I dont get it how to put this command right....

 

What do i put as ChnOffsetValue when i use the mode "mean value Offset"??

Command: ChnOffset

Subtracts an offset from the channel values or adds an offset to the channel values.

ReturnValue = ChnOffset(Y, R, ChnOffsetValue, ChnOffsetMode)

Input Parameters

YSpecifies the data channel that contains the y-values.
RSpecifies the result channel.
ChnOffsetValueSpecifies the number of values that DIAdem averages or the free offset that DIAdem adds to the individual channel values.
ChnOffsetModeSpecifies the type of offset correction DIAdem uses.
Enumeration variable
Enumeration variable with the following selection terms
Script TermInterface Term, Explanation
"free offset"
Adding free offset
"first value offset"
Subtracting first channel value
"min. value offset"
Subtracting minimum channel value
"last value offset"
Subtracting last channel value
"max. value offset"
Subtracting maximum channel value
"mean value offset"

Subtracting average of the first n values

Waveform x-offset

$
0
0

Hi everyone,

 

Could someone please explain the idea of the Waveform x-offset (in the waveform properties). I understand it is quite easy to shift a channel on the X-Axis when you are using the VIEW window but when it comes to calculations or data export (i.e. csv.) this offset is not being taken into account and creates confusion among my colleagues and myself.

 

In the attachment, you'll find an easy example for this issue. I have two waveform channels A and B. Channel B has a Waveform X-offset of 3. I would have expected that DIAdem recognizes the Waveform offset and therefore takes the offset into account when you perform calculations. Nevertheless, DIAdem seems to calculate row-by-row and completely ignores the offset.

 

In order to keep the "correct" timing, I tried to ignore the Waveform offset and add a "NoValue" in the first three rows of B. However this creates problems when applying FFT or filtering functions on the signal.

 

In addition, when I try to export the two channels (i.e. as .csv) the actual output is also not including the waveform offset.

 

Is there a way of including the waveform offset in calculations without programming tons of scripts? In my opinion, DIAdem should be able to calculate waveform channels by taking the actual time information into account instead of calculating row-by-row.

 

Many thanks for your help and best regards

David

Plotting Exponential Curve with two co-ordinates automatically in diadem

$
0
0

Hi,

I am trying to automatically plot a exponential curve with two co-ordinates. 

Please help me with the format that i should be using in the formula

Example of the plot is as attached below

 

Thanks in advance

 

Best Regards

Naseem

 

How to get data type out of DataPlugin

$
0
0

Hi everyone,

 

I have created a program, where the user needs to select a DataPlugin first and chooses the files he wants to load in afterwards. In order to filter the files that can be chosen, I need a way to read the supported data type out of the DataPlugin. Is there any way to do that in DIAdem Script?

 

Many thanks for your help and best regards,

Jakob

Alternative for CCH function

$
0
0

Hi all,

 

i saw that the DIAdem function "CCH" is obsolet. Now im confused how to get the average of an Channel?

I saw nothing in the documentation for an new command. So do i have to write my own function which calculates the average of an channel? 

 

best wishes


Script for report pdf file naming

$
0
0

Hello!

I would like for my pdf export report to have the same name as the data file. I have the script to create the pdf export and allows one to make the file name as they wish however I would like the name to automatically be the same as the csv file and located in the same folder (which is not always the same location). It would be preferred that it does this in the background with no windows popping up for user input.

 

Can someone please help me?!!

 

Dim PDFFile : PDFFile = LayoutWritePath & "Test Results.pdf"

Call Report.Sheets.ExportToPDF(PDFFile,False)

If (Err.Number <> 0) Then

Call MsgBoxDisp("Cannot create the PDF document.")

else

' show results in PDF reader

If FileExist(PDFFile) Then Call ExtProgram("", PDFFile)

If Err.Number <> 0 Then MsgBox "Cannot start the PDF Reader. Have you installed a PDF Reader on your computer?"

End If

 

Thank you!

TDM DataFinder Server Install Requires WIndows Firewall Service Running

$
0
0

Just wanted to leave a note that during my TDM DataFinder Server 2017 Install I hit errors that took quite a bit of troubleshooting to resolve.  In summary the installer requires that the Windows Server OS has the Windows Firewall Service Running.  It seems our IT department uses other methods to protect the servers and not only turns windows firewall off, but actually disables the service.  The NI installer seems like it does not complete if it cannot communicate with the firewalls service to install specific rules for the TDM server.  Hope this helps save someone a few days of digging.

 

Symptoms of this issue are error dialogs saying: 
The "NI file service 17.0 for Windows 64-bit" installation has failed

The "NI RabbitMQ COnfiguration for Skyline Products" installation has failed.

The "NI Skyline Manager 17.0 for Windows 64-bit" installation has failed.

The " NI Skyline Database Service 17.0 for Windows" installation has failed.

 

 

 

Plot Thickness in VIEW

$
0
0

The number one feature in DIAdem that blows away the customers (NASA engineers), is the high speed video synced to the sensor plots. But for over 10 years I have been asking for how to thicken the plots in VIEW to make this easier to see. Choosing a point style and changing the point thickness (& number of points), tremendously slows down the user interface, and look terrible for sudden changes in the sensor data. And the redraw time for the plots is way too long. 

Again, when I demo DIAdem to NASA engineers, they are very impressed with the high speed video synced to the sensor graphs. Reports lets you change the plot thickness, but only VIEW lets you have the video synced to the plots.

2D Plot Channel Names

$
0
0

I'm having trouble finding a method to extract the name of the channel being used within a plot as the y-axis (ex: [#]/Speed, [#]/Torque). What I'm attempting to do is:

 

Look if a specific channel exisits

If it does exist add the corresponding mean value channel

If it does not exist move on to the next curve/plot/tab

Access violation err:00142C50

$
0
0

Hello there,

Has anyone met  with this error before or know what does it mean?

 

Error while executing "StatBlockCalc" command
Error type: ACCESS VIOLATION
Error address: 00142C50
Module name:GFSFILE.DLL

 

this error appears quite randomly when i am try to average of a channel. When this appears i just close Diadem and it works afterwards. Do you have any idea why is that?

Thank you very much in advance for any inputs.

Viewing all 3197 articles
Browse latest View live


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