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

Copying sections of records/channels.

$
0
0

I did a search, and didn't find the answer to what is probably a simple question. (Or maybe it was there, but Meine Deutsch ist schlect...)

 

I have a long record (computer issues during data aquisition) that I would like to break into 3 different records. First, I am going to try to get my terms straight, hopefully.

 

Each channelgroup has 15 channels of data (5 accelerometers x 3 axes).

 

I would like to copy all 15 channels from one single channelgroup(?), make 3 new channel groups and copy the segments of all 15 channels into the new channelgroup. Hope this is clear.

 

Here is the basic idea of what I'm attempting:

 

Call Data.Root.ChannelGroups.Add("Record#2", 2).Activate()

Call DataBlClpCopy (Data.Root.ChannelGroups(1), 1, 40000)

Call DataBlClpPaste (Data.Root.ChannelGroups(2),1)

 

Then do this two more times, adding a new channelgroup, and copying a different range.

 

Thanks for any help you can provide. I have not done any coding in...years..., and I think the last time I did, it was fortran, so I'm not really familiar with object oriented coding except on a very high (and very fuzzy) level.

 

 


Plugin help

$
0
0

I need a little help modifying a dataplugin to automatically truncate the data in a .csv file - dependent upon a phase wrap that occurs near the end of the file. The 3D Axis in report doesn't handle data that isn't monotonic, and I really don't want to include that data anyway.

 

I'll attach the VBS plugin file and a sample datafile. I wish to truncate the Angle [deg] channel, and all the numbered Z-axis channels to the same length so that nothing beyond the point where the angle wraps is pulled in. The angle in the first column in the data.

 

In the example datafile, the data I need to truncate would be the last 3 lines.

 

This seems like it should be really easy, but I just can 't seem to find the right object, method and properties that I need.

 

Thanks!

error message on DAC clock

$
0
0

Hello everybody,

 

I have a problem ith my new installation of DIAdem 2012 SP1 (1f5436). While creating a new DAC plan I tried to edit the clock. I got the error messages as attatched. Is that a known issue?

 

Regards

Daniel

Newbie question

$
0
0

Hello,

I am new to DIAdem, I have gone through the basics, hand-on etc. But I have not been able to make much progress with my problem.

 

I was wondering if anyone can give me some pointers on how to proceed.

 

I have TDMS files being generated every hour for 90days. Yes a test lasts for 90days and there are mutilple stations!

 

There are different groups within each file and each group has its on LabVIEW timestamp.

 

I need to automate generation of some reports done daily, weekly and monthly etc.

 

So here are my thoughts:

combine 23 files using copy \b <hour0> + <hour2> ... <hour23> day.tdms

Then reduce the files by only taking every nth sample to form day_reduced.tdms.

Now combine all day_reduced to form month.tdms

 

I am not a big fan of duplicating data but I dont have much time to try things, Is the above ok?

  

Please help/comment!!

 

Thanks in advance.

Excel data loading

$
0
0

Pls find the attached excel data which contains section name and date as the first two columns. If I delete these 2 columns, I am able to load the data using plugin wizard without any problem. If I try to load without deleting these two columns, I am not able to load it properly. Pls help me in loading the entire data without truncation as the date and section name is very important for me.

 

Regards,

X. Ignatius

Excel data loading

$
0
0

Pls find the attached excel data which contains section name and date as the first two columns. If I delete these 2 columns, I am able to load the data using plugin wizard without any problem. If I try to load without deleting these two columns, I am not able to load it properly. Pls help me in loading the entire data without truncation as the date and section name is very important for me.

 

Regards,

X. Ignatius

search i a string

$
0
0

Hello, 

 

If I probe a string. I get this from probe Watch.

 

Name:  Tested

Value:   "Testpart_0_part_0"

 

How can read out the value from "Testpart"   ( in this case 0).

 

Br

P

PDF-Export truncates report

$
0
0

When I export my TDR-report (test.tdr in the attachment) to PDF I get only truncated reports (see testDIAdem2012.pdf in the attachment). The export to JPG or WMF is OK. (see test.jpg in the attachment). Even the output to the printer is as expected.

It does not matter if I use the File-Menu\PDF Export or the following code

  Const sTdr = "C:\temp\test.TDR"
  Const sPDF = "C:\temp\test.pdf"
  Call PicLoad(sTdr)

  PicWidthInScal =  29.7
  PicHeightInScal = 21
  PrintLeftMarg = 0
  PrintTopMarg = 0
  PrintOrient = "landscape"
  
  IF FileExist(sPDF) THEN Call FileDelete(sPDF)
  PDFFileName = sPDF
  PrintName = "winspool,DIAdem PDF Export"
  Call PicPrint ("WinPrint")

