global functional

Hi all.

Having the application main and 4 under apps.  Each of the 4 under apps functional a global (or motor action) in which he writes and reads a cluster of app-specific data.

The idea is that using a functional overall for each application data could be transmitted between all and APP of the hand.

For example, I want to be able to drop the sub-app1 FG on the BD for sub-app2 and read all the data.  At the same time sub-app1 would update its FG on his own comics.

This doesn't seem to work.  For example the FG1 is updated by sub-app1, BUT the instance of FG1 on the BD for sub-app2 is empty.

None of the fivet is reentrant; That of why there is never a single instance of each FG, correct?  There is only one (1) instance of each FG on the disk.  Each sub - app and FG are located in a separate LV project.

Confused.

Battler.

MarcoMauri wrote:

I could be wrong, but because the FG is running various projects, that is to say different application instances, it can be used to Exchange data.

In all cases are another way to make, for example DataSocket...

Marco

I think you're right.

While the two screws are running the two project go to hiarchy screen and press 'ctrl-a' to show all.

You will see that the two FG are running is unique contexts. So, this is the fate of an app to talk to another application on the same computer or on PC, so Datasockets, TCP/IP, server of VI...

Ben

Tags: NI Software

Similar Questions

  • Global Variables are preferable to the Globals functional - so there! :-)

    I feel a little controversial today so forgive the brutal title of this post

    I've never used global variables because I was under the misconception that they are somehow 'bad '. That's all I've heard since I started learning the LabVIEW. Review the code in the nets upconvert and downconvert. The ugliest code uses globals and some of the most beautiful code does not work. This means that bad programmers use global variables and globals are so bad programming practice. This is not true. Globals are just easy to use for newbies to use them. ' Not initialized what? I can't find those on the pallette? »

    I think I always wondered unconsciously that globals are bad. They are not bad, it is their use that may be bad. This is true for anything in life.

    The first and the most obvious problem with global variables is racing conditions. But this is not strictly the overall causing the race condition. This is the data stream is not defined.

    But the same is true if functional a global being misused. In the example below there is nothing to enforce data streams.

    You must run the data flow with a thread of error for example.

    Globals do not have a thread of error but not fear - the man of the sequence is here!

    You only need the sequence if the global is directly on your drawing. These two structures of single image sequence could be replaced by a NumericWrite.vi and a NumericRead.vi containing nothing but overall, a command or the indicator respectively and the terminals of the error. Put it online and it is good as gold. Or you might have a Subvi containing nothing but a frame two cases selected by an enumeration containing the elements 'Get' and 'Set '. Now, it looks like a duck and quacks like a duck. Don't you worry by the overhead of the structure of the case either. If the enum is a constant, it will be unfolded.

    Another problem with globals, it's that they are, well, global. Is not different from a functional overall, so it isn't really a problem anyway. Globals and globals functional it is easily taken by placing them in a library and define the scope of the access. Not to mention that libraries give you namespaces and "namespaces are one honking great idea - do several of these!" *

    The real reason to use a global rather than a functional overall is that they are about twice as fast.

    Until this morning I would have recommended to use a more functional global overall. But I changed my mind. Someone can it change back?

    * The Zen of Python


  • Globals functional in BT 8.5

    Hi all!

    I've been struggling with making functional overall in LabView 8.5. I am a very new programmer, my job is essentially to learn LV online and check/optimize the code left by a previous programmer. His code uses a large number of local variables, many of which feed subVIs custom, so I was thinking only globals functional can be a good way to improve the code. I read that local variables are something of a no-no, but he uses them to pass specific data between a loop of producer/consumer (with the exception of the data in the queue). However, I had difficulties to enter the functional concepts behind the globals, and when I looked for examples on the forums I found examples of old/new versions that do not work for me. I think some esserntial concept is beyond me.

    So I have three questions if you have time.

    (1) exactly how the globals functional?

    (2) are they possible in LabView 8.5? My company does not update for fear of damaging the code we have.

    (3) globals functional would be faster than local variables?

    Thank you all for your time!

    -Gobble

    You have two errors in your VI.  A in the case of writing, the other at the Terminal stop.

    The error in the case of writing is what is causing the cut wire.  You create a segment of wire with two sources (one of the shift register, a control).

  • Global functional table uses 2 x initialized space?

    I had a thread going on the reduction of the memory allocation on our LabView RT system located here for reference http://forums.ni.com/ni/board/message?board.id=170&thread.id=413552 .

    I use a global functional / Action engine to add to a U32 table that I'll be back to our FPGA PXI via DMA reads cards.  In order to keep the determinism, for the first time this table through the AE to its maximum size (18Million).  During my debugging process, I decided to run the 'Performance and Memory '.  When I put the number of elements to initialize to 18,000,000 I expect the performance tool to show me that this VI takes over 18 000 000 * 4 bytes = 72Mbyte.  However, after this VI running by clicking on the button instant I see this VI meet twice as many 144Mbyte, extactly!

    Then I ran the tool to 'See the distributions of buffer' and with 'Tables' checked, I see a black dot on the table to initialize primitive and a black point on the passage of the leftmost register.  By clicking on the button "help" in this tool I see it say under the table section "to avoid abuse of global and local variables when working with arrays. Reading of a global or local variable causes LabVIEW to generate a copy of the data. "This must be what happens now, but how am I supposed to store these data with the flexibility of an adverse event and do not have an extra copy floating around?

    Here is the part pertient EI for your reference:

    Hello

    When you use the function "Initialize the array", you create an additional table. Use the function "Remodeler Array" reuse the already existing table. See attachment.

  • Create a directory tree: how to call a global function from inside a for loop

    Hello

    I am trying to create a workflow that will create a directory tree in vCenter.

    Concept:

    Basically, I am trying to execute nested for loops for each level of the tree to the caller a global tree.

    Problem:

    The 1st loop for works and creates the file 'Dev '.  The second loop for does not work with error message:

    [19:16:16.219 2013-06-27] [I] building Dev folder
    [19:16:16.474 2013-06-27] [I] directory Built: Dev
    [19:16:16.476 2013-06-27] [I] the records building servers
    [19:16:16.480 2013-06-27] [I] TypeError: cannot find the createFolder function in dev object. (Workflow: TEST_TNG_New_Site_Folder_Structure / Scriptable task (item2) #36)

    I think it has to do with JavaScript not being not able to call a global function in a nested object (I'm not a programmer and don't know JavaScript, so don't shoot me on that :)

    Code: (will clean this up once I do work)

    var folderBase is ['Dev', 'DMZ', 'Prod', 'UAT'];.

    var folderT1 = ["servers", "Jobs"];

    var folderT2 = ['Window', 'Linux'];

    var folderT3 is ["Repo2', 'Repo3', 'Repo1', 'Repo4'];.

    var folderT4 is ["T1", "T2", "T3"];.

    Create the files folderBase level

    for (var i = 0, l = folderBase.length; i < l; i ++) {}

    var rootFolder = parentFolder;

    buildFolderTree (folderBase [i]);

    Create the files folderT1 level

    for (var j = 0, l = folderT1.length; j < l; j ++) {}

    var rootFolder = folderBase [i];

    buildFolderTree (folderT1 [j]);

    Create the files folderT2 level

    for (var k = 0, l = folderT2.length; k < l; k ++) {}

    var rootFolder = folderT1 [j];

    buildFolderTree (folderT2 [k]);

    Create the files folderT3 level

    for (var x = 0, l = folderT3.length; x < l; x ++) {}

    var rootFolder = folderT2 [k];

    buildFolderTree (folderT3 [x]);

    Create the files folderT4 level

    for (var y = 0, l = folderT4.length; y < l; y ++) {}

    var rootFolder = folderT3 [x];

    buildFolderTree(folderT4[y]);

    }

    }

    }

    }

    }

    function buildFolderTree (folderName) {}

    System.log ("Building folder" + folderName);

    rootFolder.createFolder (folderName);

    System.log ("directory of frame:" + folderName);

    }

    Any help will be appreciated.

    Thank you

    B

    Hello

    The createFolder() method returns the object VcFolder to the folder just created, for the new file to be used immediately.  Here is how I modified the code:

    Create the files folderBase level
    for (var i = 0; i)
    var newBaseFolder = buildFolderTree (parentFolder, folderBase [i]);
    Create the files folderT1 level
    for (var j = 0; j)
    var newT1Folder = buildFolderTree (newBaseFolder, folderT1 [j]);
    Create the files folderT2 level
    for (var k = 0; k)
    var newT2Folder = buildFolderTree (newT1Folder, folderT2 [k]);
    Create the files folderT3 level
    for (var x = 0; x)
    var newT3Folder = buildFolderTree (newT2Folder, folderT3 [x]);
    Create the files folderT4 level
    for (var y = 0; y)
    var newT4Folder = buildFolderTree (newT3Folder, folderT4 [y]);
    }
    }
    }
    }
    }

    function buildFolderTree (parentFolderObj, folder_name) {}
    System.log ("Building folder" + folderName);
    var newFolder = parentFolderObj.createFolder (folderName);
    System.log ("directory of frame:" + folderName);
    return NewFolder;
    }

  • Using user defined global functions

    Hello
    I put implement Error Handling in a package. The logic goes like this:
    If the call to the first interface fails, KO called the proc error using what error message is retrieved, written to a file and an e-mail notification is sent.
    The code below is written in the procedure.

    OdiOutFile-FILE=E:\OraHome_2\oracledi\demo\Assignmnt\ErrorLog.log
    ErrMesg: "< % = odiRef.getPrevStepLog ("MESSAGE") % > '"

    Now, I need to implement using a global function that can be used through interfaces to implement the error handling.
    I want to club the code used above with the sending of a notification by e-mail.

    Can someone pls guide me if I have my approach is correct and how this approach can be implemented using the global function?

    Thank you.

    Published by: RitikaS on December 18, 2009 02:19

    Hi Ritika,

    May I suggest a method?

    Build a package, describe your flow of interface, the (failed) k of each interface, call OdiSendMail.

    In the OdiSendMail set all settings such as mail server, from and to, subject to body of message code below, paste

    Previous step <%=odiRef.getPrevStepLog("STEP_NAME")%> with the session number <%=odiRef.getPrevStepLog("SESS_NO")%> failed with the error message

    * <%=odiRef.getPrevStepLog("MESSAGE")%>. *

    Please look in the operator for more details.

    So, what will the ODI is, it will send a notification to the recipient with the error message, the session number, and the name of the interface.

    Sample:

    Step previous INT_LOAD_AGE with the number of session 1822124 failed with the error message

    17002: null: java.sql.SQLException: IO exception: the network adapter could not establish the connection
    java.sql.SQLException: IO exception: the network adapter could not establish the connection
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
    to oracle.jdbc.driver.PhysicalConnection. (PhysicalConnection.java:361)
    to oracle.jdbc.driver.T4CConnection. (T4CConnection.java:151)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
    at com.sunopsis.sql.SnpsConnection.u (SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c (SnpsConnection.java)
    at com.sunopsis.sql.i.run (i.java)
    .

    Please look in the operator for more details.

    Makes sense?

    http://img259.imageshack.us/img259/1704/screenshot003.jpg

    PS: Please close your threads accordingly award points (useful/correct) help experts for you with impatience.

    Thank you
    Guru

  • Is a global functional with loops inside the structure of cases subject to the race condition?

    Like this one:

    Global variables funtional implement Mutual Exclusion for their confined i.e. code section of the code in the FGV cannot run once at the time by all processes with competing concurrent access. With this in mind, all the code inside will be executed while one task has access, then released once the FGV has completed the operation. The structures listed as your curls and case Structures are not in themselves share resources, so there is no problem with conditions of competition in this area.

    You would only if worry if the functional Global Variable wrote to other resources shared in a way that is not properly synchronized.

  • How to write global functions?

    Hello

    I have some features in my application that I feel will be used in several places. Usually in HTML/Javascript that I could do:

    < script type = "Javascript" src = "js/functions.js" > < / script >

    In the functions.js file I could have various functions and call them from any page of the display.

    How can I get a set of functions like this in Flex/ActionScript? For example, I have a few places where a user may "Add an employee" for example. I would like to call the same function.

    How can I include some functions in the world so they can be called from anywhere in my application.

    -Westside

    I create a class and simply import the classes than any place you want to use. For utilities, you can create a class with static methods.

  • Functional Global run from Source executable vs

    Hello...  Imagine a Global functional simple (shift registers loop not initialized on some time with the internal Structure of a case Set/Get) where, in a case I run the source code and I use the setting mode to enter data in the flowing shift to the relatively high rate register, say once per second.  Then I, running on the same computer, an another bifurcation of the overall even where to get data at a slower pace, I say once per minute...  And in fact, what I'm doing here is to have three different instances, data from Global setting on three different materials and then I use a case set to Get to get all three samples of data at a lower rate (I try only to see the data to change on a second period 60...)  When I'm building it from source code and run it, everything works perfectly...  I put the data of three different instances of the total from three different sources...  Then I translate all together in one place and use a Global example, set to Get to get all three items of data once per minute more...  So far so good..

    But in my real-world deployment, I can't run Source code.  I need compile this code in executable files...  I got it done and tested...  The three different Set executables seem to work very well, but the Get instance in executable form has no data.  I built this test because I realized that I'm not sure how this Global Set/Get functional concept works at the level of the compiled code...  Am I missing something?  It is possible to work somehow?

    What should I do to get the data to be read in the Global functional (Get) when I work at the level of the executable?  Any help on this would be much appreciated... Thanks bob...

    Why do you need 4 executables?

    You could launch each vi dynamically from the main vi, and then they run independent, but still be able to use the FG.

  • single item queue in a functional global

    I am considering using the queues of the unique element for messages within a project underway, but that the number increases, causing the number of references to queue to grow also, I look at methods to reduce the number of the sons of current around my upper level vi. I don't want to initialize these lines early in the program and having to run their individual references everywhere. One thought I had was encapsulate them into a driving force, to contain references, but wonder what, if anything, I win or lose by doing this vs. just using globals functional for messaging and not worry with the SEQ?

    Thank you, and for those of you in the southwestern part of the United States, stay warm (they have an exceptionally cold and snowy weather).

    Using queues in the single element as a reference object (one that fits, you can use in LabVIEW 8.6, in my opinion ), I do the following.

    1. Create single item queues for all objects of reference.
    2. Create references for each of these queues and place them in a cluster of strict typedef (typedef is probably good enough, but I would like to retain the provision).
    3. Create a queue of the only element that contains the cluster of typedef.
    4. Initialize all queues in your startup code at a level which ensures that they are not usefully cleaned for you (usually as a Subvi in your top-level code).

    For use, waiting for the queue of level higher, unbundle the right reference, place the queue at a higher level.  You should not have to touch the queue at a higher level, often because the references should not change during the life of the application.  In fact, you can replace the queue at a higher level with a global, for this reason, except that you can worry about initialization before use.  I have an extreme aversion to "desencapsulees", available on the global scale of data that I picked up in my days of C, so generally avoid them if I can.  I hope that was a little more enlightening.

    Our time at the end of the week should be about normal for this time of the year - unlike last Friday.  Here is a picture of the entrance to the R & D construction about 07:00.  It was our major snow of the Decade .  The city is closed for the day.  The next day, we almost reached 70 ° F.

  • APEX 4.2 translate data 'function and Global Variable declaration '.

    Hello everyone,

    I use APEX 4.2.1.00.08 and I wonder if there is a way to translate "Function and Global Variable declaration" textarea. Any other script text box is available for translation, but not this one.
    I know what the code is loaded on the header, but may contain important alert messages of global functions.

    Thanks in advance.

    Hi Grandmaster,

    "Function and global variables declaration" contains the JavaScript code, that is why it is not wise to include in the standard translation process.

    In my opinion, you have several options to access your translated messages:

    -) Use Application-> Substitutions or
    -) Store your message in the form of component shared-> SMS and and assign it to an application with the APEX_LANG element. Api MESSAGE (http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_lang.htm#CHDBCEAB)

    In 'Function and Global Variable declaration' use substitution syntax to replace the value. For example:

    var myDeleteMessage = "&G_MY_DELETE_MESSAGE.";
    ...
    alert(myDeleteMessage);
    

    where G_MY_DELETE_MESSAGE would be a part of the application or the request for Substitution.

    Concerning
    Patrick
    -----------
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Comprehensive functional LV2 only inits element 0

    HI - using a global functional with several parallel loops - it contains an array of clusters as its data.  The installation program is the structure of your database read/write (attached).  When you start the application, I initialize an array of 12 elements of clusters and write on a global scale.  Yet, when I try to write to the data afterwards, it seems that the only element that is not dimmed, is element 0 of the array, so any time I write to any other element, data don't "stick".  Is it because the USR does not know what size to?  How do I code around that?  I tried to add one for the init for the World Cup without result. I have used this in LV 7 without any problems, but in LV2011 switch - attached are two copies thx

    This may sound a little silly, but are you sure that you have somewhere a copy of this VI laying around in your diagram that is configured to write to the buffer? Might be hidden behind another node or a structure?

    The VI se seems to work exactly as I would guess given the triviality of it, it is only logical.

  • Is highest Null or more low value? using the fewest number of function...

    So Null is one of the if not the highest value in a list of values.

    Whenever I order a column, null has always been highest.

    However, when I use the function less

    Select * from bills by terms_of_discount desc;

    Select LESS ('2 ', '5', '12', ' 3', null) double;

    Select the LEAST ('apples', 'apps', 'applas', null) double;

    In both cases the null value is the lowest

    so I wonder why this is.

    As mentioned in oradocs:

    DESCRIPTION

    The Oracle/PLSQL LESS function returns the smallest value in a list of expressions.

    It's the greatest or least. As soon as you try to use the NULL value in a comparison, the answer is unknown.

    So, if you have NOTHING in there, the answer will be NULL.

    It goes the same for GREATEST().

    Global functions (SUM, MIN, MAX, etc) ignore NULL values.

    In ORDER BY, you can specify NULL FIRST or NULLS LAST.

  • How to reset a timer each time the function is called?

    Hello

    I have my code like below. The main function is called whenever the event occurs. The event occurs when I created a timer which occupies 10 seconds for display purposes.

    Once the Main() is called, a message appears and after 10 seconds, the message disappears.

    The problem I had met with this code is that the message does not last for 10 seconds when the Main() is called consecutively. For example; when its name for the second time within 10 seconds, the display will show for 6 seconds and maintain the reduction.

    Can someone help me with this problem and tell me what to do to reset the timer each time the Main() is called. I also used FeatureState_Timer.reset (), but it did not work.

    / * Declarations of global variables * /.

    public var FeatureState_Timer : timer = new Timer (10000);

    / * Global function * /.

    function Feature_Timer_Function(timerEvent:TimerEvent): void

    {

    Message.Visible = false;

    Feature_Timer. stop();

    }

    function Main(event:Event):void

    {

    FeatureState_Timer .addEventListener (TimerEvent.TIMER, Feature_Timer_Function);

    FeatureState_Timer . Start();

    Message.Visible = true;

    }

    Thank you!!

    Try to reset the timer first:

    function Main(event:Event):void

    {

    FeatureState_Timer . Reset();

    FeatureState_Timer.start ();

    Message.Visible = true;

    }

    If this does not work, use the following code:

    function Main(event:Event):void

    {

    FeatureState_Timer = new Timer (10000);

    FeatureState_Timer.addEventListener (TimerEvent.TIMER, Feature_Timer_Function);

    FeatureState_Timer.start ();

    Message.Visible = true;

    }

  • Problem with my aggregate function

    Hello

    I tried to build my own global function in the chain, but I have a problem when I use it in my application. When I'm with her, he wrote ORA904, considering that this idenfifier exists. Do you know what is the problem?

    here my aggregate function:
    create or replace FUNCTION aggme (query_in in VARCHAR2) RETURN VARCHAR2 IS
        incoming    varchar2(4000);
        hold_result varchar2(4000);
        c sys_refcursor;
    Begin
        open c for query_in;
        loop
            fetch c into incoming;
            exit when c%notfound;
            hold_result := hold_result||','||incoming;
        end loop;
        return ltrim(hold_result,',');
    END;
    and here my request using my aggregate function aggme:
    select
      RES.LASTNAME as "LASTNAME",
      RES.FIRSTNAME as "FIRSTNAME",
      aggme('select NAME from PATHOLOGY where ID= RES.PATHOLOGY_ID') as "PATHOLOGY"
    from
      TBK_RESOURCE RES

    user539451 wrote:
    Hi BluShadow,

    I followed your advice and try to use the aggregation of clob. No problem to compile the function but when I use the clobagg to my query, is not aggregated. Perhaps, I don't use it correctly.

    select
    RES.PATIENT_LASTNAME as "LASTNAME",
    RES.PATIENT_FIRSTNAME as "FIRSTNAME",
    (select trim(',' from clobagg(name||',')) as "pathology" from pathology where ID= RES.PATHOLOGY_ID)
    FROM
    TBK_RESOURCE RES
    

    output, I have:

    FIRSTNAME. LASTNAME. PATHOLOGY
    TOTO | OTOT | ACB
    TOTO | OTOT | GB

    instead of having:
    TOTO OTOT ACB, GB

    Well, I don't have data to work with, but it works well for me...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 'TOTO' as FIRSTNAME, 'OTOT' as LASTNAME, 'PBR' as PATHOLOGY from dual union all
      2             select 'TOTO', 'OTOT', 'GB' from dual)
      3  --
      4  -- end of test data
      5  --
      6  select firstname, lastname
      7        ,trim(',' from clobagg(pathology||',')) as pathology
      8  from t
      9* group by firstname, lastname
    SQL> /
    
    FIRS LAST PATHOLOGY
    ---- ---- --------------------------------------------------------------------------------
    TOTO OTOT PBR,GB
    

