Functional Global Variable in the CLAD sample Exam

Hello,
A question in the CLAD sample exam #2 keeps puzzling me. It's question number 32 about FGVs:
32. Which is not an important part of creating a Functional Global Variable?
a. Using Shift Registers to store information
b. Changing the VI’s execution settings to Reentrant
c. Setting the VI to inline into calling VIs
d. Setting the While Loop to stop after one iteration
The answer given is the following
32.Correct Answer: B
Topic: Functional Global Variables
Justification: It is not necessary to inline functional global variables into their calling VIs. In fact, inlining requires that the subVI be reentrant, which is forbidden for functional global variables.
Clearly, for an FGV to work properly, the VI must NOT be reentrant. So I would have selected answer B, but the justification seems to clearly point to answer C as well, doesn't it? Is it a typo, a subtlety in the wording? I am stuck on this one!
Solved!
Go to Solution.

Well, inlining requires reentrant.  Therefore, the best answer should technically be C.  This looks like one of those rejected/retired questions since it isn't quite right and/or left up to too much interpretation.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Clad sample exam 1 question

    Hi.
    I noticed this question in the clad sample exam 1
    Which of the following statements is FALSE?
    a. A SubVI connector pane defines where to wire inputs and outputs
    b. The color of a SubVI connector pane terminal matches the data type it is connected to
    c. You must have an icon/connector pane to use a SubVI
    d. A SubVI icon can be edited from the functions palette
     In the answers it says D.
    Wouldn't 'C' be the right answer ? I know that the icon is optional, but you must build the connector pane to use a sub vi.
    Nevertheless, I found an invoke node (VI Icon -> Set from file/image data) that can edit the vi icon, therefore you could pick a vi server reference and an invoke node, all from the functions palette.
    What do you guys think ?
    Thanks.

    Nope D is the correct answer.
    For C, you must have a connector pane in a subVI.  (Of course it is possible to have no terminals setup on it, or even no wires wired to it even if there are terminals set up.)  Any every subVI has an icon, it is not optional.  It might be the default icon from LabVIEW, or even a blank one, but it is always there.
    For D, no you can't edit it from the functions palette.  I had actually never come across that invoke node you mentioned.  I don't think it is one that 99.9% of LV programmers would ever use.  I'd argue that you aren't editing the icon with that from the palette.  Yes you did grab it from a palette.  But really it is just a way to programmatically set the icon, you're not actually doing any "editing" with it.

  • How does a global variable affect the runtime of optimisation-function fminsearch?

    Hi,
    my function "fmintest" needs 254s ~ 4min to finish calculation in Mathscript, while Matlab needs
    3s!!! I need the sorfware for data processing in a real time measuring system, where the calculation have to be done within 5 seconds.
    In the Mathscript-help I found the following (global -> details):
    If you call this function from a MathScript Node, LabVIEW operates with slower
    run-time performance for the MathScript Node. To optimize the performance of the
    MathScript Node, remove this function from scripts.
    How can I remove needed global variables in the fminsearch function handle? Is the system faster if I would/can remove the global variables?
    How can I avoid Mathscript-breakdown after saving changes to m-files and restarting them again?
    regards
    Attachments:
    ni3.7z ‏2 KB

    Hi,
    can you provid a VI and not only your m-files? It will be easier to help you!
    Can the customer provide a VI that demonstrates this behavior, rather than just providing the m files?
    Also, the Help file says fminsearch is not supported by the
    LabVIEW Run Time engine, so please take that in mind. If you want to build an application you cant use this function.
    Regards, RMathews

  • Function global variable(FGV) template

    Hi All 
    if NI adds the Fuctional Global Variable (FGV) tempalte in design pateren tempates in hte New window, it is easy to create FGV VI's.
    and Helps the programmers, no need to create from the begining of VI.
    Even it is usefull for CLD Exam also.

    Something like this? Note that I would use the term "Action Engine" instead of "Functional Global Variable" specifically to discourage the use of this template as a global variable and instead emphasize its role as an action performer on centralized data (as noted in the comments).

  • RT executable causes functional global variable VIs to become non-reentrant

    Hi,
    I am having a small issue with functional global variables (Repositories). The attached VI is a sample functional global variable I created that stores double precision numeric values. The VI properties are set to normal execution. I use this VI to pass data between loops running in real time on a PXI platform. When running my application from the project explorer (not creating executable) the VI functions as it should and passes data between my loops with no issues. But when I create a real time executable of my application and run it on the PXI, it does not share data between instances of the VI. My work around this issue is to change the VI properties execution priority to Subroutine but it forces me to modify my VI slightly for this to work (I have to remove the property node). I am not sure why this is happing. I have seen some applications with this VI that appear to function normally in development and in executable with the VI properties execution priority set to Normal. Any comments or suggestions are welcomed.
    I am running LabVIEW 2009, PXI-8186, and Windows XP
    Thanks
    Attachments:
    RT Repository DBL Numeric Command Ver 2.ctl ‏5 KB
    RT Repository DBL Numeric Element Ver 2.ctl ‏5 KB
    RT Repository DBL Numeric Ver 2.vi ‏25 KB

    Many properties require the front panel to be loaded in memory; the property you're using, NumItems, appears to be one of them (look at the help, you'll see that it says "Loads the front panel into memory.")  However, VIs running in an executable on RT do not have front panels, so those property nodes will not work.  If you were to log the error out terminal from the property node in your executable, you should see that an error occurs.  As a result, you're getting a 0 value out of the property node, causing your VI to output unexpected results.
    My recommendation is that you replace the property node with the function GetNumericInfo found in vi.lib\utility\VariantDataType.  It has an output called EnumNames.  Take the size of the EnumNames array and use that in place of the output from the property node.  This will work on RT.
    Note that this has nothing to do with re-entrancy, and the key hint is that the VI works when you remove the property node.

  • Using functional global variables to transfer data between touch screen device and other targets

    Hi,
    We are currently developing a control system that will operate on a cRIO with a touch screen interface. During development we have been using functional global variables (FGVs) to handle most of the settings/data etc, however we have just realised that we may have an issue updating the data on the touch screen, and vice versa.
    Previously we have implemented similar programs using shared variables, however we were wondering if there is anyway to implement FGVs in a similar manner, whether it'd be a combination of FGVs and shared variables.
    Regards,
    Mike
    Software version: Labview 8.2.1

    See this thread on LAVA about sharing FGV's across projects. THis should be extendable to cross paltforms (I believe).
    You also may want to concider an upgrade to LV 8.5.1. We have found a number of performance related issues with LV 8.2.1 and RT.
    If you decide not to upgrade, just remeber what I wrote (above) when you have reason to question the performance.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Functional Global Variable on Hold

    Hello everyone,
    I understood, by reading threads on the forum, that a call to a Functional Global Variable will block its execution if the FGV is already being accessed by another VI, correct? Is there any other way it would block, apart from the stated?
    The motive of the question is that I have one FGV (non-reentrant) that is read by 8 subVIs concurrently (they are, actualy, the same vi, but configured to reentrant) and whose access time varies, strangely, based on the number of subvis running.
    When less than 5 VIs are trying to access the FGV, the execution is blocked (I assumed it, because when the FGV is disabled and replaced by a constant there is no problem with the execution) and the access lasts at least 50 ms; if this number is between 5 and 8, the execution is done much faster. My first guess was that the FGV hasn't been initialized until the fifth subVi is called, but I don't know how to check that.
    I can figure that there is something wrong with the FGV, but can't put my finger on it. Any ideas?
    Thank you in advance for any help.
    Solved!
    Go to Solution.

    Thank you for your response, Ben
    I'll try to explaing the problem better with the images that follow.
    I have 8 concurrent instances of the "bitDefiner.vi" - shown below - in the program.
    It reads from the AE (a simple read-write one) and it's the only one to call it besides the writer (that generates the appropriate signal), gets the rising edge of a waveform and determines how long it takes until the falling edge, giving a category to this time later on. If it doesn't determine the period between rising and falling edge before the timeout runs out, it aborts the execution of the while loop. This VI execution is setup like this:
    That being said, let's go to the problem.
    Assuming there is nothing using the AE but one instance of the bitDefiner, it won't get the rising edge, due to the fact the signal is not being generated, resulting in a timeout. The return value on the diff indicator should be next to the one defined to timeout(image below)
    However, when the subvi concludes its execution, the diff indicator shows 54ms intead of 15ms; so I concluded that the AE is taking to long to process the call. Besides that, I'm quite positive that there is only one thread accessing the AE.
    After this result, I ran the other instances of the bitDefiner and after the 5th one got activated, the diff went to the expected 15 ms (I'm still thinking how to show that on picture).
    I tried highlighting the execution, but it didn't show me anything unsual. The call chain just present that the caller is the bitdefiner VI as expected.
    Any thoughts on that?

  • Functional global variable question

    Hello,
    I fully understand how a functional global variable (FGV) works and its purpose but I have one last question.
    How do I guarantee (or how is it guaranteed) that my sub-VI (the FGV one) is not re-entrant, in other words, how am I sure that when an instance of the FGV is running it does not loose the processor to others?  Is this an option that I can choose in a sub-VI or is it related to the while loop or case strucure that compose a FGV?
    Joao

    Hi Joao,
    For a little more background on configuring reentrancy and the options you have available if you do want to make a subVI reentrant:
    LabVIEW Help: Reentrancy: Allowing Simultaneous Calls to the Same SubVI
    http://zone.ni.com/reference/en-XX/help/371361K-01/lvconcepts/reentrancy/
    As Lynn said, all new SubVIs will be non-reentrant by default.
    Regards,
    Tom L.

  • CLAD Sample Exam 1, question 2:

    CLAD Sample Exam 1, question 2: can a wire be used to pass date between 2 llps that are intended to be runn in parallel?  CLAD Sample exam1  provides the following url as an answer:  http://zone.ni.com/devzone/cda/tut/p/id/9393 . This doesn’t explain the answer. Please provide a correct explanation.
    Solved!
    Go to Solution.

    B Spears wrote:
    NIquist wrote:
    Is that the actual wording?  Why can't they make these questions less
    ambiguous?   Just because you intend for the loops to run in parallel doesn't mean they actually do it.  BUT, the data will still be passed between the loops eventually, so technically, YES, a wire can be used.  Why didn't the question just say: "two loops that ARE running in parallel"?
    The wording actually seems to be pretty decent. Two loops cannot be running in parallel if there is a wire running between them. The situation you describe--where one loop stops, data is passed, then the other loop begins--does NOT describe two loops running in parallel, rather two loops running sequentially.
    When the question says "intends", it asks you to play the part of the designer of the code: if you want to have data passed between two loops, how would you design that? The answer is certainly not a wire.
    True, but the fact that we're even discussing the semantics proves that it's confusing.  I'm sure NI has a tough time coming up with multiple CLAD versions covering essentially the same questions but those questions should be testing for knowledge of LabVIEW, not English Language.  A test taker should be able to focus on the what a question is asking and not how it's being asked.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Functional global variable

    I would like to ask to the experts a question about functional global variables. 
    In the labview basics 2 course was said that a functional global variable is not reentrant. 
    My purpose is to implement a code in such a way.2 main vi's. The first vi deals with some hardware that writes data in an output file with 1 Hz rate (more or less 1Hz, I cannot decide it).
    The second vi deals with a different hardware (thermocouples). This works at a different rate (I cannot match exactly the different rates). I would like to write the data from the second hardware in the same output file of the first vi. 
    I am thinking to use a functional global variable to pass the information from the second vi to the first vi. In this way I am using the data from the thermocouples at a rate given by the first vi. But at the same time in the global variable the data are written at a rate given by the second vi.
    My question is: what exactly happens if the subvi (functional global variable) is called exactly at the same time? As you can understand it's not really important if I read the temperature with an error of 1 second, but I would not like the execution would stop or something like that. 
    A functional global variable is a subVI that is not reentrant. This means that when
    the subVI is called from multiple locations, the same copy of the subVI is used.
    Therefore, only one call to the subVI can occur at a time.functional global variable is a subVI that is not reentrant. This means that whenthe subVI is called from multiple locations, the same copy of the subVI is used.Therefore, only one call to the subVI can occur at a time.

    A couple of quick comments to add to this thread.
    FG's can be involved in Race Conditions if two callers attempt to direct set the same value. An Action Engine (well what do you expect?) can be coded to help with those situations.
    Example:
    In arecent app I needed to set the heaters to "0" if an over-pressure condition was detected. The Heater set points where driven by a PID. The safety conditions where controlled by a process monitoring the input values.
    So how do I keep the PID from setting the heater when the rig is not safe?
    A Safety AE !
    Actions used by the pressure monitoring set the Safety AE in an "go-safe" state where setting the heaters results in a null op.
    This particular pattern (two writters) screams for an AE to coordinate the vaious actions. Do this same thing with queues could get tricky.
    So for the Q in this thread we have a pattern of "two source of info, one sink for each" that screams for a queue.
    BTW:
    The AE Nugget linked above addresses what happens when two callers attempt to call the same non-re-entrant sub-VI.
    Have fun,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • CLAD sample exams

    Hi, i've got the 2 sample exams, but does anyone have any more exams? Or even some learning material?
    Thanks Stuart

    These are the two official sample exams.  Not sure if these are the ones you have or not.
    https://lumen.ni.com/nicif/us/ekitcladexmprp/content.xhtml
    When I took the CLAD I read through this entire blog.  I found it to be very useful and I definitely got a few more correct because of it.  As well as learned a few useful things for my daily work.
    https://decibel.ni.com/content/blogs/DailyCLAD
    Lukin
    Certified LabVIEW Developer

  • CLAD Sample exam

    Hi,
    I'm new to this forum and this is my first post.
    I am a beginner to LabVIEW. Currently preparing for CLAD.
    I'm looking for some sample exams, which i thought would be very helpful before taking up CLAD.
    I came to know from my collegues that there was an online CLAD Sample exam available, which I've been trying to find it but had no luck
    It would be very helpful if someone could please tell me if it has been removed, or provide a link if it still does exist.
    Thanks
    Suchin
    Solved!
    Go to Solution.

    Hi there guys,
    Now I may be missing something, but to the best of my knowledge the CLAD sample papers are still up and running. In fact I was dicussing them in a meeting recently.
    So I ran a search for CLAD exam sample papers, and it was the very first search result.
    http://zone.ni.com/devzone/cda/epd/p/id/5225
    Let me know if I've mis-understood the question. Thanks.
    EDIT:
    Sorry, I to have missed the point here... by 'online' you mean 'interactive'? I hope the link is helpful though. I will get straight back to you if I hear of an interactive test around.
    Rhys
    Applications Engineer
    National Instruments

  • CLAD sample exam 1

    Hi,
    yesterday I had a discussion with some friends and I want to get some independent opinions now :-)
    It concerns this CLAD sample exam question:
    Now lets see, what does the iteration terminal do? From my point of view: it returns a new value at the beginning of each loop iteration and this value tells me how often the loop has already executed (0 during the 1st iteration, 1 during the 2nd and so on). In this case answer a would be correct, right?
    According to the results contained in the sample exam, the correct answer is c.
    But this is only true (hard to write "true", because I think it's kind of odd to put it that way) if you wait until the loop terminates and than check what value was returned last.
    I'm curious about any comments or opinions.
    Regards,
    Thomas

    I would check c too (maybe if even have it, can't remember) , more because I expect it as the expected right answer
    In examines you should always say what your examiner wants to hear, right? Well, most of the time easy to proof in an engineering world
    And that's why the best preperation to a test is a test test, to learn how you have to understand the questions and what are the expected answers, otherwise it would be too simple
    If you are picky answer a  might also be correct because the sentence is written in the past * and the terminal will spite out it's value right at the beginning of the loop when the loop has not (completely) executed.   That's why it is positioned inside on the left side.
    *) I'm not a native English speaker, and grammar in any language hasn't been my favor anyway, so I might be false.
    Message Edited by Henrik Volkers on 03-26-2010 11:48 AM
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Storing DAQmx Task in a Functional Global variable

    Happy New Year to everyone!
    I got a nice little question hoping some of you might be able to help me....
    After initializing an starting a DAQmx task (V7.5), I wanted to store the task out reference in a functional global variable, but it seems, it didn't work.
    Everytime I tried to call a DAQmx VI with the opened reference, I get an error, the task would not be existing....
    I already made a workaround, so everything works fine. I'm just curious what I made wrong....
    Thanks in advance!
    Cheers
    Oli
    Programming languages don't create bad code, programmers create bad code....

    Helo Oli,
    Normally, you should not have a problem storing a task reference in a variable. However, the vi that created the task has to stay in memory for it to work. Closing the vi will result in the destruction of all created hadles -
    that is why your reference might be regarded invalid if you use it in
    another vi.
    That is why I can just assume that you are closing the VI that created the task before you are using the handle somewhere else. You can use variables to store the task ID, but as a workaround you have to keep the vi which reated the reference running.
    Hope this explains the behaviour.
    Regards
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany

  • Global variable in the LSMW

    Hi
    I declared variable in the __GLOBAL_DATA__ declaration part of Maintain Field Mapping and Conversion Rules step.
    But LSMW system understands it as fixed value.
    How to declare real variable and use it globally?

    Global Data means global within the LSMW-Object
    data: gv_date type sydatum.
    you can use GV_DATE in all forms of that one LSMW-object

Maybe you are looking for

  • Strange problem while login to SCN in Internet explorer

    Dear All, I am facing a strange problem, where i am unable to login into SCN through Internet explorer, as when i click logon button a blank screen is coming and the login screen is not opening.Its happening  both in my office and house. This questio

  • Web dynpro abap application on Portal does not work via internet access.

    Dear All, I have created a web dynpro abap application and deployed the same on Portal. The issue I am facing is that the webdynpro application works fine when the end user logs into Portal from Local Network, However when the Portal is accessed from

  • Converting JPEG to BufferedImage using previously allocated BufferedImage

    I have an application containing 11 Thumbnails fed by streams of JPEG images at 5 fps and a large panel that shows the image full size. Each thumbnail and the large panel are separate applets in a web page. The jpeg images are received directly into

  • Keep my phone #

    Can I keep my phone # when using the FreeTalk home phone adaptor? I am currently with Verizon, area code (410).

  • So Confused S: Please Help.

    Okay, I'm not sure if this is the right section, and I'm not sure how to explain what's going on, but I'll try my hardest haha. Okay, firstly! a while ago my computer got formatted and I lost all my music so my friend gave me her iPod and I transferr