PicPdfExport results in the same truncated report.


What can I do to get a whole PDF-Report page?


gemu


Order of properties in Data Portal

$
0
0

Hi!

 

I've just noticed, that in the Data Portal of DIAdem all default properties are ordered as they are specified in the documentation. But when adding new custom properties to the root or anywhere else, these properties are ordered alphabetical. Is there a way to let the custom properties appear in the same order as they were added?

 

Thanks,

 

Martin

Scripting a report.

$
0
0

I've done the following steps:

Created a report (page) template.

    Each page has 4 charts

       1. X, Y , Z plot (accelerometer data)

       2. FFT transforms of (1). 

3 and 4 are the same for the next channel, and there are 5 channels total.

 

Looking at the Curve and Axis definition dialog, it shows the type, color, Y-Axis (which are all Y1), X-Channel (blank), and Y-CHannel (my data).

 

What I am trying to do with my script is get it to step through all of the data and plot it using the specified template.

Each channel is labelled "N X (Filtered)" where N is 1 - 5, and there is an X, Y , and Z.  The FFTs are labelled: "N X (Filtered) FFT" with the same set of channels.

 

Hope this makes sense. 

 

Thanks.

user command

$
0
0

Hello, I was hoping if I could get help on the user commands functionality.

I have a report and a coordinate on the report with the following as the text:

 

 @@GetYPos(CurrXValue)@@ Elapsed Time= @@str(CurrXValue,"AutoAdj")@@

 

I created a user command "GetYPos" and I used the ScriptCmdAdd to add it to DIADEM. The function extracts the y values from the current x position and it works, however when I try to change anything on the report by accesing the Display menu the result I get on the comment  is " CurrXValue Elapsed Time CurrXValue" as if the GetYPos is not getting called anymore

 

I changed the return value of GetYPos to just a constant and it still the same result.

 

The only way to make it work again is to re-save GetYPos file  .

 

Is there a way to get arround this? I'll appreciate the help

Copying a band of data to new channels within a script

$
0
0

Hi,

 

I am trying to copy specific data between two sets of X values (which are specified in the script) and then plot a regression curve for them.

 

I have managed to set the cursor values and create a band but the only way I can see of copying it is to set flags and copy the data points which cannot be done in a script (as far as I can see)

 

Searching on the forum suggested using the x coordinate value to find the row but the data I am using has multiple Y values at X coordinates which means this won't work as it only returns the row of the first value it finds.

 

Any suggestions? Copying the data to new channels would be the most useful solution but if I can calculate a regression curve between the two x values then I might be able to work with that.

 

Here is the code as it stands:

 

Dim MyFileNames, iCount, Sheet, Area, Graph, Curve, chlength
Call FileNameGet("ANY", "FileRead", DataReadPath, "TDM data (*.tdm),*.tdm", "All.lst", True, "Data selection")
MyFileNames = Split(FileDlgFileName,"|")
For iCount = 0 To Ubound(MyFileNames)
  Call DataFileLoad(MyFileNames(iCount))
Next

Call View.LoadLayout("view1")

Set Sheet = View.Sheets(1)
Set Area = Sheet.Areas(1)
Area.DisplayObjType = "CurveChart2D"
Set Graph = Area.DisplayObj
Call Graph.Curves.RemoveAll
Set Curve = Graph.Curves.Add("Y_Accel","Strg_Angle")

Sheet.Cursor.Type = "Band"
Sheet.Cursor.X1 = -0.1
Sheet.Cursor.X2 = 0.1

'This is where I'd like to copy the data points from flags

Chlength=CL("CopyYStrg_Angle")

Call ChnApprXYCalc("CopyXY_Accel", "CopyYStrg_Angle", "Y_Accel_Strg_Torq_approx", "Strg_Torq_approx", "Partition complete area", Chlength, 1)

Set Sheet = View.Sheets(1)
Set Area = Sheet.Areas(1)
Area.DisplayObjType = "CurveChart2D"
Set Graph = Area.DisplayObj
Set Curve = Graph.Curves.Add("Y_Accel_Strg_Torq_approx","Strg_Torq_approx")

 

And the plot so you can see what I am attempting to complete (automatically though!)

 

Data.PNG

 

Many thanks for your help

 

edit enumlistbox items

$
0
0

How do I add items to an enumListBox?  Not at runtime, but just at all.  I expected there to be an ItemsList, or something, but there isn't. Then I thought I had to link it to an enum in the script, but apparently VBScript doens't even have enums.  I feel like this should be easy, but that doesn't seem to be the case.

