Store the calculated values in a table

I do a program that computes a value double whenever the user clicks an OK button. For this I use a while above the NO-SCOPE loop that generates a new signal of each cross and a while loop around the code that I use (it requires the use of a while loop). I wonder, how can I keep a value whenever it is calculated in a list or table so that the user can see all the values.


Tags: NI Software

Similar Questions

  • kindly tell how to use the unique value of a table with the index 0

    kindly tell how to use the unique value of a table with the index 0

    Hi
     
    Yep, use Index Array as Gerd says. Also, using the context help ( + h) and looking through the array palette will help you get an understanding of what each VI does.
     
    This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
     
    -CC
  • Store the new values in the table in the new row so that the 'old' remains in the previous lines

    Hello

    I am a student of genius embedded. I did a VI where I change the values of digital controls, and it saves it as a table.
    I want to store the pair of new values in the new row of this table.
    I have attached a VI where I can change the values of numeric control, as well as the number of lines from another control. But when I change the values, all values in the output table change including values in the previous row. I want these lines to be unchanged and that new line to update.

    Need help.

    If I understand correctly, you want to always 4 models. If so a 2D table will do the trick (see annex VI), otherwise crossrulz' solution should work.

  • Insertion of the calculated values and values into a new table. How?

    Hi guys. Had a slight dilemma here. My problem is that:

    1. I have an average of two values (in the same column) for the 2 different lines (which is 7 days before the event and the other which is 14 days). I need to insert a new table

    WITH

    2. the data in some of the other columns of the lines of these two values I have on average.

    So, for example, I have the source table table S, with the values of Company_Name, Date, name of the Emp, salary, Date. I have to calculate the average salary, corresponding to the date criteria I described before. So I have to insert into another table (the average value) while keeping other data (Date, name of the Emp) etc.

    This is really confusing me. I think that the mix of simple db and sql pl theory is to play with my head.

    I know that the scenario is a bit confused, so please ask any questions! I'll check this thread very frequently!

    Frankly speaking, I'm lost.

    Please post some samples of entry and your required output in a formatted way.

    Kind regards.

    LOULOU.

  • Not able to print the decimal values in a table

    Hi all

    I created an application. Here, I have a table with three columns Col1 and col2 are numbers and col3 is the diffrence between col1, col2.

    I use AJAX and JavaScript to calculate the difference in a dynamic way.

    I am able to print the difference as for example:-1, 2, 1.5-1.5. but not 0.8, 0.8, 0.1 etc...

    If col1 col2 = 1.2 - capable of printing

    If col1 to col2 = 0.2 - error, unexpected token

    error_07012016.PNG

    -Code AJAX:

    Declare  
      p_curr  number;  
      p_prev    number;  
      p_diff number;  
    Begin  
      p_prev    := to_number(apex_application.g_x01);  
      p_curr    := to_number(apex_application.g_x02);  
      
       
      SELECT to_number(p_curr - p_prev) into p_diff  
      from dual;  
      
      -- return calculated value
      sys.htp.p(p_diff);  
    End;
    

    -JavaScript: running the loading of the page

    function f_calulate_duration(pThis) {  
    
      var row_id     = pThis.id.substr(4);  
      var s          = $('#f18_'+row_id).val().replace(/[^\d.-]/g, ''); 
      var curr       = $(pThis).val().replace(/[^\d.-]/g, ''); 
    
    if(!s){
      var s= 0;
      var prev = s;}
    else{
      var prev = s;}
    
    apex.server.process 
    ( "CALC_DIFF", { x01: prev, x02: curr }, 
    { success: function( pData ) { 
    $('#f23_'+row_id).val(pData);}}
    );  
    }  
    

    Please suggest the solution to this.

    Oracle Apex Version: 4.2.

    Thank you

    Dev

    Hello

    I don't get the point to use the expensive AJAX call to the database, instead you can have the same functionality with JavaScript code below.

    function f_calulate_duration(pThis) {
      var row_id     = pThis.id.substr(4);
      var s          = $('#f18_'+row_id).val().replace(/[^\d.-]/g, '');
      var curr       = $(pThis).val().replace(/[^\d.-]/g, '');   
    
    if(!s){
      var s= 0;
      var prev = s;}
    else{
      var prev = s;}
    
    var diff = 0;
    diff = curr - prev;
    var n = diff.toFixed(2);
    alert(n);
    $('#f23_'+row_id).val(n);  
    
    //-- Remove this code
    /*apex.server.process
    ( "CALC_DIFF", { x01: prev, x02: curr },
    { success: function( pData ) {
    $('#f23_'+row_id).val(pData);}}
    );*/
    
    }    
    

    Thank you

    D

  • acquire a signal and the rms value in a table every second

    Hello everyone,

    Sorry, but I am known in the world of LabView and I'm going crazy because I can't understand how to do a simple thing (or what it tends to be in my mind).

    As said by the object,
    my wish is to acquire a digital (a through the DAQmx) continuous (it's ok for this part), get the RMS (or average) of such acquired signal (thanks to the Amplitude and levels of measurement, for example) and put the value in a table (1 d); and, every second.

    In one sentence: acquire a signal, the average value, put in a table, and then restart each second. In the end, for example, the program for 1 minutes gives me 60 value in the table.

    Is someone can help me?

    Thank you in advance.

    Viviogs.

    First of all, I'm not sure that you can be sure exactly a second measurement using this technique.  If the precise timing is important, I think that you need a timed loop.

    That said, if the only problem you have is how to write the table indexed in a spreadsheet, you just need to use "Write in the worksheet file."  See here.

  • return the minimum value from a table

    Hi all, how can I output the lower value within an array of numbers?

    I have this but it does not work, it is always the first number in the table.

    function minF(a:Array):Number {var min:Number = [0];      for (var i: Number = 1; i >.) Length; i ++) {if (a [i] > min) {min = a [i];}           } else {trace ("buahMin!");           return min}}; }

    Thanks to you all.

    This is because you have the sign on your conditional loop wrong.

    You must make the comparison for all I less than your length of array.

    function minF(a:Array):Number {}

    var min:Number = [0];

    for (var i: Number = 1; i

    min (min =

    }

    return min;

    }

  • Store the jpg file in plsql table

    Hello

    How to store jpg files in a table
    I created the tale as
    create table image_table (image1 clob, imageno number (7));
    now I wan to insert image into image_table.
    hjow?

    Thanks in advance

    path, you must create a directory on the oracle server pointing to the location of your file

    create or replace directory DIR as '<>'
    

    If the file is located on the client machine, then give only the name of the machine and the shared path, the no ip system, and the full path

    File name, you pass as a parameter to the procedure. File must exist in the location of the file. Otherwise, you can check using utl_file.getattr as utility.

    Also, I would suggest to store the file image as BLOB as opposed to CLOB.

    Published by: SBH on July 27, 2010 11:43

  • After changing the default threshlod in the user interface, where it stores the new value?

    After I changed the value of the threshold warning/cirtical metric, I noticed there was a 'TARGET_TYPE' _ 'targetname '. XML generated in forlder $AGENT_HOME/sysman/emd/collection. It assumes that the registered here threshold has priority over that of collection.xml in $AGENT_HOME/sysman/admin/default_collection, right? I'm very curious, is if the new threshold is also recorded in some tables, the agent generates the 'TARGET_TYPE' _ 'targetname '. XML after reading the new value? If it is, could someone offer me the East?

    Thanks in advance!


    Thank you
    Satine

    The default collection file supplied with the plug-in is the basis of how the collection for the target type agent. If the user makes changes through the user interface, the agent record in a specific collection of target instance file that selectively replaces the default file in the collection.

    Data collection should be TARGET_METRIC_COLLECTIONS view of $ MGMT.

  • Get all the different values in a table - 'or array elements' does not work with I32

    Hello

    I just found out that "array elements or" does not work with a table 1 d of integer values. I didn't expect that.

    I did a semi quick forum search and did not find a pointer to an effective solution. Can someone give me a hint?

    Do not back my initial intention is to list all the values that appear in an array of integers.

    I thought that if I converted the figures for powers of 2 and or I had solved the problem at hand - only to discover that the elements of array does not.

    If someone could propose a different approach, I'd be happy too.

    I should mention that the execution time is a factor here - I need a fast code, but any suggestions are welcome because they could help me get started.

    Best regards Florian

    Hi Florian.

    try this:

    "Function, it seems, the table of GOLD ' is polymorphic (as written in the context-sensitive help), but does not support arrays of I32. At least the error message means just that...

  • Put the string value in a table

    Hello

    Probably an easy question, but I am reading data of a RFID reader that returns a string value of 12 bytes. Whenever a RFID reads, I want the tag to be inserted in a string table on the front panel. So, basically, a newspaper of the each tag [read-> Insert row 0] then [read-> Insert level 1] and so on. I work RFID reader, I don't know how to put the string in the table.

    I'm not sure of the steps necessary to achieve control of the table (or if the table control is the right thing to use).

    Any help would be greatly appreciated. Thank you.


  • Update based on the max value of different tables.

    {code}

    create the table rule_table (number rule_id);

    insert into rule_table values (10);

    insert into rule_table values (20);

    insert into rule_table values (30);

    insert into rule_table values (40);

    create the table auth_table (number of auth_id, rule_id number);

    insert into auth_table values (1000, 10);

    insert into auth_table values (2000, 10);

    insert into auth_table values (3000, 10);

    insert into auth_table values (4000, 20);

    insert into auth_table values (5000, 20);

    insert into auth_table values (6000, 30);

    insert into auth_table values (7000, 30);

    insert into auth_table values (8000, 40);

    insert into auth_table values (9000, 40);

    create the table pay_table (pay_id number, auth_id number, pay_indicator number);

    insert into pay_table values (11111, 1000, 0);

    insert into pay_table values (22222, 1000, 1);

    insert into pay_table values (33333, 1000, 0);

    insert into pay_table values (44444, 2000, 0);

    insert into pay_table values (55555, 2000, 1).

    insert into pay_table values (66666, 2000, 0);

    insert into pay_table values (77777, 3000, 0);

    insert into pay_table values (88888, 3000, 0);

    insert into pay_table values (99999, 4000, 0);

    insert into pay_table values (111111, 4000, 0);

    insert into pay_table values (222222, 5000, 0);

    insert into pay_table values (333333, 5000, 0);

    insert into pay_table values (444444, 6000, 0);

    insert into pay_table values (555555, 7000, 1);

    insert into pay_table values (666666, 8000, 0);

    insert into pay_table values (777777, 9000, 0);

    insert into pay_table values (888888, 9000, 1);

    create the table rule_pay (rule_id number, pay_max_indicator number);

    insert into rule_pay values (10, 0);

    insert into rule_pay (20, 0) values;

    insert into rule_pay (30, 0) values;

    insert into rule_pay (40, 0) values;

    {code}

    My intention is:

    for every find of rule_id on the maximum pay_indicator (tables 3 query to get the max Show pay_indicator below) and on the other table I have to update this value max based on rule_id.

    with max_tab

    as

    (

    Select a.rule_id, max (pay_indicator) pay_indicator

    rule_table a.,

    b auth_table,

    c pay_table

    where a.rule_id = b.rule_id

    and b.auth_id = c.auth_id

    A.rule_id group

    )

    Update rule_pay

    Set pay_max_indicator = (select max_tab.pay_indicator

    of max_tab

    where max_tab.rule_id = rule_pay.rule_id)

    where

    rule_id in (select rule_id from max_tab);

    The above query does not.

    Any help or suggestions are greatly appreciated.

    Something like that?

    SQL > select * from rule_pay;

    RULE_ID PAY_MAX_INDICATOR

    -------------------- --------------------

    10                    0

    20                    0

    30                    0

    40                    0

    SQL > fusion in rule_pay PR

    2. using (select a.rule_id, max (pay_indicator) pay_indicator

    rule_table 3A,

    auth_table 4 b,

    pay_table 5 c

    6 where a.rule_id = b.rule_id

    7 and b.auth_id = c.auth_id

    Group 8 by a.rule_id

    9        ) u

    10 on (u.rule_id = rp.rule_id)

    11 when matched, then update

    12 set rp.pay_max_indicator = u.pay_indicator

    13;

    4 lines merged.

    SQL > select * from rule_pay;

    RULE_ID PAY_MAX_INDICATOR

    -------------------- --------------------

    10                    1

    20                    0

    30                    1

    40                    1

    BTW, you can't put a WITH clause before an update.  It can only precede a select statement.

  • Manipulate the metric value of summary tables

    Hi all

    I've been mucking with tables of drag and drop dashboards and have met the summary column which allows to apply mathematical operations to your data:

    I'm really interested in is 'average' which will be averaged over a number of availability of the Service to me:

    Can someone tell me how to do one of the following?

    I want to choose the "average level of Service Availbility 95.124' line and put in another table (possibly in a different dashboard) or hide all of the above lines show" average Service level Availbility 95,124 "is the only one left.»

    In other words, I'm looking for the Foglight to do the math for me, but to hide the source, only display the answer.

    My preference would be to choose this line and put it in another table.

    Is this possible?

    Thank you

    Brian

    It would certainly be a use case to make them a global service, since they are shared by several things.

  • Insert the date value in a table

    Hello

    I tried to update a table to insert the date in a date field. while I am running the query, it throws an error message like:

    "
    ORA-01830: date format picture ends before converting all of the input string
    01830.00000 - "date format picture ends before converting all of the input string.
    * Cause:
    * Action:
    "1830Error salesperson online: 1.


    My update query is added under:

    UPDATE PS_OBJCMTP_TMP SET LASTUPDOPRID = "PPLSOFT", LASTUPDDTTM = TO_DATE ('02-11 - 2002-12.14.09.000000 ',' YYYY-MM-DD - HH24.MI.) SS') WHERE OBJECTID1 = 3 AND OBJECTVALUE1 = 'EDIMAPPROPOP' AND OBJECTID2 = 0 AND OBJECTVALUE2 = '' AND OBJECTID3 = 0 AND OBJECTVALUE3 =' ' AND OBJECTID4 = 0 AND OBJECTVALUE4 = ' '



    someone tell me how to solve this problem.

    Simply speaking, you should cut ' 2002 - 02 - 11 - 12.14.09.000000'-' 2002 - 02 - 11 - 12.14.09'.
    RPAD('2002-02-11-12.14.09.000000',19)

  • Conditional display in the text box based on the calculated value

    Hello

    I have radio buttons that each have a numerical value. For example = 1 A = 2 C = 0. In the example below, the total is equal to 5.
    examplescreen01.gif

    The sum is displayed at the bottom of the document and is passed to another text box:

    examplescreen02.gif

    Instead of '5' displayed in the text box on the right, it should display a "Control" Word like this:
    examplescreen03.gif

    The displayed word is based on the totals through this range:

    1-2 = 'absorbing '.

    3-4 = 'practitioner '.

    5 to 6 = "control".

    The script I used to pass the value from the left to the right text box in the chart above is:

    name of the field to text box;

    var cTextBox = 'Cabinet Talent strategy knowledge - total';

    get the value of the field with the name in cTextBox;

    var sTextBox = this.getField ("cTextBox") .value;

    Set the value of this field;

    Event.Value = sTextBox;

    That I need to add to this script to show one of the words, such as "control" above?

    I am a complete novice to scripting. I found the above script online and somehow got it to work.

    I thank very much for any help or pointers, you can provide.

    Best regards

    Chris

    Sorry, there were some errors in the code that I provided above. Try this:

    If (sTextBox > = 1 & sTextBox)<= 2)="">

    Event.Value = "absorbing";

    } ElseIf (sTextBox > = 3 & sTextBox)<= 4)="">

    Event.Value = "practitioner";

    } ElseIf (sTextBox > = 5 & sTextBox)<= 6)="">

    Event.Value = "master";

    } else {}

    Event.Value = "";

    }

    If it still does not respond, you can send me the file at [email protected] and I'll check...

Maybe you are looking for