Maybe you are looking for

  • are there broken by latest OSX applications?

    I am running OSX 10.8.5.  When I use my mac, I continue to offered chance to upgrade to the latest version of Mac OS x.  I have not updated.  My computer works fine, and I fear that an OSX update would break applications.  I have a session 10.9 I wan

  • VCA stops responding when doing Build command line

    http://support.Microsoft.com/kb/306617 are looking for the file for this article, but there is no way MS contact for a solution without using a credit card.  Looking for the update package. Thank you.

  • My MSN mail program does not work

    My MSN mail program does not work. I had the computer at a Staples office supply store to get a verified cd drive. They said they were doing free computer cleaning. I said yes. When it was finished, I took the computer home and Premium MSN mail progr

  • hatred sensitve, pad touch, mouse used on this laptop before. Now tried 3 mouse that will not work.

    using hp Pavilion dv6000 (dv6700 on sticker under laptop)Windows vista SP 2either 8 (cringe)different alerts: unknown device (list in the currency under usb Manager)all plug and play, but made more Plug and hide.Targus (PAUMOO4U)Targus (PAUM01U)Micro

  • WTB Sony Ericsson cable DRS - 11

    Hello I want to buy Sony Ericsson DRS-11 RS232 cable to interface my T630 phone to a serial port. Where can I buy it in Malaysia? Thank you.