Precision in DIAdem Funktion CCH

I am using DIAdem function cch() to get the maximum, minimum and the mean value of my data channel.
It works fine. I am using this funcion Comment Windwo (see the attached file). My problem is that I cant set the precision of my display value in this function.
I use
@@CCh("Channel_1",2)@@
Display value= 60.7574268
I just need 60.75
Doese anyone has an Idea how to handel with this problem?
Thanks
Message Edited by FHM on 11-19-2007 08:48 AM
Message Edited by FHM on 11-19-2007 08:50 AM
Attachments:
Window.JPG ‏29 KB

Hello FHM!
Try this: @@Round(CCh("Channel_1",2),2)@@
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  

Similar Messages

  • Daten konvertieren in Script Dac Treiber

    Hallo,
    versuche seit einiger Zeit ein Keithley 2000 DMM anzusteuern (per Scipt Dac Treiber). Komme jeoch mit der Umwandlung der empfangenen Daten nicht weiter:
    die empfangenen Daten haben folgendes Format (-1.123456789E-04,+9.987654321E+01<CR><LF>) - Es sind hier 2 Werte (2Kanäle) durch Komma getrennt.
    Wie kann ich jetzt zum Beispiel den ersten Wert in einen numerischen Wert wandeln? Die Funktion "Val()" scheint im Script Dac nicht zu funktionieren (Fehler: Typen unverträglich: "Val")
    Vielen Dank für Eure Hilfe!
    Gruß, Thomas

    Hallo Thomas,
    das online-Script läuft quasi unabhängig von DIAdem und kann dadurch keine DIAdem Befehle oder Funktionen ausführen. Es gibt eine VBS-Funktion die ähnlich wie die DIAdem Funktion "VAL" arbeitet:
    cdbl("1,234")
    Diese Funktion nimmt als Dezimaltrennzeichen das, das im Betriebssystem eingestellt ist. Bei einem deutschen Windows ist das das Komma. Für Deine Zahlen würde also dann nicht der richtige Wert rauskommen.
    Lösung: entweder Du ersetzt vor der Umwandlung alle Punkte durch Kommas oder Du stellst die Ländereinstellungen des gerade laufenden Scripts auf englisch um mit dem Befehl: setLocale("en-us").
    Grüße
    Andreas
    Andreas Weiland
    Projektingenieur
    measX GmbH & Co. KG, www.measX.com

  • Fehlermeldung bei Round-Fkt im Formelblock

    Hallo,
    in einem Formelblock möchte ich die ankommenden Werte auf drei Nachkommastellen runden (DIAdem 11.1).
    Hierzu habe ich einen Formelblock eingefügt in dem ich folgende Formel eingegeben habe:  Round(D,3)
    Hierbei erhalte ich folgende Fehlermeldung:  "Fehler Innerhalb der Formel ..ROUND(DS3>,>3).. des Blocks Formel1 fehlt eine rechte Klammer"
    Was kann hier das Problem sein?
    Danke und Gruß,
    Tobias
    Solved!
    Go to Solution.

    Hallo Tobias,
    ich nehme an, du sprichst von DIAdem DAC.
    Im f(x)-Block können keine VBS-Befehle verwendet werden, sondern nur DIAdem eigene. Die Round-Funktion in VBS hat 2 Parameter - den Wert und die Nachkommastellen. Die gleichnamige DIAdem-Funktion hat nur einen Parameter - den Wert. Um auf 3 Nachkommastellen zu runden kannst du aber folgendes eingeben:
    Round(D * 1000) / 1000
    Gruß
    Walter

  • Is there a way to view timestamps in DIAdem with a higher precision than 100 microseconds?

    I understand DIAdem has limitations on viewing timestamps due to DateTime values being defined as a double value and that this results in 100 us resolution.  Is there any way to get around this?  I am logging time critical data with timestamps from an IEEE 1588 clock source and it is necessary to have higher resolution.  Perhaps I could convert timestamp to a double before logging but then would have to convert it back in Diadem somehow...
    Thanks,
    Ben

    As you said, DIAdem can only display up to 4 decimal positions on a timestamp. Timestamps in DIAdem are recorded as the number of seconds since 01/01/0000 00:00:00.0000. To achieve a higher precision, it would be necessary to use a relative timestamp. Many timestamps are defined from different references anyway, so it might be possible to import the timestamps as numeric values to maintain their precision. Converting the timestamp prior to importing into DIAdem seems like a viable method of working around the precision limit.
    Steven

  • DIAdem 9.0: Funktion zur Datenspeicherung in neuen Pfad und unter neuen Namen...

    Hallo,
    gibt es eine Funktion die eine definierte Anzahl von Kanälen (15-28) aus einer einer Datei, unter einen neuen Pfad (NewPath_) als *.dat abspeichert und dieser Kanalgruppe einen Namen zuweist (iDaten)?
    ...Gruß Carsten

    Hallo Carsten,
    Beachten Sie bitte zusaetzlich, dass die DIAdem-Variable "ChnNoStr" maximal 255 Character speichern kann. Besonders wenn Sie mit Kanalnamen arbeiten, kann man diese Grenze ueberschreiten.
    Call DataSaveSel(DataFile, ChnNoStr, [DataFileCode])
    Sie koennen diese Gefahr minimieren, wenn Sie die Hilfsbefehle "ChnSelAdd", "ChnSelGet", "ChnSelCount" (frueher "ChnStrAdd", "ChnStrRead", "ChnStrCnt") benutzen. Der Befehle "ChnSelAdd" ("ChnStrAdd") nimmt alle Syntaxmoeglichkeiten fuer den gewuenschten Kanal an, speichert aber immer die (sehr kompakte) Kannalnummer in der Variable "ChnNoStr". Wenn zwei gewuenschte Kanaele nebeneinander liegen, werde diese immer moeglichst kompakter weise in die "ChnNoStr" gespeichert, so wie:
    Resulting Value......VBScript Command
    ChnNoStr=""...........ChnNoStr = ""
    ChnNoStr="1".........ChnNoStr = ChnSelAdd(ChnNoStr, "FirstGroupName/FirstChannelName")
    ChnNoStr="1-2"......ChnNoStr = ChnSelAdd(ChnNoStr, "FirstGroupName/[2]")
    ChnNoStr="1-3"......ChnNoStr = ChnSelAdd(ChnNoStr, "[1]/[3]")
    ChnNoStr="1-4"......ChnNoStr = ChnSelAdd(ChnNoStr, 4")
    ChnNoStr="1-4,8"...ChnNoStr = ChnSelAdd(ChnNoStr, "[1]/EigthChannelName")
    Gruss,
    Brad Turpin
    DIAdem Product Support Engineer (USA)
    National Instruments

  • What are the fft based algorithms DIAdem is using?

    Greetings!  I am relatively new to DIAdem and am trying to find some basic information about how DIAdem is performing some calculations, specifically the FFT based functions.  The DIAdem help does not cover in depth what I would like to know and I cannot find anything on NI's website or these boards (yet) that does.  I did find one post that discussed the algorithms used in DIAdem Crash Analysis (originating from the NHTSA?) that gave a very good discussion, but this is specific to Crash.  Is there a similar paper for the algorithms within DIAdem?  Yes, I have run the same data through both DIAdem and an app we currently use and the results are very close, but this anecdotal evidence is not enough to satisfy the folks I work for.  Can someone point me in the correct direction?  Thanks!

    Hi,
    DIAdem is using several different FFT algorithms, depending on the version of DIAdem and the mathematical function. The basic FFT, witch is calculating the real/imaginary part out of the time signal, is well defined. Each algorithm gives almost the same result. There are only very small differences on the last bits of the float values. The basic FFT algorithm is usually not very large. It is easy to use different functions or libraries depending on the needs. The results have to be the same in all cases.
    DIAdem 10.2 is using a new algorithm which is able to do FFT calculations with any number of values, not just the power of two. This algorithm is also used in other NI-products like LabVIEW. A large afford is going into the quality and speed of this algorithm because not only the simple FFT but also a number of additional functions like the sound and vibration toolkit for LabVIEW is depending on this.
    The difficult part, when it comes to comparison between DIAdem and other FFT calculations, is always the large number of options. You need to know the number of values, sampling frequency, window function, window correction and the averaging. You can calculate peak, rms or power spectrum and so on. Depending on the options, you can get very different but still correct results.
    Crash is much more a question of standards. Starting with sampling frequencies and ending with precise defined algorithms to get a result like the HIC-value witch has to be reproducible and comparable between cars from different vendors all over the world.
    As soon as you start to do real world FFT calculations there are so many options and possible ways do get the results you need, that it is impossible to discuss all of them in a documentation of a Software like DIAdem. You could write a series of books about this.
    If you have specific questions about the FFT results, you can give it a try and ask on this forum.
    Ulrich Bierwisch

  • Synchronous video capturing with a simple webcam with DIAdem-DAC/Visual

    Hello,
    because of DIAdem is not able to synchronise captured video files and MDF-data files measured with
    Vector Canape with all the skills of and in DIAdem-VIEW,
    how about even capturing a video additional to the other measured data with DIAdem-DAC ??
    Vector Canape can this do with a simple webcam ( a better model from Logitech suffice ) and it really works fine,
    but DIAdem is much better for the rest of all measuring tasks and so our favourite.
    And yes : DIAdem  can  data acquisition and we like it  !!! 

    Hallo,
    diese Funktion vermisse ich seit Jahren bei Diadem. Die Hardware (Web-cam) gibts längst an jeder Ecke nur Diadem hinkt (u.a. Vector) hinterher, das kanns ja wohl nicht sein ....

  • DIADEM 8.1 millisecon​d patch

    I have installed the recent DIADEM 8.1 patch. Supposedly it enables the DATA view to display milliseconds when importing and ASCII file but it does not seem to work. Has anyone been able to make this work. I have attached a sample data file alongs with it's STP file.
    I also would like to export my timestamps with milliseconds to an ASCII output file. Can this be done?
    Attachments:
    09_26_02_14_55_37.txt ‏8 KB
    can_ub_MSec.STP ‏2 KB

    Hi Craig,
    The DIAdem 8.1 Service Pack 1 enables DIAdem to accurately read in Date/Time columns with fractional (milli-) seconds from ASCII files. It does not enable the channels in DATA to reflect this correctly read value-- they still display in DATA rounded to the nearest second.
    But the millisecond values are there, and you can verify this for yourself by graphing the data and noting that you get multiple data points between integral second values on the X axis. You can also change the format of the Date/Time channel in the DATA Channel properties tab from "Time" to "Numeric" and directly see the correct fractional seconds.
    The DIAdem Date/Time format stores the number of seconds which have elapsed since 0 AD as a double precision (8 byte) real
    number. So any non-integral values are indeed fractional (milli-) seconds. Bear in mind that with this approach the best accuracy you can get in our century is about 0.1 milliseconds.
    Regards,
    Brad Turpin
    NI

  • ANALYSIS method for CCh(ChannelName,StatValueIndex)?

    Hi,
    I am trying to compute a simple mean of a channel and usually use CCh(ChannelName,StatValueIndex), where StatValueIndex = 0.  Is this available somewhere on the DIAdem ANALYSIS panel? 
    Thank you!
    Julia

    Hello Julia,
    The cch() Function belongs to the calculator which, of course, can be called inside the ANALYSIS module. But if you are looking for a specific dialog in one of the ANALYSIS menus, I am afraid I have to dissapoint you. If you want to calculate the mean value interactively, you can use the option inside the statistic dialog - which calls a different function to get the result though.
    Alternatively, you can always create a custom dialog with the SUD tool.
    I am not sure if I got qour qestion 100% right, so if that does not answer it, just reply.
    Regards
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany

  • Too many digits of precision in imported data

    I store some data in a TDMS file that has four digits of precision. When I recall the data in DIAdem or import it into Excel there are many more digits there than I want. Do I just have to live with that or is there a way to limit the number of digits to just what I want?
    George

    Hi George,
    Are you saving the TDMS file with LabVIEW or DIAdem?  In LabVIEW, you wire a data array of a particular data type to be written to the TDMS file, so the precision used on disk will match that of the data type.  So if you're currently wiring a DBL type, converting that array to a SGL type prior to writing the array to TDMS will reduce the precision (and the disk footprint), though it may not reduce it enough for your taste.  If you are wiring waveforms to the TDMS file, I believe you are stuck with DBL precision.
    If you are saving the TDMS file in DIAdem, and if you have DIAdem 10.1, then you have the option of using the new ChnQuantize() function to limit the resolution of the data both inside of DIAdem and when you save it to disk.  Unfortunately, DIAdem 10.1 has a bug for TDMS output when using custom quantization, though this will be fixed in the upcoming DIAdem 10.1 SP1.  Still, this doesn't necessarily reduce the number of displayed digits, it just reduces the accuracy so that similar values can be saved in a smaller binary footprint.  So this may not be what you're after.
    Regardless of the resolution of the saved binary data, DIAdem loads all channel values as DBLs in the Data Portal, and it displays all the digits of precision corresponding to the DBL value it has in memory.  However, you can always change the displayed format of a channel value in a VIEW or REPORT table by changing that column's format string.  Try "d.ddd" or "d.ddde" for instance.
    Ask if you have further questions,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Diadem 9.1: Transparent Grafik im Report

    Hallo,
    habe doch gleich 3 Fragen zum Thema Grafik im Report:
    1.Frage/Problem:
    besteht die Möglichkeit transparente Grafik (z.B. im PNG-Format) mit Alphakanal (d.h. nicht nur transparenter Hintergrund, sonder auch transparenter Verlauf ) im Report zu laden?
    Wenn ich mit der Import-Funktion Grafik einbinde, so wird der alphakanal automatisch ignoriert.
    2.Frage/Problem:
    Eine alternativ Lösung wäre für mich, wenn ich die Grafik per Script aktivieren bzw. deaktivieren könnte? gibt es ein Flag, wie "visible"?
    3. Frage/Problem:
    Wie kann ich per Script die Darstellungsebene der Objekte wie Grafik ändern? Ich kenne leider nur die Variante, per Kontektmenu in den Hintergrund bzw. Vordergrund zu versetzen.
    Vielen Dank

    Sie haben recht, die Funktionen war zur 9.1 noch nicht offiziell. Funktionieren tut sie aber trotzdem. Hier die Hilfe aus Version 10:
    Befehl: GraphObjMoveSel
    Verschiebt markierte Report-Objekte in den Vorder- oder Hintergrund in DIAdem-REPORT.
    Call GraphObjMoveSel(ObjDelta)Eingabeparameter
    ObjDelta
    Bestimmt die Anzahl der Ebenen, um die DIAdem das Objekt verschiebt.
    Longinteger-Variable
    -65535 <= ObjDelta <= 65535
    Hinweis  Der Betrag der Variablen ObjDelta darf den Wert (ReportObjLast - 1) nicht überschreiten.
    Beispiel
    Das folgende Beispiel verschiebt markierte Objekte um eine Ebene nach vorn.
    Call GraphObjMoveSel(1)
    Call PicUpdate
    Befehl: GraphObjMoveVerschiebt ein Report-Objekt vor oder hinter die anderen Report-Objekte eines Arbeitsblatts.Call GraphObjMove(GraphObjName, ObjDelta)Eingabeparameter
    GraphObjName
    Bestimmt den Namen eines Objekts in einem Report.
    String-Variable
    Maximal 16 Zeichen
    Hinweis  Verwenden Sie in DIAdem-REPORT statt der Variablen GraphObjName die Variable ReportObj.
    ObjDelta
    Bestimmt die Anzahl der Ebenen, um die DIAdem das Objekt verschiebt.
    Longinteger-Variable
    -65535 <= ObjDelta <= 65535
    Hinweis  Der Betrag der Variablen ObjDelta darf den Wert (ReportObjLast - 1) nicht überschreiten.
    Hinweis  Nehmen Sie die Parametrierung von Objekten in DIAdem-REPORT immer in folgender Reihenfolge vor: Das Objekt öffnen, den Inhalt des Objekts verändern, dann ein Unterobjekt öffnen, den Inhalt des Unterobjekts verändern, dann das Unterobjekt schließen und zuletzt das Objekt schließen. Weitere Informationen finden Sie in der Vorgehensweise Zugreifen auf Objekte in DIAdem-Modulen.
    Beispiel
    Das folgende Beispiel erzeugt einen roten Text und davor ein 2D-Achsensystem mit gelbem Hintergrund. Der Befehl GraphObjMove verschiebt den Text vor das 2D-Achsensystem.
    Call GraphSheetNew("Test")
    Call GraphObjNew("Freetext","New Text")
    Call GraphObjOpen("New Text")
    TxtTxt ="Test Report"
    TxtSize =20
    TxtColor ="red"
    TxtPosX =50
    TxtPosY =50
    Call GraphObjClose("New Text")
    Call GraphObjNew("2d-axis","2DAxis1")
    Call GraphObjOpen("2DAxis1")
    D2AxisTop =15
    D2AxisBottom =15
    D2AxisLeft =25
    D2AxisRight =25
    D2AxisBackColor = "Yellow"
    Call GraphObjClose("2DAxis1")
    Call PicUpdate
    Call MsgboxDisp ("Move text into foreground")
    Call GraphObjMove("New Text",1)
    Call PicUpdate

  • Setting precision format for variables or in STATS...

    I need to be able to format variables so that they only have a certain number of decimal places.  I know you can use a rounding function but it is for about 90 variables so that would not be an efficient way to accomplish this.  Is there a way when global dimensioning variables to set a precision factor or can you set while doing STATS like for average or stdev?? Help appreciated.

    Hi BW_Cummins,
    There is no way to set an internal precision property of a DIAdem variable or a VBScript variable.  You can of course format the display of that variable with the "str()" function, which you can include as an embedded expresion in a REPORT layout (text box, Axis lable, legend, etc.).  You can also declare DIAdem real variables as either DBL or SGL, so that would set a certain maximum precision, but that doesn't sound like what you want.
    Let me know if you need something other than display formatting,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How con i produce a colored .eps output from Diadem Report

    Hello anybody,
    I need your Help.
    I want to export my Diadem report data to EPS with color. But when i
    export ist via the export funktion of diadem i only get gray value EPS.
    What went wrong and how can i fix tghe Problem.
    I am running Diadem 9.1 under Windows XP on an AMD 64 3000+ processor with 526 MB RAM.
    Thanks for your help
    Jochen Fink
    University of Ulm, Dept of Biomaterials

    Hi Jochen,
    as with many Windows applications, DiaDEM isn't able to produce EPS
    directly AFAIK. A workaround is, to install a Postpcript printer on Windows
    which will print to a file. Most PS drivers offers an option to produce
    EPS instead of PS. Or you could print to PS and convert it to EPS using
    ghostscript.
    Another way could be to export a WMF/EMF. But here you need a vector
    graphics progam which is able to work with WMF/EMF (most unfree Windows
    programs) and to save to EPS (could be a problem again). But beware,
    if I insert a WMF/EMF into Powerpoint e.g., it makes quite a difference
    wether I paste it as WMF or EMF (dimensions are different, some
    characters may get lost in WMF)! So I'd opt for the first way...
    I hope this helps a bit.
    Cheers,
        Carsten

  • Diadem V9.1 - DAC - Funktionsgenerator - Start/ Stopp bzw. Remote

    Hallo,
    bei Remotesteuerung des Funktionsgenerator wird zwar ein Remotedateneingang generiert, aber kein Steuereingang, um das Signal zu starten oder zu stoppen.
    Wie kann man eine vom Funktionsgenerator erzeugte Kurve starten und stoppen um diese Funktion mit mehreren verschachtelten Funktionen (Rampen) zu
    synchronisieren (1. Rampe auf fertig -> nächste 2. Rampe beginnt -> ....)?
    Danke im voraus für Eure Hilfe!

    Hallo Gunter,
    vielleicht helfen Ihnen auch die Beispiele zum Thema Ablaufsteuerung in DIAdem-DAC weiter. Das Beispiel "Sequentielle Abläufe" zeigt, wie DIAdem Abläufe hintereinander abarbeitet wenn Sie mehrere Taktblöcke definieren, die sich gegenseitig starten.
    Zum Thema Vorgabe von Rampen ist vielleicht auch die Mehrpunktskalierung interessant, wenn Sie die x- und y-Werte der Eckpunkte in je einen Datenkanal schreiben. Auch hierzu gibt es ein Beispiel: "Sollwertgenerierung mit Freier Linearisierung".
    Viel Erfolg,
    Ralf
    Die zitierten Namen der Beispiele stammen aus DIAdem 10.1. Aber die genannten Beispiele müssten in Version 9.1 auch verfügbar sein. Möglicherweise unter etwas anderen Namen.

  • Daten aus TestStand mit DIAdem auswerten!

    Hallo zusammen,
    Ausgangslage:
    Daten werden mit TestStand in eine Datenbank abgelegt.(Beispiel)
    Ich soll eine Histogramm-Klassierung und eine Trenddarstellung mit wählbaren Losgrössen in Diadem 10 darstellen.
    Frage: Wie bekomme ich alle Messwerte eines Messschritts in ein Kanal?
    (Gibt es vieleicht im TestStand bessere Lösung um die Daten besser zu erfassen !?)
    Und wie kann ich für die Berechnung eines Mittelwertes für Trenddarstellung eine Losgrösse definieren?
    Freundliche Grüsse
    David
    Attachments:
    Beispiel1.zip ‏22 KB

    Hallo!
    Für die zusammeführung alle Messdaten in einem Kanal, können Sie einen kleinen Script schreiben.
    Hier einen kleinen Script, die Ihren Datenbank scannt und 3 Kanälen erzeugt für "Measurement 0", "Measurement 1" und "Measurement 2":
    Option Explicit
    dim i, index
    dim kanal_laenge
    kanal_laenge = CMax("UUT_Result") - CMin("UUT_Result")                                    'Berechnet die Anzahl von Messschrittes
    call ChnAlloc("Measurement 0", kanal_laenge, 1, DataTypeFloat64, "Numeric")      'Erzeugt die 3 Messkanälen
    call ChnAlloc("Measurement 1", kanal_laenge, 1, DataTypeFloat64, "Numeric")
    call ChnAlloc("Measurement 2", kanal_laenge, 1, DataTypeFloat64, "Numeric")  
    i = 1
    index = 6
    Do While index < ChnLength("UUT_Result")                           ​                         'Scannt die Datenbank für die Werten
      ChD(i, "Measurement 0") = ChD(index, "NUMERIC_VALUE")                       'von Measurement 0, 1, und 2
      ChD(i, "Measurement 1") = ChD(index+1, "NUMERIC_VALUE")
      ChD(i, "Measurement 2") = ChD(index+2, "NUMERIC_VALUE")
      i = i+1
      index = (i-1)*22+6
    Loop
    Sie können dann beim Statistik (in Diadem Analysis) die Historigramm-Funktion verwenden, um Ihren Berechnungen zu machen.
    Sonst können Sie im Script die Funktion "ChnHistogram" verwenden und die Berechnung direkt im Script durchführen lassen.
    Mit freundlichen Grüssen
    Ken Tobler

Maybe you are looking for