Create a channel by combining smaller values of the other two channels

Hello, I have two channels (v + and Volts1 +) and I am trying to create another channel (Volts_Small) that will have smaller values of the two channels. I need to compare each data point in the two channels and add little value to the new channel.

THS is what I tried without success:

I have Sun
Dim: Set Group = Data.Root.ChannelGroups ("200_68")
Dim Chn1: Set Chn1 = Group.Channels ("v +")
Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")

For i = 1 to Chn1.Size
If (Chn1.Values (i) > Chn2.Values (i)) then
Chn3.values (i) = Chn2.Values (i)
On the other
Chn3.values (i) = Chn1.Values (i)
End If
Next

I would give much help appreciate with this! Thank you.

Cedric

EDIT:

Nevermind, I solved this problem:

I have Sun
Dim: Set Group = Data.Root.ChannelGroups ("200_68")
Dim Chn1: Set Chn1 = Group.Channels ("v +")
Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")

For i = 1 to 900000
If (Chn1.Values (i) > Chn2.Values (i)) then
Chn3.values (i) = Chn2.Values (i)
On the other
Chn3.values (i) = Chn1.Values (i)
End If
Next

Hi Cedric,

I strongly advise to use the calculator channel and the MinV() function that is already integrated to tiara.  You have less code that runs much faster, especially for the largest data sets.

Dim: Set Group = Data.Root.ChannelGroups ("200_68")
Dim Chn1: Set Chn1 = Group.Channels ("v +")
Dim Chn2: Set Chn2 = Group.Channels ("Volts1 +")
Dim Chn3: Set Chn3 = Group.Channels ("Volts_Small")
Var Variables: Variables = Array ("Ch1", "Ch2", "Ch3")
Dim channels: channels = Array (Chn1, Chn2, Chn3)
Call to calculate ("Ch3 = MinV (Ch1, Ch2)", Variables, channels)

Brad Turpin

Tiara Product Support Engineer

National Instruments

Tags: NI Software