How to create dataplugin using .csv file?

$
0
0

I have a csv file iam traying to create dataplugin ...what are the steps to do.

I am trying for this from last 3 days ...data is not updating into the database.

i hope iam not creating dataplugin in correct way ...

please send to mdilip.sp@gmail.com

Is there a way to change the export default file name

$
0
0

I have a request to change the default file name when doing a pdf export of a report. By deault, when pushing the export to pdf button, the name is NONAME.pdf. They want the default name to be the channel name is displayed on the report.

 

Is there an easy way to do this, or will I have to load all new code into the export button?


Import Binary-Data (UEILogger)

$
0
0

Hallo,

 

ich habe von der Firma United Electronic Industries (UEI) einen UEILogger (AI-201-100). Gespeichert werden die Daten dort als dat-Datei. Eine Software von UEI ermöglicht es die Daten in .CSV zu konvertieren. Die CSV-Dateien lassen sich in Diadem mit einem Plugin ohne weiteres einlesen.

Ich würde aber gerne die dat-Dateien direkt einlesen. Hierfür gibt es auch eine Anleitung (PDF im Anhang). Ich schaffe es jedoch leider nicht das in Diadem umzusetzen.

 

Im Anhang habe ich einen Probedatensatz (Beschleunigungssensoren) angehängt.

Insgesamt sind es 15 Acc-Sensoren.

 

Ich wäre sehr dankbar wenn mir einer helfen könnte.

 

Mfg

Johannes

Calculating average of specific data set

$
0
0

I want to calculate the average Y Value of all the data points with a y value above, and below, that of the regression curve at a specific x value (in this case x = -0.1, or thereabouts).

 

This is the code I wrote in order to try and calculate it in the most simple way but it only ever returns one data value.

 

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

Dim Reg_at_neg_1_G, iMaxLen, Upr_Value, Upr_Count, Lwr_Value, Lwr_Count, iLoop 

Reg_at_neg_1_G = (Chd(1,"Strg_Angle_Steering_Sensitivity_Approx")) 'returns the first value of the blue regression curve

iMaxLen = ChnPropValGet("Y_Accel", "length")

Upr_Value = 0
Upr_Count = 0
Lwr_Value = 0
Lwr_Value = 0

for iLoop = 1 to iMaxLen 'loop over the channel
  if Chd(iLoop, "Y_Accel") > -0.105 AND Chd(iLoop, "Y_Accel") < -0.095 then
    if Chd(iLoop, "Strg_Angle") > Reg_at_neg_1_G then
      Upr_Value =+ Chd(iLoop, "Strg_Angle")
      Upr_Count =+ 1
    else
      Lwr_Value =+ Chd(iLoop, "Strg_Angle")
      Lwr_Count =+ 1
    end if
  end if
next

msgboxdisp Upr_Value
msgboxdisp Upr_Count
msgboxdisp Lwr_Value
msgboxdisp Lwr_Count

 

 

I have also written the code in a different way which copies the values to a new channel if they meet the requirements and this returns 4 or 5 pieces of data for both above and below the regression curve.

 

In the interest of cutting down unnecessary data channels and learning, can anyone tell me why the above code doesn't work?

 

This is a plot of my data so you can get an idea of what I mean

 

Data.PNG

 

Many thanks

Changing a report object's name

$
0
0

I'm using this command in my script

 

oMyObjects.Item("Text1").Text = Data.Root.ChannelGroups("PhotoSet" & i).Properties("Caption").Value

 

This is great, it works fine.

 

However I'm not happy with the object having the name of Text1, I would like it to be PartNumber.

 

How do I change this?  I just can't find it on the Report tab...

 

Thanks

 

Denis

polynomial fit quality: estimators for coefficients

$
0
0

Hello

When running a polynomial fit on some data, I want to know, how 'good' my fit parameters are. Some evaluation programs (Minitab, Excel) offer an estimator i.e. some sort of sigma on the a, b and c coefficients. Is there a similar functionality in DIAdem?

 

Thank you for your assistance.

Michael

Automatic scaling on 2D chart in report

$
0
0

In my report, I am displaying the first 3 minutes (of a 10 hour recording) for a channel on a 2D chart.  I've set the scaling mode to Completely automatic.  The chart is scaled according to the overall peak value (around 40000), not the peak value for the 3 minutes (around 200) being displayed.  Is there a way to auto adjust the scale for just the first 3 minutes through a config setting?  

Viewing all 3197 articles
Browse latest View live


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