Run Subvi dynamically

I read a lot of post on this, but for the life of me I can't figure out how to do this.  I want to do is create a pop window of my main vi that is currently running.  Pop up to if poster select indicator values but in a zoom State so they will be visible from a distance.  So I need the values in the pop up for update with main vi that is running.  An attempt, I did the information gathered from messages is attached.  The problem is that the Subvi front is not displayed when the zoom button is pressed.  There seems to be a problem with how I'm passing the reference to sub - VI.

First of all I am doing this correctly?  Secondly, how can I connect my reference in primary vi to the Subvi?

Thanks in advance

Terry

Here is a photo illustrating what nathand said you:

I added the ' FP. ' " Open in the Subvi method, but as he says, you can do it here or in the main VI.  I like to have in the Subvi, so that the user can click on the 'X' to close the Subvi Panel instead of click on 'stop' red) and the Subvi ends always correctly, but it's a matter of personal preference.

He has a good point about the reentrancy.

I also prefer to use queues or the authors of notifications to pass data between the screws, instead of control references, but it is also a matter of personal preference.

Tags: NI Software

Similar Questions

  • 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!

  • Problem running Subvi after construction of .exe

    Hi all

    I've seen much related to this topic but you have not found anything specific to my situation.

    I built a simple wrapper to launch different Subvi depending on whether it of Saturday or not.

    The vi works perfectly well as a vi in LV2012. But when I build the application, run two cases-in other words, both Subvi front panels appear and I get a message warning me that I can't run multiple instances of the same Subvi.

    I hope it to be run true or false case and open the correct Subvi once and be done with it. Not sure why both trying to run more than once only after I have build the application. Ideas?

    I thought about it when I went to go back and create a sample project to download for you (which worked fine).

    Has proved to be a mistake in the original specification, I did. I accidentally included the vi in the structure of the case as a source of start-up files. They opened the performance, then we tried to open again after the code that was not allowed due to restrict re-entrant execution, giving me the warning.

    I corrected the issue in new versions by resolving to drink more coffee beforehand.

    Thanks for the support!

  • -Run Javascript - dynamic action wait full?

    Hello

    Apex 4.2

    I have a dynamic action that counts two real deposits

    (1) Execute javascript code that calls a plsql process to fill a graphical xml field hidden.

    (2) updates the table.

    The javascript call is made now apparently asynchronously, which means that the table is freshening up before the pl/sql has had time fill the data of chart_xml.

    I understand that some dynamic actions have an option "wait for result" of the execution, but is not available with JavaScript Code execution. I know almost nothing about Javascript, but I guess that this code:

    Apex. Server.Process ('P3_UPDATE_CHART_XML', {}

    F01: $.map ($('[Name="F01"]'), Function (e) {return $(e) .val ()})

    },{

    data type: "text",

    success: function (pData) {}

    });

    Can be adjusted to wait for the pl/sql process to complete?

    Out of my depth.

    Thank you

    Ralph

    Apex. Server.Process is indeed by asynchronous design. Now you can either make the browser wait the result by making it synchronous, or you can define a function sur-succes that run when the call is completed. Going with async, you can define follow-up actions, but "blocks" the browser in the meantime.

    Use the "async" parameter in the 3 param object:

    apex.server.process('P3_UPDATE_CHART_XML',{
    f01:$.map($('[name="f01"]'),function(e){return $(e).val()})
    },{
    async: false,
    dataType:"text",
      success:function(pData){}
    });
    

    Or, since you have the function success there, we can qualify the update region in this chart (but you should give the region to chart a static id) and do not use false async:

    apex.server.process('P3_UPDATE_CHART_XML',{
    f01:$.map($('[name="f01"]'),function(e){return $(e).val()})
    },{
    dataType:"text",
      success:function(pData){ $("#myChartRegionStaticId").trigger("apexrefresh"); }
    });
    
  • procedure to run the dynamic DDL

    If I have the T table below, and I need to create partitions based on the year (year), but I need to create partitions for each quarter of the year. How can I write a procedure for this?

    WITH T AS 
    (SELECT 2001 YR FROM DUAL
    UNION ALL SELECT 2002 YR FROM DUAL
    )
    select * From t;
    

    Here is what I have run under the procedure:

    ALTER TABLE T ADD PARTITION (PARTITION P2001_01 VALUES LESS THAN (TO_DATE('2001-01-01', 'YYYY-MM-DD' ));
    ALTER TABLE T ADD PARTITION (PARTITION P2001_02 VALUES LESS THAN (TO_DATE('2001-04-01', 'YYYY-MM-DD' ));
    ALTER TABLE T ADD PARTITION (PARTITION P2001_03 VALUES LESS THAN (TO_DATE('2001-07-01', 'YYYY-MM-DD' ));
    ALTER TABLE T ADD PARTITION (PARTITION P2001_04 VALUES LESS THAN (TO_DATE('2001-10-01', 'YYYY-MM-DD' ));
    
    ALTER TABLE T ADD PARTITION (PARTITION P2002_01 VALUES LESS THAN (TO_DATE('2002-01-01', 'YYYY-MM-DD' ));
    ALTER TABLE T ADD PARTITION (PARTITION P2002_02 VALUES LESS THAN (TO_DATE('2002-04-01', 'YYYY-MM-DD' ));
    ALTER TABLE T ADD PARTITION (PARTITION P2002_03 VALUES LESS THAN (TO_DATE('2002-07-01', 'YYYY-MM-DD' ));
    ALTER TABLE T ADD PARTITION (PARTITION P2002_04 VALUES LESS THAN (TO_DATE('2002-10-01', 'YYYY-MM-DD' ));
    

    What I'm missing here?

    You are 'away' the part where you follow the best practices for the development of pl/sql code that contains dynamic queries:

    1. remove the 'run '.

    2 create the query in a string variable

    3. just to "evacuate" the query as a string

    4. run the query manually to validate one) he did know the correct syntax (yours does not), b) it creates the correct result set and c) it works as expected.

    5. Add the "run" and delete the lines DBMS_OUT.

    If you run this procedure you can easily see what is the problem

    I'm in (SELECT "ALTER TABLE TABLE1 add PARTITION (PARTITION P_' |)") Y.YYYY | '_Q' || Q.Q | ' VALUES LESS (TO_DATE(''' ||). Y.YYYY | '-' || Q.M | '-01''' || ',''' || "(YYYY-MM-DD"' | '))'. XYZ

    FROM (SELECT DISTINCT (TO_CHAR (dt, "YYYY")) YYYY OF TABLE1),

    (SELECT 1 Q, M '01' FROM DUAL

    UNION ALL SELECT 2 Q, M '04' FROM DUAL

    UNION ALL SELECT 3 Q, M '07' FROM DUAL

    (UNION ALL SELECT 4 Q, '10' FROM DUAL M) Q)

    Not even a week, YOU will understand what this request is supposed to look like. And no ONE will be able to reproduce the query or test it.

    v_query_string: = ' SELECT... » ;

    DBMS_OUTPUT. Put_line (v_query_string); -Now you can actually SEE what query is used and test it manually

    BECAUSE me in v_query_string

    Once 'v_query_string' does not add the actual as a comment in the code query so that later there's someone test with a real query.

      LOOP
         v_alterstring: = i.xyz;
         EXECUTE IMMEDIATE v_alterstring;
      END LOOP;

    This code DOES not yet - it until it works:

    LOOP

    DBMS_OUTPUT. Put_line (i.xyz); -run and test manually

    -I.xyz EXECUTE IMMEDIATE.  -NO. - not until you have executed and tested manuallyl queries

    END LOOP;

    Same here - a time that the code works adds at least ONE query real to the code as a comment, so that someone looking at the code knows what applications should actually look like.

  • Why the letter spacing is ignored when running in dynamic text fields?

    I use dynamic text fields using the font Arial embeded in Flash 8 on Windows XP and when I set the letter spacing of 5, then run it film the spacing is lost. Tried with several other fonts and they always lose their spacing during execution.

    Why is this?

    Kevin

    it solved!

    You must reset the value linespacing in code after you put text, as follows:

    var my_fmt:TextFormat = new TextFormat() / used to change the color of the text
    Label.Text = "" Hello World ""
    my_fmt.letterSpacing = 1
    label.setTextFormat (my_fmt)

  • Run Subvi - specific time

    Hello people!

    I have a generic application that run a timed sequence of loop. Inside the loop, I tried to generate a random number and get him curent date when the number was generated. As you can see,

    For example: I put the period at 50 ms. In the ElapseTime indicator, the difference between two successive items varies between 47ms and Ms. 62, my intention is to get 50 for this diferrrence.

    Hi Samoth,

    no need to cheat. Simply use the output of 'Endtime Global"of the TimedWhileLoop...

  • Code Action run Javascript dynamic Apex 4.1

    Hello world

    I want to know if there are known bugs on the dynamic Action (the Javascript code to execute).

    We did a dynamic action to action "window.open '.
    Window.Open ("& RAPPORT_URL_LANCEMENT", "_blank").

    But we have a problem. The first time, a blank page opens not mentioned by our URL page.

    We also tried to create a branch to our URL by does not open in another window. We want to keep given our open application page.

    What we can do for this?

    Thanks in advance. Good bye.

    Is RAPPORT_URL_LANCEMENT a Page or item of the application?
    Then, try window.open ($v ('RAPPORT_URL_LANCEMENT'), "_blank").

    It is a Substitution variable?
    Then, try window.open("#RAPPORT_URL_LANCEMENT#","_blank").

  • Help on running immediate dynamic Sql

    Hi all

    When I run the following Pl/SQL, nothing happens

    I want to pass the array as a result of procedure
    DECLARE
    SQL_STMT      VARCHAR2(1000);
    BEGIN
    SQL_STMT  := 'Select '|| '''populate_table_test(''' || '|| chr(39)||id_name||chr(39)||' ||''','''||'|| chr(39)||attribute1||chr(39)||' ||''','''||'|| chr(39)||attribute2||chr(39)||' ||''');'''||' from table_test1';
    dbms_output.put_line(sql_stmt);
    execute immediate sql_stmt;
    Exception when others then
    dbms_output.put_line(sqlerrm);
    
    end;
    /
    SQL> ed
    Wrote file afiedt.buf
    
      1  Select 'populate_table_test('|| chr(39)||id_name||chr(39)||','||
      2  chr(39)||attribute1||chr(39)||','|| chr(39)||attribute2||chr(39)||');' from
      3* table_test
    SQL> /
    
    'POPULATE_TABLE_TEST('||CHR(39)||ID_NAME||CHR(39)||','||CHR(
    ------------------------------------------------------------
    populate_table_test('AAA','AA','AA');
    populate_table_test('AAA','AA','AA');
    CREATE
      TABLE TABLE_TEST1
      (
        "ID_NO"      NUMBER(10,0)     ,
        "ID_NAME"    VARCHAR2(10 BYTE),
        "ATTRIBUTE1" VARCHAR2(10 BYTE),
        "ATTRIBUTE2" VARCHAR2(10 BYTE)
      );
    
    
    Insert into TABLE_TEST1 (ID_NO,ID_NAME,ATTRIBUTE1,ATTRIBUTE2) values (null,'AAA','AA','AA');
    Insert into TABLE_TEST1 (ID_NO,ID_NAME,ATTRIBUTE1,ATTRIBUTE2) values (null,'AAA','AA','AA');
    commit;
    CREATE TABLE TABLE_TEST
    (ID_NO NUMBER(10) , 
    id_NAME VARCHAR2(10) , 
    ATTRIBUTE1 VARCHAR2(10), 
    ATTRIBUTE2 VARCHAR2(10)
    );
    
    select * from "TABLE_TEST"; 
    
    
    CREATE OR REPLACE TYPE T_TYPE IS OBJECT ( 
    id_NAME VARCHAR2(10), 
    ATTRIBUTE1 VARCHAR2(10), 
    ATTRIBUTE2 VARCHAR2(10) 
    ) ;
    
    Create or replace  type TB_T_TYPE as varray(200) of  T_TYPE ;
    
    
    CREATE OR REPLACE
    PROCEDURE POPULATE_TABLE_TEST (EXAMPLE IN TB_T_TYPE) AS 
    
    begin 
    
    FOR I IN 1..EXAMPLE.COUNT LOOP
    DBMS_OUTPUT.PUT_LINE(TREAT(EXAMPLE(I) AS T_TYPE).ID_NAME);
    DBMS_OUTPUT.PUT_LINE(TREAT(EXAMPLE(I) AS T_TYPE).ATTRIBUTE1);
    DBMS_OUtPUT.PUT_LINE(TREAT(EXAMPLE(I) AS T_TYPE).ATTRIBUTE2);
    insert into TABLE_TEST(id_name,attribute1,attribute2) 
    values (treat(example(i) as T_TYPE).id_NAME, 
    treat(example(i) as T_TYPE).ATTRIBUTE1, 
    treat(example(i) as T_TYPE).ATTRIBUTE2 
    );
    end loop;
    end; 
    Select ' populate_table_test ('| chr (39) |) AMXX% | Chr (39) | «, » ||
    Chr (39) | attribute1 | Chr (39) | «, » || Chr (39) | attribut2 | Chr (39) |') ;' Of
    table_test

    Published by: user1849 on November 30, 2011 12:40

    Published by: user1849 on November 30, 2011 13:18

    user1849 wrote:
    Justin Merci for your comments

    Can you let me know why this isn't the Insert for 2 folders

    any help is appreciate

    I think that I did in my first answer about 40 minutes ago. If something in this answer would have been absurd, I'd be happy to try to clarify if you can let me know what the parties are and are not clear.

    Justin

  • Attempt to create run time (dynamic) table and insert the data in this... The entrance is a flat file (txt file) which has the numbers and strings... I'm trying to convert them to a string and insert into the table. It is a matter of urgency for me please

    create or replace procedure Dynamic_Table AS

    iVal VARCHAR2 (32);

    iTemp varchar (200): = ";

    sql_stmt VARCHAR2 (200);

    l_file1 UTL_FILE. TYPE_DE_FICHIER;

    l_file utl_file.file_type;

    BEGIN

    l_file1: = UTL_FILE. FOPEN ('TEST', 'dinput.txt', 'R');

    EXECUTE IMMEDIATE ' CREATE TABLE baseline (Item_ID varchar2 (32))';

    Loop

    BEGIN

    UTL_FILE. GET_LINE (l_file1, iVal);

    EXECUTE IMMEDIATE ' insert into baseline values (: ival) "using ival;

    EXCEPTION

    WHEN No_Data_Found THEN EXIT;

    While some OTHER THEN dbms_output.put_line (SQLERRM); * /

    END;

    end loop;

    END;

    You are approaching this the wrong way.  Create an external table based on the file.  External tables are CSV, fixed width data in a queryable table.

    You will need to create an oracle directory to put the file in (MY_ORA_DIR) I leave it for you to do, and then perform the following...

    create table BASELINE)

    ITEM_ID varchar2 (32)

    )

    EXTERNAL ORGANIZATION

    (

    TYPE ORACLE_LOADER

    THE DEFAULT DIRECTORY MY_ORA_DIR

    ACCESS SETTINGS

    (

    RECORDS DELIMITED BY NEWLINE

    LOGFILE "dinput.log".

    BADFILE "dinput.bad."

    NODISCARDFILE

    FIELDS

    (

    ITEM_ID

    )

    )

    LOCATION ("dinput.txt")

    )

    REJECT LIMIT UNLIMITED

    /

    All the dubious records appear in dinput.bad. Dinput.log will give you information.

    External tables are read-only, so once you set up your file, you can create editable as a normal table.

    create table ITABLE_EDITABLE as

    Select * from BASELINE

    /

    Work done, a few lines of code.

  • 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,...)

  • Showing the façade unqiue for several instances of appeal Subvi

    Hello

    I have a Subvi, which resembles a table 2D data and graphs of the plots.  I call the Subvi and he opens the subVIs Panel to display plots.  Now I would like to put the Subvi in one for a loop and call several times with various 2D charts.  I'm trying to figure out how to make multiple instances of the Subvi front panel appear. Essentially a front for each table 2D.  All I can get it to do is to open and close the user interface for each Subvi call and for the last table display the user interface for the data.

    I tried to make the VI reentrant and selected the option pre allocate the memory for each clone.  Maybe it works, but I need the front of each Subvi call to stay open.

    Thank you

    Gary

    Thank you both for the help.  I used the open VI of reference and call by reference and created a strictly typed reference VI to call the Subvi dynamically.  Is attached a screenshot of the block diagram.  The link below has guided me to created the strictly typed VI reference required by the "reference" entry of the reference function call.

    http://zone.NI.com/reference/en-XX/help/371361H-01/lvhowto/create_strict_type_vi_ref/

  • Load a dynamic VI and keep in memory after execution

    Hi guys,.

    I use a strange setting that I have to follow a set of rules.

    My problem is the following:

    I have a main VI (which is compiled into an EXE file) that dynamically loads and executes a Subvi (the Subvi is not compiled into the EXE file). Calls Subvi has overall functional which is called only by dynamic screws, where the global is not a dependency of handmade VI and it is not compiled into the EXE file either. As you can see already, when I call my Subvi dynamic for the first time (for example it behaves like a SET function), it will define the functional global; then, when the dynamic Subvi execution stops, it releases the global functional VI. So if I call another sub - VI dynamic as a function of READING, he will not retain the information specified by SET Subvi.

    I'm not allowed to do the subVIs or global one functional dependence of handmade VI and it can not be compiled into the EXE file, so what I have to do is load the Subvi Dynamics somehow and either keep in memory even when the execution ends, or keep the functional global in memory after the first call.

    Anyone know how I would be able to do this?

    Help is appreciated,

    Drazen

    Drazen,

    When ' a VI dynamic calls functional overall for the first time, launch an another dynamic VI (Holder.vi) who has the functional overall as a Subvi.  Holder.VI does nothing except wait until the hand VI is called dynamic screws as long as Holder.vi is in memory, it will also keep the functional global in memory.

    I have not tried this, but think that it will work.  It of a little awkward, but must have a minimum size and impact on CPU resources.

    Lynn

  • Svchost.exe is free running and leaves multiple windows open all gel. Re-loaded windows XP after a crash with original rescue records.

    Original title: Windows XP - free race - is lost.

    Just re - load windows XP after a crash with original rescue discs, svchost.exe is free running and leaves several Windows Open gel, all on and offline. Any ideas? I ran ms-fixit beta for all listed. I also disabled Norton and now use Windows Defender, still no luck.

    Hi MarkBerri,

    ·         How long have you been faced with this problem?

    ·         Did you do changes on the computer before the show?

    Svchost.exe is a process name generic host for services that run from dynamic link (dll) libraries. The Svchost.exe file is located in the folder C:\Windows\System32. At startup, Svchost.exe checks the registry services part in order to build a list of services that it needs to load. Multiple instances of Svchost.exe can run at the same time. Each Svchost.exe session can contain a grouping of services. Therefore, separate services can run, depending on how and where Svchost.exe is started. This grouping of services enabling better control and easier debugging.

    Svchost.exe groups are identified in the following registry key:

    HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Svchost

    You can run the auditor of system files on the computer.

    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)

    http://support.Microsoft.com/kb/310747

    Note: if it asks you the service pack CD, follow these steps from the link: you are prompted to insert a Windows XP SP2 CD when you try to run the tool on a Windows XP SP2 computer system File Checker:

    http://support.Microsoft.com/kb/900910 (valid for Service pack 3)

    Hope this information helps.

  • Dynamic page Unload Action

    Hello

    I want my tabular presentation, use to display a warning message if they try to sail away without saving the changes. To do this, I created a dynamic action - Page Unload/confirmation.

    When I try to navigate away from the form of tables, it appears the confirmation alert but when I click OK, it blocks the browser. I use IE 9.

    Is there any version of IE that is recommended for the use of this dynamic action? Has anyone run this dynamic action successfully with IE 9?

    Thank you

    Zoro

    Alternatively, you can make use of the jQuery plugin built

    Demo: Are you sure? -dirty a jQuery forms Plugin

    Sunil Bhatia

Maybe you are looking for