Calculation in tiara

Hello

I am trying to automate the generation of reports using the VB script, I can do all the calculations in the Excel worksheet, but how I can put implement the same in the Vb script.

I want to take an average of 2 cells in X channel and the channel sum output Y.   Y = X + (X-1) / 2

then multiply the channel Y with 9.8 to give the output to channel Z.  Z = Y * 9.8

I need to do all the calculations in all cells.

also, I need ask a set of command in the specific channel with 100 and 0 as the departure and arrival in the channel.

If any body knows that I can implement this in VB scripts, it would be a great help.

Thank you

Veer

Hey Veer,

It would not be acceptable to take the average of 3 adjacent cells?  If so, you can use the ANALYSIS feature "Smooth" in the palette "Curve Fitting" with a width of 1 smoothing.  Then, you can use the ANALYSIS function "Scale" in the "Basic mathematics" palette to multiply by 9.8.

Brad Turpin

Tiara Product Support Engineer

National Instruments

Tags: NI Software

Similar Questions

  • Service event of Chanel

    Hi all

    I have a dataset using two channels: (1) a signal that has Boolean values (0/1) and (2) times. I want to eliminate this signal noise, I mean what gives a value of 0 for the signals that last less than 2 minutes. I guess first of all, I must calculate delta X when Y = 1 and once I did I can eliminate the smaller values. I was recommended to use the search function of event for this calculation in tiara 2015 in a previous post, but I don't know how to use it in a script.

    Thank you

    Estefania M


  • Calculator command stack 2014 tiara

    The last update of Diadem 2014 doesn't seem to store the previous commands in the calculator command stack. He always seems to be empty. Is there a setting hidden somewhere?

    Thank you Walter,.

    Now, works great.

    Happy new year!

    Karoline

  • Constants in the calculation Manager

    Hello, is there a way of constant output in calculation Manager?  I tried to generate a value, but I get an error (object required: 'CurrCalculationValues').

    Specifically, I want the molecular weight of carbon output.  Since it is a constant 12,011 g/mol, that I do not see how to set the value to use in other calculations.  I don't want to enter the constant in each calculation that uses it as an input, I prefer to use the dependency.  (There are other constants which are a little more complicated than this one).

    I guess I can sum up my question like: "How you use constant OUTPUT calculations as INPUTS to other calculations channel."

    Hi Russell,

    I recommend that you export each constant to a property attached to the root level, group or channel (depending on which is most appropriate based on the scope of the constant).  Then, you can reference this property as an input in the subsequent calculations.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Alternative to MS Excel for viewing and the calculation

    Good evening

    I am looking for an alternative to MS Excel. My use case is:

    (1) collect data using Labwindows CVI

    2) store in .csv files

    (3) with Labwindows CVI to copy data from .csv files into .xls templates

    -some calculations of data is executed by ICB

    -some equations are in the Excel file and get automatically calculated after you paste the data

    -existing charts in Excel templates display data calculated after copying

    Given that the amount of files has grown over the years and data analysis is becoming increasingly heavy, I'm looking for an alternative allows

    (a) possibilities for visualization of data and the flexibility of chaning that later

    (b) calculation within the tool (I don't want to have too many equations hidden in some C programs)

    (c) integration in Labwindows CVI (I can change that... but not quite yet)

    Anyone have a recommendation?

    Thank you!

    Hi ZerMahlMeer,

    Tiara not only allows you to perform a multitude of analyses (very easily I might add) on your data, it provides even the ability to automate the entire data, analysis and reporting through Visual Basic Script.  Another really nice feature of DIAdem is that it copies the data that you import and saves it as. Files TDM that prevents overwriting your original data.  If you did, you might also the scrap of the generation of the .csv file and use the C API of TDMS.  This allows you to save data much faster because of the binary structure of TDMS files and then you can open these files in Excel using the TDM Plugin OR for Excel (free to download) and import natively in DIAdem.

    What you call sounds almost exactly what DIAdem is made.  The only transient pain point can be get used to writing VBS if you don't know the code.  However, most of the things that you do not want to refer to a script (for example data channels) can be simply dragged from DIAdem data portal to the script to generate the script code to access this item.  There is also a script recorder that allows you to perform activities of DTC using configuration dialog boxes and automatically capture this activity in the script, so the rise is also greatly facilitated.

  • Calculations using values in the channels

    Is there a way to make simple calculations (addition/subtraction) of single values selected channels?   New user DIAdem, so I'm not at all familiar with the scripts.  Looks like it should be a simple command, and I'm right on it.

    Thank you

    Shannon

    Hello Shannon,.

    It seems to me that you do not want to add two or more 'cells' (to use the jargon of Excel) together.

    DIAdem manages data such as channels, not individual cells. If the approach to add two cells in DIAdem works like this:

    The variable SMC allows you to access a 'cell' in a channel, using the following sequence parameters:

    ChD (X, Y)

    where X is the line number of the table of channel, and Y is the name of the channel (column) or the number of the cell you want to access.

    For example, this expression here calculates the result of adding the value of line 2 of the channel called "Temperature_1" and the channel called "Temperature_2" of the example data set that takes over at the start of tiara. In this case, R1 is a real internal DIAdem variable that stores a single value.

    R1 = SEC (2, Ch("[4]/Temperature_1")) + SMC (2, Ch("[4]/Temperature_2"))

    The calculation above can be entered in the "Calculator" which is available in MODE of DIAdem and DIAdem analysis in the toolbar.

    I hope it's useful, please let us know if you have additional questions.

    Otmar

  • CHN combobox how to get the selection of the channel to the scenario and calculations

    Hi, my mother languaje is Spanish and I am very confused

    the dialog box user box what it should do is that I could choose among two chn combo boxes 2 angles data from where I want to calculate the difference.

    TL:Dr I want to choose 2 angles and call Calculate ("Ch(""ANS"") = (Ch (" "L1 (1,1)" ")" ")-(Ch (" "L1 (1,2)" "))")

    This is by far my script in the user dialog box

    "warns of variable ANGLE1 en cambio

    Sub ChnComboBox1_EventChange (ByRef This) ' creates the event handler
    Call MsgBoxDisp ("Selected channel:" & ChnComboBox1.Text)
    End Sub
    "warns of variable ANGLE2 en cambio
    Sub ChnComboBox2_EventChange (ByRef This) ' creates the event handler
    Call MsgBoxDisp ("Selected channel:" & ChnComboBox2.Text)
    End Sub
    ' THE PLOTS
    Sub Button1_EventClick (ByRef This) ' creates the event handler
    Call Calculate ("(""Result5" ") Ch = (Ch (" "L1 (1,1)" ")" ")-(Ch (" "L1 (1,2)" "))")
    End Sub

    had a lot of trouble with examples please help any advice will suffice

    Hi Johnny,.

    As long as you have a fairly new tiara version, you should be able to use the built-in function of subtraction in the Panel ANALYSIS instead of the calculator of channel, like this:

    Call ChnSub (ChnComboBox1.Text, ChnComboBox2.Text, "Result5")

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • With the help of tiara, how to get the slope of a signal (linear or nonlinear)

    Speed of rise or precipitation rate and the temperature of the signal, I am trying to sign up the slope in my report using DIAdem,

    I could not find, is there a function of slope?

    or a way to do

    Thank you

    Na'amat salvation,

    You can get the calculation of the slope to climb the built-in "ANALYSIS > Curve Fitting > calculate regression."  If you want to adjust only a subset of the data, you will need to extract this subset of data to a new data channel, and then initiate the calculation of reconciliation on the new channel.

    Here is a script I created to do the calculation of extraction and statistics/slope range automatically.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Calculation Excel in DIAdem for hours of Sun points

    I am trying to perform the calculation for the hours of Sun peak in tiara we usually do in Excel.  Any advice on how to approach this calculation in the popular DIAdem environment.

    Hi Moses montoya.

    I was able to recreate hours of Sun data tip with the following script.

    Dim PeakSun, intLoop
    PeakSun = ChnAlloc ("Sun rush hour")
    Data.Root.ChannelGroups (1). Channels ("Sun rush hour"). Values (1) = 0

    IntLoop = 2 to (Data.Root.ChannelGroups (1).) Channels ("2"). (Size - 1).
    Data.Root.ChannelGroups (1). Channels ("Sun rush hour"). Values (intLoop) = Data.Root.ChannelGroups (1). Channels ("Sun rush hour"). Values (intLoop - 1) _
    + (Data.Root.ChannelGroups (1).) Channels ("1"). Values (intLoop) - Data.Root.ChannelGroups (1). Channels ("1"). Values (intLoop - 1)) * 24 / 1000 _
    * Data.Root.ChannelGroups (1). Channels ("2"). Values (intLoop)
    Next

    Is both channel 1 and channel 2 is the irradiance.

    Kind regards

    Brandon v.

    Engineering applications

    National Instruments

    www.NI.com/support

  • The value of path as unit target in the calculation Manager

    Hello

    is there a way to define a course of treatment as unit target in the calculation Manager? I have data with unspecified units (for example, deg_Cel ° C) then I disabled the calculation of the amount in function. Now I want the result channel have the same unit as the first input channel (something like @@ChnUnit (N) @).

    Best regards

    Martin

    Hi Martin,

    You can launch the Manager of calculation without management unit (turn based on the amount off the coast).  You can set the property unit of the resulting string with ChnDim() to be of the same unit as the starting channel.  I guess you do all that with a VBScript.  You actually run the Manager calculation by hand with the mouse?

    You can add as many lines of VBScript code that you want at the end of the normal equation.  Here is an example of calculation which comes with tiara:

    P = n * (2 * Pi / 60) * M * (1 / 1000)

    If you click the button, you can add the following line of VBScript call second to run the equation:

    Calculate the call ("P = n * (2 * Pi/60) * M * (1 / 1000)", CurrSymbols, CurrValues, "kW")
    ChnDim (P) = ChnDim (n)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Cannot add new channel - tiara mΘmoire

    Hello

    I loaded a chunk of data to my tiara. I've got 92 groups with approximately 740 channels each and a Channellength with about 1000.

    Now I can't do anything in tiara

    When I try to calculate a channelaverage betwenn two channels, I get the message "Die gewunschte Kanalmenge nicht but werden konnte. I can't yet do ChnLinGenImp.

    Is there a way to increase the memory allocated to the tiara with a parameter? Or is it just too much data to all the...

    Here is my systeminfos:

    Tiara 12.0.1 SP1b

    1.410.700K RAM usage

    Operating system: Win7 Enterprise SP1 64-bit

    CPU: i5 M520 @ 2.40 GHz

    RAM: 4 GB

    Kind regards

    Martin Kozlowski

    Hi Martin,

    TIARA has a maximum global chain of 65335 counter (2 ^ 16).  Based on figures you provided, it looks like you're bumping into this hard limit.  Would it not possible to load the part of all of the data in the data portal and do your calculations in steps?

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • FFT and differ from the values overall btwn VI and tiara

    Hi all

    I have an application that displays live readings of vibrations which the spectrum and the overall vibration level.  Everything my generation of report is made in the DIAdem scripts, so it is essential that all values calculated and displayed on the side of LabVIEW are the values calculated and reported in DIAdem.  The VI and Script, when the entrance to the PDM attachment, attached give me values significantly different to the size of the FFT and the overall value of RMS.  Can anyone spot what I'm doing wrong?

    Thank you

    Scott

    Hello

    This is an excellent response of R & D. I felt that it would be better to put it on the web, then keep it limited to your service request.

    The difference has to do with the window of correction. The results are the same if you choose rectangluar (or not) window.

    Usually a window takes a share of the singnal away, so in the first place, the result has a different shape and is smaller compared to train with rectangular window. This can be fixed with a specific factor for each window.

    There are two possible corrections. Random and periodic.

    -Periodic is used if you have pure sinusoidal signals and you want to measure the peak value. A typical use case is the window of flattop is designed for this type of calculations.   The periodic correction is too great if you want to add values to calculate the total RMS signal or the sum of a certain frequency band.

    -Random is correct the signal back to the correct overall RMS value and must be used in all other cases.

    The periodic correction for Hanning window is a factor of two. The correction is randomly about 1.633. Tiara will give the same result as LabVIEW if you use the following type of correction:

    FFTWndCorrectTyp = "periodic".

    In the world of the FFT analysis, the different corrections are very often not obvious and hidden to the user. Unfortunately, it is also the case in LabVIEW. You can find a good example of explanation here:
    http://blog.Prosig.com/2009/09/01/amplitude-and-energy-correction-a-brief-summary/

    There are different factors for different window functions. If you go further in the FFT - VI you will find "window scaling VI. It has a «constant window» output With this, it is possible to obtain the correction values for window functions.

    I think also, periodical is false in most cases, when Hanning is used, because Hanning is the best for the sum of the values of the RMS in the frequency bands and the results are bad without a correction at random.

    Hope that helps.

  • set the default name for the calculated channels

    Hello

    The German version, but sometimes the calculated channels serve the Middle English, I use tiara 10.2.

    For example if I use cclasssample with my version of tiara, only the channels named "VKlass_X" and so on

    and with another German version, the canal is named "CompoundClassificationX".

    Where can I configure these behaviors?

    Thank you

    Diademi

    Hello diademi!

    Select the "Einstellungen" menu / "Options" / «Allgemeines...» ». You get the "Allgemeine Einstellungen" dialog box. Click the "Compatibility" button... ». In the dialog box "Compatibility", you have the flag "Sprachunabhangige Ergebniskanalnamen in the ANALYSIS" where you can configure the behavior. If you press Ctrl + A and paste it into a text editor, you can see that it is the CompResChnNaming variable.

    Matthias

  • mathematical calculation in script on each element of the array.

    Hi all

    I am trying to write the VB script in which I want to do different mathematical operation on each element of channel-specific data. For example, for each element I want to find the next two index given way and both before and after publication of the results on the basis, then it is more calculating.

    It will be very useful if someone can guide me in the execution of operation on the elements in the array inside the script of tiara, that we can do in labview using indexes in the table. There are built-in math and statistics in tiara tab analysis tool. But I want to design for my custom mathematical operation.

    Thnks

    HS

    Hi HS,

    Here is a version 10.2 tiara from what I understand ask you:

    Window = 2

    Denom = 2 * window + 1

    Threshold = 10

    Chnum = CNo("[1]/Speed")

    FOR i = 1 + ChnLength (Chnum) window - window

    Sum = 0

    FOR j = i - window to i + window

    Sum = sum + ChDX (j, Chnum)

    NEXT ' j

    Ave = sum/Denom

    IF Ave > threshold CAN

    ' do action of contingent

    END IF

    NEXT ' I

    Brad Turpin
    Tiara Product Support Engineer
    National Instruments

  • Maintaining a calculated value for iterative calculation

    LabVIEW Forum Dear members,

    It may seem like a trivial question, but I'm having trouble with this problem using the LabVIEW vi & environment.  I explain as follows:

    I need calculate and display as a graph, the content of a hopper which is initially filled to 100 tons.  The hopper is to be released and filled at the same time, I have values for filling and discharge in 1 second intervals.  The contents of the hopper is a calculation simple mass balance, hopper content = materials of entry - exit.  Here are the first few sets of data:

    Material in hopper off content theoretical hopper hopper

    0                                     0                                                 100

    0                                     1.534057                                   98.465943

    0,345 5,250186 93.560757

    0.6                                       6.801075                                   87.359682

    How can I calculate iteratively and use the calculation "Content theoretical Hopper" hopper upstream and downstream?  I use the Simulation & control framework so I can't use the loop in this frame.  Attached is the program vi far and Graph2 XY build is where I'm wanting to display these data in content of hopper.

    Any help would be appreciated gratefully.

    Kind regards

    Hi bunnykins,.

    You asked a question of LabVIEW on the Discussion Forum of the tiara.  Please repost on the LabVIEW Discussion Forum.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

Maybe you are looking for

  • Cannot insert address of contacts/address book correctly in message

    Read all the article proposed without success. Cannot with any combination of clicks, buttons etc., successfully insert an address in the Contacts/address book pane in the TO: field in an e-mail message. I need to open the contact, copy and paste the

  • Not all programs work

    Hey everyone I need help. After starting my computer about a week ago, I noticed that the icon of the internet has shown that I was not logged. so I open internet explore and nothing happened. only a few applications are actually start and working as

  • Dell Inspiron 1545 Blue error screen in the time interval.

    Please check the below sign in and provide the right solution. ==================================================Dump file: 090116-23368 - 01.dmpCrash time: 09/01/2016 10:36:23Bug Check String:Bug check code: 0 x 00000124Parameter 1: 0x00000000Parame

  • Volume in blaackberry slider

    Hi all I need to create the volume slider in my application. My basic requirement is to get the noise level. (10 to 70) no matter what user defined. Please someone tell me how to create the volume slider in blackberry? Thanks in advance

  • Is there a different cinema program that I can use instead of Director?

    filmmaker keeps crashing on me I don't know why I can't fix it, so I'm looking for an alternative program too Director please help.