Call event from other event or other vi

I have LabVIEW 6.1.
1. Can I call an event or a serious of events from another event? How can I do that? It doesn't matter if the events are executed after the event that called them is completed.
2. Can I call an event from another vi? Let's say I have an event structure in a subvi. Can I trigger an event in the subvi calling it from the main vi? How would I do that?
Thanks for your help.
Jerome.

Salutations,
In reality, a program should only have 1 event structure. Or so someone much more knowledgable with labview has told me in the past.
It's an important note to make that when running events or SubVi's, they will run until they are accomplished and then allow the next event or subvi to take place. So if you have multiple event structures, you must wait until one finished before the next one is run (This might...no guarantees, be avoided by multiple while loops and not locking the front panel on the execution of an event). Now, since you don't care, you can handle such a case. Just make multiple events in your one main event structure. I'm not sure what exactly you want to do, just make sure you "unfreeze" the front panel when you're messing with what handles what events.
Hence, you could have a "run" button that's pressed and it goes about it's business. Then you could have a mouse down response, that you hit while your "run" process is still going, this will be, in a sense, logged and accomplished once the "run" task is done. Now, if you're looking for data to trigger another event, maybe I'd switch over to a case structure that's inside your event structure. For case structures, every case must have an output.
Can you trigger an event in the subvi calling it from the main vi.... Excellent question... I'm not exactly sure when this would come up, but i'm not super experienced like some of the people around here. It may be possible, but i'd imagine a case structure would be more efficient. Like the ones in error handling. Pass the case to the subvi, it'll operate depending on what you want, and then continue along. Events seem most useful when dealing with events that occur on the front panel.
Hope this helps,
ElSmitho

