Switch to manipulate an eventcase structure??

Hi everybody
I'm working with labview 7.1 and ,i'm developing a userinterface to controle af Flow meter (FLM).
In my VI, i'm using  event structure to handle som buttons when pressed.
I starts my application by pressing arrow button in labview. now the my program(VI)is ready.  
I got one problem now, wtih a switch button to stop the measurements and commandswrite from/to the flow meter.
when i switch the start /stop-switch to start, the VI writes some commands to FLM using the serial port like desired,
and then the eventcase structure is ready for some button actions. These buttons are used to send commands to FLM.
i can without problems send the desired commands to FLM.
Now when i switch the start/stop-switch to get the vi to stand by, the event case stil reseives and handle the commandbutton when pressed.
can any one help me with my problem?
any suggestions are full acceptable
Thanks
HZ
PS. if there are problems understanding my explanation, please informe it.!   
Message Edited by HFZ on 01-16-2006 05:14 AM
HFZ
Attachments:
DEMO2.vi ‏112 KB

Hi,
First of all, the structure of your program look a little strange to me.
You have two infinite while loops, that constant connected to the while loop end control will make sure that once you entered there you will never get out. It's ok that you put an event structure inside the loop and you even have an event assigned to the exit button, then the exit control of the loop should be controled be the value of the exit on that event loop.
I'm quite convinced that you can change the structure of the program in such a way that you have only one loop and only one event structure inside of it controlling all the buttons and the exit condition.
Anyway there are still some functionalities that I don't understand...
Do you want that the program starts once the user press the button to start and then end it when he presses it to stop?
I changed it a little bit, I'm not sure if this is exactely what you need and I'm sure that it can be improoved, but I hope it can help you...
Paulo
Attachments:
DEMO2.vi ‏108 KB

