How to use settings with a state machine?

I have a "classic" data acquisition program that acquires voltages from different sensors. Each DAQ read subvi has some settings for the scale, range of voltage etc.; additionally I have set a certain buffer size, sampling rate etc.
I would like to show on the front panel only the start, stop type of buttons, file name and charts, and 'hide' the settings in a subvi. I already built the subvi but now the problem is how to hide it and how to call it through a "settings" button whenever I want to change something. I tried this using New events handler (using events in a while loop); the problem is when I start the program, the settings in the application do not take the settings in the subvi, they all go to 0 (I used shift registers). I started to wonder if this is a good approach or what could I do to make the settings available right from the start.
Did anybody have the same problems and could give me some suggestions and an example?
Thank you. 

Attached is an example to help you get started.  The popup VI in the event structure is called and shows it's front panel when called because of the subVI node setup (right click to check this) - the instance of the subVI outside the loop, which initializes the shift register, does not pop up because it's subVI node setup is not set that way. 
If you run the example and study the code, you'll find comments in the code to help you understand the behavior.
I hope this helps!
Best Regards,
Change Settings Example.llb ‏46 KB

Similar Messages

  • Help me with a state machine design

    I have a little bit of a problem.  I have a system with several modes, each selected by the user and called with a case structure.  Each case in the case structure is its own state machine with a few states (like 4-6).  Now here's the catch.  I need one of the states within one of the modes to call and execute an entirely different mode (and all of its states) without actually changing the mode command, and to do so every iteration until I jump out of that state into another state within the first mode.
    Is there a simple way to do that that I'm just not thinking of?
    Lee Jay

    Lee, my first thought would be to use just a big state machine.  For example if each mode needs 4 states, mode 1 gets states 0-3, mode 2 get states 4-7, and so on.  This way, if you need to change modes in the middle of another mode, you just direct the state selector to the state that starts the mode.  (If that makes sense).  It's not real elegant, but it works fairly well as you still maintain the flexibilty of the state machine design, including the ability to add and rearrange cases. 
    Don't forget you can use any method to select the cases, including strings, so you have full flexibility with how you setup case select.

  • How to use Terminal with KeySpan USB serial adaptor cable?

    I own a KeySpan model USA-19HS to use with our MacBookPro when working on clients networking equipment that require serial communication. I have used ZTerm with excellent luck, but it costs, and is yet another application that I dont really want. I would like to know if any one out there has exacing instructions on how to use Terminal with this adaptor. If I could write a file that had, say, the couple most common settings (9600-8-n-1, 57600-8-n-1, et cetera) that I could simply click on, to open a new Terminal window with those settings, then simply close that, and open a new window (apple+n) in order to get back to a default settings terminal window. All feedback is most appreciated.
    Thanks so much, Jason Sjobeck

    Hi, Jason. Welcome to the Discussions.
    You wrote: "All feedback is most appreciated."OK.
    1. Have you considered discussing this with Keyspan Support?
    2. Have you read the section "OSX has - why do I need ZTerm?" on the ZTerm Home Page? That seems to explain why one needs an app like ZTerm.
    3. A quick search of Keyspan's FAQ for your product and terminal doesn't yield much more than how to find the serial ports using Terminal.
    Likewise, this Google search also yields little, and variants of that search of such weren't particularly help either.
    It appears your inquiry seems to be a somewhat esoteric topic.
    4. Apparently, ZTerm X is a bit long in the tooth and there's no Universal Binary for it. It sounds, however, like you've tried it running on your MBP under Rosetta, yes?
    5. In researching alternatives to ZTerm for you, I note the followng:• The comment from "Reverb" on this page suggests C-Kermit or Kermit as a free alternative.
    • This tip on Mac OS X Hints cites Minicom as another option.6. You may want to try your question on the Unix Discussion.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • How to use Count with Date Parameters

    I am having issues using the Count() function in conjunction with date parameters.
    This is a Siebel report and in my report I have 2 date parameters(From Date, To Date). In a nutshell I am basically trying to count Opportunities that has a start date within the given date period. However I don't see a reasonable way to put my date parameters within the Count() function. The reason being is that I need to have a huge chunk of code to convert the dates into a common format that can be compared, and it won't even fit within the code block in my rtf template. I am not even sure how to put multiple conditional statements inside a Count() function since all the examples I have seen are very simple.
    Anyone have a suggestion on how to use Count() with date parameters?

    Any chance you can get the date formats in the correct format from siebel?
    I don't know Siebel - so I can't help you with that. If you get the correct format it is just
    <?count(row[(FromDate>=date) and  (date<=ToDate))?>
    Otherwise the approach would probably need to use string function to get year/monthd/day from the date
    and store it into a varialbe and compare later the same way
    <[email protected]:from; ....?>
    <[email protected]:to; ...?>
    <?count(row[($from>=date) and  (date<=$to))?>
    Potentially you can use the date functions such as xdofx:to_date to do the conversion
    But I am not sure if they are available in your siebel implementation.
    Hope that helps

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use setSoTimeOut() with socket ??

    HI All!
    I eagerly need to know how to use setSoTimeOut() with socket (on server side).
    How can i do that??
    Any help with example will be appreciated!!
    Thanx in advance

    you'd have to do something like this:
    (this is all assuming you want to read Strings from the socket. setSoTimeout works for any read() call to the InputStream associated with the Socket)
    ServerSocket ss = new ServerSocket(myPort);
    Socket s = ss.accept();
    s.setSoTimeout(5*60*1000); // 5 mins * 60 secs * 1000ms
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    boolean running = true;
    String readIn = in.readLine();
    // do whatever you want with the data read
    running = false;
    Now. That's what I think needs to be done. I don't have Java on the machine I'm currently on, so I can't test/verify it, but it goes something like that.
    Good luck,

  • How to using ical with two separate iphones

    trying to understand and learn how to use Ical with 2 different Iphones, using Icloud.

    To sync iCal across computers, the calendar needs to be published to a server. This can be a local server that you can set up, or it can be something like google or microsoft exchange or apple's mobile me. The best bet may be to wait until fall and see what iCloud offers!
    Sharing your screen can be accomplished a few different ways. You can have two iChat accounts set up, and have one logged in on each computer, and then use iChat's screen share feature. The other way is to go to System Preferences, Sharing, and then check the box next to Screen Sharing. You may have to adjust some of the settings in there, but give that a shot.

  • Does anyone know how to use ATV with a keynote presentation?

    Does anyone know how to use ATV with a keynote presentation? Is it possible?

    Yes use Quicktime. Try to create a presentation that uses a widescreen aspect 1280 x 720 would be good, then export it at full quality which should give you a movie of 720p at 24 fps and should be just fine for the tv, if you have any problems with exporting it this way, you could try manual settings or simply run the export you made at full quality through itunes using advanced/create an Apple tv version.

  • How to use variables with

    I need to get the number of lines in internal table, which would
    be easy, using DESCRIBE TABLE itab LINES lines. But the problem
    is, that I get the name of this internal table in the field of
    another internal table, so I have to use the name of internal
    table as variable, but I don't know how to use variables with
    DESCRIBE TABLE (or if this is possible).

    define two tables with diferent structures.
    data: begin of table1 occurs 0,
    registro type i,
    end of table1.
    data: begin of table2 occurs 0,
    registro type i,
    repid like sy-repid,
    end of table2.
    data: rows type i.
    fill them with data
    do 1000 times.
    table1-registro = sy-tabix.
    append table1.
    do 1757 times.
    table2-registro = sy-tabix.
    table2-repid = sy-repid.
    append table2.
    call a form that receives as input the table and returns the number
    of rows as output.
    perform howmanyrows tables table2 changing rows.
    break-point. "evaluate the number of rows
    perform howmanyrows tables table1 changing rows.
    break-point. "evaluate the number of rows
    form howmanyrows tables itable changing rows.
    rows = 0.
    loop at itable.
    add 1 to rows.
    You can try it if you don't find a better solution.

  • How to Use Gmail With Apple's Mail?

    Now Itis not a Problem, Please go to this link and know how to solve this problem, Ihave configuir this in my mac pro. Have enjoy. tml

    I notice that it's possible to have sticky posts in these forums. See
    the Concurrency forum for an example. Posting a link to the FAQ in a sticky post might reduce the number of FAQs asked here by maybe 1%? Or posts like this one might do well as a sticky?

  • How to use javap with jar files ?

    how to use javap with jar files ?

    As long as the jar is on the class path, your gold. So,
    javap -classpath myjar.jar mypackage.MyClass

  • How to use log4net with C# clients

    Can anybody please give an example of how to use log4net with C# clients? Foe java clients you can use the
    How do we use it with C# clients? Any example will be appreciated.

    The following is an example on how to define a custom logger (including log4net) in tangosol-coherence-override.xml for coherence .NET client; you need Coherence .NET client 3.7.1 patch 1.
    <coherence xmlns="">
    <message-format>(thread={thread}): {text}</message-format>
    You also need to configure log4net in app.config. Please see the following web page for more information:

  • How to use assert with wireless toolkit?

    I am trying to find out how to use assert with wireless toolkit. I have found that I need to pass "-source 1.4" to the java compiler. But I can't find any documentation on how to do it.
    I'm using J2ME Wireless Toolkit 2.2.

    Here's a quote from an article on Java World at
    "To support the new assertion facility in J2SE 1.4, the Java platform adds the keyword assert to the language, an AssertionError class, and a few additional methods to java.lang.ClassLoader."
    So I really think it's part of 1.4.

  • How to use I18N with a custom validator?

    This is my custom validator:
        public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
            Pattern pat=Pattern.compile("[email protected]+\\.[a-z]+");
            Matcher m= pat.matcher(value.toString());
                FacesMessage message = new FacesMessage("Not a valid e-mail address");
                throw new ValidatorException(message);
        }Instead of providing the text "Not a valid e-mai address", I'd like to get the text out of my ApplicationResources property file.
    How can I do this?
    I know how to use it with the provided validators, but not with own custom ones
    Please help me out, thanks

    I found a solution for this problem, I don't know it's best practice but here it is :
        public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
            String errortext;
            Pattern pat=Pattern.compile("[email protected]+\\.[a-z]+");
            Matcher m= pat.matcher(value.toString());
                ResourceBundle bundle =
                ResourceBundle.getBundle("be.vdab.resources.ApplicationResources", context.getViewRoot().getLocale());
                errortext = bundle.getString("erroremail");
                FacesMessage message = new FacesMessage(errortext);
                throw new ValidatorException(message);

  • How to use x264 with FCPX

    I used the automatic installer for x264.
    There were no instructions on how to use it with FCPX or compressor.
    Can someone offer a tip?
    iMac 2009,1

    Youn can't use it in FCP, only with Compressor. In Compressor make a new QuickTime preset or duplicate an Apple preset and change the codec to x264.

Maybe you are looking for