Minimum value/default

I am measuring a current wich is sometimes negative and want to change the negative values to zero. I tried to choose "Data range" and set the minimum value to zero and then from the menu: Operate, make current values default. Then the value is zero as long as the program isn't running, but as soon as i start to run it, the values are negative again. What shoold I do to make them zero all the time when they are negative? (Of course, I don't want them to be negative when they are positive.)

The data range attributes (like min/max/coerce...) just apply to the datasource - I think. To limit the display, you could maybe do some limit checking and coerce it programatically.
A small VI should show what I mean. I am not sure if this is the only solution. You might post your question as well to the "Core" LabVIEW forum.
Hope this helps
Roland
Attachments:
LimitedValue.vi ‏26 KB

Similar Messages

  • How to get all minimum values for a table of unique records?

    I need to get the list of minimum value records for a table which has the below structure and data
    create table emp (name varchar2(50),org varchar2(50),desig varchar2(50),salary number(10),year number(10));
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',3000,2005);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',4000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2007);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2008);
    insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2010);
    commit;
    SELECT e.name,e.org,e.desig,min(e.year) FROM emp e,(
    SELECT e1.name,e1.org,e1.desig,e1.salary FROM emp e1
    GROUP BY (e1.name,e1.org,e1.desig,e1.salary)
    HAVING COUNT(*) >1) min_query
    WHERE min_query.name = e.name AND min_query.org = e.org AND min_query.desig =e.desig
    AND min_query.salary = e.salary
    group by (e.name,e.org,e.desig);With the above query i can get the least value year where the emp has maximum salary. It will return only one record. But i want to all the records which are minimum compare to the max year value
    Required output
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007Please help me with this..

    Frank,
    Can I write the query like this in case of duplicates?
    Definitely there would have been a better way than the query I've written.
    WITH      got_analytics     AS
         SELECT     name, org, desig, salary, year
         ,     MAX (SALARY)  OVER ( PARTITION BY  NAME, ORG, DESIG)          AS MAX_SALARY
         ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY
                                    ORDER BY        year  DESC
                           )                              AS YEAR_NUM
           FROM    (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
    SELECT     name, org, desig, salary, year
    FROM     got_analytics
    WHERE     salary          = max_salary
    AND     YEAR_NUM     > 1
    Result:
    emp1     org1     mgr     7000     2010
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007
    emp1     org1     mgr     7000     2007
    WITH      got_analytics     AS
         SELECT     name, org, desig, salary, year
         ,     MAX (SALARY)  OVER ( PARTITION BY  NAME, ORG, DESIG)          AS MAX_SALARY
         ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY
                                    ORDER BY        year  DESC
                           )                              AS YEAR_NUM
      ,     ROW_NUMBER () OVER ( PARTITION BY  NAME, ORG, DESIG, SALARY, Year
                                    ORDER BY        YEAR  DESC
                           )                              AS year_num2
         FROM    (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
    SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
    SELECT     name, org, desig, salary, year
    FROM     got_analytics
    WHERE     salary          = max_salary
    AND     YEAR_NUM     > 1
    AND YEAR_NUM2 < 2
    Result:
    emp1     org1     mgr     7000     2008
    emp1     org1     mgr     7000     2007

  • Finding a minimum value in an array without using loops

    I can find a minimum value in an array using a loop, but I am unsure of how to do it without any type of of loop
    Here is what I have using a loop:
    // This method searches for the minimum value in an array
    public static int min(int a[]){
    int min = a[0];
    for(int i = 1; i < a.length; i++){
    if(a[i] < min){
    min = a;
    return min;
    How do I covert this to do the same thing, using no loops?
    Thank you for replies
    Edited by: kazmania on Feb 7, 2008 12:26 PM

    public class Test112 {
    public int recurse(int[] x, int i, int n)
    if (i==x.length-1) { return (x[i] < n) ? x[i] : n; }
    n = (n < x[++i]) ? n : x;
    return recurse(x, i, n);
    public static void main(String[] args) {
    int[] nums = {3, 1, 56, 2, 99, 34, 5, 78, -400, 2383, 201, -9, -450};
    Test112 t = new Test112();
    int min = t.recurse(nums, 0, nums[0]);
    System.out.println(min);

  • Error while setting Minimum value to  Input Number Spin Box..

    Hai
    I drag and drop a VO and created a table.In that table,i convert a column which contain an InputText field to Input Number Spin Box.At the time of page load ,the table fetches the datas from the DataBase and showing Number values in the SpinBox.After that,When i scroll the table through vertical scrollBar,the table showing *"fetching data"* and Error is throwing as *"The value must be Number"* .. In the VO,this attribute is Number.
    THIS ERROR ONLY OCCURS when i set the Minimum value of spinBox ..The purpose of setting minimum value is that i only want user to select ve value only..How can i restrict the user for selecting only ve values..?(ie,*How can i set minimum value to SpinBox?)*

    Try changing the datatype of your attribute in the EO to be Double instead of Number.

  • How to populate minimum value

    Hi
    I have an extractor with 2 primary keys, Indkey and Indcode.
    I need to get the minimum value of Indcode and populate the relevant Indkey.
    ex, Indkey   Indcode
         IND001    20
         IND002    30
         IND003     40
    I only need to get the record IND001 20, populated and not the other two. I am populating these values to a DSO in BW.
    How can I acheive this? Please give the algorithm or sample code.
    Thanks
    Sirisha

    sort table by key1 key2 and read table index1

  • Charge sales order value with a minimum value

    Dear All,
    I have one requirement where I would like to charge my sales order value with a minimum value. For example, a minimum sales order value requirements are set at $1,400.00 (the minimum values can be different based on the different materials) per order, if the value of the order exceeds $1,400.00, therefore no minimum fee is applied or displayed and the customer is charged the actual value of the order; if the value of the order is less than the minimum thus the customer is charged the minimum. We also can set the minimum as quantity.
    Is there any standard functionality through which this can be done.. or any suggestion?
    Your help is highly appreciated.
    Thanks and best regards,
    Jo

    You can maintain the Condition Record with Condition Type as AMIW wrt to Division & Price Group.You can change the Accesses as per your requirements.
    Best Regards,
    Ankur

  • How to capture the data within the given range of maximum and minimum values ? from csv files

    My requirement,
    1. Here, the user will provide the range like maximum and minimum values, based on this range, the VI should capture the data within the given range. ( from CSV file as attached )
    2. Then VI should calcluate the average value for captured data and export it to excel.
    This is my requirement can anyone help me on this.
    Many thanks in advance
    rc_cks
    Attachments:
    sample_short.csv ‏2439 KB

    Hi,
    Thanks for remnding me. I forgt to attach the VI, 
    Here I am attaching the VI, what I tried. 
    From attached CSV file, I have to find an average value for columns B,C,D,E,F,G,H,I and AJ, AK. ( data range will be defined  by user ), focused only on these columns
    Here, the scope is to calculate an average value for given data range by user as MAX and MIN data.  
    FYI:  I tried manually for two instance i.e column H & I.  As per H column one steady state values from  7500 to 10500 and similarly in I column 7875 to 10050. So, I gave these as a limit to capture and calculate the average value. But unfortunaltely, requirement has been modified as per below requirements.
    More Info on requirement: 
    --> The user will define the range of data by giving some MAXIMUM and MINIMUM values(for above mentioned columns induvidually), then VI should capture          that data range and it has to caculate the average value for that range of data. This is the task I have to complete. 
    --> I am stuck in creating a logic for data capturing for given range of MAX and MIN value from user, 
         Can anyone help me on this. 
    If my explanation is not clear, Please let me know.  
    Many thanks, help mw
    rc
    Attachments:
    VI_rc.vi ‏25 KB
    sample.zip ‏4166 KB

  • Invoke Node - Make current values default

    I have an issue similar to many postings regarding the use of an invoke node to set control values and then to make those values default in that I get an error message: "Error 1000 ( The VI is not in a state compatible with this operation)."
    The catch is that it is not all the time.
    I am trying to set up a configuration utility which allows configuration or modification of settings of channels and serial ports. This top level VI pulls values from a configuration file using a mid-level VI which, in addition to loading the configuration file, also calls a further sub VI which initialises and sets as default front panel objects on a number of VI's using Invoke Nodes. Thus there is a heirachy of three VI's
    with the lowest level VI doing the Invoking.
    The only time I get the Error 1000 is when I try to run everything from the top level VI. From any lower level the VI's run with no problems and the defaults are set as desired.
    Any suggestions as to the origin of the problem?
    Ross.

    To complement the other answer that explains why it not always works, I would again and again stress that !! make current values default !! is not the way to go when you want initial values to be changed.
    For changing startup values you should use .ini files !
    greetings from the Netherlands

  • Minimum Value Sucharge not calculated

    Hi Gurus,
    I created condition record ZMIW for material 1234 1000 Euro but in the Salesorder Condion Tab
    SD Minimum Value Sucharge is same with Minumum Order Value
    Mat 1234 1 pc 200 Euro
    Minimum Order Value                            1000 Euro
    Minumum Minimum ValueSurchrg          1000 Euro (it should be 800 Euro)
    I use the Condition types ZMIW and ZMIZ
    In the Pricing Procedure                                                                               
    SubT    Reqt   Calty                  acct
    817       0          ZMIW   Minimum SalesOrdrVal                                      D          2
    818       0          ZMIZ     Minimum ValueSurchrg                                                 2          13                    ERS
    RefCondtTyp is ZMIW fpr CondType ZMIZ
    Could please tell what should I check ?
    BR,
    Emre
    Edited by: Y. Emre Kurnaz on Sep 11, 2009 9:00 AM
    Edited by: Y. Emre Kurnaz on Sep 11, 2009 9:01 AM

    Hi,
    thank you for your reply.
    I maintained the Condtyp ZMIW and ZMIZ
    ZMIW from 800  subtotal D and requirement 2. i typed step number 800 (where Net Value for Item calculated).
    ZMIZ requirement 2 and altcalc type 13
    I maintained Condition record for ZMIW 1000 Euro.
    everything looks right. but minimum order value and surchage are same (both are 1000 Euro.)
    I tried with standard pricing procedure (RVAA01) the result is equal
    I donkt know but  it should not be so complex.
    Thanks in Advance
    Emre

  • Minimum Values in Billing Doc - Consolidated Invoice - How to exclude items

    I have a requirement to apply a minimum charge to an invoice but the minimum amount is not to be based on the total value of the invoice.
    The invoice is used to bill a rental contract via a billing plan, via deliveries based on actual usage and other manually entered transactions. All these contribute to the minimum value.
    The invoice is also used to bill other debit notes during the period but their value MUST not be included when the minimum value is to be determined.
    The minimum pricing condition is working as standard SAP, BUT I need to exclude the value of some of the line item. I can distinguish which item are to be excluded by the preceding document type.
    Anyone has any idea of how to do this?
    Regards

    question marked as answered because it is no longer required.

  • Select Query with minimum values

    Table name: employess_inout
    Column name: employee_code number(data type)
    IN_Time date(data type)
    Out_time date(data type)
    i want to select only in_time coloumn data with min intime as in one date A employee have more then 2 times in_time entry
    example
    employee_code in_time out_time
    1 18-mar-12 08:15:21 18-mar-12 13:02:01
    1 18-mar-12 14:07:46 18-mar-12 18:01:32
    1 19-mar-12 09:15:11 19-mar-12 12:58:54
    1 19-mar-12 14:10:01 19-mar-12 16:21:57
    1 19-mar-12 16:53:37 19-mar-12 18:15:33
    In above example I only want to select in_time column values which is minimum as 18-mar-12(08:15:21) like wise in date 19-mar-12 minimum value is 09:15:11.
    Please write the script.
    thanks in advance

    Dear Frank Kulash
    the Script is
    Select ei.emp_code,p.ename, d.department_name, ds.designation_name,
    to_char(ei.intime, 'dd') "IN_Date",
    to_char (ei.intime,'hh24:mi') "IN_Time" /*here i used "min" but not solved*/
    FROM einout ei, personnel p,departments d, designations ds
    where ei.emp_code = '470'
    and intime between to_date ('01/03/2012 08:10', 'dd/mm/YYYY hh24:mi')
    and to_date ('21/03/2012 10:00','dd/mm/YYYY hh24:mi')
    and ei.emp_code = p.emp_code
    AND p.dept_code = d.dept_code
    and p.desig_code = ds.desig_code
    group by ei.emp_code,p.ename, d.department_name, ei.intime,ds.designation_name --, ei.outtime
    order by ei.intime, ei.emp_code asc;
    Out Put
    EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          08:58*
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          14:04*
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          15:11*
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
    *470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 19:39* 470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 08 12:16
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 09:26
    *470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 14:08*
    I want to take out put
    like that
    EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 02 08:58
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
    I only need min time (value) once of A date.
    [Bold rows are no need in output]
    please tell how it will be possible

  • Minimum value in sales order

    Dear All,
    CAN U PLZ TELL WHERE IS THE SETTING TO MAINTAIN MINIMUM ORDER IN A SALES ORDER.
    Regards,
    Pankaj

    Dear Pankaj,
    You can have minimum order quantity by maintaining at Material master -->Sales org data view but, I don't think you have option to control minimum value in sales order in the standrad functionality.
    You can try with some user exit with the help of ABAPer.
    I hope this will help you,
    Regards,
    Murali.

  • Unexpected minimum value for SHEAPTHRES_SHR

    Hi Folks - We keep getting the following message every 30 seconds on our BI QA server.
    2009-08-24-07.26.17.263989-240 E78429A607         LEVEL: Warning
    PID     : 930014               TID  : 15425       PROC : db2sysc 0
    INSTANCE: db2bq1               NODE : 000         DB   : BQ1
    APPHDL  : 0-28423              APPID: *LOCAL.DB2.090808073504
    AUTHID  : DB2BQ1
    EDUID   : 15425                EDUNAME: db2stmm (BQ1) 0
    FUNCTION: DB2 UDB, Self tuning memory manager, stmmComputeMinSHEAPTHRES, probe:836
    MESSAGE : Unexpected minimum value for SHEAPTHRES_SHR - value automatically
              corrected -  122423 -  2448 -  338887 -  9180 -  3 -  0 -  3.000000 -
               1 -  31 -  271110 -  630
    I am pretty sure this will have performance impact on the database as the database manager has to keep changing the SHEAPTHRES_SHR value every 30 seconds back to the correct value. Has any one seen this before? Turning off STMM is not an option. We do not want to hard code SHEAPTHRES_SHR value as the loads on BI are not-predictable in the environment.
    Pl advise.
    Thanks.

    The output of the SQL statement shows:
    MAX_PARTITION_MEM: Maximum allowed "instance_memory" (this will correspond with the current setting of instance_memory in bytes)
    CURRENT_PARTITION_MEM: Current total memory allocation (in bytes)
    PEAK_PARTITION_MEM: HWM total memory allocation (in bytes)
    The bug with the STMM memory calculation was first fixed with version 9.5 FP4 so you might have to upgrade your instances to FP4. In fact, if I am not mistaken, SAP withdrew FP3 due to a hiper apar which can potentially impact SAP systems.
    Also as far as the values in the output of the query and db2pd are concerned, they are not different. The output of the query is expressed in bytes whereas the output of pd is expressed in KB.
    $$ db2pd -dbptnmem
    Memory Limit:         36000000 KB (which is 36864000000 bytes)
    Current usage:        31746944 KB (which is 32508870656 bytes)
    HWM usage:            35704320 KB (which is 36561223680 bytes)
    Regards,
    Sameer

  • Limit minimum value of the shopping cart

    Hello all,
    in classic scenario we would like to limit minimum value under which shopping cart can be created. So, that user cannot create SC which value is less than 50 euros per vendor. Maximum value is not limited.
    Is that possible via BAdI?
    TIA
    Gordan

    Hi,
    Yes.You have to use the BADi "BBP_DOC_CHECK_BADI" for this.For sample code,refer the foll link:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/bbp_doc_check_badi-CheckPurchasingDocument&
    BR,
    Disha.
    Pls reward points for useful answers.

  • VI to make current values default

    Hi, I've used this website:
    http://www.originalcode.com/SavDef.htm  to create a method that
    will call the "Make current values default" at the end of my program.
    Here are my Save defaults.vi and Save defaults core.vi
    The latter works but the former gives me a bad input error... I admit I
    am not advanced enough in Labview to fully understand these two
    programs so I just built them both visually from the website, as I need
    my larger program to save the current defaults when it's done running.
    Thanks for any help!
    Attachments:
    Save defaults.vi ‏37 KB
    Save defaults core.vi ‏35 KB

    It's difficult to explain (and unfortunately I don't have much time)..  but the 'Set Control Value' methods in the Save Defaults.VI  are actually setting the values for the controls in the Save Defaults Core VI.  You instead had constants.  I changed these to Controls and named them accordingly (i.e., "occurrence" and "VI to save").  See attachments.
    I am guessing "Relative position.vi" is your VI where you wants the defaults to be saved.  So, you will add the Save Defaults VI as a sub VI in this VI.  You do not have to explicitly give its path anywhere as that is obtained from the call chain. 
    I have not tested this.. but it should work now.  You will have to rename these to the original names, including spaces, etc.  (or change the names on the diagrams).
    Hope this helps.
    -Khalid
    Message Edited by Khalid on 11-15-2005 01:51 AM
    Attachments:
    Savedefaults_1.vi ‏38 KB
    Savedefaultscore_1.vi ‏36 KB

Maybe you are looking for

  • Value limit in graphs 2147483?

    When making graphs in illustrator CS3, I often get the error message when changing the figures in the Value Axis that the maximum value is 2147483 -- which does me no good since I am working in larger numbers. Anybody know how to get around this prob

  • SRM Shopping Cart & Catalog Scenarios

    Hi Gurus, currently we are running SRM Project (shopping chart) with SRM-MDM Catalog. based on  our High Level architecture, we just installed instance below : SAP SRM (AS ABAP) SAP NW 7.4 which SRM_MDM_CAT, MDM_CONNECTOR, MDM_JAVA_API installed SAP

  • UWL configuration for travel and leave

    Hi, Can anyone guide me on configuring leave and travel workflow and UWL connectors. We have deployed ESS/MSS . HR is configured in SAP ECC. Workflows are configured. I want to integrate to UWL. I am very new to UWL , so i need steps from start to en

  • Need Help Badly - still unable to make iTunes synch apps with iPad

    iTunes 10.1.2, MSWindows. iPad WiFi/3G 64Gb. Cannot get all apps on iTunes to transfer to iPad so cannot restore an app I had to delete on iPad. Number of apps on iTunes doesn't match in quantity. Also, specific apps that are deleted from iPad still

  • Get all JNDI names - EJBLocalHome

    Hello, I've tried to get all JNDI names that are deployed on the J2EE Server RI Version 1.3.1. It worked fine with the JNDI names of the EJBs with Remote Client view (EJBHome), but did not work with EJBs with local Client View (EJBLocalHome). Does an