I'm stuck inside of my functional Global

I'm at the end a reorganization on my installation main acquisition and would like to tie all together with this FG I have 13 different values that are stored in a file, I would like to read the file into a FG so that they can be dispersed to appropriate locations.

The problem is that there are 9 different types of data within 13 values, and I can't find a way to get a value on a given (by assigning the enum constant) place, other than to have at least 9 indicators. I have attached a picture of what I'm trying to do, but obviously the variant does not work because I can't wire that the entry of VI until the doubles, data acquisition channels, etc...

I played a bit with VI loaded dynamically, but did not get anywhere and think that OOP is the only way to go, but I'm not familiar with it. I also did not this in a project yet, although I'll probably do it anyway to create a .exe on the road.

Although LVOOP could work your AE version just needs turned inside and wrapped (short answer).

Create actions and a wrapper associated with VI for each action. In the warpper to "Value1" must call EI with something like 'Get value1', the return value of the AE to the calling wrapper using an indicator of type variant. The wrapper (who knows what kind of data to wait) throws in turn this varinat as the appropriate data type.

What you should do.

Ben

Tags: NI Software

Similar Questions

  • 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

  • 'Stuck' inside an application with No Way Out

    I recently bought an iPad Mini 4, my first iOS device after years of Android. There is much to say about the iPad, and I can see why it has become so popular. There are things that I have to "unlearn" on Android to succeed with the iPad, and that is what is talking about this issue.

    When you work with the apps I sometimes find myself 'stuck' inside an application with no way to go back where I was before. There is no visible controls that move to be back, and swipe left/right/up/down does not help. The only thing I can do is quit the application by pressing the Home button.

    In Android, I can press the previous to go back to where I was before. I can go back in a full application to the first screen. Can I do this with my iPad Mini 4?

    Double-click the home button, then tap the application you want to switch to.

    --------

    iPad User Guide - web site:

    https://help.Apple.com/iPad/9/#

    iPad User Guide - iBook:

    https://iTunes.Apple.com/us/book/iPad-user-guide-for-iOS-9.3/id1035374126?Mt=11

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

  • Functional global variables with polymorphic VI

    Hello

    I am keen to build a functional global variable in a polymorphic VI. So, for example in a functional global variable, we have case structure. I want to build separate VI for the structure of the case and make a polymorphic VI.

    Is it possible that I could use a polymorphic VI rather than business structures?

    Thank you!

    You could create a polymorphic VI that serves as a wrapper for the FGV.  The idea is that each instance of the polymorphic VI called FGV with selected appropriate case-sensitive.  Then your API is the polymorphic VI instead of FGV.

  • Functional Global Variable reference

    Hi all

    I want to update the value of the indicator element in primary VI, I don't want to use the global variable, due to the problem of race condition. So I create a functional global variable to control reference. It is reliable and can avoid the race condition critical?

    I have attached two Test VI.

    Thanks for your advice.

    Personally, I use user events to send data to the main VI and then he can update the indicator.  This generally works very well since most GUI screws using a Structure of the event anyway.

  • Functional global variable pending

    Hi all

    I understand, by threads of reading on the forum, that a call to a functional Global Variable will block its execution if the FGV is already consulted one another VI, correct? Is there another way that it would block, apart from those shown?

    The reason for the question is that I have a (non-reentrant) FGV which is read by 8 subVIs simultaneously (they are, in fact, the same vi, but configured for returning) and whose time strangely, access varies based on the number of the subvis running.

    In less than 5 screws are trying to access the FGV, execution is blocked (I guess, because when the FGV is disabled and replaced by a constant there is no problem with running) and access lasts less than 50ms. If this number is between 5 and 8, execution is carried out much faster. My first assumption was that FGV has not been initiated until we call the fifth sub - VI, but I don't know how to check that.

    I can understand that there is something wrong with the FGV, but can't put my finger on. Any ideas?

    Thanks in advance for any help.


  • Multiple copies of the functional global using vi references

    I have several producers acquisition in a global operation (a functional overall by the producer). These functional overall are identical except for the name. He would work to have only one functional global VI and get a separate reference for each producer? The corresponding consumer would have also used the appropriate reference to consume the data.

    The functional global contains an array of data that must be analyzed by the consumer. It is possible that the data table does not contain a complete set of data on a unique "store" by the producer operation. Of course, the consumer, is written to search for a complete data record before completing the processing of the file.

    Les__Bartel wrote:

    TST wrote:

    No matter that there is a better way, the answer to the question is Yes. The FGV must be reentrant and the reference you open must be re-entrant too and then you can use the CBR node to run the specific copy of the FGV.

    I thought that a reentrant vi would not maintain the State of the shift register not initialized by one call to the other.

    A reentrant VI will maintain the State of its shift uninitialized registers.  However, you must be very careful, how to do this.  You first need to make sure that it is set to allocate Clones.  What will happen in this situation, it is that each different place call you this sub - VI each will be a different clone.  This means that each call will have its own data.  The problem with this is that you cannot share the data between multiple instances and therefore multiple loops.  If you don't believe me, go play with mean it Point by Point VI.

    So what happens if you assign shared clones?  A big freakin mess '.  You will have no control over which clone called where, and there will be a major data corruption.

    This is why FGVs are almost always not reentrant.

  • Laser Jet MFP M125nw Pro: the paper is stuck inside the printer

    the paper is stuck inside the printer Laser Jet Pro MFP M125nw

    Did you follow the information from the HP web site?

    http://support.HP.com/us-en/product/HP-LaserJet-Pro-MFP-M125-series/5396664/model/5303404/document/c03921935/

  • U400 - cd stuck inside the car

    I have a cd stuck inside the slot in the drive. By pressing the ejection will hear the sound of the player moving the thing, but the drive did not just get out. What should I do?

    Thank you all for the suggestion. Somehow, I managed to take out the drive by sheer luck. I found that the disc is a bit twisted and that like most is the reason why it got stuck. It's a lesson for me to carefully check the physical condition of a disc before putting in any drive slot-loading!

  • disc is stuck inside my computer

    I have a disc stuck in my computer.  The drawer WILL come out, but the disc is stuck inside the computer somewhere and isn't in the drawer.  Help, please.  Thank you.

    As far as I can tell the screw you are looking for is in the location where memory is (see figure).  If you intend to review, make sure that you unplug the computer AND take out the battery

  • Hi Im trying to switch plans but anyway I'm stuck inside a blank page in my adobe account. Oh I live in South Africa I limited the speed of the line and I think I ran... Any help?, Hi Im trying to change the plans but anyway I'm stuck inside some bl

    Hi Im trying to switch plans but anyway I'm stuck inside a blank page in my adobe account. Oh I live in South Africa I limited the speed of the line and I think I ran... Any help?, Hi Im trying to change the plans but anyway I'm stuck inside a blank page in my adobe account. Oh I live in South Africa I limited the speed of the line and I think I ran... Any help?

    Hello

    Please consult phone support | Orders, returns of trade

    Hope this helps!

  • Help! My file is stuck inside a group!

    Help! My file is stuck inside an empty group!

    I edited a linked picture by double-clicking the form and image in the toolbar links to edition, but now I can't leave the group to pursue the rest of my paper edition.

    All the rest is washed out! A double click of the canvas does nothing, there is no small "arrow" at the top left, most of the options of the menu of the object is gray...

    I'm totally stuck here!

    Please help with any suggestions! ?

    (using Illustrator CS5)

    Update: I think I solved the problem... my drawing layer had become sort of the base layer to another layer. No idea how - did not deliberately make!

    What that it either - by pulling it until its own layer everything fine.

    Never seen that before but.

    Consider the problem solved.

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

  • Disc stuck inside of the notebook - Pavilion 17-e110dx (F9L87UAR #ABA)

    Hello-

    I have a Pavilion 17-e110dx (F9L87UAR #ABA), running Windows 8.1. Today, I put a DVD in my optical drive and when I heard it turns, I ejected the drive, but the drive is now stuck to the INSIDE of my computer... Please help!  The Player opens and closes without any problem... where's my drive?   How can I safely remove the optical drive in order to take out the drive? I don't want to damage the disc, because it contains irreplaceable photos.

    Also - I bought this laptop a month ago, refurbished and it is still under warranty.

    Thank you!

    It must always be inside the optical drive. It is a closed box. Turn the laptop on the back, open the service Bay and search a single screw with an icon of DVD player next to him. Remove the screws and the DVD player should slide out of the chassis with a little help by behind with a flat blade screwdriver. Pages 47-49 in this manual shows how.

    Manual

    Once the disc is out of the chassis, you can use the pin hole to open it with a folded-out paperclip. Completely open and you should be able to see the drive in there to remove it.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

Maybe you are looking for

  • How to export the bookmarks?

    In older versions of Firefox it was obvious how to export bookmarks. On the new version, I have not a clue. I need to move the bookmarks to another computer Bill

  • DOM.max_script_run_time would not allow me to click on reset

    I get the "a script on this page may be busy...". "etc, pop up message regularly for more than a week. 'Continue' had worked until today, where everything is completely stopped on gmail. I cleaned my computer, checked for the latest update of Firefox

  • Move the folder of Photos on an external drive

    Hello my MacBook Air is near capacity. I'm going through iTunes and Photos on an external drive to free up disk space on the internal drive. I searched the threads and found the right solution for iTunes. I moved the entire iTunes folder to the exter

  • How to define logical tristate using NOR-DAQ 6212 in c#

    Hello world I am very new to NOR & help each of you experts out there. As the subject says, I'm trying to set digital output at tristate DAQmx & c# channel. I found the link on the Tristate property, but I don't know how to use it. http://zone.NI.com

  • Distorted words in Web pages and the desktop appear after viral infection cleaned

    I'm very technologically challenged, so I hope someone can help me.  Computer turned on the other day and some of the words are fragmented, both online and with the saved documents.  The entire page is not affected, but several words have the appeara