How to query a Subvi dynamically loaded to its input terminals names?

Hello

I have an application where I use dynamically load the Subvi and I need a way to query the Subvi for its names of input terminals.  I'll use several different Subvi now and in the future and will not experience the terminals.

Any help would be greatly appreciated.

Thank you in advance!

Tags: NI Software

Similar Questions

  • How to remove event listeners dynamically?

    I have a graphic keyboard composed of clips to key.  When a key is pressed, a function is called and actions are performed. Later, I want to disable what key has been pressed by removing the listener. How can I do that dynamically using a string for the name of the listener function?

    Allows a key

    keyK.addEventListener (MouseEvent.CLICK, insertConsK);

    Disable by deleting the listener.  What is the correct syntax? char = 'k '.

    MovieClip (root) ["key" + char.toUpperCase ()] .removeEventListener (MouseEvent.CLICK, "[insertCons" + char.toUpperCase ()]);

    This ['key' + char.toUpperCase ()] .removeEventListener (MouseEvent.CLICK, this ['InsertCons' + char. toUpperCase()])

    But if each key has it's own listener function, just use e.currentTarget to the listener function and the function name hardcord.

  • Question about the Manager of messages in queue and dynamically load/close Subvi

    Hi, my dear LV users

    I learn how to use the machine in queue Sate Architecture. I created a simple project, including a "main.vi" to dynamically load a sub vi 'sub_Vi2.vi' in the case of "initialize". The sub vi simply open a configuration file and load affecting some control and write these values in the configuration file. If the configuration file is not created, the sub vi creates until the user closes the Subvi.

    In the case of "Get out" of my "main.vi", I send 'true' to the Subvi stop button to stop running it. But the sub vi did not write these values back to the configuration file, or created a new when I delete the configuration file.

    There is another vi I made 'main1.vi', which loads dynamically and close the Subvi. And it works as well as I expected: create the file and write data!

    Can someone help me understand the code? I've also attached the front of diagrams and source code. It's in 2012 LV.

    Best regards

    Li CQ


  • How to debug several copies of a dynamically load vi

    I have a Subvi, which is dynamically load by several sie. How can I debug the Subvi for each instance? It seems that I can open only a copy of the Subvi but I want to get the front panel for each instance. Is this possible? Thank you!

    Tom

    You must do two things to open several instances of the same VI dynamically.

    • Make sure that the VI is reentrant.
    • Set the input options on Open VI refers to the value 8, indicating that you open the VI for reentrant run.

    In the case otherwise you simply open a reference to the same VI twice, and this instance cannot run in two places at the same time. The second call to the VI will have to wait for the first at the end.

  • How can I dynamically load a different css in a desktop Air application?

    I dynamically load one or more css in an Air of Air desktop application to implement a theme system.

    How can I do?

    OK, I finally managed to do, by reloading the page in which I dynamically generate the css link.

    The difficult part was to pass the identifier of the theme from the old page to the new.

    I managed to do in writing an "option file" that I read to the loading of the page.

    I ' not very elegant ts, anyway I have to save it in the option file as a permanent option, so he ' just read during the loading of the html code.

    Concerning

    Maurizio.

  • How can I dynamically load swc files using as3? (without relying on the Flash IDE).

    How can I dynamically load swc files using as3? (without relying on the Flash IDE).

    The SWF file can be used in the same way as the CFC, which means that you don't need to "visually show" anything when it is loaded. Your code can use the classes and assets incorporated into the SWF, just as a SWC file. So if someone just to load the SWF file to see what was in it that they see nothing. They could however access programmatically to what anyone on the inside just like you, if they went to that level. But it is not as easy as just racing as SWF to see what is inside.

    I hope that all packaging several separate sovereigns will allow you to load and unload only what you need to keep the RAM usage as low as possible with a minimum load SWF.

    If you are ready, please mark all useful/correct so we can filter without response. You're welcome and good luck!

  • Passing parameters to dynamically loaded screws

    Hello

    I have a data acquisition application that uses an analog input, PCI-Hardware.
    With this material I enjoy different channels and display them in audio
    In operation 'Preview' I enjoy 4 channels and display them in 4 audios.
    I have therefore a quarter of the maximum sampling for each channel.
    Operation 'zoom' I only enjoy a channel (at the material max sampling rate)
    and display the data in the selected channel (the other channels are igored in zoom mode)

    My idea is to launch the different screws according to the mode (overview, zooom).
    I could imagine, that a good approach to perfom this task calls different screws
    of the main program.

    Unfortunately, I do not understand how to pass parameters to the VI if I call them
    using knots "reference open VI", "call for reference" and "close reference VI.
    I tried to understand the Labview "Example of dynamic load", but it's too complicated for me.
    Can someone give me a simple example to dynamically load the screws or y at - it white papers
    or nugets on this topic?


  • How to get the Subvi (the virtual path is in .exe) reference in Run Time System

    Hello world

    The problem is how to get the reference of the Sub - VI in run time system, when the Subvi is in .exe after construction.

    More details:

    Top of page vi called the Subvi dynamically, so that the Subvi is always included, and the source object is the application.exe.

    After the above configuration, the Sub - VI will be the application.exe. For example, the path of Subvi est...\application.exe\SubVI.vi

    So, how to get the reference of the Subvi in Run Time System?

    I can't do it when you use 'open reference VI' with le...\application.exe\SubVI.vi path in the run time system.

    In fact, I can create a file to include the Subvi, rather than build the Subvi in application.exe, then I can get the convenintly reference. But this isn't my favourate average.

    Thank you

    chenyin

    That is the problem. Call a Subvi dynamic means users could change, but it is also very attractive.

    The dynamic call should be used in a user control, but some parade can avoid problems.

    It depends on why you use dynamic calls...-online 2 main ways:

    -Dynamic call are used to maintain a scalable framework for the code without acting on the executable file-online a single VI distribution managed by the administrator/developer

    -Dynamic call are used to provide a collection of "external" characteristic that could be enriched by the administrator/developer. For example, you provide your customers a set of selectable custom signal filters in the executable.

    In 2 cases, you are only able to assess the skills of the users to know if there is a risk of damage, if there is a change.

    So to stay only master a parade might be to provide dynamic VI without a schema, but with the problem of maintenance, since no in-place editing and more attention to manage distribution.

    Another way is to hide the actual distribution to user-online call dynamic VI but it without name as *.vi but others (a repellent name as system of OS name ) or simply without extension in order to attract not user... but that's debatable...

    Another more difficult but more secure method is to create a consistency check before your routine (version, user, modified date,...)

  • dynamically load the Options in a drop-down list in C++

    Hey guys,.

    I'm trying to dynamically load items Option in a drop-down list by using C++.  I have a function in my class of WorkManager file that does the trick:

    QStringList WorkManager::getListOfItems() {
        int i = 0;
        QStringList taskNames;  // used for debugging mainly, so i can print the list out to debug
        QList  myObjects = m_model->toListOfObjects();
        DropDown * dpList = bb::cascades::Application::instance()->scene()->findChild("scriptListDropDown");
        if (dpList != 0 ) {
            dpList->setSelectedOption(0);
            dpList->removeAll();
            for (i = 0; i < myObjects.size(); i++) {
                Task * myTask = (Task *) myObjects[i];
                taskNames.append(myTask->taskName());
                dpList->add(Option::create().text(myTask->taskName()).value(myTask->command()));
    //          delete myTask;  // do I need to delete the task object?
            }
    //      qDebug() << "WorkManager::getLIstOfItems(), ---> list of tasks is : " << taskNames;
            return taskNames;
        } else  {
            qDebug() << "WorkManager::getListOfItems(), ---> dpList was 0";
            return taskNames;  // empty list
        }
    }
    

    I also found this thread:http://supportforums.blackberry.com/t5/Native-Development/Adding-options-to-a-DropDown-from-c/m-p/21... that helped me get the filled drop-down list when the application starts.

    However, I need to re - fill list from time to time, when the list (a GroupDataModel) changes.  calling the function above a second time anywhere in my application appears to hang the application immediately.

    I think / thought it might have something to do with the slot for the onSelectedValueChanged, but I can't understand it.

    It seems down right when I do dpList-> removeAll().

    I also can't seem to find the right place to call this function to an object of type in my class.  I think it's because the drop-down list is not ready yet as the dpList * is always 0 unless what I call after the line:

    app->setScene(root);
    

    in the applicationui.cpp file.  Calling it works on start-up, but trying to update the list later (by removeAll() and recreate) causes the app crashing.

    is there a better way to do it?  .. and make it safer?  I can't understand how to do this.

    Thank you!

    J

    First, drop the:

    dpList->setSelectedOption(0);
    

    Not only if it is not necessary, but it will explode your application if the function is called when there is already no options in the menu dropdown.

    Also, do NOT delete the task, because it is still owned by the datamodel. I also see that you use type casting C, which just blindly accepts your cast, even if it's a mistake. Instead, if you know for sure what kind it will be this way instead:

    Task* myTask = static_cast(myObjects[i]);
    

    If you are not sure if the type you are casting the is the type you need, use the dynamic_cast instead:

    Task* myTask = dynamic_cast(myObjects[i]);
    

    The advantage of this more static_cast , is that if you try to perform a type cast is not compatible, then myTask will be set to NULL.

    Alternatively, Qt offers a replacement for dynamic_cast which works on platforms where is not regular C++ casts.

    Task* myTask = qobject_cast(myObjects[i]);
    

    It is functionally equivalent to dynamic_cast, but as I said, it works on all platforms that Qt exists, whereas dynamic_cast cannot.

    Once you did get back to us.

    oddboy wrote:

    Hey guys,.

    I'm trying to dynamically load items Option in a drop-down list by using C++.  I have a function in my class of WorkManager file that does the trick:

    QStringList WorkManager::getListOfItems() {
        int i = 0;
        QStringList taskNames;  // used for debugging mainly, so i can print the list out to debug
        QList  myObjects = m_model->toListOfObjects();
        DropDown * dpList = bb::cascades::Application::instance()->scene()->findChild("scriptListDropDown");
        if (dpList != 0 ) {
            dpList->setSelectedOption(0);
            dpList->removeAll();
            for (i = 0; i < myObjects.size(); i++) {
                Task * myTask = (Task *) myObjects[i];
                taskNames.append(myTask->taskName());
                dpList->add(Option::create().text(myTask->taskName()).value(myTask->command()));
    //          delete myTask;  // do I need to delete the task object?
            }
    //      qDebug() << "WorkManager::getLIstOfItems(), ---> list of tasks is : " << taskNames;
            return taskNames;
        } else  {
            qDebug() << "WorkManager::getListOfItems(), ---> dpList was 0";
            return taskNames;  // empty list
        }
    }
    

    I also found this thread:http://supportforums.blackberry.com/t5/Native-Development/Adding-options-to-a-DropDown-from-c/m-p/21... that helped me get the filled drop-down list when the application starts.

    However, I need to re - fill list from time to time, when the list (a GroupDataModel) changes.  calling the function above a second time anywhere in my application appears to hang the application immediately.

    I think / thought it might have something to do with the slot for the onSelectedValueChanged, but I can't understand it.

    It seems down right when I do dpList-> removeAll().

    I also can't seem to find the right place to call this function to an object of type in my class.  I think it's because the drop-down list is not ready yet as the dpList * is always 0 unless what I call after the line:

    app->setScene(root);
    

    in the applicationui.cpp file.  Calling it works on start-up, but trying to update the list later (by removeAll() and recreate) causes the app crashing.

    is there a better way to do it?  .. and make it safer?  I can't understand how to do this.

    Thank you!

    J

  • Dynamically load content in NavigatorContent inside Viewstack

    Thanks for help.

    Question:

    How do I dynamically load components or inside a NavigatorContent buttons when the user clicks on the

    Label NavigatorContent appropriate within the viewstack located inside the TabBar component?

    Code example...

    < s:Scroller id = "scrollerHome" includeIn = "Home" x = "3" y = "8" width = "933" height = "584" >

    < s:VGroup width = '100 percent"height ="100% ">

    < s:TabBar dataProvider = "{viewstackHome}" / >

    < mx:ViewStack id = "viewstackHome" width = '936' height = '553' >

    < s:NavigatorContent width = '100 percent"height ="100% "label ="Tab 1">

    .

    .

    .

    < / s:NAvigatorContent >

    < s:NavigatorContent width = '100 percent"height ="100% "label ="Tab 2">

    < / s:NavigatorContent >

    .

    .

    .

    < / mx:ViewStack >

    < / s:TabBar >

    < / s:VGroup >

    < / s:Scroller >

    When the user click on Tab1 or Tab2 depending on the time of day I want to

    display a different set of components which vary in number.

    Is there something that I need to manage, if so how. I could not find in these objects.

    Other suggestions are also welcome.

    Thank you

    Jumroo

    Since it's content browser, all components are created automatically the responsibility of the application that they do not obey the creationpolicy.

    1st way: I could intercept the events of "hide" / "show" on the content of navigator to listen to the event and dynamically add child elements.

    2nd way: Instead of Viewstack I'll go with the States of the spark.

    and on creationComplete of these components you can manage it that display and what not to do.

  • Dynamically loaded .jpg are pixelated

    I know that this subject has been discussed ad nauseum, but I tried to find and implement a solution without success.  For some reason some of the .jpgs on my flash site that are loaded dynamically load pixelated. I tried to find solutions to this, but I don't know exactly where a quality = better or smoothing = true script should be placed. And I'm just as puzzled as to why only some of my .jpgs load pixelated? It's very frustrating, this is the code I use to load my images, prental help:

    On the timeline, where the movieclip, I have the following code:

    loadMovie ("Wave.jpg", _root.image_box_9);


    On the movieclip itself, I have this code in order to create a fade chained in:


    {onClipEvent (load)}
    This ._alpha = 0;
    Speed = 10; change this option to change the speed of the fade
    }

    {onClipEvent (enterFrame)}
    load = this.getBytesLoaded()/this.getBytesTotal ();
    if(Loaded == 1) {}
    This ._alpha += speed;
    } else {}
    This ._alpha = 0;
    }
    If (this ._alpha > = 100) {}
    This ._alpha = 100;
    }
    }

    Could someone tell me please how to smooth this image? I would really appreciate it.

    in general, it is bad coding practice to fix the code to objects.  in your particular situation, it is really bad coding because this loop continues to run for as long as your movieclip exists.

    you have to attach code to a picture and put an end to this loop when it is no longer needed and you can use forceSmoothing to enable anti-aliasing.  Remove the code related to any object that you have demonstrated and replace your code with:

    _root.image_box_9.loadMovie ("Wave.jpg");

    _root.image_box_9._alpha = 0;
    _root.image_box_9.speed = 10;

    clearInterval (preloadI);
    preloadI = setInterval(preloadF,70);

    function preloadF (): Void {}
    If (_root.image_box_9.getBytesLoaded () > = () _root.image_box_9.getBytesTotal & _root.image_box_9.getBytesLoaded > 100) {}
    _root.image_box_9._alpha += _root.image_box_9.speed;
    _root.image_box_9.forceSmoothing = true;
    {if(_root.image_box_9._alpha>=100)}
    clearInterval (preloadI);
    }
    }
    }

  • Scale and dynamic load

    I'm working on a mini project.

    Here was my original goal: "to produce a parent .swf which loads dynamically an image has a preloader for this external image, to show how much has loaded and finally and above all for this position, to be able to put this image when the size of the scene is changed"

    That's what I come up with so far:

    DYNAMIC LOADER

    var homeimageLoader:Loader = new Loader();

    var homeimage:URLRequest = new URLRequest ("image.jpg");

    homeimageLoader.load (homeimage);

    PRELOADER

    homeimageLoader.addEventListener (Event.ENTER_FRAME, homephotoLoading);

    function homephotoLoading(e:Event):void {}

    var total: Number = homeimageLoader.contentLoaderInfo.bytesTotal;

    var loaded: number = homeimageLoader.contentLoaderInfo.bytesLoaded;

    loadBar.scaleX = loading/total;

    if (total == load) {}

    addChild (homeimageLoader);

    homeimageLoader.x = 0;

    homeimageLoader.y = 0;

    SCALING OF THE IMAGE

    homeimageLoader.width = Math.round((stage.stageWidth/2)+(stage.stageWidth/3));

    homeimageLoader.height = Math.round((stage.stageHeight/2)+(stage.stageHeight/3));

    (homeimageLoader.scaleX < homeimageLoader.scaleY)? homeimageLoader.scaleY = homeimageLoader.scaleX: homeimageLoader.scaleX = homeimageLoader.scaleY;

    this.removeEventListener (Event.ENTER_FRAME, loading);

    }}

    It actually works very well...

    My problem is the scaling section.

    Because the image will load dynamically, it's pretty glitchy on a scale comparable to that of a picture that has been placed, for example, in the library or is placed on the floor.

    If anyone knows how I can change my code so far, and from scratch to produce the same leaders, so that the scale is smooth, I would really appreciate it!

    Thank you much, long in advance.

    use:

    DYNAMIC LOADER

    var homeimageLoader:Loader = new Loader();

    var homeimage:URLRequest = new URLRequest ("image.jpg");

    homeimageLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,homephotoLoading);homeimageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeF);
    

    homeimageLoader.load (homeimage);

    PRELOADER

    function homephotoLoading(e:Event):void {}

    var total: Number = homeimageLoader.contentLoaderInfo.bytesTotal;

    var loaded: number = homeimageLoader.contentLoaderInfo.bytesLoaded;

    loadBar.scaleX = loading/total;

    If (total == load) {}

    Remove your preloader display

    addChild (homeimageLoader);

    homeimageLoader.x = 0;

    homeimageLoader.y = 0;

    }

    }

    SCALING OF THE IMAGE

    function completeF(e:Event):void {}

    homeimageLoader.width = Math.round((stage.stageWidth/2)+(stage.stageWidth/3));

    homeimageLoader.height = Math.round((stage.stageHeight/2)+(stage.stageHeight/3));

    (homeimageLoader.scaleX< homeimageloader.scaley="" )="" homeimageloader.scaley="homeimageLoader.scaleX" :="" homeimageloader.scalex="">

    }

  • text of dynamic loading problem

    Hi all

    I am trying to build a website and run into a problem with the dynamic loading of text.

    I'm doing a news section of scrolling with a scene of 200 W x 250 L

    Created a clip with the following encoding:


    var myTextLoader:URLLoader = new URLLoader();
    var myTextField_txt:TextField = new TextField();
    myTextField_txt.wordWrap = true;

    myTextLoader.addEventListener (Event.COMPLETE, onLoaded);

    function onLoaded(e:Event):void {}
    myTextField_txt.text = e.target.data;
    addChild (myTextField_txt);
    }

    myTextLoader.load (new URLRequest ("myText.txt"));

    Then set the clip (which is 250 w x 600 L) on the main stage, moving upward, creating the effect of auto-scroll.

    The problem that I am running is that I can't figure out how to put the text to use the entire width of the text box I created. It only uses half the width, by creating columbs like this:

    Hello and

    Welcome

    to our new

    Web site!

    Etc.etc.

    etc.etc.

    The text box itself is at least twice the width of the phrases, but they may not use the full width.

    Any ideas?

    I don't see where you set the size of the TextField.  Add a line to set the width to what he...

    myTextField_txt.width = 300; or any value that you are considering.

  • Get the dynamically loaded movieclip content

    Hey,.

    After trying without success to get the totalframes to a .swf dynamically loaded in AS3, I regressed to AS2.

    Now, I can add the clip and get the totalframes of content, no problem.

    The problem is that I can't resize the content at all.
    I have no idea how to target the loaded content.

    Here is the code I use:

    var myXML:XML = new XML();
    var path:String;
    var mcl:MovieClipLoader = new MovieClipLoader();
    var mclm:MovieClipLoader = new MovieClipLoader();
    var mclL:Object = new Object();
    var frames:Number;
    var i:Number = 0;
    var mc:MovieClip = new MovieClip
    myXML.ignoreWhite=true;
    myXML.load("content.xml");
    
    holder_mc._alpha = 0;
    
    myXML.onLoad = function(xmlLoaded){
    menu();
    load();
    }
    
    
    
    mclL.onLoadComplete = function() {
              frames = (MovieClip(holder_mc)._totalframes);
              if (frames == 1) {
                   image();
              }
              else if (frames > 1) {
                   clip();
              }
         }
    
    load = function(){
         clearInterval(timer);
         path = myXML.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue;
         mcl.loadClip(path, holder_mc);
         var tFiles:Number = myXML.firstChild.childNodes.length;
         if (i < tFiles){
              i++;
         }
         else if (i == (tFiles)){
              i=0;
              load();
         }
         mcl.addListener(mclL);     
    }
    
    image = function() {     
         seconds=1000;
         holder_mc._alpha = 100;
         timer = setInterval(load, seconds);
    }
    
    clip = function() {     
         holder_mc._alpha = 100;
         ftimer = setInterval(checkFrames, 100);
    }
    
    checkFrames = function() {
              frame = (MovieClip(holder_mc)._currentframe);
              if (frame==(frames-1)){
                   clearInterval(ftimer);
                   load();
              }
         }
         
    menu = function(){
         
         var tFiles:Number = myXML.firstChild.childNodes.length;
         for (me=0; me < tFiles; me++){
         path = myXML.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue;
         i++;
         _root.attachMovie("circle", "circle"+me, me, {_x:(me*30), _y:330});
         mclm.loadClip(path, ("circle"+me));     
         }
         
    }
    

    I need to resize the content as well for the main holder_mc, as well as for menu items.

    Use onLoadInit():

    mclL.onLoadInit = function(target:MovieClip) {          frames = target._totalframes;          if (frames == 1) {               image();          }          else if (frames > 1) {               clip();          }// size target here     }
    
    
    
  • Jpg smooth dynamically loaded in AS2

    Simple problem, but the answer baffles me. I spent half a day looking for solutions to this issue, but nothing works for me.

    Here's the problem:

    I'll put up an online photo gallery. I'm trying to make it easy for the customer insert specific images, loaded dynamically, ask them to appear at 63 percent. If the user clicks on one, she grows to 100 percent. Problem is when the image is at 63%, it is not smooth and looks terrible,

    All posted online BitmapData class solutions work for individual images. But I can't understand how to automate the process in a loop for. At this point, I'm not even concerned about enlargement. I want just the images to load at 63 percent and smooth look.

    Here is the code for both images. Later, I'll expand this to 25.

    On the stage are two rectangle of color video clips: toon1 and toon2. I want the dynamically loaded jpegs to load inside of them. The customer will be manually change the last lines, whenever she feels like it, to choose what are the images to load.

    What I need is an elegant AS2 solution where everything dynamically loaded jpeg will be smoothed.

    ------------------------------------

    for (i = 1; i < = 2; i ++) {}
    This ["Toon" + i] .createEmptyMovieClip ("Cartoon", this.getNextHighestDepth ());
    This ["toon" + i].cartoon._xscale = this ["toon" + i].cartoon._yscale = 63;
    This ["toon" + i].cartoon._x = 8;
    This ["toon" + i].cartoon._y = 9;
    }

    toon1. Cartoon.loadMovie ("0025.jpg");
    toon2. Cartoon.loadMovie ("0054.jpg");

    ------------------------------------

    Please do not suggest xml or AS3 solutions. Those that are incomprehensible to me. If anyone has an elegant solution to AS2, I'll be most grateful.

    var OL: Object = new Object();
    lo.onLoadInit = function(target:MovieClip) {}
    target.forceSmoothing = true;
    }
    var mcl:MovieClipLoader = new MovieClipLoader();
    mcl.addListener (lo);

    ------------------------------------

    for (i = 1; i<=2; i++)="">
    This ["Toon" + i] .createEmptyMovieClip ("Cartoon", this.getNextHighestDepth ());
    This ["toon" + i].cartoon._xscale = this ["toon" + i].cartoon._yscale = 63;
    This ["toon" + i].cartoon._x = 8;
    This ["toon" + i].cartoon._y = 9;
    }

    mcl.loadClip ("0025.jpg", toon1);

    mcl.loadClip ("0054.jpg", toon2);

    toon1. Cartoon.loadMovie ("0025.jpg");
    toon2. Cartoon.loadMovie ("0054.jpg");

    ------------------------------------

Maybe you are looking for