Triggering events in a sub-VI

I am trying to incorporate a subVI with event handling into a main VI.  Changing values on the main front panel does not elicit changes in the values of the controls in the subVI to which the main controls are wired.  I have attached a simple example to demonstrate my problem.
In these VI's, the subVI works independently with three different event cases handling 4 different events.  When this sub is placed in the Main Message VI, it loses functionality because the events in the Main VI do not cause the same events in the subVI, which is what I intuitively thought.  (You will be able to use the subVI independently, but the main VI will not act and you will have to use the stop sign to break it). 
This example is redundant, I know.  And I know of a help file and an example of dynamically registering events, however, I can't make heads nor tails of it.  Dynamically registering events seem to work in the opposite way, where the event handler is in the main VI and changes in the subVI elicit event handling in that frame. 
Any ideas?  Am I completely wrong in my conception?
Thanks,
Brad
Attachments:
Message Main.vi ‏10 KB
Event trig sub.vi ‏14 KB

Hi Brad,
Your assumptions are correct regarding events with subVIs and TopLevel VIs.  Successfully detecting an event in a SubVI from a top-level VI requires some more work and can be done with LV 7.0 and higher. I will try to talk it out on how to do it:
The link between
the VIs is a reference to the front panel object that will trigger the
event. To detect a front panel event that occurs in a SubVI from
Top-level VI, do the following:
In the SubVI, do the following:
Place a control reference function on the front panel for all the events to be monitored.
Place a "register for event" function on the block diagram.
Register all the events to be monitored by connecting all the control
references to the register for event function and select the event to
be monitoredEnable the dynamic event terminal on the event structure by clicking on the structure and selecting "Show Dynamic Event Terminal ".
Connect the register for event function to the Dynamic Event Terminal
and edit the event handled by each case. Make sure you select the
control and event to be monitored under dynamic source.
Place "unregister event" function after the
event struture and wire it to the output of the dynamic event terminal
to unregister the event.
The front panel event will now be selectable as a dynamic event.
In the Top level VI, do the following:
Create a reference to the front panel Control in A. To do this, right click on the control and naviagete to "Create»Reference"Place the subVI created in 1 onto the Top-Level VI.
Pass
the reference from A to B. Connect the control reference to the
corresponding control-reference input created in SubVI.
I have attached two screenshots on how to do this.  Hope this helps.
Regards,
Nadim Rajabi
Applications Engineering
National Instruments
Attachments:
EventSubVI.gif ‏2 KB
TopLevelVI.gif ‏2 KB