Similar Messages

  • Calling EJB from other EJB on other J2EE Server

    Can I call EJB from other EJB on other J2EE Server
    Servers - Websphere 5.0
    Do i require home & remote interface of that ejb on client side also
    Help me, please

    the problem is actually i require that is specific to websphere
    for example i want to call a method ion that ejb
    say my ejb name is myejb
    so the normal way i should call is
    InitialContext initialContext = new InitialContext();     
    Object homeObject = initialContext.lookup("ejb/MyEjbHome");
    MyEJBHome myEJBHome =(MYEjbHome )javax.rmi.PortableRemoteObject.narrow(homeObjectMYEjbHome.class);
              myEJB = lSHome.create();
    myEJB.someMethod();
    but here i am having class for home and remote available
    now if other app server i am not having this classes then what to do

  • Create DLL from labview and calling it from other application

    I have an application built using Labview. I wanted to create DLL out of it. The application has
    two String inputs start and stop buttons and two status indicators.
    1. How to itegrate start and stop buttons from function prototype?
    2. Does Labview created DLLs requires labview runtime engine when it is to be called from other application?
    Can some one help on this.
    Solved!
    Go to Solution.

    Hi Yuvish,
    1) They should be boolean inputs to your VI. But does it makes sense to provide a stop button input at the start of your VI? (THINK DATAFLOW!)
    2) Yes, the LV-RTE is needed...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Calling Transaction from other system using RFC

    Hi ,
    I have one button on screen(say Screen-A), in ECC. when its pressed the transaction '/SAPAPO/BOPIN' gets called from APO.
    For calling transaction from APO I am using FM - 'ABAP4_CALL_TRANSACTION'.
    I want the initial screen of that transaction to retain some values which I fill on the Screen-A(the screen which has that button).
    When I call the transaction from ECC itself (ex. C006), the initial screen of C006 retains the value on Screen-A.
    I want the same to happen in case of calling transaction from APO.
    How to achieve this?  Would it need the changes in IMG (SPRO)?
    Please note that, Screen-A is initial screen of transaction 'md05' and I want to retain vaules of Material, MRP Area, Plant.
    Thanks,
    Sujeet

    Builld a RFC enabled FM () that wrap the call of Smartforms (*) in the other system.
    Regards,
    Raymond
    (*) [Writing Remote Function Modules in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/22/0425f2488911d189490000e829fbbd/content.htm]
    (**) [Integrating the Smart Form into the Application|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm]

  • NetBeans: Calling code from other packages?

    Normally, when I would call code from eclipse, I would type something like:
    import +<package name>.<class name>+But somehow, this approach doesn't seem to work in NetBeans, how can I import code from another package? I can seem to import from the same package, but not a different one.
    Edited by: px7659 on Jun 15, 2010 6:21 PM

    px7659 wrote:
    Normally, when I would call code from eclipse, I would type something like:
    import +<package name>.<class name>+But somehow, this approach doesn't seem to work in NetBeans, how can I import code from another package? I can seem to import from the same package, but not a different one.Then the package is not part of the project. Did you perhaps forget to add the jar library in question?

  • Calling EJBs from other EJBs in other J2EE Server?

    How can I call one EJB on one J2EE Server from other
    EJB on other J2EE Server?
    Help me, please.
    Dmitry Tumanov

    Basically call the beans as if you were calling them in the same server through their remote interfaces. Get a InitialContext into the other appserver and then get the home object, narrow it and create a remote reference. You can follow the standard implementation just make sure that the InitialContext you create has the right properties, ie. context factory, urls, etc to the OTHER appserver.

  • How to store Connection object and call it from other programs.

    Hi,
    I am trying to connect to the database, store the connection object and use this connection object from other standalone java programs.
    Can any one tell me how to do this? I've tried in the following way:
    In the following program I am connecting to the database and saving the connection object in a variable.
    public class GetKT2Connection {
       public static void main(String[] args) {
          String url = "jdbc:odbc:SQLDsn;
          String dbUser = "sa";
          String dbPwd = "sa";
          Connection kt2conn = Connection connection = java.sql.DriverManager.getConnection(url, dbUser, dbPwd);
          if(kt2conn == null) {
             System.out.println("Database Connection Failure!");
          else {
             System.out.println("Connected to Database...");
         GetKTConnectionObj.storeKT2ConnectionObj(kt2conn);
    } Here is the program to save connection object in a variable.
    public class GetKTConnectionObj {
       static Connection kt2Connection = null;
       public static void storeKT2ConnectionObj(Connection conn) {
       kt2Connection = conn;
       public static Connection getKT2ConnectionObj() {
       try {
          return kt2Connection;
       catch(Exception e){
          System.out.println(e);
      return null;
    }Now from the following code I am trying to get the connection object that is stored. But this is throwing NullPointerException.
    public class Metrics_Migration {
      public static void main(String args[]) {
         try {
        java.sql.Connection connection_1 =   GetKTConnectionObj.getKT6ConnectionObj();
         catch(Exception e){
    }

    kt2Connection is null. You need to store it first, to make it not null. Otherwise it will stay null forever. And why on earth are you trying to do this THIS way?
    If you are running the two applications separately, it wont work either.

  • Calling repaint from other Class file.

    Hi,
    First of all i am pretty new to Java so I hope you understand what I am trying to explain..
    I am trying to create an applet which draws some polygons on the screen. For the drawing of these polygons I have created another class which is located in another package but the same project. I plan to use this second package as some kind of library so that i can simple call 2 or 3 functions in future applets to draw these polygons (which always have the same shape). In the library file i have created a contructor, a draw function and some other functions to change some properties. I also created a function that created a popup window as soon as i click on one of the polygons i have created. In the popup some buttons are available which change the color of the polygon. All this works fine, but the problem i have is the following:
    When i click a button the main class (in package 1) needs to be repainted for the changes to be visable. But the main class can always be a different one. Is it possible to check in the class in the library package, which class from the main package called the class, and execute a repaint() on that class. So i have the following situation:
    Package 1 (Applets):
    package applets;
    class myApplet extends Applet implements .... {
    private Tank tank1 = new Tank(20, 20, 100, 200);
    private Tank tank2 = new Tank(250, 20, 100, 200);
    public void paint(Graphics g) {
    tank1.drawTank(g);
    tank2.drawTank(g);
    public void mouseClicked(MouseEvent e) {
    tank1.openWindow();
    tank2.openWindow();
    Package 2 (Library):
    package applets.library;
    class Tank {
    public Tank(int xPos, int yPos, int height, int width) {
    public void drawTank(Graphics g) {
    public void openWindow() {
    new myWindow("Window1");
    public class myWindow extends Frame {
    public myWindow(String name) {
    show();
    public boolean action(Event e, Object arg) {
    return true;
    So what i want to do is: In class Tank in the public class myWindow in the method action, i want to call the repaint() of the class myApplet
    I hope my problem is clear to you, as you may have noticed i have a little trouble explaining it clearly..

    First of all thanks a lot for your reply and sorry for my way of programming. Like i said i am pretty new to Java, i am actually only programming for about 2 weeks and trying to learn from some examples on the internet.
    I dont really understand what you want me to do, is it maybe possible to give a little bit of sample code? That would help me a lot.
    Maybe some background information about the project will help a bit too.
    I work at a company that develops automation solutions. We program PLC's and SCADA systems. Now Siemens has some PLC's that support Java applets which make it possible to visualize industrial processes. Now i am trying to figure out if it is possible to start developing own java applets for visualisation in the future. Since most programmers here have no experience in any higher programming language i want to keep it as simple as possible, by developing libraries that do the most of the programming work for them.
    Now i want to create the first part of this library by programming some kind of storage tank. This tank always has a valve. when i click on the valve a popup should open with the operation button to open of close that valve. When a valve is opened it should be colored green and when its closed it should be colored gray or something. The Tank class has a couple of methods:
    drawTank(); to draw the tank in my applet,
    openValve(); to open the Valve,
    closeValve(); to close the Valve,
    After all this is created i want to be able to use this class in all my other classes and create a tank by simple making a new Tank object, draw it on my applet using the drawTank() method and open or close the Valve using the other 2 methods, however when i open or close the Valve the color of the valve should change so i must be able to call the repaint of all the classes that use my Tank class, but i want to do that INSIDE my Tank class.
    If there is another way of doing this i would love to hear so, but i would help me a lot if you can explain in a little bit of sample code. It doesn't have to be really long or detailed.
    Thnx in advance

  • Calling application from other database

    It's possible to call an application on another database, without informing user and password again?

    Sorry for being fastidious, but I don't think you can "call" an Apex application as you would call a database procedure for instance. So I assume you mean navigate from one Apex application to another Apex application in a different database.
    If you use single sign-on (SSO), that is a piece of cake.
    If you don't, there is no straightforward way I think. You can use some ingenious ways to get round it though, for instance:
    - In the calling application, using a database link, insert a token in some table in the other database along with the username and a timestamp.
    - Pass that token and the username in the URL as a parameter to an "auto login page" in the other application
    - In the "auto login page" of the other application, check whether the token/username combination is valid and, if it is, auto-login the user using the provided username.
    You also could use other fancier techniques like queues. Maybe others may have other suggestions.
    I hope this helps
    Luis

  • Calling smartform from other system in ECC.

    Hi friends,
    I have a smart form in other system....In Ecc there is an alv report  where in when i click on any line item,it should fetch the information in terms of smart form from the other system.that is a smart form present in other system should be displayed in ECC.I have not to create any smart form in ECC...Only call smart form from the other system....
    Has somebody done this before or have any ideas how to do it.
    I ll be highly thankful l to you
    kanishak

    Builld a RFC enabled FM () that wrap the call of Smartforms (*) in the other system.
    Regards,
    Raymond
    (*) [Writing Remote Function Modules in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/22/0425f2488911d189490000e829fbbd/content.htm]
    (**) [Integrating the Smart Form into the Application|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm]

  • Calling methods from other classes

    I have a bunch of little java files in a folder, do I need to make a package in order to access all the methods in all the classes, or can I just make an instance of any of the methods because all the classes are in the same folder?

    HI,
    If your methods have a "public" modifier (and the class does too) then you can instantiate your classes as objects from that (so-called) "default" package in any other class or object in any other package and then call the methods on those instantiated objects as you please.
    If that sounds confusing... I'd seriously try the excellent tutorials at this site, especially "the java tutorial".
    /k1

  • Calling Results from Other Forms

    i have data on one form and want to display it on another. basically i want to transfer the int value in form 'a' on a label to a label in form 'b
    the forms are calles Main, whcih is where the original value is and Print where the label that wants the value is.
    the label is called jlabel1 on the main page with the value and the other label is jlabel2 where i want the value to go.. i have a variable in place called result to save this value
    upto now i have something like;
    Main.jLabel1.getText(result);
    Print.Label2.setText(result);am i going anywhere with this??
    thanks

    phil028 wrote:
    i have data on one form and want to display it on another. basically i want to transfer the int value in form 'a' on a label to a label in form 'bDon't think in terms of forms, think in terms of classes. How would you get information from one class to another? Often I use getters and setters. Sometimes I use observer pattern where appropriate.
    upto now i have something like;
    Main.jLabel1.getText(result);
    Print.Label2.setText(result);
    What happens when you try to run this? Any problem with the getText(result) method call?
    But again, how about having accessors in the one form that has the information?

  • Calling phones from other than home country

    While traveling overseas, in order to call phone numbers, should I use home country international dialing code or the code of the country I am in? Have tried several ways but nothing seems to be working.

    vinaysingh wrote:
    Thanks for your response. But let me state the problem differently. I live in the US and am traveling in Brazil now. I have enough Skype credits to make call mobile/landline numbers.
    While dialing from USA I dial 00 + country code + area code + number.
    My question is how do I dial an international number while in Brazil? Above format does not work. The code to dial international numbers from Brazil is 0021+ country code+ area code +number. But it does not work. I am surprised that this routine question is not answered on Skype web site and I have to post a message in order to get help.
    You would dial telephone numbers from Skype the same way, wherever you are, and even if you are in the same country as the number you are dialing.  Your location is irrelevant to Skype when calling phones. 
    To call a number in the States, you would dial +1 xxx xxx-xxxx (or 00 1 instead of +1).  For Brazil, you would have to start out with the Brazilian country code +55 (or 00 55) followed by the Brazilian area code and phone number.  The 21 you are referring to appears to be a code to select a Brazilian telephone carrier Embratel when placing a call within Brazil.  You can't use those carrier-selection codes when dialing from Skype.  Skip that, and dial the rest of the number as you outlined - 00, then country code, then area code and number. 
    Patrick
    Location/Ubicacion: Arizona USA
    Time Zone/Hora Local: UTC/GMT -7
    If this message has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.
    Si esto mensaje le ha ayudado, por favor haga clic en "Aceptar como solución". Si encuentra un mensaje útil, por favor "Da Kudos" al final del mensaje, por lo que esta información puede beneficiar a otros.
    I am not a Skype employee. No soy un empleado de Skype.

  • My CommandButton calls PostContructs from other Managed Beans. Why?

    Hi,
    i have a big problem that i can't understand.
    I use a command Button who should call only one Managed Bean. But however it calls other Managed Beans too.
    How is it possible?
    my properties:
    Primfaces 2.1
    Glassfish v3
    jsf 2.0
    Ejb 3.1
    JPA - Toplink
    Facelets
    Netbeans
    mainTemplate.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:c="http://java.sun.com/jsp/jstl/core"
          xmlns:p="http://primefaces.prime.com.tr/ui">
        <ui:insert name="head">
            <h:head>
                <meta http-equiv="content-type" content="application/xhtml+xml;charset=utf-8" />
                <link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/style.css" />
                <title></title>
            </h:head>
        </ui:insert>
        <h:body>
            <div class="main">
                <div class="main-bg">
                    <div class="main-width">
                        <div class="indent">
                            <h:form id="urlForm" prependId="false">
                                <div class="posturlbox">
                                    <h:inputText value="#{addUrlBean.userUrl}" styleClass="posturlinput" id="url" onclick="this.value = ''" />
                                </div>
                                <p:commandButton styleClass="button" action="#{addUrlBean.addVideo}" value="#{msg.send}" style="float: left;" update="urlForm" />
                                <div class="addUrlMessage">
                                    <p:message for="url" showSummary="true" showDetail="false" />
                                </div>
                            </h:form>
                            <div class="clear"></div>
                        </div>
                        <div class="content">
                            <div class="content-indent">
                                <ui:insert name="content">
                                </ui:insert>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </h:body>
    </html>
    test.xhtml
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:c="http://java.sun.com/jsp/jstl/core"
          xmlns:p="http://primefaces.prime.com.tr/ui">
        <h:head>
            <meta http-equiv="content-type"
                  content="application/xhtml+xml;charset=utf-8" />
        </h:head>
        <h:body>
            <ui:composition template="/WEB-INF/template/mainTemplate.xhtml">
            </ui:composition>
        </h:body>
    </html>
    addUrlManagedBean.java
    package managedBeans;
    import entities.UserEntity;
    import infoBeans.VideoValidationInfo;
    import javax.ejb.EJB;
    import javax.faces.application.FacesMessage;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.ManagedProperty;
    import javax.faces.bean.ViewScoped;
    import sessionBeans.VideoSessionBean;
    @ManagedBean(name = "addUrlBean")
    @ViewScoped
    public class AddUrlManagedBean extends GeneralManagedBean {
        @EJB
        VideoSessionBean videoSessionBean;
        private String userUrl = "URL";
        @ManagedProperty("#{loginBean}")
        LoginManagedBean loginMB;
        /** Creates a new instance of AddUrlManagedBean */
        public AddUrlManagedBean() {
        public void addVideo() {
            UserEntity sessionUser = loginMB.getSessionUser();
            if (sessionUser == null) {
                informUser(FacesMessage.SEVERITY_WARN,
                        "log_in_or_crate_new_account",
                        "log_in_or_crate_new_account_detail", "url");
            } else {
                int validationId = videoSessionBean.validateVideo(userUrl);
                if (validationId == VideoValidationInfo.VIDEO_IS_OK) {
                    videoSessionBean.addVideo(sessionUser, userUrl);
                    informUser(FacesMessage.SEVERITY_INFO,
                            "video_create_success",
                            "video_create_success_detail", "url");
                } else if (validationId == VideoValidationInfo.URL_IS_EMPTY) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "url_is_empty",
                            "url_is_empty_detail", "url");
                } else if (validationId == VideoValidationInfo.URL_SYNTAX_WRONG) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "url_syntax_wrong",
                            "url_syntax_wrong_detail", "url");
                } else if (validationId == VideoValidationInfo.VIDEO_NOT_EXIST) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "video_not_exist",
                            "video_not_exist_detail", "url");
                } else if (validationId == VideoValidationInfo.VIDEO_ALREADY_EXIST) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "video_already_exist",
                            "video_already_exist_detail", "url");
                } else if (validationId == VideoValidationInfo.VIDEO_ID_LENGTH_WRONG) {
                    informUser(FacesMessage.SEVERITY_ERROR,
                            "video_id_length_wrong",
                            "video_id_length_wrongdetail", "url");
            userUrl = "";
        public String getUserUrl() {
            return userUrl;
        public void setUserUrl(String userUrl) {
            this.userUrl = userUrl;
        public LoginManagedBean getLoginMB() {
            return loginMB;
        public void setLoginMB(LoginManagedBean loginMB) {
            this.loginMB = loginMB;
    }Now. if i click the Button
    *<p:commandButton styleClass="button" action="#{addUrlBean.addVideo}" value="#{msg.send}" style="float: left;" update="urlForm" />*
    *<div class="addUrlMessage">*
    it should only use the AddUrlManagedBean right (i tried it with h:commandButton too.. same result)? But i make a System.out in my other ManagedBeans (PostConstructs) and i see this logfile.
    LogFile
    INFO: PostConstruct: VideoDetailMB - ViewScoped
    INFO: PostConstruct: VideoMB - RequestScoped
    INFO: PostConstruct: UserVideosMB - ViewScopedHow is that possible? Why it activate the Lifecycle of other ManagedBeans?

    it should only use the AddUrlManagedBean rightWrong. It should also use this bean:
    @EJB
        VideoSessionBean videoSessionBean;with whatever consequences that has.

  • Calling screen from another transaction

    Hi,
    If I want to call screen from other standard or custom transaction into my custom transaction, how do I do it?
    Thanks.
    Tushar.

    Hello See this link ,
    http://www.sapgenie.com/abap/bdc.htm
    This contains the program which calls the transaction using BDC.
    Hopping this will help for you

Maybe you are looking for

  • Opening a Word document in a form layout html region

    Hi all, In an Interactive Report I use select '<img src="#WORKSPACE_IMAGES#'||package.f_get_document_type ( doc.id )||'" title="Document" width=20 height=20>' ) document from table to show an icon that eventually downloads (and shows) a word document

  • Preview font special characters

    There are times I want to type a character that is not show on the keyboard. Is there a way to preview various fonts to see if the character is available? Thanks LarryB

  • Entire library vanished!!!

    Hi everyone, As the title says!! Opened iTunes to find the entire library empty!! All my music is still located in the windows music folders so I can copy that back over (takes an absolute age), but where have the 2 movies I recently purchased gone.

  • Why have my security questions changed?

    I received an email from apple today saying my security questions were updated. I did not do this. I immediately changed my password for my apple ID as a result. However, I cannot change my apple security questions and answers. I truly don't remember

  • Oracle ADF Open source

    Hi , Is Oracle ADF is open source framework ?