What is the problem with this event handler in LabView 8.0?

Please find attached a copy of a simple Event Structure VI. Can anyone please tell me why the Pos 0, Pos 1, Pos 2 work fine, but Pos 3 does Not????? It works in Version 7.1 of Labview, but Not in version 8.0. Any help here would be appreciate
Everything is Free! Until you have to pay for it.
Attachments:
ValChgEventBug.vi ‏29 KB

Hi,
It doesn't work because the logic is flawed.  If you run the VI in Execution-Highlight mode you will see that for a value-change of, say, 7.0, all the cases (except the first one) are True!  And since there is no data dependency, whatever case executes last will set the final position. 
You will want to change the logic to check if the value falls in a range, rather than just being greater than something.  For isntance, the psuedo-code would be: 
"go to position 2 IF value >= 4  AND < 6" 
You are missing the "AND" part.  Hope this helps.
-Khalid

Similar Messages

  • Please tell me what is the problem with this code

    Hai,
    Iam new to Swings. can any one tell what is the problem with this code. I cant see those controls on the frame. please give me the suggestions.
    I got the frame ,but the controls are not.
    this is the code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ex2 extends JFrame
    JButton b1;
    JLabel l1,l2;
    JPanel p1,p2;
    JTextField tf1;
    JPasswordField tf2;
    public ex2()
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setTitle("Another example");
    setSize(500,500);
    setVisible(true);
    b1=new JButton(" ok ");
    p1=new JPanel();
    p1.setLayout(new GridLayout(2,2));
    p2=new JPanel();
    p2.setLayout(new BorderLayout());
    l1=new JLabel("Name :");
    l2=new JLabel("Password:");
    tf1=new JTextField(15);
    tf2=new JPasswordField(15);
    Container con=getContentPane();
    con.add(p1);
    con.add(p2);
    public static void createAndShowGUI()
    ex2.setDefaultLookAndFeelDecorated(true);
    public static void main(String ar[])
    createAndShowGUI();
    new ex2();
    }

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ex2 extends JFrame
        JButton b1;
        JLabel l1,l2;
        JPanel p1,p2;
        JTextField tf1;
        JPasswordField tf2;
        public ex2()
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setTitle("Another example");
            b1=new JButton(" ok ");
            p1=new JPanel();
            p1.add(b1);
            p2=new JPanel();
            p2.setLayout(new GridLayout(2,2));
            l1=new JLabel("Name :");
            l2=new JLabel("Password:");
            tf1=new JTextField(15);
            tf2=new JPasswordField(15);
            p2.add(l1);
            p2.add(tf1);
            p2.add(l2);
            p2.add(tf2);
            Container con=getContentPane();
            con.add(p1, BorderLayout.NORTH);
            con.add(p2, BorderLayout.CENTER);
            pack();
            setVisible(true);
        public static void createAndShowGUI()
            ex2.setDefaultLookAndFeelDecorated(true);
        public static void main(String ar[])
            createAndShowGUI();
            new ex2();
    }

  • Vector, what is the problem with this code?

    Vector, what is the problem with this code?
    63  private java.util.Vector data=new Vector();
    64  Vector aaaaa=new Vector();
    65   data.addElement(aaaaa);
    74  aaaaa.addElement(new String("Mary"));on compiling this code, the error is
    TableDemo.java:65: <identifier> expected
                    data.addElement(aaaaa);
                                   ^
    TableDemo.java:74: <identifier> expected
                    aaaaa.addElement(new String("Mary"));
                                    ^
    TableDemo.java:65: package data does not exist
                    data.addElement(aaaaa);
                        ^
    TableDemo.java:74: package aaaaa does not exist
                    aaaaa.addElement(new String("Mary"));Friends i really got fed up with this code for more than half an hour.could anybody spot the problem?

    I can see many:
    1. i assume your code snip is inside a method. a local variable can not be declare private.
    2. if you didn't import java.util.* on top then you need to prefix package on All occurance of Vector.
    3. String in java are constant and has literal syntax. "Mary" is sufficient in most of the time, unless you purposly want to call new String("Mary") on purpose. Read java.lang.String javadoc.
    Here is a sample that would compile...:
    public class QuickMain {
         public static void main(String[] args) {
              java.util.Vector data=new java.util.Vector();
              java.util.Vector aaaaa=new java.util.Vector();
              data.addElement(aaaaa);
              aaaaa.addElement(new String("Mary"));
    }

  • I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    HELLO
    I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    Take it up with iTunes Support - we are not Apple here, we are just users like you:
    http://www.apple.com/support/itunes/ww/
    Cheers,
    GB

  • What is the problem with this Stored Procedure

    Hi ,
    What is the problem with this Stored Procedure ?Why is it giving errors ??
    CREATE or replace  PROCEDURE getEmpName
    *(EMP_FIRST OUT VARCHAR2(255))*
    BEGIN
    SELECT ename INTO EMP_FIRST
    FROM Emp
    WHERE EMPNO = 7369;
    END ;
    */*

    You don't specify precision in procedure arguments.
    (EMP_FIRST OUT VARCHAR2(255))should be
    (EMP_FIRST OUT VARCHAR2)Since you asked what's wrong with it, I could add that it needs formatting and the inconsistent use of upper and lower case is not helping readability.

  • What is the problem with this code ? Race condition??

    Guys,
    The idea behind the attached code is quite simple.
    I have a 2D parent array. First, I print a subset of this array into a table control (based on a sensor selection). Now, I want edit the numbers in the table. I need the changes to be reflected in the table and the parent 2D array. (In simple terms, this is like replacing the the edited array subset into the parent 2D array)
    The problem is when I change(edit) any entry in the table, the entry changes back to its original value. The change doesnt seem to be reflecting on the parent 2D array and the table. .
    Can anyone tell me where the problem is?
    Thanks
    Ravi
    Solved!
    Go to Solution.
    Attachments:
    Alarm threshold test.vi ‏14 KB

    I agree with Chris, here's an idea (of whatI think your code does):
    The case structure in your code was unnecessary, all the cases were the same so I removed them.
    The sequence structure was unnecessary.
    Ton
    Message Edited by TonP on 11-20-2008 07:52 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Alarm threshold test_BD.png ‏19 KB

  • Custom tables create in Apps schema ( What are the problems with this?)wwww

    Hello all,
    I'm a dba in a new environment where a number of custom schemas are being created in the apps schema. I know this is not considered Oracle's best practice and I would like to make some recommendations for a change. Before doing so, I would like to know the problems that are associated with custom tables living in the apps schema. We are currently on 11.5.10.2 on AIX. Also, if someone can point me to any "Official" customization standard or Oracle documention where I can backup my case it would be greatly appreciated.
    Thanks in advance,

    Hi,
    Please see this thread.
    Custom application implemented in E-bussiness Suite
    Re: Custom application implemented in E-bussiness Suite
    Regards,
    Hussein

  • What's the problem with this CC stuff?

    Since CC is available I only have trouble with all this stuff. I'm on OSX ML and there seems to be no change to install anything of the new stuff. CC app desktop- failed to install. When I use AAM, the CC apps are available, but after downloading I get an installation failure (15). I've tried anything discussed in this community, but nothing worked. So why there are so many problems with CC? Since I pay over 60 Euros each month, I would like to use the promised applications. ADOBE, please supply a reliable solution for all operating systems without the need of erase data, rename folders or anything else. Thanks in advance.

    1hausl1 I would recommend you contact our support team and work with them directly.  You can contact our chat support at http://adobe.ly/yxj0t6.

  • What is the problem with this script. it is giving invalid table name error

    declare
    l_cnt number;
    v_sql varchar2(1000);
    table_name1 varchar2(1000);
    begin
    for i in ( select table_name from all_tables )
    loop
    table_name1 := i.table_name;
    v_sql := 'select count(1) from :table' ;
    execute immediate v_sql into l_cnt using table_name1;
    dbms_output.put_line(l_cnt);
    end loop;
    end;

    the problem is that you can't do that. it's illegal. use dynamic sql.
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96624/11_dynam.htm#10961
    see a million other thread here, including this one posted 12 minutes before yours
    Passing Parameter to From clause of SQL

  • What is the problem with this Xcopy in PostBuild?

    I am having the following post-build command in a Visual Studio project:
    xcopy  $(ProjectDir)Data $(OutDir)\
    The Data is a directory in the project folder which I want to have copied to bin/debug or bin/release after build completes successfully.
    I am getting an error as below:
    The command "xcopy  E:\Lavanya Deepak\Projects\matrimonial\Data bin\Debug\" exited with code 4.

    Why are you using Xcopy for something that Visual Studio can do already?
    http://support.microsoft.com/kb/306234
    http://msdn.microsoft.com/en-us/library/0c6xyb66%28v=vs.80%29.aspx
    Besides, this is a issue with XCOPY, not with Visual C# or Visual Studio (wich this forum is about). Perhaps you better look into the documentation or ask in a admin Forum?
    -1 for not an answer to the question.
    This does not address the need for XCOPY. This is NOT an answer. How does this help transfer *.ascx files along with the compiled code behind into the respective directories of a local website for debugging.  Umbraco requires this as an example.
    Also, this could be an issue with Visual studio as the XCOPY works in VS 2012 and via the command prompt but NOT VS 2013 for me.

  • What is the problem with this trigger

    please tell me why this trigger is not working , i tried to complile it but its giving the error!
    the format is ...
    create or replace trigger log_off
    BEFORE LOGOFF ON database
    begin
    insert into log_trigg_table
    values(user,sysdate,'LOGED ON');
    END LOG_OFF;
    and the error is
    BEFORE LOGOFF ON database
    ERROR at line 2:
    ORA-04072: invalid trigger type
    can you tell me the rreason
    one this i forgot to tell you that i am using oracle 8.0.6
    umair sattar
    null

    valid trigger types are BEFORE/AFTER
    INSERT/UPDATE/DELETE on TABLE

  • What is the problem with this code?

    dear sirs...
    i have a page that does not contain any binding, it contains the following event:
    public void onCheck(DataActionContext ctx)
    ViewObject V=ctx.getBindingContext.findDataControl("AppModuleDataControl").getApplicationModule.findViewObject("empview1");
    V.setWhereClause("");
    V.executeQuery();
    V.first();
    note that the above code works if the table emp is on the page, however, if the page is not bound to the page (it does not contains the table) the statement in the bold will fire an exception saying that there is no binding. i am sure the V is not set to null.
    another problem appears, if i put the table and execute it within jdeveloper, it works correctly, however, if i run if i deploy the application into application server, the code never runs as if there is some kind of an error.
    i hope that you can anser me about the following;
    1- if the code above correct?
    2- how can i view the log for the application?
    3- System.out.println("test"); in jdeveloper works okay, in the application server, does it cause some kind of an error?
    thanks for any help & best regards

    If you don't close the ResultSet, different things happen based on which database you're running. You can keep read locks that you don't need. It wastes resources, and as different databases react differently to it, you might have weird bugs down the road that result from your practices of not properly closing ResultSets, PreparedStatements, and Connections. Put this in a loop like you've got here, and the effects may or may not get amplified.
    I write a close() for a ResultSet just as soon as I open it, just to make sure I don't forget. In a situation like this one, I would write something like so:
    for(int i = 0;i<someValue;i++)
    try
    //some code
    rs = pstmt.executeQuery();
    //some code that uses rs
    catch(Exception e)
    finally
      if (rs != null)
        rs.close();
      if (pstmt != null)
        pstmt.close();
    }

  • What is the problem with this jsp

    <html>
    <head>
    <br>
    <br>
    <center>
    hi ,
    I have following jsp , it runs fine if i delete that if part, it prints the query string as null, i am getting errors becuse of that if , i am not undertsanding what is wrong with that part, someone please suggest.
    <h2>Enter the following data</h2>
    </center>
    <br>
    </head>
    <body bgcolor="#FFDAB9">
    <%
    String query = request.getQueryString();
    out.println("query is "+query);
    if(query.equals("null"))
    out.println("query is null");
    %>
    </body>
    </html>
    I ma getting folowing errors when i access it thorugh the browser
    java.lang.NullPointerException
         at org.apache.jsp.index_jsp._jspService(index_jsp.java:58)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)

    oh thanks it worked , i am doing this since yesterday.but why should i use == , i know equals compares the string and == compares the address ,here query string returns a string
    Anyway thank you once again

  • What is the problem with this simple script

    This shouls work to open safari:
    tell application "Safari"
      activate
    end tell
    But I get error:
    error "Safari got an error: Connection is invalid." number -609
    So what is wrong? Other apps work such as:
    tell application "Adobe Bridge CS6"
      activate
    end tell

    Ah the Devils in the details.
    With the quit like that there is the potential for error.  When I add the quit I see either Safari not opening or else I get the connection error also.
    There are ways around this either put in a delay between the quit and the activate or else superficially check to see if Safari has quit.
    so
    tell application "Safari" to quit
    repeat while application "Safari" is running
    end repeat
    tell application "Safari"
      activate
    end tell
    or
    tell application "Safari" to quit
    delay 5 -- increase or decrease as needed
    tell application "Safari"
         activate
    end tell

  • Can not resolve symbol? what is the problem with this braclet?

    Hi to all!
    I've got a problem understanding the output of javac. Here's the code and below the javac message.
    class ExtComboBoxUI extends BasicComboBoxUI
    private Object sourceBase;
    ExtComboBoxUI(Object source)
    --> {
    sourceBase = source;
    ExtComboBoxUI.java:28: cannot resolve symbol
    symbol : constructor BasicComboBoxUI ()
    location: class BasicComboBoxUI
    Could someone please give me an idea why javac cannot resolve this braclet?
    I am helpless - I really don't know how to get rid of this bug.
    Regards,
    LeaH

    Hi Leah,
    Please check whether you had included all the packages required for your program/application and also check that the packages has been set to the classpath.
    Specify the classpath and check once again.
    Regards,
    Anil.
    Technical Support Engineer.

Maybe you are looking for

  • How do I delete my OLD apple ID?

    I have 2 apple ID's  an old one that was @mac and i've recently made a new one. OK so I want to keep the purchases that i have made at the "@mac"  ID but i want to change the primary email to the recent one i have made. Both of the ID's are not merge

  • "First Site" name - How do I make a site my "first site"

    Mobile Me allows your "first site" to be called [YourMobileMeName]. So it appears as http://web.me.com/[YourMemberName]. For some reason my iWeb demands that I name my "first site" so that my addresses are http://web.me.com/[YourMemberName]/[SiteName

  • "Exception thrown in non-transactional EJB invoke"

              When I throw an application exception from within a statless session bean which uses jdbs for DB Lookup Only I get           "Exception thrown in non-transactional EJB invoke".           As this is a llokup only I have no Transaction Manage

  • JCOM only works once

    I have a web application that was originally developed using J-Integra 1.5.3 -- it works great in tomcat 4.1, and the classes themselves can also be tested/exercised outside of tomcat, where they work perfectly as well. Now that the application is mo

  • Upgrade to Airport Utility 6.2 problems

    imac running 10.7.5. network off comcast modem to airport extreme base station with 2 airport express as extenders. controlled the expresses with airport utility 5.6. had airport 6.1 as well. now ran the upgrade to 6.2 and can't control any of the ai