SubVI with while loop + event structure not working in multi tab VI

Hello Everyone,
I am developing an interface for the control of a prober using Labview 2012, and I am stuck with some issue.
To start with I provide you with a simplified version of my control interface VI, and with the sub-VI used to build and manage the wafer maps.
The VI consists of several tabs: Prober Initialization, Wafer Handling, Wafer Map, Status, Error.
The sub-VI can:
1/ initialize the grid to display the map (sub VI Init Grid not provided here)
2/ import XY coordinates from a txt file (sub VI Wafer Map Import)
3/ display the coordinates and index of the die below the cursor
4/ and when a die position is double clicked, and the boolean "Edit Wafer Map" is true, then the user can change the state (color) of the die between On-wafer die and Selected Die
My issue:
If I use the sub-VI by itself, it works fine. However when I use it as a sub-VI in the tab "Wafer Map", the map does not build up and I can no further use the embedded functionalities in the sub-VI.
I suspect the while loop + event structure of the sub-VI to be the bottleneck here.
However I don't know which way to go, that's why I'd be glad to have some advice and help here.
Thank you.
Florian
Solved!
Go to Solution.
Attachments:
Control Interface.zip ‏61 KB

Hi NitzZ,
Thank you for your reply.
I tried to save the VIs in LV10, please tell me if you can open them now.
Inside he event structure there is quite some code, and since I don't want to make the main vi too bulky, I would like to keep it as a sub-VI. 
As you can see from the sub-VI, the event structure is used for extracting cursor position and tracking the double click action. These events are linked, through a property node, to the image "Wafer Map" which is passed to the main vi through connector pane.
All values are passed this way as well (through connector pane). Is there another way?
Maybe "refnum", but I don't really understand how to use them...
If I use the event structure in the main vi, the wafer map is still not working. I tried it earlier.
To implement the multi tab front panel, I used a tab control, and a for loop + case structure. For each element of the case structure, there is a corresponding action.
For the case where I put the code (element=2) for Wafer Map, I also control the execution of the code with a case structure activated by the button "REFRESH". Otherwise I end up with a freezing of the panel right after the start.
I hope these comments help you understand better.
Regards,
Florian
Attachments:
Control Interface.zip ‏104 KB