Similar Messages

  • Imitate boolean switch behavior using an event structure on a front panel indicator

    Hi,
    I am looking for a possibility to imitate the bevhavior of a boolean switch with an event structure. To be more precise, I want a boolean value to change each time I click on the front panel indicator and then remain constant until I click again. I have not worked with shift registers in a while loop yet, but could this be a way to find a solution?

    LordSnow wrote:
    Okay, I figured it out, BUT I still have a problem. Before I first trigger a mouse event on the front panel indicator, I already need the case structure to be executed once. Therefore I assume that I need some kind of default value, but since the event structure does not create any output at first, I have no idea how to do that.
    Are you talking about the shift register you just created?  You can while in a default value on the left shift register ndoe.  It is wired outside of the loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Switching from case to event structure

    I once down converted some LV 7.0 code to 6.0 and it (automatically) converted an event structure to a case structure.  When trying to upgrade some code to change a case structure to an event structure, I didn't see any means for doing that (a flat sequence, yes... event structure, no).
    Is there a way to convert a case to an event structure -- if not, why not?
       ...Dan

    No, the question is very valid!
    The resulting code does not need to make sense immediately, but I have desired this functionality (=convert case structure to event structure) at several occasions. I have many legacy programs that were made before the introduction of the event structure. Some contain big case structures with many cases, one is the "idle" case which only contains a small wait statement, while others are executed if certain controls change their value. (Sort of a poor man's event structure emulation ). Upgrading this old code would require a simple replacement of the case structure with an event structure so each event case contains the code of one of the original cases, followed by a quick manual cleanup (assignment of the event triggers, etc.).
    Without such a conversion tool, my code upgrade is major work, especially if there are many cases and dozens of shift registers crossing the case structure. Basically, I need to rebuild things from scratch.
    Summary: It would be useful to be able to easily convert between event structure and case structure and vice versa using a "replace" command. I even remember asking for this functionality.  I would use it!
    LabVIEW Champion . Do more with less code and in less time .

  • Structure inside while should work only one time ?

    Hi Everyone ,
                      I have coded a program that if i click a button ( switch untill released) . inside that structure should work only one times . 
                      and i have coded and its working fine .. but its looks compilcated..
                       i need some simple solution . Plz help me guys 
    Attachments:
    CODE.vi ‏10 KB

    saran1988 wrote:
                      I have coded a program that if i click a button ( switch untill released) . inside that structure should work only one times . 
                      and i have coded and its working fine .. but its looks compilcated..
                       i need some simple solution . Plz help me guys 
    Your code has very little to do with what you are describing.
    There is no button with "switch until released" mechanical action. (OK is switch when released, stop is latch when released)
    A case structure always "works". Are you saying that it should execute e.g. the true case only once whenever the outer case goes from false to true??
    Your inner case goes true more than once per run of the program (whenever the OK goes true). If it should really only work once overall, use the "first call?" primitive. You need to formulate the problem using less ambiguous words.
    There is no obvious starting state for the boolean that you read via local variables. How do you ensure that it start with a known value? Does it matter?
    You seem to entirely deal with integers, so why are you using floating point representation for the numerics?
    What is the purpose of the orange numeric indicator. Is it just a kludge for your logic or does its value mean anything?
    Why does your loop not contain any wait?
    At this point, you should learn about shift registers. It would eliminate all your local variables.
    LabVIEW Champion . Do more with less code and in less time .

  • Multiple instances of identical vi inside a while loop

    We have a while loop that is monitoring 6 sensors in a heated water bath.
    Each sensor has the same basic switching parameters.
    While the loop runs, it does not tie the shift register value to the same instance every time it runs.
    The 6 instances of the Switch Pass or Fail.vi in the attached project have a dummy 1, 2, 3, 4, 5, 6 value and we don't know how to tell the main program which instnace to run when a switch switches.....
    So far, everything else works, but we can't get the Switch Pass or Fail.vi to run the same way twice...
    Attachments:
    switch pass or fail vi question Oct 17 2011.zip ‏575 KB

    Stepping back to our "inception" problem.. we have a problem, within a problem, within a problem...
    Before we can answer our other problems, we need to be able to test our VI and can't figure out how to update a bank of shift registers, one at a time, without having the wires break when we don't update each output from the case structure on each case.  The VI won't let us run by populating one output from a wire to different shift registers in a "bundle" vi.
    The goal of the attached VI is to have "TMP Reg" input, initial, shift register, values into the "switch pass or fail.vi" and have the output on the "trip temp out" wire update only the shift register in the "bundle" associated with that switch.
    example: the first case structure entry "1" would output the "trip temp out" value to the first entry in the bundle to update the first shift register.  Then, when the second case ran, it would update the second entry in the bundle to update the second shift register, and so on, until all six cases (switches) had thier shift register values updated.
    Attachments:
    cycle through updating shift registers without re-writing the others.png ‏148 KB
    clusters now feed the RGTR_FX.png ‏195 KB

  • Create user in a form

    I want to create a user in a form trigger such as Pre_insert or other trigger
    CREATE USER :daten.oracle_user PROFILE "DEFAULT" IDENTIFIED BY "xy"
    PASSWORD EXPIRE DEFAULT
    TABLESPACE "USERS" TEMPORARY
    TABLESPACE "TEMP" ACCOUNT UNLOCK;
    GRANT "CONNECT" TO :daten.oracle_user;
    GRANT "DBA" TO :daten.oracle_user;
    doesn't work when I compile. how can I solve the problem to create an user from a form??
    answers in german highly recomended.
    I use
    ORACLE FORMS DEVELOPER AND FORMS SERVER 6i (Patch 2) RELEASE NOTES
    and I belive its an 8.i database version. but I am not shure

    Ok I tried it in a button-trigger and it worked.
    one more I learened:
    DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Forms are not suppose to manipulate the database structure.
    A statement like CREATE TABLE X (A DATE); will result in error:
    Encountered the symbol "CREATE" which is a reserved word.
    However, you can use the FORMS_DDL built-in to execute DDL statements. Eg:
    FORMS_DDL('CREATE TABLE X (A DATE)');
    FORMS_DDL can also be used to create dynamic SQL statements at runtime. The FORMS_SUCCESS built-in can be used to determine if the last executed built-in was successful.
    I got it from:
    http://www.orafaq.com/wiki/Forms_FAQ
    but thanks a lot!! your answer solved me the problem and after googling the meaning of "forms_ddl" I understood the technik
    regard
    robert koch

  • MANAGEMENT SOFTWARE

    teams administration software
    · Support display 30 network devices such as routers and switches
    · Display the network topology structure type tree and access to equipment from this window.
    · Monitoring of switches including packet errors, temperature, bandwidth, CPU and memory.
    · Alarm notification (by network errors or threshold) by email.
    · Allow the computer to update the software without the need for command line usage or TFTP server application.

    CNA is a great tool and have a lot of features, but LMS/CPI is full fledged NMS application which suits all your requirements.
    Following are the benefit of CNA :
    Cisco Network Assistant facilitates:
    Network discovery and convenient display in a topology map
    Configuration management of Cisco products fitting small and medium businesses
    Single-click Telnet or access to device manager
    Front panel view of devices, clusters and stacks
    Inventory reports and health monitoring
    Troubleshooting of common network issues
    Event notification of network errors and alarm thresholds
    Drag-and-drop Software upgrades saves time in maintaining your network
    Direct access to lifecycle information using Cisco Active Advisor
    Following is the benefits and features of LMS/CPI:
    Primary Functional Areas and Benefits
    Monitoring and Troubleshooting
    Proactively identify and quickly fix network problems before they affect end users and services with out-of-the-box preconfigured monitoring dashboards.
    Configuration Management
    Simplify the roll-out of new technologies and network changes through guided workflows based on Cisco best practices with built-in configuration templates that help reduce errors.
    Compliance and Audit Management
    Upgradable compliance engine offers extensive modeling of industry, corporate, IT, and technology policies and quick visibility into compliance status of the network.
    Comprehensive Reporting
    Get immediate up-to-date information about the network through flexible reporting for inventory, user tracking, compliance, switch port usage, end-of-sale, PSIRT, and other critical areas.
    Work Centers
    Easily manage all phases of the end-to-end lifecycle of Cisco value-added technologies and solutions, such as medianet, EnergyWise, TrustSec and Identity, Auto Smartports, and Smart Install.
    Cisco Prime LMS manages the deployment of the latest Cisco technologies and services such as Cisco TrustSec, and EnergyWise. Get started today with new Cisco Prime LAN Management Solution, and the related resources on this page.
    There is a similar discussion in past :
    https://supportforums.cisco.com/thread/180485
    -Thanks

  • How can I debug CRM middleware function call in R/3?

    Hi there,
    I have extended the order line in CRM with a few fields that I need in R/3. I have also extended BAPE_VBAP, BAPE_VBAPX, VBAP_KOM and VBAP_KOMX in R/3 and I have implemented the CRM_DATAEXCHG_BADI BADI to manipulate the BAPIPAREX structure before the BAPI is called in R/3.
    My problem is that I cannot find out which BAPI is called in R/3 to update the sales order and I cannot find out where in CRM_UPLOAD_TO_OLTP it is called? Am I looking the wrong place? Ideally I want to check that the BAPI is called with the correct parameters from CRM, to see if the BADI did what it was supposed to do.
    Best regards,
    Anders

    Below I have stated how Orders flow from CRM to R3 - triggering which all exits in R3 and how we can reach them from CRM in debug.
    A) Block the CSA queue on CRM Side .
    B) Create an order and save it.
    C) Go back to the CSA queue and execute your queue in debug mode . Please put a BreakPoint in 385 line of FM   crm_upload_to_oltp. and line 422 of FM crm_r3_salesdocument_upload.
    D) Put a break point on line 385  of  FM   crm_upload_to_oltp and change the destination in parameter lt_actual_recipients-DEST to <R3SYSTEMRFCDEST>_DIALOG.
    E) Put a break point on line 422 of FM crm_r3_salesdocument_upload and Set the value of variable gv_synchronous_call  = X  in debug.
    F) Then you will be in R3 - debugging how data flows to R3 .
    Hope it helps.
    Regards,
    Kaushal

  • What is a DomParser/SaxParser?

    Hi all,
    I need to parse a couple of html files to make some changes to the tags. I was just going to use a simple bufferedReader/BufferedWriter with a sub string replacement method....but somebody suggested the use of a parser. Specifically a SaxParser. Whadayallthink? And for that matter, what is a SaxParser and how does it differ from a saxParser?
    Regards,
    Mat

    SAX stands for Simple API for XML. Apparently, it is event-driven and is used for accessing XML documents and extracting information from them. However, it does not support manipulation of the internal structure of the documents it reads.
    DOM stands for Document Object Model, and it specifies how HTML and XML documents can be represented as objects. It differs from SAX in that it can manipulate the internal structure of the documents it reads, but I've read that any changes made to the document are only stored in memory and don't affect the file directly. You'd have to have your program do that.
    I have not used either of these or XML yet, but I am learning about them currently.
    HTH
    Jeff

  • [Announcement: Java server-side web controls] - TICL 1.0 Final Released

    Hello JSP developers,
    We are pleased to announce the immediate availability of TICL (Tag Interface
    Component Library) 1.0 Final Release. TICL is library of server-side user
    interface components accessible through JSP tags. Like a conventional
    desktop toolkit, the components maintain state and manage interaction logic
    with the end-user with little or no assistance from the programmer.
    Read more about TICL at http://www.kobrix.com/ticl/ticlmain.jsp.
    If you are already a TICL user, check out the release notes at
    http://www.kobrix.com/ticl/releasenotes.jsp for the latest changes.
    More info
    One of the major goals of TICL is to bring RAD-like development to the WEB
    platform. Programmers can concentrate on logical functionality and build JSP
    pages by placing TICL components through tags and responding to user events.
    Every component is self-contained and manages interaction with the end-user.
    Visual appearance of components is abstracted into a high-level styles
    framework. In fact, TICL is probably the only server-side Java toolkit that
    rivals Microsoft ASP.NET's web controls.
    The library is tailored more towards WEB application development, rather
    than content only oriented sites. It is designed to quickly build clean,
    robust, well-structured and therefore highly maintainable code. It
    integrates seemlessly into existing JSP applications and it will work on any
    standard compliant JSP 1.1 container (e.g. Tomcat 3.2.1 and above, Resin
    etc.) and with fairly recent versions of the popular browsers.
    Core features are:
    - A powerful and extensible server-side event model. Component-end user
    interaction is encapsulated into a well defined set of server-side events.
    You can of course define event listeners, develop custom events, event
    filters etc.
    - Predefined components like panels, tabbed panels, tree views, DHTML menus,
    table views. Most can perform their interaction with the end-user at the
    browser through DHTML or by making a trip back to server on every user
    action (like expanding a tree node or minimizing a panel) - that is
    components are either "client" or "server" managed.
    - Smart browser handling. A complete framework for dealing with browser
    (user agent) capabilities, including detection of dynamic properties like
    connection speed, screen resolution, available plugins etc.; supporting JSP
    tags; on the fly selection of component rendering based on the current user
    agent.
    - A high-level styles framework for complete customization of the look&feel
    of components. Styles can be organized into themes. An inheritence mechanism
    of style objects provides for a powerful high-level structuring. The
    framework allows for a clean separation between look&feel and functional
    behaviour of GUI elements. No more copy&paste, no more code cluttering with
    tedious, browser-specific HTML details - consistency of look&feel can be
    easily achieved by maintaining a single TICL style sheet, a simple XML file,
    that is applied to all pages in your WEB application.
    - Full encapsulation of HTML forms, including a file upload component,
    augmented with things such as server-side command handlers, labels and DHTML
    tooltips. Form fields are typed, true server-side components. Not limited to
    the standard HTML form fields, they operate on a high level and custom ones
    can be developed and plugged into the framework.
    - A very powerful and easy to use declarative form validation mechanism
    (both client and server-side). You define validation rules and handlers for
    invalid forms in a clean, declarative way. The same rules you define can be
    applied at the client (through automatic generation of the necessary
    JavaScript) or at the server. Special purpose syntax allows you to easily
    handle interdependencies between field values.
    - A Data Objects framework integrated with TICL forms. Allows you to
    manipulate complex aggregate structures and associate them with forms for
    automatic mapping to/from form field values and data object fields (e.g.
    Java beans). A type mapping framework allows you to map any form field type
    to any Java type.
    - An integration module for the popular Struts framework is provided also.
    For example, it is possible to use the powerful TICL form tags with Struts'
    ActionForms.
    TICL is FREE for non-commercial and non-govermental use, and for an
    unlimited evaluation period. It comes with an extensive, over 200 pages,
    Reference Manual. To download it, please goto http://www.kobrix.com and
    select Downloads from the TICL pulldown menu. If you are not already a TICL
    user, you may need to register first.
    We sincerely hope you will enjoy TICL and are looking forward to your
    feedback!
    Best Regards,
    Borislav Iordanov
    [email protected]
    Kobrix Software Inc.
    http://www.kobrix.com

    This looks quite nice. I'm going to evaluate it now, but I wish it was open-source....
    Judging from the release notes, it's been around for a while. Has anybody had any experience with this product? Is it reliable? Does it scale well?

  • Saved session opens as blank

    Hey everyone,
    I've encountered a very unusual bug - occasionally when I save a session, the next time I open it, it opens as a blank session.  No tracks, no data - I can't actually even open anything - it just asks me to make a new track, as if I had made a brand new empty session.
    I save as a *lot* (haven't switched to the new 'alternates' structure, of which I'm very glad) so as of yet this hasn't caused me to really lose any work, but it's incredibly frightening.  If someone from Apple would like me to send them one of these sessions, I'd be happy to.
    This has only happened so far to files that are in a folder I'm using bittorrent sync on: http://labs.bittorrent.com/experiments/sync.html
    If we think this is related to BTSync, I'll have to find another sync solution.

    I occasionally see the channel strip disappear from the inspector; opening a fresh main window fixes that (it's a graphics glitch)
    If you think that your sync method is involved, it might be a good idea to .zip your logic files first (rightclick the project file and choose "compress"). That protects the integrity of the file.

  • CREATE VIEW with PreparedStatement

    Hi guys,
    I'm trying to run a CREATE VIEW statement, which I have been doing up till now just using a regular Statement, and using the executeUpdate() method. It's been working fine for a while, and now i've hit a bit of a problem.
    I can't include a WHERE clause in a Statement, as it doesn't like the single quotations (') and wildcards. After searching this forum, I saw that I should be using a PreparedStatement, and using the setString() method to put in the ' and %'s.
    Now when I try to run the PreparedStatement using the executeUpdate() method, I get the "Incorrect syntax near the keyword 'VIEW'" error. Can anyone tell me if i'm using the right method for executing the PreparedStatement, or what i'm doing wrong?
    Regards,
    Jack Smith

    SQL statements are often broken up into two classes, DML (data manipulation language) and DDL (data definition language). DML contains the normal CRUD statements, INSERT, SELECT, UPDATE, DELETE and anything else that modifes the data but not the data structure. DDL is the set of statements that manipulates the data structure, things like CREATE, ALTER, DROP.
    As a general rule of thumb, you shouldn't do DDL in a PreparedStatement.
    PreparedStatements exist primarily to allow late-binding of data-value objects into the internal datastructure within the database that represents a parsed SQL statement's execution plan. It is NOT a mechanism for doing string substitution (though I understand who it can look that way to beginners).
    Another way of saying this is that PreparedStatement is based on the distinction between data and code; in a DDL statement, the entire statement is code.
    There are a few drivers/databases where this might happen to work, because they aren't really seriously implementing PreparedStatement but merely doing string replacement to fake it. I very much doubt SQL server is going to be one of these.

  • Help to migrate from XP to Windows 7

    The PC that my family uses to synch our iphones and ipods has crapped out and will not boot and runs Windows XP..  The weird thing is the whole issues started when my son said that all of his music libraries were gone.  So after researching the issue, I was able to restore everything back to an archived itunes library from back in November.  A few days later, the PC wont even boot, is seems something is corrupt in the boot sector.  If I add the hard drive to a PC, I can actually read the data.  So on to my question.
    I am building a new PC which will have windows 7 64 bit.  So my question is, what would the best method be to migrate everything from my XP hard drive to my new Windows 7 PC?  I don't even know what version of Itunes the XP machine was running.  Is there a way to look at some xml file on the XP machine to find out?  I have read other posts on this topic and they seem to get somewhat complicated based on what the old machine(XP)'s folder structure was set to.  I don't recall ever switching to the new folder structure so I am sure it will not match the new iTunes version on my Windows 7 Machine.
    Thanks in advance for an advice, it is greatly appreciated.
    Sprybry

    Hi,
    When you backed up the data, did you use the default setting? Or did you choose the files you needed to backup?
    Files under a profile should all be backed up, except when you created an independent .pst file and imported the data into it.
    You can try Don's suggestion, and we can also post this question to Windows Client forum:
    http://social.technet.microsoft.com/Forums/windows/en-us/home?category=w7itpro
    Regards,
    Melon Chen
    TechNet Community Support

  • Reinstalling of os x lion taking a long time! help?

    Hello!
    I am having such a frustrating time with the reinstalling of the os x lion.
    At one point of the download it has told me it would take 180 hours to complete! (it's unbelievable!) I mean I know that the computer goes through recalculations over the time of the download but the download bar doesn't even hit half way even after several hours.... All it says is "Downloading Additional Contents"
    Before I started to reinstall the os x I had cleaned out my disk and everything.
    Please if anyone could help it would really mean the world as I want to get my laptop back to working again.
    Is there anyway I can fix this or anything?

    Which parts of what I said you don't know what I meant?
    If you only want something to happen when the value of the boolean switch changes, then maintain the value of the boolean in a shift regsiter or feedback node so that you can compare it between the last iteration and the current iteration.  If the values are not equal, put your switching code in the case structure.  Then use the current value of the boolean wire to determine whether to send one constant or the other to the DAQmx Switch function.
    See the modified VI.
    I think those DAQmx functions for the switch are rather odd.  They say they are DAQmx, but generally DAQmx functions will output a task wire to string along to later functions.  It allows you to have multiple functions operating on different equipment at the same time without the the DAQ functions getting confused.  I don't know why these Switch functions don't have this.
    Attachments:
    Fat%20Switch[1].vi ‏13 KB

  • Double Instance of one Button

    Hi guys I have an event structure which handles two cases, one of them is to write some external hardware and the other is to read from it.
    There are 2 methods of reading and writing to this part through its Volatile and Non Volatile Memory.
    To decide between these two functions I have placed a control toggle switch outside of the event structure, each event "read" and "write" need instant access to this control.
    When I place the switch outside the event struc its is of course not read immediately in the event but delayed a bit because of the connector at the border of the struc.
    When I place the button inside in the event struc it is read everytime instantly and the appropriate Volatile or Non Volatile write/ read takes place instead of having to execute the event twice to update the value.
    I would like both cases to have instant access to this toggle switch as if it would be placed inside in each event .
    Is it possible to create 2 instances of a front panel control on the block diagram ?
    Solved!
    Go to Solution.
    Attachments:
    screb.GIF ‏12 KB

    eoin87 wrote:
    Is it possible to create 2 instances of a front panel control on the block diagram ?
    Yes. Use a local variable of the front panel control in the other event case. Right-click on the control and select Create -> Local Variable.
    One of the few times that a local variable has merit. 

Maybe you are looking for

  • Creation of delivery from rental contract MV

    Hi, Is creation of delivery document with reference to rental contract MV allowed? Do I need to create a sales order first? Thanks, NMD

  • Text underlined... can't remove

    i underlined some text on my site, published it, and then decided i no longer wanted it underlined. i removed the text in iweb, and typed it agian without the underline formatting, and it still saves the file and publishes it with underlining. i am n

  • SQL DEVELOPER INSTALLATION ERROR

    Hi Guru's, My OS : Linux DB : Oracle 10g When i am trying to install Oracle Sql Developer, I am getting the below error: Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk I install jdk-7

  • HT1349 please i need an email to contact the apple store because I need information about iphone

    Please i need an email to contact the apple because i need some information about iphone. Can you send to me an email? flavinha_bs<at>yahoo<dot>com<dot>br <Email Edited By Host>

  • When sending E-Mail

    Is there a way to send e-mail but not have that person's e-mail show. In other words when I send a e-mail the person's name etc... joe blow ([email protected]) shows. Can't I just have the name show and not the e-mail.