Similar Messages

  • Regarding Workflow triggering event.

    Hi,
    Description: I have created a Object type and a event for the same by transaction SWO1, after that i have created a WorkFlow(WF) for which the triggering event is the event i have created in the Object Type. There is a report in which i have used the FM "SWE_EVENT_CREATE" and passed the Object Type, Event Name, Key field values and the creator.
    Problem: When i am executing this report the FM is called and the sy-subrc after call is 0, stating that the call was succesfull, but the WF is not getting triggered when i went to transaction SWI2_FREQ to check this WF is not at all triggered. But when i tested from WF transaction SWDD it is working fine.
    Could anyone please explain me on this. or is there any other way to use an event of a Object Type to trigger WF.
    Thanks and Regards,
    Raghavendra Goutham P.

    hi gauthum,
    try this chks.
    Workflow Trace On/Off - SWU8
    Display              - SWU9
    Delete              - SWU10.
    Work Item Analysis    - SWI1
    Identifying workflow for the work Item :
    Tx : SWI1 - Enter the workiem id which has been identified in workflow log
           The details consists of workflow of the workitem.     
    WorkFlow Errors :
    1. Workflow Not Started           - Using Event Trace we can Identify
    2. Started but No Proceeded           - Wrong Object Keys
    3. Problem in Work Item Execution
         Dialog Work Item          - Agent Determinaion Error ( Position,Role,User )
                             - Role Resolution Error
                               Reqd Element would no be
                               Set in Binding
         Background Work Item      - Make Foreground and Test once Sucessfull make it Back round
    rgds
    nver
    if hlped mark points

  • Work Flow - Triggering Event through Webdynpro

    Hi,
              I am new to Workflow. I have generated the Workflow related to claim (Objects as ABAP Class). Now I have generated Webdynpro component and through this I need to execute the Workflow. I have used the FM SAP_WAPI_START_WORKFLOW & SAP_WAPI_CREATE_EVENT. To raise the event 'cl_swf_evt_event=>raise'. I have used. But this is not triggering event. So, Any one can help me on this issue.
    In workflow using ABAP CLASS is essential or Business object.
    In my case I have used only ABAP CLASS. In workflow I have generated the Triggering event as SAVE. In webdynpro I have generated the code in 'ONACTIONSAVE'. When ever the user clicks SAVE' button. Workflow shouild trigger and approver should receive the mail as notification and he/she will approve/reject the claim.
    Thanks & Regards
    Kannappan

    After SAP_WAPI_START_WORKFLOW do you have COMMIT WORK?
    Does the SAP_WAPI_START_WORKFLOW return some error message?
    Are you sure that the event is not triggered? Check this with event monitor SWEL (turn monitor on in SWELS).
    Also, ready Jocelyn Dart's blogs about ABAP OO. She have clear instructions about how to trigger ABAP OO events.
    Regards,
    Karri

  • Triggering event from for-each

    Hi,
    I have a process that takes long to execute, I want to be
    able to send a progress notification to the user with the hope of
    not getting him bored or impatient, for some reason I can't achieve
    it and I don't know where to go for help, if you know how to solve
    this, any help will be greatly appreciated.
    I have some code like this:
    <code in mxml for my application>
    - component declared .. onXEvent="showProgress()"
    - script for showProgress calls refresh for ProgressBar
    Component
    </code in mxml for my application>
    <code for my component>
    for each (var myObject:xObject in MyCollectionOfMyObjects)
    // do some complex logic and calls methods for this item
    // creates and triggers event for progress notification
    </code for my component>
    I would expect to see my ProgressBar advancing as the process
    is completed, but for some reason the process seems to take control
    of the execution and no onProgressEvent is fired until the foreach
    finishes execution. It will run perfectly in the debugger (step by
    step) but it doesn't work at runtime.
    Is there any way I can achieve this in Flex?? Is there any
    event class I can use to solve this issue?
    maybe anyone has done this before or knows a link to more
    information on this subject?
    Thanks in advance
    William Vega
    MCSD / Beginner Flex Developer

    Flash functions execute within a frame. They finish before
    any UI rendering is done. You will have to use callLater , somehow,
    within your loop to give the UI a chance to draw.. There is a more
    detailed answer to this thread somewhere else.
    Tracy

  • How to use Mulitple DAQs with a single triggered event on only one of the DAQs

    I have three PXI6115 and would like to tie all these to a single triggered event on one of the DAQs. I've scaned the examples and any assistance would be greatly appreciated....

    TCjr,
    Please refer to your other post:
    How to use Multiple DAQs with a single triggered event on only one of the DAQs

  • Triggering event FMRE-CREATED in an infinite loop

    Hi guys,
    Iu2019m having a big problem in Public Sector Management with Founds Management Government when I create a Found reservation Tcode FMX1.
    My problem is the triggering event FMRE-CREATED  (event to start the Workflow) because when the document is created, this event is generated by the system which is fine, but inside on my Workflow I have a task to change the status with FMRE-SetLock, when this method is executed, automatically trigger an event FMRE-CREATED again, so my WF gets in a infinite loop.
    How can I tell the system to donu2019t trigger this event when the status is changed?
    Thanks a lot
    Felipe Uribe.

    Hi,
    but inside on my Workflow I have a task to change the status with FMRE-SetLock, when this method is executed, automatically trigger an event FMRE-CREATED again, so my WF gets in a infinite loop.
    How you changing the status? Check any Function Module or BAPI to change the status.
    You have acheive it via Start Condition, check are you getting entry in the Table  SWFREVTLOG for Creation.
    If second time creating, check for the entry in the table, if found not allow it.
    Regards,
    Surjith

  • Issue in triggering events in task

    Hi,
    In my workflow there is a fork and after a fork there is a task for which triggering event is defined and this particular event is triggered from zprogram and agent for task is determined using a rule.
    In zprogram logic is written as event (triggering event for task) is triggered when all 4 users in fork presses submit button.
    Problem is when 4th user presses submit button workitem is created in workplace of agent defined for task and in 4th user as well.Workitem should not be created for 4th user.
    Please suggest.
    Regards,
    Kaustubh.

    Hi Rick,
    I have defined single task in all branches of a fork with CONFIRM END OF PROCESSING tick in task. Task is to call ztransaction.
    Problem is if all users in a fork enters into transaction and by clicking BACK comes out without pressing SUBMIT button in ztransaction and clicks COMPLETE WORK ITEM flow will go to task defined after fork which i dont want.
    Flow should go to task after fork only when user presses SUBMIT and COMPLETE WORK ITEM button.
    Hence I have created triggering event for task which gets triggered only after all user presses SUBMIT.
    Please suggest.
    Regards,
    Kaustubh.

  • Multiple BIUs with one triggering event

    Dear Experts,
    I am trying to create a B1i scenario that does something similar to the following:
    1. Journal Entry created in sender system by a user
    2. Journal Entry created automatically in receiver system by B1i
    This much works so far, my question is the next two steps
    3. Another Journal entry created automatically by B1i in sender system
    4. Finally another journal entry created by B1i in receiver system
    So for one triggering event (manual adding of JE in sender) I want B1i to create 3 new documents - basically have 3 bius run from one triggerring event.
    I've had a bit of a look around and haven't really found anything useful; is this easier than I am thinking or will there be some trick to it?
    Thanks in advance,
    njmog1

    To be honest, I solved it in quite an ugly way..
    First, I set it up so that B1i does not ignore the Events created when it creates a document (You can see more on that on page 9 of the guide 03. Extensibility)
    Next I created a new transaction code in Business One journal entries called "B1i"
    So basically I have 4 BIUs, the first one is triggered by an outgoing payment. and B1i creates a journal entry - and I set the memo to be something like "JE created by B1i Step 1".
    For the second BIU, the filter is "Transaction Code equal to B1i and Memo = "JE Created by B1i Step 1" - this creates another JE, and I set its memo to be "JE created by B1i Step 2"
    For the third BIU, the filter is "Transaction Code equal to B1i and Memo = "JE Created by B1i Step 2" - this creates another JE, and I set its memo to be "JE created by B1i Step 3"
    etc. etc.
    It's an ugly solution but I got it done quite quickly, If anyone has any suggestions to improve it, let me know! And if it's not clear to you, let me know what I need to clear up

  • Which container element contains the triggering event name?

    hi,gurus,
    i have a workflow template, and i want to use a 'switch' to deal with different triggering event inside the template logic.
    but i can not find a element in the container which supposed to contain the triggering event name.
    could you please help me ?
    br.
    zj

    Hello,
    The element which stores the name of triggering event is '_EVT_NAME' which is present in the event container. To use it in the workflow template, you have to create an element in the workflow container and bind this element to the above mentioned element through the binding for triggering event.
    Thus you can use the workflow container element in the switch.
    Hope this will help.
    Regards,
    Samson

  • Notification mail according to  triggerring event in workflow

    Hi All,
              am doing customer master workflow using KNA1 Business object, it has event CREATE and CHANGE.
    whenever event CREATE is triggering workflow, i want to send notification mail with title 'CUSTOMER 999 CREATED'.
    whenever event CHANGE is triggering workflow, i want to send notification mail with title ' CUSTOMER 999 CHANGED'.
    Could you please advise, how can i handle notification mail according to triggering event.
    Thanks in advance.
    Regards,
    Balamurugan.

    You can either trigger a 1 step workflow that has a send mail step. The triggering event of the Workflow should be CREATE and CHANGE event of BO KNA1. You have to activate the linkage between event and workflow in PFTC. You have to maintain some entries in SWE2.
    After you have done this check your development from Tcode SWEL.
    Thanks
    Arghadip

  • In Which table Will maintain the All Workflows Triggering Event Details?

    Hi,
    Can Any one tell me
    In Which table Will maintain the All Workflows Triggering Event Details?

    Hi Mohit,
    The Tr Codes KE29N/KE28L will give me the Logs of Past TDD runs. However, i would like to see the all the variants in a go. Due to a Organizational change, there is a new characteristics introduced. Now we need to change the sequence of the TDD runs. Since there are lot of TDD Variants that are in use. we need to get all of them into an excel and then decide the necessary changes.
    Thanks & Regards
    Surya

  • How to call pragma autonomus_transation in repeated triggering event

    How to call pragma autonomus_transation in repeated triggering event
    eg :
    create or replace trigger trg_1
    after insert on aa
    for each row
    declare
    PRAGMA AUTONOMOUS_TRANSACTION;
    begin
    insert into aa values(10);
    end;
    insert into aa values(20); ..... can u help me pl

    Welcome to the forum.
    How to call pragma autonomus_transation in repeated triggering event You don't, unless you want to corrupt your data.
    Read:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551198119097816936
    http://www.oracle-base.com/articles/9i/MutatingTableExceptions.php
    http://www.oracle-base.com/articles/misc/AutonomousTransactions.php

  • Description on triggered event of Cisco director..

    Hi,
    I am looking for any document, which can elaborate the Triggered event description to understand what actually happend on port or any componenent.
    Ex.
    Triggered event: [PI_FSM_EV_FCOT_REMOVED]
    Triggered event: [PI_FSM_EV_FCOT_INSERTED]
    Thanks.
    Rajeev Ranjan.

    hello Rajeeve,
    Hope this document will help
    http://www.cisco.com/en/US/docs/switches/datacenter/mds9000/sw/5_0/configuration/guides/sysmgnt/nxos/snmp.html

  • Alerts -triggering event

    Hello All ,
    i am working on Alerts .
    can any body please tell me , what is " Triggering Event " ,how it is working ,can i get some detail explanation of this .
    Thanks,
    Aravind .

    Hi Aravind,
    <b>Triggering Event</b> means that you need in certain condition annonce that Event  is happend. And then every one who "waiting" for this Event is happened starting to do their jobs. In Alert example when a confirmed BP is a "Golden Customer" you want to popup an alert to the user.
    So what you need to do in your ALERT class  when you check that you need to popup an alert you <b>Triggering your Event</b> and in customization when you created an alert you insert this alert as <b>Triggered Event</b>.
    Create an Interface <b>ZIF_CRM_IC_EVENTS_CON</b> and add there Interface <b>IF_CRM_IC_EVENTS_CON_BASE</b> in your inerface add your Custom events on <b>Attribute</b> section. In customization you will see your Custom Events so you can choose it.
    Good Luck
    Eli Steklov
    <b>Please Reward Points if it Helped :-)</b>

  • Can I instruct the debugger to step through triggered events as well?

    I have the following statements in my code:
    Public Class Class1
    Public Shared Sub TestClass()
    Dim ExlApp As Excel.Application = CType(AddinModule.CurrentInstance, TimeTracker.AddinModule).ExcelApp
    ExlApp.Range("A1").Value = "Test"
    ExlApp.Range("A2").Value = "When I press F11 the debugger jumps to this row from test"
    End Sub
    End Class
    When I step through the debugger, it jumps directly from the first statement above to the second. But inbetween those rows some events are triggered. Is there any way to tell the debugger to not jump over these events but instead step into these events?

    Hi JP3O,
    Since it is related to the specific VB app, to really repro this issue, could you share me the sample?
    >>But inbetween those rows some events are triggered.
    Maybe you could add breakpoints in your events, and then debug your whole app with "Start debugging (F5)", and make sure that the code is really called (the breakpoints were hit)or it has been called before the code shared in your thread.
    Or it is related to the JIT:
    https://msdn.microsoft.com/en-US/library/7ad07721(v=vs.100).aspx 
    If the breakpoints in evens are not hit, please check whether you could get any message if you put the mouse on the breakpoints. Maybe it is related to the symbols loaded or others.
    If you get any latest information, please feel free to let me know.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Macro lens for Canon 5D Mark iii

    I'm taking a Class with NYIP and need to submit a macro photo. Not sure I really want to get into macro so I was hoping for suggestions on cheaper a lens or tubes. Any suggestions?

  • Only C/C++ supported through JNI?

    I was wondering if there is any initiative to expose functions in java to languages other than C/C++ like perl/VB/Delphi etc. (create header files in these languages). Or is there a way to do it today?

  • Data Center InterConnect with Dark Fibre

    Dear all, We are designing a Data Center InterConnection for our two Data Centers on top of a 10G Dark Fibre. Our primary goal is to:- extend a few vlans between the two DCs; Support VMware vMotion betwen the two DCs; asymmetric SAN synchronization;

  • Problem starting VC

    Hello, intalled is vc 7 on nw2004s on windows server 2003! im using IE6! first problem was that i couldnt find any vcrole, so we deployed vcfiles again. after that the vcrole existed and i mapped it to users and did everything else like it is discrib

  • NPObject

    error calling method on NPObject in firefox