Similar Messages

  • Controlling a SubVI with while loop from another VI

    Dear All,
    this might be an easy Question but i couldn't catch an answer for it.
    first of all i have a VI which i will use as a subVI , this VI  is simply as shown in the "test_out of scope.vi" attached file
    now i will use it inside another VI called "Main VI" as shown in the file "Main_VI.vi"
    i'm just wondering , why couldn't i control the "Frequency" and "Stop" as i can do so while running the SubVI only without accessing it from another VI ?
    isn't it possible to access objects inside a while loop from another VI if i just connected them in the connection Pane terminals ??
    Thanks in advance to everybody
    Message Edited by Mohammed.Ashraf on 06-09-2009 10:27 AM
    Eng. Mohammed Ashraf
    Certified LabVIEW Associated Developer
    InnoVision Systems Founder, RF Test Development Engineer
    www.ivsystems-eg.com
    Attachments:
    Main_VI.vi ‏10 KB
    test_out of scope.vi ‏30 KB

    Do you need the sub-vi to run iterations for an undertermined period of time? 
    If so, then why not implement it as a parallel loop to the main one.  Maybe part of a consumer loop.
    If not.  Where the main loop would take care of each iteration and call the sub-vi in one shot. Then no need for a loop in the sub-vi.  
    It's all a matter of how you want the software to behave.  Have you looked at Event Structures?
    R

  • Create subVI with while loop

    Hello,
    i have a big program which is in a while structure and when i try to make a subVI, i have a message which tell me that my selection contain a front pannel which is in a while loop. How can i do to make a subVI?
    Thanks a lot

    Hi macarel,
    just proceed
    You should ask yourself: Which front panel control? Is it intended to be used in the subVI?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • A problem with a timer event sometimes not working

    Guys...
    I have this problem:
    I have a child added to the stage eacg 5 seconds and if this child still on the stage after another 5 seconds, you go to the next frame...
    My problem is that sometimes it does not work, meaning that you can have this child on the stage for ever and nothing will happen... but sometimes it does work properlly...
    Is there any mistakes in my code or what should I do?
    var miC4:Loader = new Loader();
    miC4.load(new URLRequest("nivel1.jpg"));
    addChild(background1);
    background1.addChild(miC4);
    if (!lives){var lives:int = 3;}
    var enem1:Loader = new Loader();
    enem1.load(new URLRequest("1enemigo.png"));
    var enemy1Array:Array = new Array(enem1);
    var t1:Timer=new Timer(5000,1);
    var t2:Timer=new Timer(10500,1);
    recycleEnemy();
    function removeEnemy(){
               background1.removeChild(enem1);
               recycleEnemy();
    function touchListener(event:MouseEvent){
        enem1.removeEventListener(MouseEvent.CLICK, touchListener);
        removeEnemy();
    function recycleEnemy():void{
            enem1.x=(50 + Math.random() * (stage.stageWidth - 150));
            enem1.y=(50 + Math.random() * (stage.stageHeight + -100));
            t1.addEventListener(TimerEvent.TIMER, addEnemy);
            t1.start();
            t2.addEventListener(TimerEvent.TIMER, bang1);
            t2.start();
    function addEnemy(e:TimerEvent):void {
            background1.addChild(enem1);
            enem1.addEventListener(MouseEvent.CLICK, touchListener);
            enemy1Array.push(enem1);
    function bang1(e:TimerEvent):void {
        if(enem1.stage){
                    lives--;
                    if (lives >= 0) {
                        t1.stop();
                        t2.stop();
                        removeChild(background1);
                        gotoAndStop(5);
    Thanks a lot!!!!

    ok, so there are a number of issues.
    the first error is enemy1Array contains two duplicate objects ~5 seconds after entering that frame.  i'm not sure if that's a problem because i don't see where you're even using enemy1Array, but you should fix that error (if enemy1Array is used) or remove enemy1Array (if it's not used).
    the next problem is you can call recycleEnemy more than once and re-add those timers.  flash will probably protect yourself from the bad coding but you shouldn't count on it.  when you call removeEnemy you should stop those timers and remove those listeners before re-adding another pair of listeners.  or just reset the timers in removeEnemy and start them in recycleEnemy.  there's no need to re-add those listeners more than once.  they could be added in your if(!lives) conditional.
    the next (and probably most important) error is your removeChild(background1) statement which fails to remove enem1. so, when you re-enter that frame you have an enem1 on-stage that you can't kill and can't even reference.  remove it when you remove the background1.

  • Time not stopping with while loop

    Hello,
    I've attached my VI.  I am having trouble with while loops.
    I want to turn on LEDs. The first LED should turn on after 3s.  The second LED should turn on after 5s.  The third LED will turn on later. 
    The LEDs turn on based on the following conditions:
    Case 0: numeric control > 10 then led_1 off, led_2 off, led_3 off
    Case 1: numeric control <= 10 then led_1 on, led_2 on, led_3 on
    Case 2: numeric control <=5 then led_3 on
    Because of the way I'm delaying time, I have the following problems
    Case 1 --> case 2: led_3 doesn't come on right away
    Case 2 --> case 1: led_3 doesn't turn off right away
    Putting probes in certain areas leads me to believe that these problems are due to the way the time delay is being generated.
    Thanks in advance.
    EDIT: Looking at it more...it seems to be that when the stop condition is true, the loop runs one more iteration. Is there a way to keep it from running that "one more iteration."
    Attachments:
    timing.vi ‏15 KB

    One of the problems is that your VI is not able to "breathe" because it is sometimes trapped inside inner loops that consume all CPU and step on each others toes. All you need is an single outer loop and a few shift registers.
    May of your specifications are still not clear, for example what should happen to LED 1&2 in case #3? Should they remain in the state they are in, or should they turn off, for example.
    Here is a simple rewrite that spins the outer loop at a regular rate, has no inner loop, and does not need any local variables or value property nodes. See if it makes sense. Also note that your code can be simplified dramatically by using arrays. Since the stop button is read with each of the regular interations, we don't need to worry about sequencing.
    Most likely you need to do a few simple modofications, because your specs are not clear.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    timingMODCA.vi ‏15 KB

  • How can I update cluster items from inside a while loop that does not contain the cluster?

    I have a VI that contains front panel clusters and two while loops. The main cluster contains items such as a doubles "distance" and "stepsize" and boolean "step" (a whole buch of this type stuff). The first loop contains an event structure to detect front panel changes and the second contains code and sub VIs to perform operations based on detected events.
    The operator can enter data into either double or click the boolean. If distance is changed the second loop does what is required to process the change. The same happens with stepsize. If step is clicked the ±stepsize value is added to distance and the result is processed. In each case the front panel should track the result of the input and subsequent processing.
    Because the clusters are outside the while loop, they are not updated unless I click 'highlight execution' which seems to allow updating each time the execution highlight is updated. There are other issues if I move the clusters into one of the loops.
    I've tried referencing the clusters and using local variables and nothing works. It looks like overkill to use shared variables for this.
    Any ideas would be greatly appreciated.
    Thanks,
    Frank    

    Hi Ben,
    Thank you for the response. I followed the link and tried reading everything you posted on AEs but I'm afraid that I didn't understand it all. It seems that each AE example had a single input and a single output (e.g. a double). Is this the case? 
    What I have is a couple of front panel clusters containing (approximately) 18 control doubles, 8 indicator doubles, 5 boolean radio button constructs and 26 boolean control discretes. I clusterized it to make it readable. In addition I'll eventually have a cluster of task references for hardware handles.
    All I want to do is update the front panel values like I would do in a C, VB or any other language. I've tried referencing the cluster and using the reference from inside the loops. I've tied using local variables. Neither works. I'm experimenting with globals but it seems that I have to construct the front panel in the gloabal and then I wouldn't know how to repoduce that on the front panel of the main VI.  Sometimes it seems that more time is spent getting around Labview constructs than benefitting from them.
    I hope the 'Add Attachment' function actuals puts a copy of the VI here and not a link to it.
    Thanks again for the suggestion,
    Frank 
    Attachments:
    Front Panel Reference.vi ‏33 KB

  • Iteration non sequencial with While Loop

    I've a SubVi in while Loop. Iteration n+1 will execute when Iteration n finish.
    Can I execute this SubVi in paralel (no sequencial)?
    In Spanish:
    Tengo una SubVi dentro de un bucle while. Pero este bucle actúa de forma secuencial. No se cargará la iteración n+1 hasta que la n acabe.
    ¿Cómo puedo hacer para que se ejecuten las iteraciones de forma no secuencial? Es decir, que no haya que espera a que acabe una para que se ejecute la siguiente.

    Hello,
    it is not possible. The while loop works as follows: 1) execute the code inside 2) check the ternimation condition 3) depending on that, continues with the following iteration or exit from the while loop. So, it is not possible what you are asking for.
    Maybe you have to use two while loops.
    Regards
    rusC

  • Timing with while loop

    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    Attachments:
    while- loop.GIF ‏6 KB

    nichts wrote:
    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    I would use as GerdW has mentioned,"elapsed time.vi" in a statement 1st case structure, after set time has elapsed> goto 2nd case structure. try not to use flat sequences....this can be done with case statements with transitional coding. I have noticed young LV programmers like to use flat sequences...I think it's a trap set up by LV developers? 

  • When I add a while loop to the vi "niScope EX Multi-Device Configured Acquisition (TClk)" to acquire data for multiple times, it works but it runs very slowly.

    Because I want to acquire the similar data for multiple times and then take an average to increase SNR, I add a while loop to the vi "niScope EX Multi-Device Configured Acquisition (TClk)".  It works but it runs very slowly (about 1 sec for each iteration). I think I had put the while loop at a wrong position, which makes the vi run from the very beginning in each iteration. So I really want to know where should I put the while loop to improve the speed? I have attached all the vi and subvi.
    Thanks very much.
    Attachments:
    Multi-Device External Clocking (TClk).vi ‏1166 KB
    avgWfm.vi ‏15 KB

    Dear Zainykhas,
    Thank you for posting this to the discussion forums and for uploading some sample code.  I took a lok at the issue you have been having, and it is unclear to me as to why you have placed two for loops around the original while loop.  My understanding is that you want to use the original Sample.vi and want to execute this N times where N is the Max Freq divided by Interval so that you can scan for a range of frequencies.
    Why not just put Sample.vi around one for loop and use the increment counter scaled by the interval to count up towards Max Freq and insert the desired Frequency into the cluster using Bundle By Name?
    Kind Regards,
    Robert Ward
    Applications Engineer, NI
    Attachments:
    Modified - RW.vi ‏48 KB

  • Sym.play("loop"); This is not working

    Please'm having problems with the LOOP. 've Followed several tutorials but the file does not end LOOP function. You guys could send me a link where I can get a solution to this problem?
    // play the timeline from the given position (ms or label)
    sym.play("loop"); This is not working (sorry for the english: Translate)

    sym.play("loop"); will move the root timeline playhead to the "loop" label, and play from that "loop" label.
    If you want to loop a section, for example, you could put a label called "loop" at 1 second, and then at 3 seconds, add a timeline trigger that has the code sym.play("loop");

  • Command.text with ODBC escape sequence is not working in VC++, Bug in OLEDB ?

    Command.text with ODBC escape sequence is not working in VC++. The Code, which written in VB is working perfectly. Is there any different syntax in VC++ or bug in
    OLE DB provider ?. I am using OraOLEDB 8.1.7 version.
    Thanks
    Mani
    VB Code
    ' Enable PLSQLRSet property
    Cmd.Properties("PLSQLRSet") = True
    ' Stored Procedures returning resultsets must be called using the
    ' ODBC escape sequence for calling stored procedures.
    Cmd.CommandText = "{CALL corpuser.GetCorpUserRec(?, ?)}"
    Set Rst1 = Cmd.Execute
    VC++ Code (while execute it is giving error )
    pCommand->CommandText = "{CALL corpuser.GetCorpUserRec(?, ?)}";
    pRs1 = pCommand->Execute(NULL,NULL,adCmdStoredProc);

    Hi
    The odbc escape sequence for calling stored procedures works fine with VC++ also.
    You can check the sampe application at following url :
    http://otn.oracle.com/sample_code/tech/windows/ole_db/content.html
    Hope this helps
    Chandar

  • Simple WD4A Portal Eventing does not work

    Hello togehter,
    I'm trying to get a simple Portal Eventing to work with two WebDynpro ABAP components. I read several threads as well as a blog from Thomas Jung about this but still have no eventing. What am I doing wrong? I think that it might be only a little obstacle but I can't get it. So what I didi is:
    1.) Created 1st WD4A application with a button and an action behind that button:
    DATA: l_api_component  TYPE REF TO if_wd_component,
            l_portal_manager TYPE REF TO if_wd_portal_integration.
      l_api_component = wd_comp_controller->wd_get_api( ).
      l_portal_manager = l_api_component->get_portal_manager( ).
      l_portal_manager->fire(
        portal_event_namespace = 'urn:my.namespace'
        portal_event_name      = 'test_event'
        portal_event_parameter = 'testValue' ).
    2.) Created 2nd WD4A application with the following code in the WDDOinit-Method:
    DATA: l_api_component  TYPE REF TO if_wd_component,
            l_portal_manager TYPE REF TO if_wd_portal_integration,
            view TYPE REF TO if_wd_view_controller.
      l_api_component = wd_comp_controller->wd_get_api( ).
      l_portal_manager = l_api_component->get_portal_manager( ).
      view ?= wd_this->wd_get_api( ).
      l_portal_manager->subscribe_event(
        portal_event_namespace = 'urn:my.namespace'
        portal_event_name      = 'test_event'
        view                   = view
        ACTION                 = 'CATCH_EVENT' ).
    and an action.
    method ONACTIONCATCH_EVENT .
      data: EVT_NAME type STRING,
            evt_parameter type string.
      EVT_NAME = WDEVENT->GET_STRING( NAME = 'PORTAL_EVENT_NAME' ).
      if EVT_NAME = 'test_event'.
        evt_parameter = WDEVENT->GET_STRING( NAME = 'PORTAL_EVENT_PARAMETER' ).
        DATA:
          ls_text TYPE if_main=>element_main,
          node_main TYPE REF TO if_wd_context_node,
          elem_main TYPE REF TO if_wd_context_element.
        node_main = wd_context->get_child_node( name = `MAIN` ).
        evt_parameter = 'IT WORKED'.
      else.
        evt_parameter = 'did not work'.
      endif.
      ls_text-text_receiver = evt_parameter.
      node_main->bind_element( ls_text ).
    endmethod.
    3.) FInally I created two iViews (for each WD4A application) and a page, linked the iViews in the page and made a preview. Unfortunately nothing happend in the second iVIew with the 2nd WD4A application in it.
    Any help?
    Thanx in advance
    Matthias

    Hello,
    thanks for your answers. But the problem is not yet solved, the link gives nothing new for me.
    To amend my first post:
    After having created and activated my both small WD4A applications, I created 2 similar iViews (iViews for WebDynpro -> and chose WD ABAP) in my portal. Both iViews have the same namespace (which is SAP - is this ok?) and no application parameter.
    Then I created both a Standard SAP page and a WebDynpro proxy page and added the 2 iViews as deltalink. The page and the iViews have the same prefix (but this is not important, isn't it?).
    --> In both pages the portal eventing does not work
    The ABAP server and the Portal server are the same machine and I call the portal with the full qualified domain name:
    http://<servername>.<domain>:50000/irj/portal
    When I test my WD4A applications in se80 I get the path http://<servername>.<domain>:8000/sap/bc/webdynpro/sap/z_event_receiver?sap-language=EN
    so this is the same domain.
    I even have an entry in my hosts-file for
    <myInternalIp>  <servername>.<domain>
    - Do I have to specify the domain explicitly in addition when integration the WD4A applications in the portal?
    - Is there a correlation between the Portal Event namespace, the namespace of my iViews and page and the domain name of my server?
    - Does the portal event namespave to have the prefix urn: or not?
    Thanks again in advance

  • Probably simple problem with while loops

    I was programming something for a CS class and came across a problem I can't explain with while loops. The condition for the loop is true, but the loop doesn't continue; it terminates after executing once. The actual program was bigger than this, but I isolated my problem to a short loop:
    import java.util.Scanner;
    public class ok {
    public static void main(String[] args){
         Scanner scan = new Scanner(System.in);
         String antlol = "p";
         while(antlol == "p" || antlol == "P"){
              System.out.println("write a P so we can get this over with");
              antlol = scan.nextLine(); 
    //it terminates after this, even if I type "P", which should make the while condition true.
    }

    Thanks, that worked.
    I think my real problem with this program was my CS
    teacher, who never covered how to compare strings,Here's something important.
    This isn't just about comparing Strings. This applies to comparing ANY objects. When you use == that compares to see if two references refer to the same instance. equals compares objects for equality in the sense that equality means they have equal "content" as it were.

  • Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible.  The purchase at the end of a sample book doesn't work either.

    Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible.  The purchase at the end of a sample book doesn't work either. Anyone have a solution?

    Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible.  The purchase at the end of a sample book doesn't work either. Anyone have a solution?

  • Hi! I am having a problem with my dictation. It works fine with Greek but it does not work at all with English. Anyone knows why?

    hi! I am having a problem with my dictation. It works fine with Greek but it does not work at all with English. Anyone knows why?

    Have you changed the system voice to an English one in system preferences?

Maybe you are looking for

  • My Mac Keeps Crashing.

    My Mac will unexpectadley crash and I have to hold down the power buttong to re-boot. It happens while I am running two (or more) applications at once, but always happens while I am using Photoshop. Please help if you can! Thank you!

  • Logical Component for HANA DB system

    Hi Friends, I am doing Managed System Configuration for HANA DB system. I have created Logical Component for the same, but I am unable to put it in Solution(in SMSY). Can some one suggest. Thanks & Regards, Solman Starter

  • Problems with symlinks and include directives

    Any files that are included with an include directive from a file that is           contained in a directory that is reached via a soft link do not work           (resource not found error) if the link begins with "../".           directory structure

  • Alpha channel and imaging lingo

    I have a 32 bit image with an alpha channel. When placed on the stage only the black anti-aliased text shows and no background shows (using the copy ink) I'm scrolling this image with imaging lingo where I take a sliding portion of the original image

  • Media Center Deluxe III problem...

    hi there... i have a megaPC (mega 865) and i have a problem when i want to see dvd's in Media Center Deluxe III. the image is always stoping, but if i try to use WinDVD our PowerDVD it work real good and the image don´t  stop. does anyone here have t