Creating single executible with global variables

I am trying to create an executible with global variables. I dynamically load the source file but when I run the indicator does not update unless I run both VI's together. Is the executible require different inputs during creation?

Hello,
It's not the fact that you are creating an executable that is causing the issue. What you are experiencing is expected behavior. Please see this KnowledgeBase" for some solutions.
Nicholas C
National Instruments
Applications Engineering

Similar Messages

  • Formula node with global variable

    Hi,
    I am tring to use formula node with global variables as an input and output,
    but this is where I see the SW hangs forever.
    By the way I am a novice to the labview.
    Can some give me hint why this is happening?
    Thank you in advance,
    Do
    Solved!
    Go to Solution.
    Attachments:
    formula_node_wGlobalInputOutput.JPG ‏281 KB

    Well, the first case of the two loops has a direct LabVIEW translation like this:
    However, just because that's the direct translation doesn't mean that's what you should be doing. In the formula node it seems as if you were copying elements from one array to another. Element-wise operation on arrays via loops can be quite inefficient in LabVIEW. Often one can operate in place with arrays, and an operation that would require two loops in a language like C would actually require no loops in LabVIEW. In fact, with the above example, even if you were to use loops, arrays can auto-index for-loops so you don't even need to wire the constants to the N terminals to tell the loop(s) how many times to run.
    Can you describe what you're trying to accomplish? There's likely to be a more natural way to do it in LabVIEW that would require no loops. Have you gone through the tutorials? You can also look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

  • Using built-in with global variables

    I am trying to setup built-in source code control for LabVIEW. It seems to be OK except in one case:
    Is it possible to use built-in with global variables ?
    VIs that use a global variable are supposed to be updated automatically when global variable is modified but what happen when VIs are checked-in ? LabVIEW cannot updated them. Is it necessary to check out all VIs before modifying global variable ? This is not convenient if global variable is used in more than 100 VIs !
    Is there another solution ? Can Perforce resolve this problem ?
    Thanks for your help !
    David

    You can still use and update global variables while they are checked in to SSC. The default values will still be saved in SSC but they can still be modified and read by other vi's.
    goldie

  • Issue with Global variable in FM

    Hi experts,
    I have created  two functional modules under same function group and declared the internal table (ITAB)as global variable ,
    i have populated the data to to  ITAB n first function module , and  These FM are used in a program , when i debug the program , the data is populated to 1st FM and but in  2nd function module the ITAB is null only internal table structure is available.
    please let me know the reason.
    Thanks NK

    thanks all, the program ( it also an FM)  ,which is calling the 2nd FM is in background mode, i think thats the reason ITAB values are not populated.
    i ts working fine with IMPORT/EXPORT but my lead says it is not advisable and they are obsolete in ECC 6.0,
    ---> declated iTAB as global variable.
    ---> call FM1 --populate itab
    call function " MAIN_FM" in update task.
       ---> fm2 cllaed in side MAIN_FM,   ( here values not populated)
    please suggest global variable not filled incase of background mode.
    thanks
    NK

  • PtbyPt editing with global variable?

    Hey guys,
    I'm wanting to setup a counter to count a crossing of a sinewave. The thing is, the sinewave is not zeroed. It's a sinewave of a cyclic load cell that I'm testing a material with. With this test, I will put load on the load cell, then cycle from that position, which is my realitive zero.
    So, say I put 0.043 volts on the load cell. I would then cycle the material at a certain strain both ways horizontally, and this "0.043" would be my zero for the crossing. I've included my Vi so you can see what's happening in the "strain" and "stress" state. These states are independant from eachother and don't work together in anyway. They're just recording data on different channels
    Is there a way I can edit the Pt2Pt vi to look at this "0.043" value (which is an analog channel)? I was thinking global variable...or...something simpler I could put in my code. I'm still a novice in all this and I would greatly appreciate some advice.
    Kindly
    Gary S.
    Attachments:
    New CSS state44.vi ‏405 KB

    glskinner wrote:
    The signal is crossing at the offset, but my "cycle count" is crossing at zero since I'm using Pt2Pt. How to I get my cycle count to cross at the offset? Is there a way I can edit the Pt2Pt to look at my beginning load cell reading zero/offset (I have it a TTL that starts the data aquisition) and then increment everytime is reaches the offset?
    As for the why I need to worry about where the cycle count crosses: I am recording the cycle count as a scalar numeric value in my data file, along side my load cell. I need this cycle count to match with the crossing of the load cell for data reduction purposes. So if the load cell crosses at -0.043, I need the cycle count to change when the load cell crosses that value. I understand the Pt2Pt crosses at zero, but the stipulation for the crossing of this vi, "0", is what I want to change. I want it to cross at my offset (-.043, or whatever the case may be), since that is my true "zero" in relation to the behavior of my load cell voltage.
    I think you're not following my train of thought.  What you want to do is make a copy of the data (i.e, create a wire branch).  On one branch, you will do the crossing calcs.  On the other branch, you retain the actual data.  On the crossing calcs branch, you will subtract out the offset so you can use the Pt2Pt without modifications.  On the other branch you have your original data.  There should be a direct correlation between the two.  You should now have a record of both how many times it crosses and where it crossed.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Adding tab to typedef tabcontrol causes class conflict with global variable

    Hi,
    I am quite new to labview. I have to update an existing program and I have a problem whith a tabcontrol. In attachement, I give you a very simple solution showing my problem.
    I have defined a simple tabControl in a typedef ctl. I had it to a VI and in block diagram of this VI, I want to fill a global variable with this control and this global variable is set as "Include Data Type".
    When creating my ctl file with a simple tabcontrol, there is no problem but my tabcontrol only contains 2 tabs. When I use "Add page after" in my ctl file to create a third one, after saving, I get a class conflict error on wire to global variable in my block diagram.
    If I remove added page, all is OK again. I don't understand why adding a new page causes a class conflict. In my attachement, it is very simple but in program that I have to modify, I already have 15 tabs and I just want to add a 16th one so, I am sure there is a mean, but impossible to fond it after many hours...
    If someone can tell me how to make my example works with "Include Data Type" (if I remove it, it always works but that is not what I want) and adding an additional tab, it would hemp me a lot!
    Thanks in advance.
    Yohann
    Attachments:
    test2.zip ‏11 KB

    The problem is that the tab is an enum, and you can't wire two strictly typed references of two different enums together, because they are considered different data types. What you can do is right click the reference control in the global variable and select Show Control, which will show the data type of the reference. You can then replace the control inside the reference with the typedef, which will cause it to update correctly.
    Although that will solve the problem, if you have the reference to a tab control in a global variable, you probably have some issues with your code, but that's not something which can be commented on without more details.
    Try to take over the world!

  • How can I programmatically create and use a global variable?

    I have an app where the number of AI DAQmx tasks I create are specified in a config file.  I have a monitor task that periodically looks at the latest values from all DAQ tasks.  I've been doing this with a set of global variables because it was the simplest way to do it.  But to do this, I have to explicitly create a separate AI task that uses the hard-coded global variable name for the DAQmx samples.  I would prefer to only write one VI for the DAQ loop that writes to a global variable that I programmatically create based on the config file.  The only solution I can think of is to use a global variable "pool" that is sized bigger than I expect to need, and then have a big switch case to select which one I want based on the task index.  But this sounds pretty silly.

    I tend to agree with Ben. I don't buy the concept of taking the asy way out (globals) because it very rarely will things remain static. You almost always have to extend the features and functionality of an application and then you will run into issues with sloppy and lazy implementations. The solutions offered may require a little time to learn but once you do it doesn't really require any extra effort.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How do i create and pass a global variable from one vi to several sub-vi's?

    Hi Guys,
    I am trying to create a program that opens several front panels (sub-VI's) in sequence. in each front panel, the user would open a file that the name is obtained from the previous sub-VI. I would like to know how i could pass the filename and refnum of the file thorough from one sub-vi to another. A global variable would do it in VB, but how do we do global vars in LABWIEW. thanks
    Papish

    I put together a sample VI and Sub VI that illustrates how to pass a Refnum and access a data file while in a Sub VI.
    For multiple VIs just repeat the sub VI process.
    You probably don't wanna use a Global Variable if not needed (can add to the mess down the road haha).
    Let me know if it helps you out! Or if I can clarify anything else!
    Chances are if you have seen VI in the forest it hasn't fallen.
    Attachments:
    Passing Refnum.zip ‏21 KB

  • Creating a range with Substitution Variables for Report Script

    Is it possible to create a range with substituion varables for use in a report script. For example instead of listing "Jan" "Feb" "Mar" "Apr" in the report script can I use a sub varaible like Jan:Apr that will list them all out?

    while I have not had luck with ranges in report scripts, others have. You could have a substitution variable the is "Jun" "Jul " "Aug" or whatever you want the members to be. and it will replace jusr fine

  • Build stand-alon​e applicatio​n with Global variable

    Question:
       how to build a VI access a global variable into a standalone EXE file?
    there are multiple VIs access to one Global variable, one of the VIs need to run in background to update the Global variable, whick i built into EXE file.
    the rest VI will be called in from Teststand to retrieve the Global variable.
    the global variable is updated if i run the background VI in labview, but after i build it into EXE file, it seems the global is not updated even the EXE running OK.

    Hi,
    Do you actually need to have an executable.
    If you can call your global variable updater VI as a VI form, then your other VI's will still beable to see the Global variable.
    You can launch you global variable updater VI in a new thread or execution so that it runs in the background and returns back to TestStand sequence so you can continue on with the rest of your tests.
    Remember to close your global updater VI before you complete your test sequence run.
    Regards
    Ray Farmer

  • Problems with global variable!!

    Hi!
    I am using some cluster (global variable), and certain fields in the cluster don't be updated.I can't understand where is the problem, because some fields are updated correctly and others no!!
    Any idea?
    Thanks in advanced!!
    Graci

    A functional global acts as a global variable in that it allows LV applications to access the data from different parts of the vi or from different vis for as long a LV is running. The vi is set to not be reentrant so that race conditions are avoided. Since functional globals are subvis that you write you also have the ability to store many global variables which are dependent upon only one input by performing the calculations within the functional global vi. You can certainly achieve this by using semaphores, but with functional globals this synchronization is built in.
    In the functional global vi you have a while loop which is set to stop after 1 iteration. This while loop has a shift register which holds the global data. There is a cas
    e structure to determine whether to read or write the functional global variable. In the write case the data from the input is written to the shift register on the right side. In the read case the data from the left shift register is written to the output and also passed on through to the right shift register. A good example can be found at the following link.
    http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3DB4956A4E034080020E74861&p_node=174821&p_submitted=N&p_rank=&p_answer=&p_source=External

  • Running Business Rules with global Variables in Composite Forms

    Hi,
    I am having trouble running Business Rules, that include Global Variables, in composite forms.
    I have two forms in the composite form, both have entity in Page dimension set to 'local'. one includes entities at level 3 and the other has entities at level 0. I need to pass this level 0 entity to the business rule, from the form.
    When i try to run the rule, it gives me the following error:
    "This rule cannot be launched because it has hidden rtp variables without default values "
    I get this error even when i set the default value for the global variable.
    This rule runs perfectly when run from the individual form (which is part of the composite form).
    Please help.
    Thanks.

    Known Issue: 9900514
    The Use Members on Data Form and Hide Prompt options for business rules attached to composite data forms apply only for runtime prompt values from the globally shared pages and POVs of a composite data form. In other words, this will only use members that are shared across all component data forms. If users want a business rule to take context from a single component data form, they should attach the business rule to that component data form and include the business rules for that component data form at the composite data form level (<Business rules for componentX>).
    Please let me know if this is not what we are talking about.
    Thank you,
    Todd Rebner

  • Is it possible to intialize a text item with Global Variable

    Hi,
    I have forms10g, I want to initialize text item with current hour for this purpose I have defined one global variable and initialize text item(for hour) with this global variable.
    Defination of global variable
    :GLOBAL.my_var := TO_CHAR(sysdate,'hh24');
    Initial Value of form text item as
    :Global.my_var
    but when I run the form it raise error " ORA-01403 no data found " error
    I already check this global variable intialize properly with the current hour.
    Thanks and Regards.
    Khawar

    Hi Francois,
    Thanks for reply, but when I removed initial value property of text item from Global variable to other or Null form starts running, I have one Poplist and it populate with a procedure at form startup I remove it but no success.
    Thanks and regards.
    Khawar

  • Status with global variable

    Hello to you all,
    I would like to add a status bar using a global variable, unfortunately it does not work that way I thought.
    Pls see attachement: Status_test_global.vi contains the global variable that I used.
    What couses the problem and how can I solve it ?
    Every answer is appreciated.
    Br
    B.
    PS: Status_global.picture is a *.jpeg
    Solved!
    Go to Solution.
    Attachments:
    Statusbar_Test_global.vi ‏4 KB
    Status_bar.vi ‏10 KB
    status_global.jpg ‏223 KB

    There are some mistakes in your VI.
    1) You have not followed dataflow structure between updating global variable and delay time.
    2) You are not updating indicator (You have kept it outside loop hence it will update only one time)
    Do following correction
    1) Make functional global VI. (Take reference from forum if you don't know about functional global)
    2) make two while loop structure running parallel.
    3) From one loop update message in Functional global vi.( Keep sequence like -messageupdate-delay-messageupdate-delay..so on)
    4) Read functional global vi in another loop also keep some delay in this loop.
    Try this correction.
    Prashant
    CLAD
    Labview 6.1-2010
    KUDOS ARE WELCOMED
    PBP (CLAD)
    Labview 6.1 - 2014
    KUDOS ARE WELCOMED.
    If your problem get solved then mark as solution.

  • Hazards with global variables

    Hi all,
    I have a theoretical question. Is it possible to have hazardous situation when using global variables in stacked frame sequence?
    Situation above is just an example. The data in global could be much more complex. Is it possible that in some case writing to global variable can last long enough to end later than reading it in the next sequence? I'm 99% percent convinced that it would never happen. Is execution of next frame waits until writing to global is finished or is it only starts the task "write to global" and then goes to next frame?
    Best Regards,
    Pitol
    Certified LabVIEW Developer, Certified TestStand Developer

    If a wire will do the trick, use it... 
    Anything that breaks dataflow (Local, Global, even a FGV/AE, StackedSequence Structure) can introduce uncertainties into the code... Uncertainties are when you run the code and get different results, usually because of race conditions.  Other uncertainties would be inccorect behavior because the data did not reach its intended destination (example:  error cluster going into a structure, but not refreshing the next iteration / page, etc..).It's not limited to the error cluster, but any variable.
    The most common situation is the race condition.
    The proper architecture will ensure that the code is robust, repeatable, maintainable and scalable.