Similar Questions

  • I want to create a 2 cells in demand for numbers, the 1st cell is a dropdown menu with items of text, when choosing an item, that it would be represented by a numeric value in the other cell. How can I do?

    I want to create a 2 cells in demand for numbers, the 1st cell is a dropdown menu with items of text, when choosing an item, that it would be represented by a numeric value in the other cell. How can I do?

    You can use vlookup() like this:

    (1) crate a table like this:

    the first line is a heading row

    the first column contains the same list of items in the context menu

    the second column contains the corresponding values

    name of the table 'value '.

    In another table (where the pop-up menu), you can use the table of choice of 'Value' like this:

    create a drop-down list in cell B1

    Select cell C1 and type (or copy and paste) the formula:

    = VLOOKUP (B1, Value::A:B, 2, 0)

    short hand for this is:

    C1 = VLOOKUP (B1, Value::A:B, 2, 0)

    now change the pop-up to display the value in the change of cell C1

  • Moving Listbox values in the other drop-down lists

    Hi - I am an advisor to undergraduate students. I am trying to create a planner of degree two page. Page 1 of the Planner keeps track of the required courses. See this link for my inspiration. Page two helps students during the sequence. Here is an example of page two of something I did in Livecycle.

    My vision is for students to complete what they have completed on page 1, the poster form the unfinished journey in a main list at the top of page two and students can delegate classes to any sentence they want. I have attached a work in progress at this post for your comment.

    Here's my problem; I'm new to javascript. If you looked at the example, you can see that I figured out how to create a dynamic drop down and fill the list box on page 2. I need help, find ways to move values between the areas of list on page 2. Is it still possible?

    Thanks in advance.

    -Brian

    Form1. Page2.Term1Button::click - (JavaScript, client)

    Form1. Page2.Term1.AddItem (form1. Page2.ListBox1.RawValue);

  • Release of updated with the value of the other Table

    Hello
    I need the sum there point TableB and insert/update this value in the X field in TableA. I can do this with select statements regular when I add values in my statement, but I'm getting errors now. Need help on how to code the trigger to do this, thank you.
    ORA-00936: lack of expression
    SELECT a.X, SUM(b.Y), 
    INTO a.X
    FROM TableA a, TableB b
    WHERE a.PK = b.FK;

    Ok. I think I understand now what's going on. Think logically that you create the customer first and only then customer can create orders, right? So when you insert a customer into the table DEMO_CUSTOMERS there is no customer order in the DEMO_ORDERS table. As a result, the CREDIT_LIMIT column remains NULL.

    SY.

  • Make a mandatory or optional field according to the value in the other field

    Hello

    I added a new location of the merchant class just under the name of merchant in the fresh details in iexpense page. I want to make this field option or required depending on the value selected in the field Type of expense.

    If Type of expense is like mileage so merchant should be mandatory otherwise in option.

    I found controller associated with this page is DetailsPageGlueCO and here is the code that I am trying to extend DetailsPageGlueCO.

    package oracle.apps.ap.oie.entry.lines.webui;
    Import oracle.apps.ap.oie.entry.lines.webui.DetailsPageGlueCO;
    Oracle.apps.fnd.framework.webui import. *;
    Import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    Import oracle.apps.fnd.framework.OAException;

    SerializableAttribute public class XXDetailsPageGlueCO extends DetailsPageGlueCO
    {
    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {

    super.processFormRequest (pageContext, webBean);

    Try
    {
    String ExpReportType = pageContext.getParameter ("ExpTypeChoice"); take the value of the list of ExpTypeChoice

    If (ExpReportType.toLowerCase () .indexOf ("mileage")! =-1) / / check if the value selected in the list ExpTypeChoice is of type mileage
    {
    Code to intercept the value in ExpTypeChoice list, and then newly added fact XXMerchantLocation required field?



    }
    } catch (System.Exception e)
    {
    throw new OAException ("you must enter merchant location");
    }
    }
    }

    Pls. suggest a piece of code in the section / / Code to intercept the value in ExpTypeChoice list, and then fact newly added XXMerchantLocation required field?

    Published by: yannick bigot on January 2, 2012 06:42

    Bigot,

    To make a required field on the selection, you must join a SPEL with the bean and make true or false based on your requirement.

    See article PPR of the developer's Guide.

    Kind regards
    GYAN
    www.gyanoracleapps.blogspot.com

  • All unique combinations of values in the same column of a group?

    Hi friends

    I have a table t with data as follows
    CREATE TABLE T
    (order_number number,
    item_name varchar2(3))
     
    INSERT INTO T VALUES (1,'A1');
    INSERT INTO T VALUES (1,'A2');
    INSERT INTO T VALUES (1,'B1');
    INSERT INTO T VALUES (1,'B2');
    INSERT INTO T VALUES (1,'C1');
    INSERT INTO T VALUES (1,'C2');
    INSERT INTO T VALUES (2,'A4');
    INSERT INTO T VALUES (2,'B1');
    INSERT INTO T VALUES (2,'A3');
    INSERT INTO T VALUES (2,'B5');
    INSERT INTO T VALUES (2,'C1');
    INSERT INTO T VALUES (2,'C2');
    
    sql> SELECT ITEM_NAME, ORDER_NUMBER FROM T
    /
    
    
    item name   order number
    A1             1
    A2             1
    B1             1
    B2             1
    C1             1
    C2             1
    ...
    ...
    A4             2
    B1             2
    A3             2
    B5             2
    C1             2
    C2             2
    
    In my table, each 'item' can appear just once in each 'order number'. 
    I want to join each item name to all other item names (without any repitition), within the same order number. 
    
    
    My desired output is like below:
    
    item name     item name   order number
    A1            A2          1
    A1            B1          1
    A1            B2          1
    A1            C1          1
    A1            C2          1
    A2            B1          1    
    A2            B2          1
    A2            C1          1
    A2            C2          1
    B1            B2          1    
    B1            C1          1
    B1            C2          1
    B2            C1          1
    B2            C2          1
    C1            C2          1    
    
    ......
    ......
    ......
    There are 15 combinations so the number 1
    .. .nCr where n = 6 and r = 2 NCR Yes = 15.


    Note: x A1 A2 is ignored because already, A1, A2 came in the first row of my desired output. similar cases for others combinations should be ignored as well.


    I want to have the shortest possible of a query with more rapid execution to achieve this goal. Because in my real table 2000 there order numbers and each order number has 10 unique objects.

    I look forward to the answer.

    concerning
    Hamza

    Published by: Hamza on July 10, 2011 22:55

    Published by: Hamza on July 10, 2011 22:58
    with t as (
               select 'A1' item_name,1 order_number from dual union all
               select 'A2',1 from dual union all
               select 'B1',1 from dual union all
               select 'B2',1 from dual union all
               select 'C1',1 from dual union all
               select 'C2',1 from dual
              )
    -- end of on-the-fly data sample
    select  t1.item_name,
            t2.item_name,
            t1.order_number
      from  t t1,
            t t2
      where t1.order_number = t2.order_number
        and t1.item_name < t2.item_name
      order by t1.order_number,
               t1.item_name,
               t2.item_name
    /
    
    ITEM_NAME  ITEM_NAME  ORDER_NUMBER
    ---------- ---------- ------------
    A1         A2                    1
    A1         B1                    1
    A1         B2                    1
    A1         C1                    1
    A1         C2                    1
    A2         B1                    1
    A2         B2                    1
    A2         C1                    1
    A2         C2                    1
    B1         B2                    1
    B1         C1                    1
    
    ITEM_NAME  ITEM_NAME  ORDER_NUMBER
    ---------- ---------- ------------
    B1         C2                    1
    B2         C1                    1
    B2         C2                    1
    C1         C2                    1
    
    15 rows selected.
    
    SQL> 
    

    SY.
    P.S. It your order_number big enough index table, nom_element would be useful.

  • Create a drop-down list of values with the country in?

    Hi, I looked everywhere and nothing helps I found something useful - without coding of all the values of a country in a lov, how do I get a drop-down list with the countries of the world in there?

    Thank you
    -C

    Hello

    If you like the privilege
    Connection to SQL more as SYS and run

    GRANT SELECT ON APEX_030200.wwv_flow_countries TO your_app_schema;
    

    Change your_app_schema to what is analysis application schema.

    Then use the LOV query like this

    select country_name,country_id
    from APEX_030200.wwv_flow_countries
    

    BR, Jari

  • Horizontal plane shows negative value in the other field dependent demand

    We never seen it before?

    A material Planner open the HP for a given element. There is a value of-6 at the line called another independent demand. Double-click this field to open the PTB, and that returns nothing. We have exported the results of the PTB for the supply of items/photo request and see nothing to represent the-6. Has anyone ever experienced this before?

    Thanks in advance

    Hello

    ATP creates adjustment rescheduling several times that creates negative demand and sometimes negative supply to balance demand.

    I think she does mainly when you cancel or reschedule an order and unable to find older ATP request to delete. In this case, it creates negative request more supply available since the earliest application must be cancelled.

    Thank you

    Abhishek Sharma

  • Problem to extract the value of the other schema

    Hi all the gurus of the database.

    I'm having a little problem could someone please help me out.

    Here's my problem:

    I'll have two distinct schemas in a database SCHEMA1 and SCHEMA2.

    And I'm having a table EMP to SCHEMA1, I had created a public synonym for this table and give grant SELECT, DELETE, INSERT and UPDATE to SCHEMA2.

    I am connected to SCHEMA2 and try to write a select statement to retrieve the emp_id of the EMP Table of SCHEMA1. My select statement is simple: select emp_id SCHEMA1. EMP where emp_name = "AAA". This select statement works very well since SCHEMA2.

    Now, I'm trying to create the SCHEMA2 procedure and try to get with the same select emp_id. But it is not allowing me to create the procedure. I tried with dynamic sql too but not able to read this value.

    Could someone help me please for this?

    Kind regards
    Paragraphs Mistry

    How is the privilege to select on the table SCHEMA1 granted to the user SCHEMA2? It is through a role? What the procedure defined, Summoner or the rights of the author?

    My guess is that the procedure has the author rights and the right to SELECT is granted to a role. In this case the procedure does not take into account roles and the select statement will fail.

    Try to grant privileges directly to the owner of the procedure.

    HTH!

  • New created manually on VISTA restore point erased all the other restore points

    I have windows Vista and suddenly CCC.exe began to appear and has completely changed my office. All documents on my desktop and icons (file photo) have disappeared. My husband's office has not changed.  My main problem is I did a restore of the system on Jan. 28 and will use the system restore points was (the first being 18 Jan) but thought that I need to come back a few days, so I manually created a restore point from January 26, 2016. Nothing has changed, so I'll use the point 18 Jan restoration but disappeared from all available restore points earlier (before the manual creation of a new).

    I want to make it clear that my restoration system and normally have restore points chose to EXCEPT those disappeared after creating a new restore point manually.   I spent a lot of time looking for answers without success - I've read a lot of problems have been System Restore does not work or restore points are deleted automatically, so that they do not apply to me.

    Help, please!

    Although system restore must be maintained at a min. amount of restore points, in the cleaning disc, other options

    Search button, clean the system restore, it removes all but the last restore point right... Back to youre

    problem, try the R.clicking on the desktop/properties/find "change desktop icons" on the top left, again

    window, select restore default settings, and / or modify, close... Then open cmd prompt, type cmd:

    Sfc/scannow the file check/repair utility runs automatically. Once through, type: CHKDSK C: /F agree to restart.

    type: EXIT restart the pc

    You can run the restoration cleaning before other measures are taken, this gets you the clean restore point

  • Files created in vmware workstation is not visible by the other OS

    After much research, I am in a bind. I use vmware workstation 7 with xp on a host of win7. When files are created within the virtual machine I can see them on the host of win7, but not on other computers in a network (OS x and ubuntu).

    Thanks much for any help.

    What types of files are they? Share permissions vs. ntfs permissions type

    of thing?

    On 12 February 2010, at 21:36, wesleyb82<>

  • How to extract the values of the other tables in the process upon request

    Hi all
    In Oracle Apex 4.1.
    The Leave_transaction Table contains the following fields,
    1.Leave_id
    2.Emp_name
    3.From_date
    4.To_date
    5.Remaining_days
    The Emp_Master Table contains the following columns
    1.Emp_id
    2.Emp_Name
    3.Remaining_days
    Holiday_master table contains a list of the dates of the holidays as 'From_Date '.

    I have the form based on the Leave_Transaction Table,
    I created the process,
    "Sur-Soumettre after calculations and validations of."
    and posted the following PLSQL code,
    declare
    days number(3);
    ex_days emp_master.remaining_days%type;
    new_rem_days emp_master.remaining_days%type;
    begin
    select count(*) into days from (select dt
    from(
        select to_date(:p1_from_date, 'DD-Mon-YYYY') + rownum -1 dt 
            from dual
    connect by level <= to_date(:p1_to_date, 'DD-Mon-YYYY') - to_date(:p1_from_date, 'DD-Mon-YYYY') + 1)
    where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holiday_start from holiday_master)) dual ;
    
     select remaining_days into ex_days from emp_master where upper(emp_name) = upper(:APP_USER);
    new_rem_days := ex_days - days;
    
      update emp_master set
        remaining_days = new_rem_days
        where upper(emp_name) = upper(:APP_USER);
    update leave_transaction set
        remaining_days = new_rem_days
        where upper(emp_name) = upper(:APP_USER) and
         leave_id=(select max(leave_id) from leave_transaction);
    
    end;
    If the date is between from_date and To_date comes Saturday and Sunday or if any Date exists in the table of Hpliday_master he will exclude and return the count (*) rest of dates.
    For example,.

    If the From_date is 04-may-2012'
    and To_date is 08-may-2012,

    Here the dates 5 May and 6 may are "Saturday" and "Sunday".

    and if any date between From_date and To_date is exist in the Table Holiday_Master
    That is to say that here it is 07-may-2012,

    Then the remaining dates are (excluding sat, Sunday and dates in holiday_table).

    04-may-2012,
    08-may-2012.

    the count (*) is 2.

    I use the code above but it return 5.
    I think that this
     
    ...where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holiday_start from holiday_master))
    code does not work.
    Can someone help me solve my problem.

    Edited by: Gurujothi may 3, 2012 23:59
    set serveroutput on;
    declare
    v_sql varchar2(100);
    begin
            v_sql := 'ALTER SESSION SET NLS_LANGUAGE= ''GERMAN''';
            execute immediate  v_sql;
            dbms_output.put_line(v_sql);
            for c in
                        (
                        select to_char(sysdate + level ,'fmday') day_
                        from dual
                        where to_char(sysdate + level,'fmday') not in ('sunday','saturday')  connect by level < 8
                        ) loop
                        v_sql := c.day_;
                         dbms_output.put_line(v_sql);
                        end loop;
    
            v_sql := 'ALTER SESSION SET NLS_LANGUAGE= ''AMERICAN''';
            execute immediate  v_sql;
            dbms_output.put_line(v_sql);
            for c in
                        (
                        select to_char(sysdate + level ,'fmday') day_
                        from dual
                        where to_char(sysdate + level,'fmday') not in ('sunday','saturday')  connect by level < 8
                        ) loop
                        v_sql := c.day_;
                         dbms_output.put_line(v_sql);
                        end loop;
    end;
    /
    
    ALTER SESSION SET NLS_LANGUAGE= 'GERMAN'
    samstag
    sonntag
    montag
    dienstag
    mittwoch
    donnerstag
    freitag
    ALTER SESSION SET NLS_LANGUAGE= 'AMERICAN'
    monday
    tuesday
    wednesday
    thursday
    friday
    PL/SQL procedure successfully completed.
    
  • Copy member of value to the other level zero zero members under a parent

    Hello

    I'm against a dummy costcentre data entry. I need will affect the value of other costcentres who are sitting under a parent. I tried @relative ("parent member", 0) = ""false costcentre"." I have this in a statement to fix.

    I tried datacopy but he does not like the @relative. I watched together and calc, but no solution is obvious. I'm sure that this is possible. I would like suggestions.

    I could hardcode each i.e. fictitious CC = CC, but that would require an update of script each time a new CC has been added or deleted.

    Thank you

    Nathan

    Published by: Acts4:12 on October 6, 2010 02:51

    Hello

    It would be useful to see your statement to FIX, but I would like to calc it as follows (with the help of another dimension, for example the scenario):

    DIFFICULTY (@relative ("parent member", 0))

    'scenario1 '.
    (
    'scenario1 '=' scenario1'-> 'dummy costcentre.
    )

    ENDFIX

  • I have to finish a presentation as soon as possible! I have to add more (already created) document to the other two. It's orientation. 2 are already in portrait mode. I have to add is landscape. Is there a way to fix this?

    When you create a form with Adobe Designer, and you need the joint page (a portrait and a landscape) orientation you can achieve this by using multiple Master pages.

    I took your two shapes and created an example (see table) with mixed orientation.

    Here's what you do to mingle with orientation...

    Create a new form

    Add a Master Page (with the Master Page tab active, select Insert > new Master Page)

    Select the second Master Page and set the orientation to landscape (object > Master Page tab)

    Select the Design view tab

    Add a new page (active the Design view tab, select Insert > new Page)

    To associate the new page to the second (landscape) Master Page...

    Select the new page (from the hierarchy palette)

    In the object > paging palette set the property of 'place' by browsing where you want (i.e. on Page "insert the name of your page master landscape here")

    Note: you need to resize the content are of the page to match the landscape orientation.

    I hope this helps.

    Concerning

    Steve

  • How to create a unique page on one side of the other view?

    I have a document that considers the side-by-side, except the first page.  I would like to see unique page and the ability to print a page by page!

    Any help?

    Thank you

    Blue

    Looks like you don't have a side-by-side, as it is normally referred to in Acrobat, but that the PDF file is actually a set of pages that are 2 pages per sheet. To be able to print a page of the worksheet, use the crop tool to select one side (and the same on all the leaves if you select everything). Then print this set. For other pages, simply move the culture across the sheet and repeat. Looks like it's what you're trying to do. If you want a single PDF file with 1 page per sheet, a crude to do this is to print each cropped to new PDF series. Then merge the two sets of printing and then rearrange the pages.

Maybe you are looking for