public to package functions and variables via dblink

It is possible to call a public global variable in a package in a database to another package procedure in another database use a database link? If so, could you let me know the syntax? Same question to package functions.

Hello

Check this link documentation especially the stmt...
http://www.MCS.csueastbay.edu/support/Oracle/doc/10.2/AppDev.102/b14251/adfns_packages.htm#i1007858

You cannot access remote package variables and constants.

Maybe you can write a function in terms of the distance which, once called will returns the value of the variable.

to call remote packaged functions...

[documentation syntax is [[schema.] plan.] function_name[@dblink] [(param_1...param_n)]

an example given in the link above for this...

RUN fire_emp1@boston_server (1043);

Ravi Kumar

Published by: ravikumar.sv on August 31, 2009 11:29

Tags: Database

Similar Questions

  • How to trace all the functions and variables Movie Clip

    How can I find all the functions and variables available Movie Clip?  Thank you

    Use the describeType() function.

  • 2.1.0.62: problem with Package.Functions and Unit Tests

    I like the new Sqldeveloper - I startet try Unit Tests as described here: link: [http://www.oracle.com/technology/obe/11gr2_db_prod/appdev/sqldev/sqldev_unit_test/sqldev_unit_test.htm#t4]

    He has worked with a test procedure. Now I'm testing my package functions, but all I get is the following:

    ---------
    Die Prozedur ausgeführt wurde following.

    Ausfuhrungsaufruf
    BEGIN
    : 1: = "PKG_MYPACK". "CREATEFUNCTION"(IN_PROGRAMMEID = >: 2,) "
    IN_AMOUNT = >: 3,.
    (IN_SWS = >: 4);
    END;

    Bind-variables verwendet
    1 WHOLE (NULL)
    INTEGER 2 IN 1
    INTEGER FROM 3 TO 10
    INTEGER 4 TO 11

    Ausfuhrungsergebnisse
    ERROR
    Ungultige conversion angefordert
    oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:439)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7723)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7496)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7978)
    oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4063)
    oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:221)
    oracle.dbtools.raptor.datatypes.strategies.callablestatement.CallableBindingDatum.customBindIN(CallableBindingDatum.java:135)
    Oracle. ...
    ------

    What can I do?

    Created
    Bug 8976245 - EA1: UNIT_TEST: CONVERSION not VALID ERROR with the HELP of the INTEGER PARAMETER
    and asked the answering machine of bug to keep you informed about the situation here in the forum.

    Bad news, it is that any INTEGER type parameter for which you specify a non-null value will fail.

    Possibly useful new, is that if you create a "clone" of you the function using NUMBER as the data type, you can continue to experiment how unit tests can be useful for you.

    Answer no sorry moment. :(

    Brian
    SQL development team

  • load a SWF into another domain and access its functions and variables

    I need to load a swf file into another domain and call its functions and access to its variables, in the same field, I can load and access its functions successfully, but in different areas not.

    control the class security.  Depending on the browser version that you're targeting you might be able to get out of the allowDomain() method, but you'll probably want to use a cross-domain security file.

  • to access the public jdbc package types and the length of the type name

    is it possible to use a jdbc type defined in a package in the public (in the header defined and body of course)

    For example
    user applications
    package hxc_self_service_time_deposit
    type app_attributes_info

    Can I use apps.hxc_self_service_time_deposit.app_attributes_info?
    for example:
    ArrayDescriptor arrayDescriptorAttributes = (ArrayDescriptor) (conn) .getDescriptor ("apps.hxc_self_service_time_deposit.app_attributes_info") (OracleConnection);
    If (arrayDescriptorAttributes == null) {}
    System.out.println ("creating array descriptor");
    arrayDescriptorAttributes = ArrayDescriptor.createDescriptor ("apps.hxc_self_service_time_deposit.app_attributes_info", conn);
    }

    That said, that the name of the type is not valid also if I leave aside applications, same thing.

    I could define the type myself, but then this pause by using the Api E - BS, and that of the whole point of the task, check if you can use the api of E - BS JDBC.
    : p seams do not make for jdbc callls unless change you the database

    Hello

    No, you can't do it. getDescriptor is looking for a structured object SQL. (It's a SQL object type)

    Apps.hxc_self_service_time_deposit.app_attributes_info is a type of PL/SQL and SQL can be used:

    SQL>create or replace package hxc_self_service_time_deposit
      2  is
      3     type app_attributes_info is record (x number);
      4
      5     function f
      6        return app_attributes_info;
      7  end hxc_self_service_time_deposit;
      8  /
    
    Package created.
    
    SQL>
    SQL>select hxc_self_service_time_deposit.f from dual;
    select hxc_self_service_time_deposit.f from dual
           *
    ERROR at line 1:
    ORA-00902: invalid datatype
    

    Concerning
    Peter

  • Can I have a single function and variable with createjs names when publsihing of Flash?

    Hey everybody!

    I recently started to use the Toolbox for exporting CreateJS to turn the little button icon animations, done in Flash, content for HTML5. I created 3 files of ".fla" separate icon that animate when spilled.

    With that tag added in my html5 document example, animation works very well:

    < canvas id = "about_btn" width = "85" height = "70" style = "background-color: #FFF" > < / canvas >

    However, once I added several canvas tags, only one icon would be on screen:

    < canvas id = "about_btn" width = "85" height = "70" style = "background-color: #FFF" > < / canvas >

    < canvas id = "news_btn" width = "85" height = "70" style = "background-color: #FFF" > < / canvas >

    < canvas id = "contact_btn" width = "85" height = "70" style = "background-color: #FFF" > < / canvas >

    I discovered that the JavaScript files generated with each 'FLA' file were opposed because they were all using the same variable and function names (Stadium of the exodus, canvas, init(), etc.). Is it possible for me to publish the JavaScript of Flash code with variable and function names specific document? (e.g. about_stage, about_canvas, about_init())

    A work around methood I currently using puts each < canvas > tag in its own iFrame.

    Thanks again for the help!

    -DJ

    Asset JS libraries shouldn't conflict between them, unless there are symbols with the same name. Even in this case, you can change the names of symbols for each FLA avoid collisions.

    Looks like you are trying to copy and paste the code on the HTML preview. It is not really designed for it, and this will lead to collisions of names. You want to rewrite this logic in your own HTML code (code overview using as reference), or rename the variables as appropriate, after you copy and paste.

    Best,

    Concession.

  • How to move the functions and procedures of packages in a schema?

    Hello

    I have less than the needs for a work at home and my question is if anyone can point me in the right direction to find documentation that can help me solve below. Any information will be appreciated. Thank you.

    Write procedures and functions (included or not in packets) as .txt or .sql scripts. Once they have been launched in Developer SQL they should, in addition, the functions and procedures of packages in the current schema. If the current schema contains only 2 packages, pac1 (p11, p12 procedures and functions f11, f12, f13) and pac2 (contains the p21 following procedures, p22, p23 and f21 and functions f21 (case of overload), running the scripts produce the following effects:)

    • Procedures p11, p12, p21, p22, p23, and f11, f12 and f13 functions will be created in the current schema.
    • PAC2 will contain 2 instances of the function of overload-f21; they will be kept in the package, without be created in the current schema. If all overloaded procedures/functions will be kept in their original packaging
    • If pac1 contains variables, cursors, and public types, keep us only the details of the package (and remove the body); usually if the packages contain no overloaded functions or procedures the body will be removed and if no variable, cursors, types of public then we will remove the header.
    • If in the triggers, procedures and functions we will call procedures/functions packages (procedures and functions moved into the current schema) they reference will need to be updated (via editing the body or recompilation) for example if pa1.p12 will be replaced with p12.
    • Scripts must have numbers in the next series (01... n) and the characters that explain the content.

    My only advice would be to remember that these are public forums and if YOU can find them, therefore cannot your instructors.

    In addition, those are horrible procedure names and function

    This mission seems to be around to overload the pl/sql objects and... prioritize a research on Oracle documentation around overhead and legacy
    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28371/adobjplsql.htm#i21148

  • Impossible to go from baseline of connection via functional Global Variable

    Hello

    I'm working on a project of producer/consumer based, which some parties have access to a MySQL database. After the connection to the database, I want to store the reference to the connection inside of a functional global variable. Then other parts of the project that need to use it can only read in the functional global variable.

    For some reason, the reference of the connection is not valid once it has been read functional global variable. It works fine if I have the reference directly from the connection to the request for enforcement VI wiring.

    I have attached a few screws that show the problem, but you will not be able to run them unless you have a database to connect to and hack you the query a little so he selects in your tables.

    SQL_whole_thing works very well. It connects to the database, returns information he requested by the query, and then disconnects. No problem.

    But if I run DB_Connect.vi (which stores the reference to 'DatabaseID_FGV' FGV), follow-up of SQL_Query.vi (which reads to the FGV reference), then I get an error saying that the reference is not valid.

    Anyone has an idea why this happens?

    Thank you

    Christian.

    PS: You'll need DBID_FGVActions.ctl and database_connectioninfo.ctl, also attached

    Your referance on the SR's "outdated" when implementing this way.  Essentially, this means that data in memory to this referance has changed because the referance was stored.  Just because you have changed the data at this location.  This prevents you from spend a refeance for the "old data" and crashing the calling application since the referance Rassi contains assumptions that are more adequate data.

    Consider upgrading this FGV powered Action.  This would be encapulate all the Actions you want to do to the database (connect, disconnect, fecth, writing etc.) and maintain the current referance on the AEs shift register.  Ben establishes a great deal for just this type of functional encapsulation in his famous nugget.  A must read for every programmer

  • function and packages

    Hi friends,

    I have a requirement where in I need decode my source table values while inserting in my target table. I usually do my task by performing functions (don't use case and decode). My first question is

    (1) is using the function to accomplish these tasks is good. I have several of these conversion requirements.
    (2) Clubbing subprogrammes togther in packages is a good habit. But what should be the number of these subprogrammes. I can club togther 100 of this togther functions (a function of the average is 50 lines)? If this is not the case, what should be the thoughts of segregation?
    (3) are the oracle integrated like sqrt, length etc. deterministic functions?

    This code represents a typical requirement of the mine where in I map my name of source country in the target
    ID of country when migrating my data from the source to the target.

    create table source 
    (
    emp_id number,
    empname varchar2(100),
    sal number,
    country varchar2(100)
    );
    
    
    insert into source values (1,'ALEX',1000,'US');
    Insert into source values (2,'RAHUL',2000,'IND');
    Insert into source values (3,'KARTIK',3000,'IND');
    Insert into source values (4,'SHADOW',5000,'US');
    insert into source values(5,'LOUI',1500,'JAP');
    
    
    Create table source_country_code
    (
    country varchar2(100),
    abbrv  varchar2(100),
    area number,
    climate varchar2(100)
    );
    
    insert into source_country_code values ('UNITED STATES','US',10000,'COLD');
    insert into source_country_code values ('INDIA','IND',100000,'HOT');
    insert into source_country_code values ('JAPAN','JAP',1000000,'MODERATE');
    
    
    
    
    Create table target_country_code
    (
    country_id number,
    descr  varchar2(100),
    density number,
    weather varchar2(100)
    );
    
    insert into target_country_code values (101,'this is descrition txt 1',1001,'COLD');
    insert into target_country_code values (102,'this is descrition txt 2',1001,'HOT');
    insert into target_country_code values (103,'this is descrition txt 3',1001,'MODERATE');
    
    
    
    create table target
    (
    emp_id number,
    empname varchar2(100),
    sal number,
    country_id number
    );
    I generally functions for this kind of mappings. I have several of these requirements as indicated above and the
    cardinality of data is high.
    create or replace function transform (in_src_country varchar2) return number deterministic
    as
    l_country_id number;
    l_climate varchar2(1000);
    begin
    
    select climate into l_climate from source_country_code
       where upper(abbrv)=upper(in_src_country);
       
    select country_id into l_country_id
    from target_country_code
    where upper(weather)=upper(l_climate);
    
    return(l_country_id);
    exception 
    when no_data_found then
    return null;
    end;
    last step,

    so, what I usually do is

    insert into target
    Select emp_id, empname, sal, transform (country) in the source;



    As always, thank you

    Rahul

    Published by: Rahul K on 5 June 2013 10:51

    No technique is universally good or bad universally. You must understand your needs, the compromise and what you're trying to optimize for.

    If you don't care anything else you are looking for the absolute fastest performance, reduce what you have to do in PL/SQL is a good idea. Most of the people and most of the systems, however, prefer to have code that is a bit slower if it makes the code easier to maintain and easier to write or minimizes the number of places that the code is duplicated. If you attempt to load a data warehouse of company with billions of new lines every night, you're as almost exclusively worry about raw performance. And, if you design correctly, there is that one way to load any particular item of data, you don't have to worry about code duplication because there will always be an INSERT statement that inserts data in a particular table. If you build an OLTP application, on the other hand, it is very likely that there will be many places where you want to do something like search for a value and you are much less concerned about raw performance you're on maintainability and ensure that you do not duplicate the code. In these cases, well-designed functions and procedures are well worth the return miners (so if you do a query of single line as most OLTP systems are generally easier to treat if you write DSS queries that return millions of processing lines billionr lines.

    Justin

  • 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

  • How to perform a function and return the result in a variable of liaison

    Hello

    I'm trying to calculate the sum of the salaries of all persons with a particular using a function JOB_ID TOTAL_INCOME (v_job_id).

    create or replace function total_income
    + (v_job_id in VARCHAR2) +.
    Number IS BACK
    v_total number (6);

    cursor get_sal is
    Select the pay of employees
    where job_id = v_job_id;
    BEGIN
    v_total: = 0;
    for emp in get_sal
    loop
    v_total: = v_total emp.salary; +.
    end loop;

    dbms_output.put_line (' Total salary ' | v_job_id |' is: ' | v_total);
    Return v_total;
    END;

    Now I woud like to perform this function and assign the value returned in a variable binding test_sal

    test_sal variable number (6)
    SELECT total_income ('AD_VP') in: test_sal FROM DUAL;
    dbms_output.put_line (' Sal Total :'||: test_sal);

    This returns the errors below:

    SELECT total_income ('AD_VP') in: test_sal FROM DUAL
    *+
    Error on line 0
    ORA-01036: illegal variable name/number

    dbms_output.put_line (' Sal Total :'||: test_sal);
    Error on line 3
    ORA-00900: invalid SQL statement

    Could someone help me what could be the problem? Thanks for your time...

    Hi Kiran and welcome to the forum,

    You mix SQL and PL/SQL

    It's the way in which SQL:

    SQL> SELECT total_income('AD_VP') FROM DUAL;
    
    TOTAL_INCOME('AD_VP')
    ---------------------
                      123
    1 row selected.
    

    It comes to PL/SQL in SQL * more

    SQL> variable test_sal number
    SQL> execute :test_sal := total_income('AD_VP')
    PL/SQL procedure successfully completed.
    SQL> exec dbms_output.put_line('Total Sal:'||:test_sal)
    Total Sal:123
    PL/SQL procedure successfully completed
    

    Concerning
    Peter

  • How to use the type of packages, procedures and functions in another schema?

    I have two schema target in an OWB project, such as A and b. In a map of A, I would use some packet types, functions and procedures of B. I tried the method of the suggested such synonym, but I couldn't find the metadata of these when importing... The only type of synonym I can import is the synonym for the table. Y at - it a bug for synonym?

    If I can't use a synonym for that matter, is there another way to solve the problem?

    Now, in some cases you will absolutely need to create the second module as Carsten described, but it should also be noted that you can reference objects in things like Expressions even if you have not loaded the metadata. It's only when you need strong bonding that it becomes necessary to import objects. For everything else, as long as the reference can solve during the compilation so you are good to go.

    For example, I target a function in a schema (S1) and a synonym private that it in another (s2). A mapping of the S2 schema has an expression object that uses the synonym of the function in the expression property for a couple of the attirbutes of output. The synonym has not been loaded in metadata - OWB has indeed no knowledge of its existence. But she is resolved at compile time if the mapping validates and generates successfully.

    Mike

  • Oracle form functions and procedures in the APEX, how?

    I'm working to recreate in the APEX, already existing read only forms in Oracle Forms. Report features interactive APEX among other things, in fact worth as well as to target a different audience than utilizies versions of Oracle Form. Versions of Oracle Forms use a lot of pre and post query triggers, PLSQL functions.

    In Oracle Forms that places, these functions can be found in the "Units of program" section of the form. A feature typical of this kind, based on a particular Mission ID route, collecting names of regular passengers, is shaped with a comma and a space after each of them, in a single string that is returned and displayed the list of passengers of a line.

    I have all of this written code so I can move most of the main request of the Oracle form in an interactive report. These functions and triggers called in the form of the "Units of program" section of the Oracle form rather than stored in the database schema in a package, where they would go inside the APEX? Can I create a 'shortcut' in the APEX and call it from the interactive report "Source Région"? I can create the PLSQL function at the level of the region of the interactive report or page level? Or, my best bet creates a package that is stored in the database, all these functions and/or proecedures I might need the original form of Oracle?

    Some advice would be greatly appreciated.

    RLBickham wrote:
    I don't think I've been pretty clear in the description of the specific thing I want to do, simply, it does not reach the level of forms of conversion of the APEX. It is basically a problem of PLSQL function.

    I have an interactive report which is currently 90 percent of what I want however, each line, which represents a Mission may have several feet. Each arm has two places or ICAO codes attached to it. Based on the number of Mission, I want to loop through the array of leg, collect all the codes of ICAO for this Mission, put them together in 1 variable separated by a coma and add this variable to display the columns in this interactive report as the last column.

    In Oracle Forms, I have a function registered in the database, which is called in the main query. Maybe I ask a question that does not need to be asked, but anyway my question is can I put this function currently in the database somewhere within the interactive report and somehow reference it via Http, or should I just stick with set of functions and procedures in the packages stored in the database and called the conventional way?

    You could switch the function to the database and call it from the report query, but it sounds as if it were superfluous. In the report query using any form of Re: 4. How can I convert rows to columns? is appropriate for your version of the (unspecified) database.

    -----

    When you have a problem, you will get an answer faster, more efficient including information as much information as possible from the outset. This should include:

  • Full version of APEX
  • Complete operating system DB, version, edition, host
  • Architecture of Web server (EPG, SST or APEX listener/host operating system)
  • Browser (s) and version (s) used
  • Theme
  • Model (s)

  • Region/section type (s) (particularly as to distinguish if a 'report' is a standard report, an interactive report, or indeed a 'update report' (i.e. a tabular presentation))

    With APEX, we also had the chance to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproduce things is the best way to solve most of the questions, particularly those relating to the layout and Visual formatting. If you expect a detailed response it is appropriate that you take on an important part of the effort by getting as much as possible with an example of the problem on apex.oracle.com before asking for help on specific issues, then we can see firsthand.

  • Calling functions / set variables in loaded SWF

    You know how you can create a Movieclip object, add a function or a variable, and then call this function or change this variable to the SWF file that includes? I want to be able to do it, only with SWFs that are loaded at run time.

    My "main" SWF is just something the type of menu. The user clicks a button in my HAND. SWF and the HAND. SWF and then load the SWF associated with this button, using the AS 3.0 method Loader () - URLRequest () - addChild () that everyone always asks questions on prescribed.

    It works very well. But now I have a few custom and other objects (ie., not only the channels) in my HAND. SWF I want power sharing with the loaded SWF files. preferably, I'd use a function of the type of accessor (ie., LoadedSWF.GiveMeTheCoolObject (MyCoolObject)); Although at this point, I'm willing to hack the object itself (ie., LoadedSWF.CoolObject.CoolField = MyCoolObject.CoolField ;) if that's what it takes.

    I tried to call the functions and setting the fields, but the AS 3.0 compiler doesn't care for this kind of nonsense on its objects defined by the generically. Also note that, at runtime, a call to LoadedSWF.hasOwnObject ("GiveMeTheCoolObject") returns true.

    So my colleagues big brain, what is the magic?

    In advance, thank you for the help!
    Scott

    Kglad,

    Quote:
    Posted by: kglad
    the error message, seems, your function expects a member of the class MyCoolObject, correct?
    and MyCoolObject is not an instance of this class. so, you have to fix that. That is to say, create a member of this class, and use this class as a parameter of the function member.

    Heh, that's what the error message says all right. But the object IS actually an object of class MyCoolObject. I looked at this thing for hours and MyCoolObject IS an instance of this class. I tried different combinations of casting (including the cast on an object and passing that) but had no luck whatsoever.

    So I googled this particular runtime error message ("Error #1034: has no Type constraint: cannot convert '" ") and found a ton of links to other people with a similar problem. As a general rule, the problem was just as you say, someone passes a button as a string, that kinda thing. But a guy had a problem with an object that it has derived from the event class. Once the hours spent trying to make it work, he has tried to override clone() of the base class method and got it to work:

    http://www.assertTrue.com/articles/2006/10/14/custom-events-in-ActionScript-3-0

    As for my project, I took a long, hard look at the overall architecture of my project and decided it would be better if all the 'real work' is held in the HAND. SWF file. This approach would solve some other problems, and it makes sense in a mindset of "separating the display of data.

    If (and this is the interesting part) I changed the API for the LOADED. SWF to accept the pairs of strings (ie., LoadedSWF.AddToDisplay (String Name, String Data)) rather than accept MyCoolObj. Ran and Viola, now we work without any throw exceptions in. After this moment of glory, I created a couple of other APIs that comes from base classes (a type int, the other a type function) agreed and was happily on my way.

    On this basis, I understand while passing another base class objects (IE, the derived class) to load MovieClips via custom function API is... perhaps not so simple you'd expect. In the grand scheme of things well, not a big deal: as far as I'm concerned AS3 rocks.

    Kglad, thanks again for all the help: your comments on how this was the big push that I needed to get through the last barrier of this project.

    For those who read this topic for the ' how to call functions or set variables in a loaded SWF file?

    The short answer is cast to the SWF file that is loaded as a MovieClip content object and then call the function or change the variable:

    Load the SWF file (you saw this code a million times)
    var LoadedSWFObj:Loader = new Loader();
    var MyURL:URLRequest = new URLRequest("LoadThisSWF.SWF");
    LoadedSWFObj.load (MyURL);

    It is within your Event.COMPLETE Manager:

    Cast as a MovieClip object and work with it.
    var LoadedSWF:MovieClip = LoadedSWFObj.content as MovieClip;

    or another way to perform a cast:
    var LoadedSWF:MovieClip = MovieClip (LoadedSWFObj.content);

    Call yer function:
    LoadedSWF.CallMe ();

  • Functional Global Variables: an indicator can be used instead of a shift register?

    It is a simple question, but I can't find an answer to it. The model agreed to a functional Global Variable is to use an uninitialized as in this example shift register:

    ('Référence IN' and ' Reference to "is actually a pile of references.) There is also a "Se Refnum" case, which comes the straight through the tunnels shift register.

    My question is, why can't we do store the indicator data? It is much simpler to use a shift register (IMHO a non obvious way to store global data!):

    The case "Se Refnum" does absolutely nothing. Other functions such as erasure of data can be implemented just as easily. The advantage of the FGV to help avoid race conditions is maintained because you always use the VI to access the data.

    JonP says:


    Not so much, the Inidicator can happily live outside the case structure, together and Clear would be just assign different values.

    If you have only a case structure, the indicator could not live outside of it.  In order to maintain the indicator data, your design requires that it is not written in for a case of Get.  If you have an exterior structure deal that decides on 'Get' or 'set or clear' and (in the case of "Set or clear") contains the terminal of the indicator and a classiquee case that decides on 'Set' or 'clear '.  However, I would consider this a design below using the standard template of the FGV.

    The difficulty with retrieving the value if you want to do a read operation / writing change. But LV provides many ways to retrieve data from an indicator (one you don't mention is the 'Value' property), do you mean that's all "incorrect"?

    Yes (I mean that they are all incorrect).

    You could hack your way around the design to work with a single structure of matter and the terminal of the indicator being outside using a method to read the value of the indicator and through a tunnel to the structure of the case through wiring for the tunnel of writing indicator in the case of 'Get '.  However, who will require a local Variable or value of property node.  As I said, these (I only mentioned the local Variable originally) are not good choices for performance and scalability.  If you are not aware of the functional differences between the terminals, local Variables and nodes of property value, refer to this article (obviously advantages/disadvantages such as redraw objects on the front panel are not relevant here).

    I guess you could say that indicators should only be written, but it is difficult to be pure!

    No, it's not, just use the classic design of the FGV!

Maybe you are looking for