Access can be set to a local variable

Hello

In a sequence, I want to access a local variable of the 'container' type, but the container element must be defined programmatically from another variable (an element in a table). Basically, it would look like this:

For each Locals.TestList / / TestList is a table of 9 channels, current item is stored in Locals.CurrentTest.

Locals.TempVariable = Locals.ResultList. / / Locals.ResultList is a container of

End                                                                                                        // strings. Each string variable name is the same as the elements in TestList

Is this possible?  What is the syntax for the "", so that TestStand include variable structure?

Thank you

Benoit

Hello

Locals.TempVariable = evaluate ("Locals.ResultList" + Locals.TestList [Locals.CurrentTest])

Who could do if I understand your needs. The evaluation parameter must be a string, so if you pass the search string for your container, Evaluate will return the content of this place that is Locals.ResultList.

Concerning

Ray Farmer

Tags: NI Software

Similar Questions

  • How to set multiple values clustered with local variable?

    Hi all

    Okay, I made my way through Labview for everyone and have some basic concepts down. I can see with a cluster, if acting directly on it, you can ungroup, change values, rebundle, etc..

    I try something a little more complex... and just do not know how to start on this.

    I have a menu menu ring set. I created this with a typedef, with 4 values.  I used this typedef 7 times, more a few LED bool, in a cluster. I made this cluster a typedef.

    Therefore, in my main vi, I started designing, I put an example posted here... and inside, I have two instantiations of the typedef cluster commands selection of left and right.

    I dropped in this vi, a copy of the menu ring typedef (same typedef as in clusters, values) called reset all tubes.

    Now, I am trying to understand how, with an event to change the value to 'reset all the tubes'... that I can start with the left switch and change all tubes (here is the menu ring selector) to the same value as what has been selected with the ring of menu 'Reset all the tubes'.

    I created a local variable for the selector on the left. It is configured to read values. (I'll be doing the same thing with the right too, but just to start with the left).

    In the examples I've seen where access to a cluster, you could ungroup the cluster... browse and change the values... maybe pull out all the "hits" in a table and go through to update the values.  And when you group or ungroup the bunch... you can see the values, etc., when you stretch on the block diagram.

    With the local variable... I do not see to 'stretch' it as I expected... so I can access the values "tubes"... and all at the value of the 'reset all the tubes' ring menu value.

    Someone can put me on the path on the best way to do... or is it a component structure I'm missing here?  Am that I on the right track everything first here?

    It seems pretty basic to me, but miss me just something here on the way to start...

    Thank you in advance,

    Cayenne

    You can't do this with a for loop of how the Department is structured, but why make it so complicated?  Just group the new value in the cluster, as shown below:

    If you do not want to use a loop for example, consider the restructuring of your cluster.  Group ring and a Boolean value in a cluster, and then unmold 7 of those in the cluster of selector.  Then you can use 'cluster to the table' and 'picture of cluster' for all elements of the external cluster will be of the same type.

    Also, be careful when using rings in the form of type definitions.  You probably want to use an enumeration instead.  The elements of a ring do not update the when you update the type definition because they are considered to be cosmetics. the elements of a definition of enumeration type update, because the elements of an enumeration are considered as part of the data type.

  • Access to local variables in the sequence

    Hi all

    I need to access local variables in my c# file sequence in order for udate it.

    How can I do it. Are there examples?

    Kind regards.


  • I want to fill and empty a tank automatically that can be achieved without the use of local variables?

    Labview gurus,

    I have a project to complete and I'm new to labview, I have the 2009 version of the student. and want to build an initial vi of a municipal plant to FILL AND EMPTY TANKS. I use the DSC module to help and I can get my tanks to complete a sequence, but it uses local variables. They cannot be shared on the network when I create my libraries.  Need urgent help...

    Casey74

    Here's a quick attempt at a state machine. See if it makes sense.

    (It can be simplified a bit more!)

  • Get and set local variables in c#

    Hello

    I am instantiating a .net (c# 2005) of Teststand assembly.

    I want to get all the local variables of Teststand in my c# application and also to be able to define Teststand inhabitants of c#.

    Does anyone have a solution for this?

    Thanks in advance.

    Hello

    Here is an example of the CVI that perhaps you can use as a guide.

    http://sine.NI.com/DevZone/CDA/EPD/p/ID/3086

    concerning

    Ray Farmer

  • How can I get the changed data in a def type control containing an Xcontrol with a local variable

    Hello

    I did an Xcontrol and I inserted this control in a def type.

    When I want to change the data of the control with a local variable in a VI the VI change nothing. The change of the data is not complete

    How can I fix this problem?

    Thanks for your help

    Hello

    What is your version of LabVIEW? You have a simple example program that demonstrates this behavior?

    I found an other discussions related to your problems with Xcontrols:

    update of type defs Xcontrol faade

    No data change event generated for an XControl in a Type definition

    XControl facede.vi

    I hope this helps.

    Kind regards

  • Can I set up a guest account which limits the access to my computer at home.

    I'm going to do a home Exchange next month and want to leave a computer for guests to use.  Can I set up a guest account which limits the access to my computer at home. Specifically, I want to limit the client's access to Internet Explorer so that they can check your e-mails and surf the web.  Is this possible?

    Do NOT enable the guest account. The guest account is NOT designed for occasional access, it is a special system account. It is a security risk because it allows anonymous access on your machine, apart from anything else. This is why it is disabled by default.

    Just create an account user Standard, called 'Visitor', or something like.

    Make sure that the Admin account has a password and tell them it.

    Also, make sure that all users on the computer ALSO have a strong password.

    That's all you need to do.

  • Can I set up a folder with many files and give only a limited number of people access? Just as in the old system.

    Can I set up a folder with many files and give only a limited number of people access? Just as in the old system.

    Hi oliviner,

    If you are referring to the workspaces, then yes it is possible but the service will be removed in January 2015

    If you are referring to files.acrobat.com, so if you can create folders and put the files into it, but you cannot assign access to specific people as you could in workspaces.

    Kind regards

    Rave

  • How can I create a function using variables TestStand and call from Meadow step Expression?

    In one sequence, I have dozens of prior Expressions, which are almost the same thing, like this...

    Locals.tagID = (Parameters.singlePhaseEnabled? ('L': "D") & Str (Locals.phase) & "006".

    .. and the only thing different is this three-digit string in the end ("006" may vary). How can I write a function that I can call from Meadow step Expression then it should look like this? ...

    Locals.tagID = MyNewFunction("006")

    You can not write custom expressions for commands.

    That being said, there are two options:

    • Create a sous-suite with a single step. Use a setting of the sequence as "function parameter.

    • Create a step type custom including a lower level module that implements the function. Add a step edit to allow the user to the steptype graciously change the setting.

    • Store the variable setting in a local global variable / file and change the value in each step. This will, at least, keep the same 'function' for each step.

    Norbert

  • How to create a nested local variable control custom?

    I inherited code which has a cluster of CTL control nested inside another group of control CTL.  If I drag the control nested outside the border of the other, I can right-click to create a local variable, I need to connect to the bundle name.  However, as soon as I drag the inside the limits of external control, it breaks the local variable.

    How can I create a local variable in a cluster THAT CTL nested in a second group CTL?

    Is there some kind of reference OuterCluster.InnerCluster, that I can use if I do a local variable of the external group?

    It turns that I need a local variable for the cluster internal.

    JPG attached shows that I created a local variable for the external cluster (ParametersCluster), used a Unbundle based on the name to access cluster internal (EmptyParmeters) and can access one of the elements through an another Unbundle by name.

  • Copy a structure of event containing local variables

    Hello

    I am a state machine design in Labview and next state transition logic to wait be clicked a few buttons on the Panel.

    If I press a Boolean button from 1 to 9, next State should be X, otherwise condition (10 to 16 tags) should be there.

    I thought that the right approach, because it would be a structure of the event, where I added two cases: case 1 (button 1: mouse to the bottom button 2 down,..., 9 of the mouse down) and box 2 (10 mouse buttons down,...). For each of these cases, I'm reading & writing the local variable of some double digital.

    When I copy the structure of the event in another case of structure of outer case, I note the following: all cases in the event loop is missing, and the local variable renamed automatically and a new created indicator digital.

    • How to make an exact copy of the structure of the event, without the problems described above?
    • Could you suggest a different approach more effective than mine?

    Thanks for any response.

    Start by reading the guard and recommendations for using events in LabVIEW - LabVIEW 2011 help

    The fact that you try to copy and structure of the event to another, and that a structure of the event will be buried in a case initially tells me you are already heading on the wrong track and yourself in creating a world of problems.  Your architecture will never seem to work for you.

    The event structures are always active and capture events.  Even when the structure of the event is not in the path of execution, it's queue of events to which he attributed to him.  If you have events that are set to lock the façade until full, then you're really screwed because the event structure will capture the event, locking of the front panel and the execution path of your code with the state machine may never come to the specific case that has captured the event to support then release the façade.

    In general, you should have the structure of a single event in a VI, and should not be buried in a case structure where he can never carry.  You also shouldn't have several event facilities manage the same events.   These are not hard and fast rules, but until you are quite familiar with how the event structures work and completely understand the architecture of your code, you should not violate or you will just ask trouble.

    Similarly with the help of local variables.  The fact that you say that you have local variables and you try to copy tells me that you already have too many.  There is certainly a better way to build your VI, which does not require local variables with the exception of a few cases and certainly won't need several structures event buried in the structures of the case.

    You should probably have a producer/consumer architecture that handles the events.  Have a simple loop with a structure of the event which captures all user interactions.  Pass events to a loop of consumer who is also your computer through a queue of State.  (Also known as a computer state in queue or the BAU).  Let the state machine to determine how to manage the events, he received based on what is the current state of the VI.

  • pure example to compare the performance of reading for a local variable, a declarant and a queue element (looking for)

    Dear users,

    I came across an example of the operation and the disadvantages of using a local variable, a declarant and a queue for the collection and handling of data these last time. But I can't find him.

    I try to describe what and I hope someone can give me a hint:

    A sinus values were generated periodically and were sent to an indicator, a declarant and a queue. In the other loops, the local variable (of the indicator), the authors of notifications and of the elements of the queue were plotted graphs. Time of the playback loop loops can be set separately for each of them and depends on the sync settings (time: equal to the generator, half of the generator and copy of the generator), we can observe omitted elements or duplicate. Very useful to observe the behavior of loops in a local variable, a declarant and a part of the reading queue.

    Does anyone have an idea where this VI is placed, please?

    Hello ghighuphu,

    Do you mean this example?

    With the help of local Variables, queues and notifiers to synchronize data with parallel loops.

    http://www.NI.com/example/28717/en/

    Best regards

    Maha

  • A list allows you to select a local variable to draw

    I have a few tables of point 2D locations stored in local variables.  For diagnostic purposes, I would like to be able to select a (all) of these current local variables and plot.  I can do this one at a time by indexing the table, and adding a 255 to the value of each pair of coordinates in table z, then all indexed to a curve of intensity.  Setting a period of time allows me to "look" at the position of the points in the table as they are drawn.  I know that none of you have had problems with the line, col x, y reversals and others, but I need something to help me visualize these interactions.  Browsing through the simultaneous plot of two of these tables would allow me to see what points focus on others I'm working on the berries.  Rather than having to 'program' whenever I wanted to get the location of the points of view, I would rather chosen them from a list of a few little vi I could run any time I wanted... How can you go about this?  Or is there a better way.

    Basically, how to complete scrutiny of the enumeration with the list of local variables?

    Thank you.

    You cannot change the labels for an enum during execution.  However, you can use a drop-down list (right next to the enum) who will do exactly what you want.  Just use the property "Tags" to set all the elements for the control.

    Bruce

  • LabVIEW 2010 local variable behavior

    HI -.

    I upgraded to LabVIEW 2010 of 2009SP1 and the attached sub that VI no longer works correctly.  It is a case of State machine structure that is called inside a loop.  I will put a Boolean variable true local, then on the next appeal when the case changes the variable has been reset to false. He has not done this in LV2009.

    Someone tell me immediately I have a race condition, but these local variables are not be written anywhere else, just in these separate cases.

    See the attached code, specifically, the local variable 'Activate' is to reset during the passage of the 'turn on' case for case "power."

    Anyone else seen elsewhere deliver, or can shed some light?

    I've corrected the VI by writing the value in each case, but this different behavior I wonder what are the other issues lurking in LV2010?

    Thank you

    This code looks more like a kind of a motor of Action that a state machine, but not quite.  It is called several times since a state machine, and he decides who will be the next State according to the entries.  Instead of using all local variables, I would use shift registers not initialized (Nothing cable on the left side).  They hold their value of one call to the other.  A case more will need to be added in this case.  An event of default without a name, which would set the initial values of all the shift registers.  Make the default case and does the same name.  It will be called first automatically because the shift register is not initialized, then the default value will be called.  Inside the default case, set all the shift fits to the desired values.  Next time the Subvi is called, these values will always be there.  As long as nothing is wired on the left side, everything is wired for the shift state register will be the next case called.

    See attached vi.  It's broken because I have this thread not to indicators.

  • Local Variable is NOT being updated?

    Hi all

    Please see the attached picture for the problem that I am facing. Basically, I want to open multiple files in a folder and file names allows you to derive the other names of files in a different folder and plot the data in all the files.

    Here's what I do:

    1. use the file dialog box to select files

    2. create a local variable to 'selected files' - see below

    3. derive from new files "new files" using the "selected files" and make a local variable of the "new files".

    4 plot data of "selected files".

    5. Drawing data from the files of 'new '.

    The reason for the local variables is that I will access files original and derived from many places in my VI and I want to avoid the eternal wiring or by opening the file several times dialog box (less clicking - my figure of index hurts )

    Problem: Data from "selected files" get traced. However, given "new files" are NOT given in the 'new' files to run it, but run a previous data. Apparently, the local variable "new files" does not get UPDATES

    with the "new files" of the current run. I have to run my VI twice. Why is this? How can I solve this problem?


Maybe you are looking for

  • In the absence of Pages sharing for mail

    I have 3 machines, 2 execution model and portable with Yosemite.  I used to be able to create things in all email and Pages... I would choose to share e-mail and she asked how to send [pdf, word, etc.], but now that lack – it is always possible on a

  • Often, my monitor gives me a message: "monitor going to sleep".

    When this message I could not leave the keyboard to wake up. I have to shut down the back of the computer, even cutting power to the adapter monitor or c does not correct. any ideas? Thank you for any effort on my behalf

  • How to install a memory expansion in a Satellite 2450?

    I have a toshiba 2450 and want to install an extra 512 MB of memory. I can't find where to put it. There is nothing on the bottom so I suspect that it is under the keyboard. I can't get off the keyboard.All the screws came out on the bottom. It peels

  • problem starting 1800

    Hello world Can someone help me? I have a satellite 1800-712 and after connecting my scanner and launch the software of scan that my screen froze, and the only thing was to shut down the computer. Now when I try to start I get the black screen with t

  • Cannot enter 'log-in' page after the upgrade of VISTA SP1 x 32 SP2 with failure code 0xc0190036 340/47122 (explorer.exe)

    I was "forced" to upgrade my computer to SP1 to SP2 when I tried to download the latest msn who. The upgrade part wasn't serious and VISTA asked me to restart my computer after the upgrade. Then I REBOOTED. The problem came when the final stages of t