Script to find fixed values

Hello world

I am new to tiara scripts and I'd appreciate any help I can get.

We get the various channels of test data, including: time, speed, engine rpm, distance, etc. Need to find:

(1) the time interval between a State and a set of fixed values of distance (m) or speed (km/h).

(2) get the speed of ROTATION of the motor when the speed reaches 100 km/h for the first time

For 1), the departure time is when the value in the AccelPedal canal is equal to or greater than 99. In theory, the vehicle came to rest for at least 30 seconds at the beginning that, at that same moment, the distance and the speed should be close to zero while the value in the channel optional BrakePedalPos must be zero.

The time intervals are caught between the above departure time and time to reach:

(A) the value of closest distance from you to: 6.1, 12.2 and 18.3 meters

(B) the most close speed value: 10, 30, 50, 80, 16.09, 32.19, 48,28, 64,37 and 80,47 km/h.

Finally, it takes the average of the chain of acceleration between the time of departure (or line) and the time (or line) when the speed reaches 24,135 kph.

As final note, the sampling rate of data common to all channels but may vary from one test to another.

Felix HC

Felix HC

Looks like the ChnFind command will be your best friend.

Here is the syntax that will find what are greater than 10 channel named 'Channel' in the Group of channels "Group1".

Dim intMyResult
intMyResult = ChnFind("Ch(""Group1/Channel"") > 10", 250 ')

It will return the index in the channel where found. I suggest you seek help, details of the ChnFind command.

I also love going out a reference channel. This allows me to treat each channel in a table (from 1 not to zero).

The ChnFind command is faster than using channel references, but not as much.

Channel references are out as in this example.

Dim oChn

Set oChn = Data.Root.ChannelGroups ("EXAMPLE"). Channels ("Revs")

for i = 1 oChn.Size

If oChn (i) > 10then

endif

next

It will then take reference to the "EXAMPLE" group and the name of the channel "tricks".

Then you can refer to string values using

oChn (10) to get/set the value 10 in the channel.

Hope this helps some.

Paul

Tags: NI Software

Similar Questions

  • I have windows live hotmail on Vista.Problem is that this message, 'error on page' appears on the lower left and no emails will be open and I can't change pages. How do you find / fix 'error on page '?

    I have windows live hotmail on Vista. New problem is the error message, 'error on page' appears at the bottom left. As a result I can't open any email or forward to other pages of e-mail. How does a find/fix 'error on page '?

    Hello

    ·        What browser do you use to connect to the internet?

    ·        The issue is with Hotmail?

    If the question is only limited to Hotmail then confirm your request in the forum Hotmail for assistance:

    Windows Live Solution Center Hotmail Portal

    http://windowslivehelp.com/product.aspx?ProductID=1

    If you use Internet Explorer, then you can try the steps from the link and check if it helps:

    What should you do about Internet Explorer script errors?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-should-you-do-about-Internet-Explorer-script-errors

  • A Script to find and replace the layer names

    Is there scripts to find and replace the names of layers?

    There is an excellent script available for Photoshop that allows you not only to replace words in layer names, but also insert words as prefixes, Suffixes and sequential numbers.

    The version of the illustrator of this script allows only sequential numbering: it does not offer search and replace words.

    Ideally, it would be great if there were something that could find multiple and replaces in a go:

    (for example

    You have layers like this car, the dog, the bat

    You enter: because (Option1), dog (Option2), Bat (Option3)

    Your layers become then: option 1, option 2, Option3).

    )

    Big_SmiLe, which is a very good start! Step 1 of learning how to Script is indeed, by adjusting an existing simple script to make things more complicated. (And usually then "break something", which is also a necessary part of the process.)

    You are right your comment, it comes to repetitive things. For one or two different articles that wouldn't be a problem, but in the longer lists you are soon lost.

    As usual to work with lists of search - replace is to build a table:

    var layernames = [
    [ 'FHairBowlBoy *Hair', 'Hairboy1' ],
    [ 'FHairCurlyafroBoy *Hair', 'Hairboy2' ],
    [ 'FHairSpikyBoy *Hair', 'Hairboy3' ],
    ];
    

    The general idea is to loop through all the names, check if the current layer name is "layernames [i] [0]" (the left column) and if so, rename it "layernames [i] [1]" (the right column). If you know how to write a loop in Javascript, then you can implement this immediately.

    However...

    A more advanced method to do this didn't need even loop on all layernames - instead you can immediately 'get' the correct name by layer! It's magic! Almost!

    The trick is to use a Javascript object rather than a table. JavaScript objects are nothing special; "Layers" of Illustrator are an array of objects, and each object 'sex' has a 'name' property, which you can read and set the value. What I do here, is to create a new object, where the part 'name' is the name of the original layer and its value is the name of the new layer. All you need to check each layer is if there is a "object.originalLayerName" property and if so, assign its value to this layer name.

    It looks a bit like the table above, except that (1) you use {.} instead of [..] to create an object and (2) you add pairs "name: value" instead of 'value' only (in fact, the 'name' of a value in a table is simply her number).

    So here's what it looks like:

    // JavaScript Document
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {
     'FHairBowlBoy *Hair':'Hairboy1',
     'FHairCurlyafroBoy *Hair':'Hairboy2',
     'FHairSpikyBoy *Hair':'Hairboy3'
    };
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++)
    {
     //Set up Variable to access layer name
     var currentLayer = app.activeDocument.layers[i];
     if (layernames[currentLayer.name])
     {
      currentLayer.name = layernames[currentLayer.name];
     }
    }
    

    Enjoy!

  • How to find the value closest in the table?

    Hi all

    I just want to find the value closest from the string table. That I joined herer as an image.

    Now, if I want to find the value of 350 of the string table and that's not in the table in the output array there should be more close 350 display value...

    Thank you for the support

    Vinal Gandhi

    Hi G Vinal,

    something like the joint comes to my mind.

    It may be useful

    Mike

  • Find a value in a table

    Hi, I'm trying to find the index of a value in a table, I know that it is a VI called 'research in a 1 d table' but there is my problem: Let's say I'm looking the value 25 and in my series of measurement, there like 24.998 and 25.001 but not 25, this VI will not find the value 25 although he went close enough , so basically I try to inplanta a tolerance system making it able to find with precision +-3 or 4 on the index, doing someone something for this?

    Thanks for your time

    I wrote this for a similar job, but it could be used for your application.  Just use the vi attached in a loop to check "in range" and returns the index of the loop of the first occurrence.

    Hope this helps

    Ken

  • Look for the logic find the value of m and c of this equation y = mx + c.

    Hello

    I have 4 points for example = 3.38276, 0.375866 xi

    Yi = 3.37749, 0.281924

    using this tip, I want to find the value of m and c.

    You please suggest me some logic to solve this equation using labview programming.

    I tried with one solution, but in this case I do not have the correct answer. Here as an attachment, there is vi help I tried to solve my equation, but in this case the value that never got as a response it is dissatisfied with the equation, means if I replace the value of m and c eqation then it must be L.H.S = R.H.S, but I don't have the right solution.

    You please guide me.

    Thank you very much.

    Why do you think that the results are incorrect? I put your numbers in your code and the result on a XY Chart Wescott, I then bunk which with more than 20 values with a value ranging from 0.6 to 3.2 x and use factors calculated in your code to generate values of Y. The two overlap almost exactly...

    Mike...

    BTW: There is a linear adjustment integrated into LV VI

  • How to find the value max and min for each column in a table 2d?

    How to find the value max and min for each column in a table 2d?

    For example, in the table max/min for the first three columns would be 45/23, 14/10, 80/67.

    Thank you

    Chuck,

    With color on your bars, you should have enough experience to understand this.

    You're a loop in the table already.  Now you just need a function like table Max and min. loop.  And you may need to transpose the table 2D.

  • How to find missing values in the table?

    Hi all..

    Please help me.

    1.jpg

    For example:

    I have a. table

    in this table, I have a folder with the number 1 up to 10 serial number.

    And then, in table B, I put number between 1 and 10.

    and I use the number 1, 2, 3, 6, 8, 10.

    I want to find missing values between 1 and 10. So, can I select with query for this case?

    It's the value of query output:

    4, 5, 7, 9

    Sorry for the bad language.

    Thank you all.

    Select

    r

    Of

    (

    Select Rownum r

    Of the double

    Connect by Rownum<= (select="" serialto="" from="">

    )

    where are > = ((select serialfrom from tablea))

    less

    Select the series from tableb

  • Where can I find the value of ss_nm_jvm_startup_properties?

    Hello

    I am trying to reset the password for the user weblogic using the document Doc-ID 1949675.1

    I am stuck at step 4

    B. start AdminServer:

    Java $ < s_nm_jvm_startup_properties > - Dweblogic.system.StoreBootIdentity = true - Dweblogic.Name = AdminServer weblogic. Server

    Where:

    < s_nm_jvm_startup_properties > is the same as the variable value of context ss_nm_jvm_startup_properties

    Where can I find the value of s_nm_jvm_startup_properties.

    I searched the support site and google it without any result.

    I'm new in EBS and try to upgrade the EBS 12.2.0 to 12.2.4

    Thank you

    Salman

    Hello

    Application contextfile $INST_TOP/appl/admin find the setting "nm_jvm_startup_properties".

    grep nm_jvm_startup_properties context_file.xml

    Thank you

    A H E E R X

  • How to find the value dated the same day in the last year

    I want to know how to find the value dated the same day in the last year.

    I use now, there is the function with the year and the result is

    Year Rev There are Rev
    20113000
    201240003000
    201320004000
    201450002000

    It works but it's not that I want. I'm trying to add the column date (Ex.20140101) in my report but it'snot work.

    I want to show:

    Date Rev There are Rev
    20110112200
    20120112100200
    20130112300100
    20140112500300

    If use (< degree >, < time_dim >. < date >, 365), it works but does not correct 100%

    Please help me...

    Thank you very much

    Check this link cool - bi.com

  • Script to find duplicates in a row and combine the data in specific column

    Looking for a script to find duplicates in a line like below...

    "VM1', 'VM', 'LDEV', 'LDEV1', 'LDEV2', 'LDEV3', 'LDEV4', 'LDEV5', 'LDEV6 '.
    'VM', 'VI-SVC-VM001', "0000ef ', ' '," "," "," "," ""
    'VM', 'VI-SVC-VM001', "0000de ', ' '," "," "," "," ""
    'VM', 'VI-SVC-VM002', "0000df ', ' '," "," "," "," ""
    'VM', 'VI-SVC-VM002', "0000f0 ', ' '," "," "," "," ""

    .. .and manipulate the data in the following:

    "VM1', 'VM', 'LDEV', 'LDEV1', 'LDEV2', 'LDEV3', 'LDEV4', 'LDEV5', 'LDEV6 '.
    "" 'VM', 'VI-SVC-VM001', '0000ef', "0000de ', ' ', ' '," "," ""
    "" 'VM', 'VI-SVC-VM002', '0000df', "0000f0 ', ' ', ' '," "," ""

    (Note: VM VI-SVC-VM001 object has two LDEVs him assigned 0000ef and 0000de)

    There may be two, three, or n LDEVs attributed to each VM object. I guess I have to build a table and the "join-collections" script can't cut it on this one.

    I have the process to follow, I just need to put it in a loop (note, data already sorted on the virtual computer object):

    1 import-csv

    2. read each line, matched VM object, copy each found LDEV and place it in the next LDEV along

    3. remove the duplicate line

    4. rinse, repeat until the end

    Thank you.

    It's a solution pleasant Luc. I didn't use the Group-Object cmdlet to solve this problem.

    Now I can go to sleep without having to worry about this problem more.

  • Find a value in ASO...

    Gurus,

    If I hit a combination in OSB, essbase research the value of data presents at this location using the Index to locate the block, then the dense combination of members to find the value of data (it's my understanding, pls correct me if I m missing something here)...

    How are the data value for a particular combination sought to ASO (if its pagination through please developed)

    Thank you

    ~ RN

    ASO is, as you already know, completely different.

    If no aggregate views are materialized and compression is not in use, each data point of zero is represented by a 'row' in the .dat file.  The line contains a bitmap identifier metadata to the intersection and the data value itself.

    The clever bit (no pun intended) is how top-level queries are processed - the bitmap that represents your market size e.g. is coded so that you can find all the lines representative "Is" (and the sum of their values of data) in a single step, does not need to look for "New York", "Connecticut" and so forth separately.

    Views overall, compression, dynamic hierarchies and attribute dimensions all complicated.  If you can, buy "Development of Essbase Applications" and read the chapter of Dan Pressman.  Also, check out the following presentation at WORLD (both a video of the presentation and the slides are available): Kscope13: ASO operation and how to design for Performance

  • script to find configuration of esxi host problems.

    Need a script to find if all configuration host on all issues the esxi host in the vCenter...

    example: alert, warning.

    Hello, nareshunik-

    You can consult the properties TriggeredAlarmState and ConfigIssue to display HostSystem for the VMHost objects, such as:

    Get-View -ViewType HostSystem -Property Name,TriggeredAlarmState,ConfigIssue | ?{$_.TriggeredAlarmState -or $_.ConfigIssue} | `    select name,         @{n="NumConfigIssues"; e={($_.ConfigIssue | Measure-Object).Count}},        @{n="NumAlarms"; e={($_.TriggeredAlarmState | Measure-Object).Count}}
    

    This will return just all hosts with a triggered alarm, a configuration problem or two (and the course of each):

    Name       NumConfigIssues  NumAlarms
    ----       ---------------  ---------
    myHost001                1          0
    myHost122                2          0
    myHost212                1          1
    

    How does do for you?

  • script to find the local TSM and TSM remote is activated on the esxi host

    Need to generate scripts to find on which esxi host in the vcenter is enabled for Local TSM and TSM remote...

    Hello, nareshunik-

    Thanks to the handy Get-VMHostService cmdlet, you can quite easily get this info:

    Get-VMHost | Get-VMHostService | ?{"TSM","TSM-SSH" -contains $_.Key -and $_.Running} | Select VMHost,Key,Running
    

    The result is something like:

    VMHost    Key      Running
    ------    ---      -------
    myHost01  TSM         True
    myHost02  TSM         True
    myHost05  TSM         True
    myHost05  TSM-SSH     True
    

    TSM is the local service of TSM or "ESXi Shell", and the TSM - SSH service is "SSH".  How does do for you?

  • need a script to find vmware tools does not not on virtual machines

    I need a script to find the virtual machines running without vmware tools?

    Hello, nareshunik-

    You can add an extra point to the filter to include only the virtual machines that are on, as:

    ## get names of powered-on VMs that either do not have Tools installed, or on which Tools are not currently runningGet-View -ViewType VirtualMachine -Property Name, Guest.ToolsStatus -Filter @{"Guest.ToolsStatus" = "toolsNotInstalled|toolsNotRunning"; "Runtime.PowerState" = "PoweredOn"} | Select Name, @{n="ToolsStatus"; e={$_.Guest.ToolsStatus}}
    

    How does do for you?

Maybe you are looking for

  • How to configure rules? I can't get it work

    I tried following the instructions but when I click to send mail in the selected folder, nothing happens.I have to be able to get the rules to work if I will continue to use Thunderbird

  • Upgrade RAM to HP pavilion 15-n209TX

    My HP Pavilion 15 n209tx book has 2 memory slots for RAM modules. A slot contain Hynix 4 GB 1600 MHz RAM. I want to update total RAM 12 GB. I'm of the India & amp; Consider purchasing 8GB DDR3L 1600 MHz SODIMM 12800, PC3L Non - ECC SDRAM 1.35v. I hav

  • Custom progress bar

    Hello. I'm doing an intelligent progress bar (similar to the picture) where it shows this feint of diagonal dotted the ability to change the color of structure (or something similar) on the progress bar (i.e. light blue when operation successful and

  • Codes not working not not in XBOX

    I have an xbox 360 and just bought the game mx vs atv alive and the code inside the box that is supposed to be used for free things didn't work so I sent THQ and they gave me two codes, but none of them worked? there not perhaps another problem?

  • Change the IP for UCS management pool

    Hi all We try to change / less the size of the property held by the pool for blades UCS KVM management. Some IP addresses are assigned to the existing blades, pourrais I delete existing IP pools directly and create the new compact block for managing