Scripting - reference control Replace inside the flat sequence

Hello

Just in the process of upgrading our software from 8.6 to 2011. A question that we have is references appear to be different to the old code. Example - if we create a new control reference, put it next to the old one, put a probe on the two, references do not match when we run the vi.

This causes havoc with our very large amounts of code. We contacted OR that our support subscription and they required an example which we can really give.

In any case...

I thought that I would write a vi script to replace all old references of our code with new references.

Problem is that I can't replace a control easily reference which is inside any kind of structure.

I need a way to get a reference to a parent structure, I can then add to the structure.

This will take place on large amounts of complex code, so there need to be versatile. Please see the attached Vi

Thank you

Joe

I would like to make the following changes:

  • You'll want to use the 'Move' method, which allows you to specify an owner.  In this case, the owner is the schema that belongs to the original control reference.

  • You want to get the original order wire and get all its wells (i.e. not null index into the array of terminals), so that you know what to wire the new benchmark in control of.  That is why the Connect wire method is in a loop For... the original control reference may have wired to several objects.

Let me know if you have any other questions.  As far as I know, all properties/methods that I am using the code above are available in LabVIEW 8.6.

Tags: NI Software

Similar Questions

  • Scripts (connect a Terminal to a flat sequence Structure)

    (script)

    Is it possible to connect a terminal to a flat Structure of the sequence?  (in my case, with a single frame)

    (with the "Connect Wire" method)

    Ouadji wrote:

    but the main question is... Why the flat sequence structure does not inherit from node?
    Why the developers chose this?
    What is the main idea of this choice?

    Flat sequence Structure introduced in LabVIEW 7.0, provides a semantic schema object that no other object has. It is a structure of multi-frame (like a case structure or a stacked sequence), but it is the only structure where data can be wired between frames through normal tunnels. It is the only structure which may have tunnels in places other than its external borders. It is the only structure that can have subdiagrams of different sizes in different positions. It also introduces scenarios of strange wiring that you won't find elsewhere:

    At the same time that the flat Structure of the sequence was introduced, there was enough of these bizarre scenarios with scripts (which was an internal feature NOR at the time), it was easier on the developer to make his own script class to try to find a way to support it under an existing class. We had no idea that script would become a public service someday, so the burden was relatively low and limited within the walls of NOR. Looking back, there have been enough problems with the FlatSequence class in the script than most of us agree that it would be better to have it in class Node (or more precisely, the class MultiFrameStructure) from the beginning.

  • The speed of the flat sequence?

    Hello

    What I want to do: read a map OR 6 analog voltages and provide a few analog/digital outputs from another card of NEITHER.

    Here's what I do: I use the DAQ assistant to acquire 6 different analogue voltages on a simulated map of NI 9205. I tried to run at the same time all 6 data acquisition assistant acquires (which did not), but I read that since there is only a single clock on the map, so I can not use multiple acquires at the same time because of timing issues (right?). Then, I put my DAQ assistants in their own images in a flat sequence then they would be operated sequentially. This works fine, but each frame/acquire takes 1 second to complete. Which means that my program lasts 6 seconds to do everything acquires it, before my other code outside the plate sequence. Outside platform sequence are my trips (some digital and analog a bit on a slider). Because my flat sequence lasts 6 seconds to compete, my outputs are updated only once every the 6 seconds, where as before the flat sequence has been inserted that they have been updated little almost instantly.

    Here are the questions: can I do the flat sequence run faster? Or is there a way to simultaneously acquire several analog voltage using the DAQ assistant. I feel that I shouldn't need to the apartment of sequences, but do not know a better way to go about it.

    I hope that makes sense and I'm pretty new to labview so feel free to add many details.

    Thank you!

    PS: If you try my Vi, notice how slowly the 3 top entries in the page update, if I remove the huge flat sequence, they run very quickly and smoothly, which is what I would like.

    e g m e n i wrote:

    Here's what I do: I use the DAQ assistant to acquire 6 different analogue voltages on a simulated map of NI 9205. I tried to run at the same time all 6 data acquisition assistant acquires (which did not), but I read that since there is only a single clock on the map, so I can not use multiple acquires at the same time because of timing issues (right?).

    Instead of trying to run 6 assistants for the acquisition of data in parallel (or sequential), use one assistant DAQ who reads all channels simultaneously.

  • Replace the flat sequence Structure?

    I read a bit in the forum and a lot of people discouraged to use the structures of the sequence. Here's the situation: I have a tick count at the beginning for the iteration (and another at the end). I want to force them to count before (and after) anything else. The code I'm working on leash all data through structures flat sequences that contain only tick counts. Is there a different way that you can do without the structures of the sequence?

    Thans

    The recommendation not to use structures of sequence applies to most of the cases where people use.  State machines are the preferred (and best) method.  However, this does not mean that there is never a good use for a sequence structure.  In your case, when you both want something, it is perfectly acceptable.  An example is shown in the first snippet below.

    There is an alternative however.  You can use a timed loop to time your code.  Someone posted here once an example.  I forgot who he was and who puts in.  It went something like the snippet of the second.

    I would like to know why there is a difference in speed between these two methods:

  • How to place a video inside the title sequence?

    I use CS6.

    I am fairly new home, but I'm trying to place a video inside the main title sequence so that when the sequence is played as a whole, there is a miniature video playing in the top corner following titles still in view.

    I hope that I am clear about that and I apologize if I'm not.

    Any help is appreciated.

    Its called picture in picture (PIP)

    http://www.InfiniteSkills.com/demos/movie-player.php?h=685&w=890&movie=http://iSkills-Medi a.s3.amazonaws.com/premierecs5-demo/0707.mp4

  • How to replace inside the faulty RAM on Satellite M40X 141?

    Hello world
    I strongly suspect a main RAM failure. It is possible to replace it by removing a slot or is it is soldered to the motherboard?
    In this case is the only way to fix Board replacement?
    Like the RAM to be located under the keyboard, which is the best way to proceed for replacement?

    Thank you much for the help.

    apipop

    Hey Popy

    The laptop has 2 slots, but only one is scalable user.
    I think the a slot is located under the keyboard and the expandable slot, you will find at the bottom of the unit.

    I think you n t a lot of experience with these replacements. Am I wrong?
    I think that these replacement or controls are not very easy for someone who doesn't have enough experience.
    So I think you should ask a technician or help!

  • Feature search - replace in the custom sequence editor

    Hello

    I use the custom on my production machine sequence editor.

    Sorry, it does not any possibility of search in an open movie file.

    Can I add this possibility to the API ActiveX TS cusstom Editor?

    Or is there another way?

    I have only the license on my production machine custom editor.

    Thanks in advance

    Hi Anpis,

    What type of search you would like to achieve in your movie file?

    Have you seen the method of Research in API TestStand help?  You will also find useful information in the API Reference.

    Let me know if this can help,

    Best regards,

  • Need a script for a replacement of the bound value

    Here's the scenario, I'm creating a cover letter for citations which has two instances of the name of the customer. The first instance is the address at the top of the letter and the second is in the last line of a paragraph. My problem is I want to link the fields, but adding a period to the next, but in cases where the company name ends in a period (EX: 'Monsters, Inc.') I don't need period. My thought is to retain a format script that adds the period, but add an if(ends.with".") Statement of the above situation. I'm kinda new to js so I could really use help sort this out.

    The field name is "company name".

    Name the second field 'Company name2' and use this computer code custom for her:

    var CNAME = this.getField("Company_Name").value;

    If (cname =="") {}

    Event.Value = "";

    } else {}

    If (/ \.$/.test(cname)) event.value = cname;

    else event.value = cname + '. ';

    }

  • on the flat sequence and time elapse

    My goal is to make the second picture of work after 1 second. I used two different methods in the attachment first and second. The first was performed well while the other fails. I don't see why the difference exists. Everything that I have done is to justify the delay time is greater than 1.

    He turns to 1. However, I strongly recommend that you stay away from the dyanamic data. As you can see, it is converted to a digital and Boolean. The result of a superior function, must be a Boolean, and that would be something that you could not connect directly to a digital. You can connect dynamic data what either, and the result of that, I think can be a little unpredictable.

  • Control located inside the ScrollPane MovieClip

    Anyone know if it is possible to access and edit a MovieClip was placed in a ScrollPane? I want to be able to manipulate a MovieClip at run time with ActionScript, but allow the Viewer to scroll the MovieClip...

    I need to find a different approach that does not use the ScrollPane?

    Is part of the content of the scrollpane movieclip?

    I use the following line of code to assign one of the MCs, which can be found in the
    ScrollPane as part of the content.

    _root.csp_scrollingBullets.spContentHolder ["bullet_1"] .gotoAndPlay (1)

    HTH,

    If you have any questions, my email is [email protected]

    -Marc Lee
    "stratosnatcher" wrote in message
    News:edpqqh$1UP$1@forums. Macromedia.com...
    > Does anyone know if it is possible to access and edit a MovieClip that is
    summer
    > placed in a ScrollPane? I want to be able to manipulate a MovieClip to
    time of execution
    > with ActionScript, but allow the Viewer to scroll the MovieClip...
    >
    > I need to find a different approach that does not use the ScrollPane
    > component?
    >

  • parallel and sequential in the same sequence

    Hello

    To expedite the duration of the test, I would like to make some of my steps in parallel with others.

    However, some of the previous steps and the following must be executed sequentially.

    How to combine these 2 behaviors run inside the same sequence?

    Put the digital multimeter read in a sous-suite. Then call three times, with the option to purchase New Thread subsequence. You can use the three steps in sequence call, or to execute a loop on a single call.

    After the call, use a step of waiting with the wait for the option of Thread for each call. You can use the three steps of waiting to match your three calls, or if your calls were in a loop, you can use an expectation not in a loop.

  • Store values in the flat order

    Hi all,

    I have the problem as I would like to ask for help from the community.

    I currently use the flat sequence to run two blocks of different functions for my VI. Therefore, there are two frames in the sequence of plate.

    For the first image, I'd like to store the previously calculated value so that when I come back to the first frame again, I can use this value to calculate the next value. It's like the iteration. I am currently using registry to offset this.

    The problem I have enconter is that when my VI goes to the second image, the values in the first image that is stored in shift registers have disappeared.

    I didn't really need to use the shift registers. I want to just store the previous value so that I can use it again in the next round.

    This is the VI to better illustrate my problem.

    Thank you very much.

    Keith Tan

    Hi Keith,

    the values in the shiftregister are only in the one frame. If you need also in two, then you must connect the wire of the output of shiftregister for the second image. If you need values of frame two Connectionwithsuchprocedures one, then put a loop around the sequence and also a shiftregister.

    Mike

  • Sequence structure flat inside the timed loop and execution order

    I have some problems trying to implement a flat sequence structure when you use a loop timed on a target of cRio VI

    I tried with or without the while loop around the structure of sequence flat, and I also tried to replace the 'Non-deterministic loop' with a timed loop

    The problem is that the program seems to run only once, then get stuck somewhere

    I am writing a program that performs the following operations as soon as possible:
    1. read the Pos_MC of entry on the FPGA
    2 send the value of Pos_MC to the VI target (on cRio CPU)
    3. calculate a value of output based on Pos_MC with a PID block ("exit PID')
    4. send 'PID output' to the FPGA
    5 write "PID output" analog output "MOOG".

    In addition, I want the program to return the measured value "Pos_MC" to a host VI for the recording of data

    So that the output of PID is calculated and sent to the FPGA as quickly as possible, I placed a flat sequence structure to ensure that it happens before you send the output to the nondeterministic loop for recording data

    Also, I want the digital input 'Stop' to be able to stop the loop deterministic (the timed loop)

    I read much more entries than that and the help of several PID and exit, but I rewrote the code for a single entry and exit to make it easier to illustrate

    Screenshot of the code is shown in 'target code.png' and 'fpga code.png.

    The VI themselves are attached in the next post (cannot attach files of more than 3)

    Question 1:
    Any advice on how to get this race? Thank you!

    Question 2:
    Is also my correct understanding in that, using this structure, each 0.9ms (fpga loop time) comes the following:
    1. the input ("Pos_MOOG") is read on the fpga
    2. the production of PID is calculated on the cRio with some delay to computation (for example 0.1ms)
    3. the output of PID is then written for analog output "MOOG" in all about 0, 1 - 0.2ms
    4. the FPGA program then waits until 0.9ms spent and repeat the process

    As opposed to the next pass whenever performing a loop is started on the FPGA:

    1. the FPGA reads the input and written on the output (the output of the execution of the previous loop PID)

    2. then the entry is sent the cRio, PID output is calculated and sent to the FPGA

    3. the new release of PID is maintained until the next time through the loop

    Thank you!

    PHG wrote:

    Thanks for the input guys, any advice as to how I could get the feature in scenario 1?

    I still say that the best route is just putting all the logic of the control in the FPGA.

    Other alternatives include 1) the use of DMA FIFO sedn data back or 2) use interruptions so that the FPGA code can not read the output level until the RT.

    DMA FIFOs are usually very limited, and I would not use them in this situation since I belive said it this code to do for the many outputs.

  • Node property of a control inside the cluster within a table

    I created a control that has a cluster to a Boolean, a string, and a digital.  Then, in my front, I created a table of these custom controls.  I wish I had access to the property of the controls inside the cluster in the table.  That is to say, I want to change the color of the Boolean or blinking, or "disable and gray" text box.  I think I'm on the right track, or maybe I'm on the wrong track.  I joined and example VI (testtray.vi) and control that I use (UUT_Display.ctl).  Please excuse the use of a flat Structure of the sequence, I know it is bad programming practices, but I just wanted to throw something together.

    Any help would be appreciated.

    Kevin

    Items in a table can have different values, BUT each element of the table share the same properties.

    "Blink" is a property when you make one in tha table blink you will all Flash.

    This restriction does not apply to clusters.

    So in theory, you could develop an XControl that has a data type is an array, but the display is actually a cluster that resembles a table. But write an XControl is not a trivial task.

    Ben

  • How to stop a flat sequence (or timed sequence) which is inside a loop for

    The problem is this, I have a loop that repeats 10 times and inside this loop, I have a flat sequence (or timed sequence) with four images, each of this chassis to evaluate a different condition of a vector that I introduce.

    What I woud like for example is:

    I'm a fifth County of the loop for and in the case that part 2 does not meet the condition, the sequence of dish (or timed sequence) stops and starts the loop again but this time for the number of number 6.

    I would appreciate your response.

    You can't stop a sequence structure.  This is how they are made.

    What you should consider to get rid fo structures sequence and to change a state machine architecture.  There are many examples in LabVIEW, as well as on the Forums.  The big advantage of the state machine is that at the end of each State, it examines the conditions and determines which State then run. And that is exactly the description of the problem you are experiencing.

    Lynn

Maybe you are looking for

  • Measurement time?

    How can I measure time my Boolean indicator light lights up. Joined the VI Thank you

  • 9232. NOR shift & weight LSB

    Hi guys,. I use an analog-to-digital converter of NI 9232. could someone tell me what means LSB weight and Offset in this node? I can't find the explanation in all manual. I think that "Offset" could be the offset of the input data. The maybe of valu

  • How it delete and start from scratch?

    All I want to do is clear on my computer and restart from scratch. I have all my records, but he said not how to this in the instruction manuals... only includes restoration at some point and I don't want to restore. How it delete and start from scra

  • I am trying to locate the wirless configure Assistant on a vista. Can you help me?

    Is there a Wireless Configuration Wizard ISO vista? If yes where?

  • The selected disk is the GPT partition style

    Hello I tried to format my laptop but the above message appears and I can't do anything I formatted the partition, I want to install the system in a left the other partition that contains important data Then I tried the diskpart thing and now I'm, wo