Control not outputting the correct value

Hello,
I have a producer consumer architecture with a queue to pass values. I want to push a new value onto the array using "Insert into Array" when a button is pressed, but when I do the previous value is being read the first time and the correct value on the second press.
I'm self taught and it's my first time using the queue so maybe something I'm not seeing/thinking about there?
Version 8 VI Attached.
Do this to see the problem:
1. Run
2. Click "Master Read"
3. Change "Value"
4. Click "Master Read"
5. Click "Master Read"
Any help is appreciated including block diagram critique.
Thanks!
Solved!
Go to Solution.
Attachments:
Untitled 1.vi ‏16 KB

It all depends on how you change the value of "Value". If you use the increment and decrement buttons it works as you expected.
If however, you type in a new value and click the button without clicking somewhere else first, it doesn't work - and here's why:
When you type in a value that modified value doesn't show up in the code untill the control loses "key focus". The problem is that clicking the button does cause the numeric input to lose key focus but only after the code has responded to the mouse up event.
To fix the problem put a property node in the mouse down event to set the numeric's KeyFocus property to false before the value is enqueued.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • COPA Derivation Rules are not assigning the correct values

    COPA Derivation Rules are not assigning the correct values when we process billing documents in batch.  We currently have derivation rules defined to take the ship to country and refer to custom tables were we identify custom geographic groups (INT/DOM and EAM, AP, etc.).  The derivation rules work accurately when the billing documents are created individually, and more than 75% of them are accurate when generated in batch, but in some circumstances, it populates the derived values with the wrong field and we can not identify where or why that's happening.  It looks like it may have something to do when the ship to customer number account group is different, but that's not consistent..  Does anyone know how or where these values get populated, or have any ideas why incorrect values are appearing sporadically throughout the billing run?  Thanks!!!

    Leigh,
    Apparently the function module is changing the values for some billing docs. Check one of the following user exits, if it gets triggered and the values are changed:
    COPA0001  Enhancement for derivation in Profitability Analysis (CO-PA)
    Function Module: EXIT_SAPLKEDRCOPA_001
    COPA0002  Enhancement for valuation in Profitability Analysis (CO-PA)
    Function Module: EXIT_SAPLKEAB_001
    COPA0003  Enhancement for assignment to profitability segment (CO-PA)
    Function Module: EXIT_SAPLKEAK_001
    COPA0005  Enhancement for actual data update (CO-PA)
    Function Module: EXIT_SAPLKEII_001
    Function Module: EXIT_SAPLKEII_002
    Award suitable points if the above helps. You can also reach me at [email protected]
    Thanks
    Ajay

  • Cost grouping exit (PBEN0004) is not outputting the cost values

    Hi,
    Client requirement is adding a custom field for vesting in 171 infotype, based on this status we have to make the correct cost grouping in the user exit.
    I have incorporated the logic in the user exit. When I execute PA30 transaction for infotype 167, it is triggering and giving the right cost group. But after successful execution it is not showing the cost values(giving initials).
    My self and functional guys checked the config steps and placed perfectly, technically nothing wrong in the user exit. So i am in big confusion. Please share your experience in this regard if you come across before and suggest if you have best solution.
    Thank you.
    Ravi.

    Dear Ajay,
    I have already included the same cost center in splitting structure.
    I have solved the problem but some doubt in my mind.
    1) I have maintained 11 equivalence no. instead of 1. problem is resolved.
    but my question are
    a) I dont want equivalence no. in kp26. Is it require for revaluation of activity type?
    b) when i changed equivalence no. from 1 to 11.Problem is resolved.What is the logic behind it.
    regards
    RR

  • V$session prev_hash_value not returning the correct value?

    Hello,
    I am executing a plsql package (which has the following query) in two modes: through Toad and through a deployed web application. I get two results.
    SELECT sa.sql_text,
    sa.sql_id,
    ss.sid
    FROM v$session ss,
    v$sqlarea sa
    WHERE ss.status = 'ACTIVE'
    AND sa.hash_value = ss.prev_hash_value
    AND ss.username = USER;
    Toad gives me the correct result. The query above pulls the correct SQL statement. But when running through the web application it gives me
    some random SQL statement executed during that session. I thought it might have something to do with pooled JDBC connections so I made sure for that
    execution I created a new dedicated JDBC connection. Still did not work. I used the function SYS_CONTEXT('USERENV', 'SID') to report the session id
    from my java program and from the query above. Both return the same SID. I've tried different variations of that query above (removing status = ACTIVE, removing username = USER, etc...)
    and I still get the same result.
    So any thoughts on what's going on?
    Thanks,
    Piyush

    I believe I figured it out. My testing was flawed. The testing in Toad was directly calling my package (e.g., pkg_b). The web app doesn't do that. It calls pkg_a which does a bunch of setup and then calls the target package (pkg_b) using EXECUTE IMMEDIATE. Apparently the v$session stops collecting info at that point. The current statement always shows as 'BEGIN :b1 := pkg_b; END;'. But it's still confusing why it would do that. Is there another way to access SQL statements from within that dynamic block?

  • Vector did not retrun the correct values.

    in my class the vector use BigDecimal not bigInteger. but my problem now is that my vector retruns the first value stored in vector until the loop completed.
    the following is print statment while I add to the vector:
    while (rs.next())
         CustNum=rs.getBigDecimal("CustNum");
         CType = rs.getString("TYPE");
         row.addElement(CustNum);
         row.addElement(CType);
         ret.addElement(row);
         System.out.println(CustNum);
    ***********1119
    ***********2220
    ***********3331
    but in my JSP:
    Vector v = new getNumber().getCustNumber();
    Iterator i = v.iterator();
    while (i.hasNext()) {
    Vector row = (Vector)i.next();
    Object CustNum = row.get(0);
    Object name = row.get(1);
    system.out.println(CustNum);
    that retrun the wrong result:
    ***********1119
    ***********1119
    ***********1119

    As warnerja said, you apparently only have multiple references to the same 'row' in your 'ret' Vector.
    If your code in your post is exactly your actual code, then you are adding the same Vector to 'ret' multiple times. That Vector will have two values (CustNum and CType) for each row.
    So, your 'ret' will have three elements, each with six elements (I separated the elements with commas):
    ret.get(0):   ******1119, Type1, ******2220, Type2, ******3331, Type1
    ret.get(1):   ******1119, Type1, ******2220, Type2, ******3331, Type1
    ret.get(2):   ******1119, Type1, ******2220, Type2, ******3331, Type1Each element of 'ret' is identical--you have three copies of the same Vector.
    In your loop to populate 'ret', initialize 'row' to a new Vector at the beginning of each loop iteration. Also, you may want to try using ArrayList instead of Vector. You probably don't need the synchronization that Vector gives. Even if you do need synchronization, use Collections.synchronizedList(new ArrayList()).

  • Query does not retrieves the correct values

    Hi,
    pls look into the code.
    clear: wf_etenr,
             vbep.
    To get the Scheduled Loading date and Scheduled Arrival Date.
        SELECT MAX( etenr ) FROM  vbep INTO wf_etenr
                            WHERE vbeln = tvbdpl-vgbel
                            AND   posnr = wl_posnr.
        IF sy-subrc EQ 0.
          clear vbep.
          SELECT SINGLE * FROM vbep         "R02
                 WHERE vbeln = tvbdpl-vgbel "R02
                  AND posnr = tvbdpl-vgpos  "R02
                  AND etenr = wf_etenr.
          IF sy-subrc EQ 0.
    when i see the values at dictionary level using the same wher conditions are mismatching with the query excution result in the program.
    here in the second query ( SELECT SINGLE * ) it giving the wrong results .
    if i compare the results at table level ,some of the field values are missing after excuting the above second query.
    pls can any one give me ur suggestion on this !
    rgds
    sanjay reddy

    Hi,
    are these the same?
    wl_posnr and tvbdpl-vgpos
    try
    SELECT SINGLE * FROM vbep
    WHERE vbeln = tvbdpl-vgbel
    AND posnr = wl_posnr
    AND etenr = wf_etenr.
    IF sy-subrc EQ 0.
    to make somewhat consistent querys.
    regards
    Message was edited by: Zlatko
            Zlatko Stracenski

  • Non-ascii, jsp-struts, not reciveing the correct value in the server

    Hi,
    I am developing JSP-Struts based application using tomcat server. In JSP struts form, when I put nonascii charater in the text field or text area, on the server side I recived twice of that non-ascii character..
    for example, in the text field I entered following string:
    ------> This is text in tex field �ƒ
    On the server side, I get the following:
    ------> This is text in tex field �ƒ�ƒ
    Please notice, twice non ascii character.. :(
    I don't know how to resolve this.. Any help will be greatly appricated..
    Thanks,
    Ajay

    I changed the <form> in the jsp to div and its working fine. I do not need to have comments in JavaScript funcion() anymore. I don't know why that made the difference though? According to:
    http://www.w3schools.com/tags/tag_form.asp
    The <form> tag is used to create an HTML form for user input.
    The <form> element can contain one or more of the following form elements:
    <input>
    <textarea>
    <button>
    <select>
    <option>
    <optgroup>
    <fieldset>
    <label>
    An HTML form is used to pass data to a server.
    I do have <button> and also send the data - the value of checkboxes - to server. So I think it should also work with <form>.
    Please let me know if you have any idea. Thanks.

  • GR amount is not showing the correct value

    Hi ,
    there are is a GR with for quantity 100 and movement type 101.
    agian there is one more GR with mvtype 122 with quantity 20.the amount in the PO is 1 INR for each quantity.So, for the GR with mvtype 122 the amount should be 20 but it is showing lesser amount than 20.
    I see there are several Invoices and credit memos posted for the PO but the quantity and price are OK for them.
    Note that there are no subsequent credit memos.
    what could be the problem?
    Please provide detialed explanation/solution as i am quite new in this area !!!
    Regards,
    Saurav

    hi,
    Please check if the price type of the material is MAP.
    Please check if the 122 moment material document is with any price differrance .
    Please check the postings of invoices is before the GR.
    In general if the invoice is posted before the GR and the price is differrant in the PO and in the MAP of material, system changes to new MAP.and accordingly the postings will take place.
    Please carefully go through the PO history and write down the postings happened in the chronalogical order.so that for the analysis it will be easy.
    Please check the accounting documents created for MIRO/MIGO so that if there exists any price differance, to which account it posted ( to stock account or PRD account)If it posts to the stock accounts definitly the MAP changes.
    Please post the postings happened so that a better anaysis can be given.
    Regards,

  • Profit and Loss Statement not reporting the correct values

    I am running the annual P&L report with posting dates dates of 01-01-09 - 09-30-09 and using Year-to-Date in the second column.  When I run this report one of the accounts should as of 09-30-09 reflect a balance of $145,831.52 but the report is showing $1,086,801.39.  The actual amount in that G\L account as of today is $162,849.90.
    Why is it reporting such a large amount when I run the report?
    Thanks, Jeff

    Version 2007, PL 42. 
    We are running the report with using Posting Date, dates are 01-01-09 to 09-30-09, Chart of Accounts Template, nothing checked in Display in Report, Display in First Column is Local Currency, Annual Report, Display in Second Column is Balance for Comparison>Year-to-Date and we have chosen none of the options on the right side of the criteria box.
    Thanks, Jeff

  • The parameter 'host_name_full' of ICM not showing the right value

    Hi ,
    The parameter 'host_name_full' is not showing the correct value.
    It is still showing the value as fully qualified domain name, where as we have reverted the setting some time back .
    can anyone let me knwo from where does it pick up the value from .
    and how can i Edit the value to show the correct value
    Thanks
    Nikhil

    Hi Nikhil,
    Check this 2 links will be useful to u r query...
    http://help.sap.com/saphelp_nw04/helpdata/en/e7/7af83b0255a206e10000000a11402f/content.htm
    http://www.basisconsultant.com/modules.php?name=Content&pa=showpage&pid=12
    Regards,
    Sridhar

  • TABLE(CAST()) function not returning the correct results in few scenarios.

    I am using TABLE(CAST()) operation in PL/SQL and it is returning me no data.
    Here is what I have done:
    1.     Created Record type
    CREATE OR REPLACE TYPE target_rec AS OBJECT
    target__id          NUMBER(10),
    target_entity_id NUMBER(10),
    dd           CHAR(3),
    fd           CHAR(3),
    code      NUMBER(10),
    target_pct      NUMBER,
    template_nm VARCHAR2(50),
    p_symbol      VARCHAR2(10),
    pm_init          VARCHAR2(3),
    target_name     VARCHAR2(20),
    targe_type     VARCHAR2(30),
    target_caption     VARCHAR2(30),
    sort_order      NUMBER (4)
    2.     Created Table type
    CREATE OR REPLACE TYPE target_arr AS TABLE OF target_rec
    3.     Created Stored procedure which accepts parameter of type target_arr and runs the Table(Cast()) function on it.
         Following is the simplified form of my procedure.
         PROCEDURE get_target_weights
         p_in_template_target IN target_arr,
         p_out_count          OUT NUMBER,
         IS
         BEGIN
              SELECT count(*) into p_out_count
         FROM TABLE(CAST(p_in_template_target AS                     target_arr)) arr;
         END;
    I am calling get_target_weights from my java code and passing p_in_template_target with 10140 records.
    Scenario 1: If target_pct in the last record is 0, p_out_count returned from the procedure is 0.
    Scenario 2: If target_pct in the last record is any other value(say 0.01), p_out_count returned from the procedure is 10140.
    Please help me understand why the Table(Cast()) is not returning the correct results in Scenario 1. Also adding or deleting any record from the test data returns the correct results (i.e. if keep target_pct in the last record as 0 but add or delete any record).
    Let me know how can I attach the test data I am using to help you debugging as I don’t see any Attach file button on Post Message screen on the forum.

    I am not able to reproduce this problem with a small data set. I can only reproduce with the data having 10140 records.
    I am not sure if this is the memory issue as adding a new record also solves the problem.
    This should not be the error because of wrong way of filling the records in java as for testing purpose I just saved the records which I am sending from java in a table. I updated the stored procedure as well to read the data from the table and then perform TABLE(CAST()) operation. I am still getting 0 as the output for scenario 1 mentioned in my last mail.
    Here is what I have updated:
    1.     Created the table target_table
    CREATE Table target_table
    target_id          NUMBER(10),
    target_entity_id NUMBER(10),
    dd           CHAR(3),
    fd           CHAR(3),
    code      NUMBER(10),
    target_pct      NUMBER,
    template_nm VARCHAR2(50),
    p_symbol      VARCHAR2(10),
    pm_init          VARCHAR2(3),
    target_name     VARCHAR2(20),
    target_type     VARCHAR2(30),
    target_caption     VARCHAR2(30),
    sort_order      NUMBER (4)
    2.     Inserted data into the table : The script has around 10140 rows. Pls let me know how can I send it to you
    3.     Updated procedure to read data from table and stored into variable of type target_arr. Run Table(cast()) operation on target_arr and get the count
    PROCEDURE test_target_weights
    IS
         v_target_rec target_table%ROWTYPE;
         CURSOR wt_cursor IS
         Select * from target_table;
         v_count NUMBER := 1;
         v_target_arr cws_target_arr:= target_arr ();
         v_target_arr_rec target_rec;
         v_rec_count NUMBER;
         BEGIN
         OPEN wt_cursor;
         loop
              fetch wt_cursor into v_target_rec; -- fetch data from table into local           record.
              exit when wt_cursor%notfound;
              --move data into target_arr
              v_target_arr_rec :=                     cws_curr_pair_entity_wt_rec(v_target_rec target_id,v_target_rec. target_entity_id,
                        v_target_rec.dd,v_target_rec.fd,v_target_rec.code,v_target_rec.target_pct,
         v_target_rec.template_nm,v_target_rec.p_symbol,v_target_rec.pm_init,v_target_rec.template_name,
         v_target_rec.template_type,v_target_rec.template_caption,v_target_rec.sort_order);
              v_target_arr.extend();
              v_target_arr(v_count) := v_target_arr_rec;
              v_count := v_count + 1;
         end loop;
         close wt_cursor;
         -- run table cast on target_arr
         SELECT count(*) into v_rec_count
         FROM TABLE(CAST(v_target_arr AS target_arr)) arr;
         DBMS_OUTPUT.enable;
         DBMS_OUTPUT.PUT_LINE('p_out_count ' || v_rec_count);
         DBMS_OUTPUT.PUT_LINE('v_count ' || v_count);
    END;
    Output is
    p_out_count 0
    v_count 10140
    Expected output
    p_out_count 10140
    v_count 10140

  • I can not get the correct anser

    Hi, Please help me.  As the following sch I can not get the correct sqrt value.  if changing resistor of R1 I always get 12v direct flow output.
    Attachments:
    op_divider.zip ‏121 KB

    Thanks for your answers.  I want the sch to do the operation of square root.
     1. in my sch the inverting input is DC -5v, I want to get the square root of 5?
     2. In my feedback path I use a multiplier, I Originally thought it is a negative feedback?
     3. it Already have ground in the sch, I do not understand that you say "did not ground the scope"?
    Thanks again, Could you give me the further pointing. if possible Could you give me a correct sch.
    (in fact, I get the sch from a rough sch in a textbook(the rough sch not for multisim). I just give the values for the all components)

  • How can I validate a dropdown box to NOT accept the default value?

    I have a fillable form where I need the user to select their "Number of Employees". I have added several ranges as their options in a dropdown box (1-10, 11-25, 26-50, 50+). My issue is the "defult value" is set to "1-10" and people submit it without changing it to the correct value.
    I have changed the default value to "--Select One--", but it still lets them submit the form with that value entered.
    I am assuming I need some sort of validation script that will basically say - "If the value in this field is --Select One-- do not submit the form, but give an error that says 'please select your number of employees" or something along those lines.
    Basically I just want them to pick something as opposed to just submiting it with the default value.
    I have looked all over and am not very good with JS.

    You can not have the default value set to a real possible value. You need a value that should be selected.
    Then for your submit script you need to test all of your required fields to make sure they are not at the default value.
    You make a variable that assumes all the required fields are completed and then check each field and if any one still has the default value you set your variable to "false" and then when you have checked all the fields you test your variable's value and only if it is true to you submit the form.
    var bSumbit = ture; // logical variable for submission test
    // test drop down # of employess
    this.getField("Number of Employees".).required = false; // clear required property
    if(this.getField("Number of Employees".).value == "--Select One--") {
    bSubmit = false;
    this.getField("Number of Employees".).required = true; // set required property
    if(bSubmit) {
    // your submit acation;
    } else {
    app.alert("Not all required fields properly completed", 0, 1);

  • How to filter certificate templates in Certificate Authority snap-in with the correct values

    How to filter certificate templates in Certificate Authority snap-in with the correct values
    I have a 2012 R2 server running Microsoft Certificate Authority snap-in.
    I want to do a filter on a specific Certificate Template which i know exists in the 'Issued Certificates' folder.
    All the documentation i can find seems to suggest i copy the certificate name and use this in the View Filter.
    1). I add the 'Certificate Template' option into the Field drop-down.
    2). I leave the Operation as the '=' symbol
    3). I paste in just the name of the template in question. for example: 'my computers'
    The search results always come back blank 'There are no items to show in this view.' even when i know there are many instances of this template. I've tried on a win 2008 server and same issue.
    Is there a correct value to enter for the Certificate Template name?
    Can this be done easier using certutil commands?
    When i run the certutil tool i can confirm i have several issued templates. Certutil -catemplates -v > c:\mytemplate_log.csv
    Anybody know what i'm doing wrong?
    I seem to be getting nowhere with this one.

    > But its important you are using the template name, not the display name
    this is incorrect. OIDs are mapped to *display name*, not common name (it is true for all templates except Machine template). That is, in order to translate template name to a corresponding OID, you need to use certificate template's display name. And, IIRC,
    template name in the filter can be used only for V1 templates. For V2 and higher, OID must be used.
    My weblog: en-us.sysadmins.lv
    PowerShell PKI Module: pspki.codeplex.com
    PowerShell Cmdlet Help Editor pscmdlethelpeditor.codeplex.com
    Check out new: SSL Certificate Verifier
    Check out new:
    PowerShell FCIV tool.

  • Firefox is not displaying the correct font color on my blog, but other browsers are.

    I have a web designer issue. Firefox is not displaying the correct font color on the header in my blog. Explorer, Chrome, and Safari have no problems. The page is in css but this particular section has html code o designate color. The code is as follows:
    <font face="helvetica" color="FF9966" size="1">blog</font>
    Though all other browsers display the light orange color designated, Firefox displays white. Strangely, if if retype the code by spelling out a color, Firefox displays it correctly. i.e.
    <font face="helvetica" color="black" size="1">blog</font>
    ... will give me black. You can see the effect by viewing the link below and looking at the word "blog" in the header, which should be light orange but is not in Firefox.

    Actually it also seems to work in the current Firefox 4 beta as it is.
    The code is not right though - the correct syntax for the color attribute with hex values is with a # at the start, so:
    color="#FF9966"
    It might work in Firefox 3.x if you change that.

Maybe you are looking for

  • How to see (net due date + payment term's days) in fbl5n as a date

    hi experts. i need some informations about fbl5n fields i can see net due date and i can see terms of payment fields in the fbl5n but  if the invoice has a payment term (30 day additional etc) i want to see (net due date + payment term's extra days)

  • Duplicate File Finder

    Wondering if anyone knows of a good software application (and has some experience using it) that finds duplicate files on my computer, and/or any of my network drives and other computers on the network. I'm hoping I can find something that will searc

  • Can I download OAS 4.0.8 ?

    Hi Jdeveloper team: We are about to start development of a new web application using jdeveloper 2.0, Oracle8i, and oracle application server 4.0.8. We want to try the new features of OAS 4.0.8 before we start the development. Can you e-mail me a user

  • How to select nodes for passing to a template

    How can I write an xpath to select only the row contained in rowset that has a child node language with the value of en-us ie something like select=rowset/row where rowset/row/child='en-us' Tks Rob

  • Web Service Destinations

    Hi,     We are facing some problem while defining the Destinations for Web Services. Have read many Threads, Blogs etc but not found any solid solution. My doubt is 1. Do we Have to configure Web service Destinations or HTTP Destinations? 2. What URL