Maybe you are looking for

  • "Interest on Arrears calculation" vs "Item Interest Calculation"

    Hi all, Could anyone explain me the difference between "Interest on Arrears calculation" and "Item Interest Calculation" and in what cases they are used. Thanks, DSK.

  • [Solved] Add a single Spanish letter to my non-Spanish keyboard layout

    Hi, I correspond with Spanish speaking people a lot. They have some special letters like accented vocals (á, í, ó and the likes). I can enter those with my deadkeys accent followed by a vocal, even though my natural keyboard layout is German. The onl

  • Has Adobe abandoned AIR Desktop?

    Seems like nothing is added to AIR Desktop anymore. What's the future hold for AIR Desktop? Are we likely to start seeing less mobile work and more desktop additions? If so, when? This year?

  • Lost the Mini, bot the Nano, but cannot convert!

    Bot the new Nano for my 10 year old. The salespunk told me just to plug the nano in and get updates. That didn't work so I tried to delete all iTunes and iPod Mini programs, but it tells me command to delete the latest download is not allowed. I'm st

  • Itune 6.0 Nightmare. PLEAASSSEEEEE Help :'(

    I am about to cry, this is by far the most frustrating i have ever experienced, technology wise, in my life! Here's whats happening. I just received my brand new Ipod 30GB yesterday. I had a mini before and thus had Itunes 4.7. I installed the CD and