creation of Subvi in for loop problem

Hi guys

I am trying to create sub - VI but part entering inside the Sub - VI contain the loop. As soon as I chose the part of my program for which I want to creat Subvi it a pop up comes. I'm posting pictures of the pop up and program. In the picture of this program, I want to create a Subvi for (for the loop with 10 iteration).

Please help me find the solution. Your help, I'll appriciate.

A lot of your local variables must be simply replaced with wires or shift registers.  That would eliminate some of your questions.  Otherwise, I would delete just your seeing terminals before creating the Subvi.

Tags: NI Software

Similar Questions

  • Cursors in PL/SQL for loop problem

    Hello. I have a problem with line 6 in this code. It should write the name of each table as well as the number of tuples on the inside. However, he does not 'row.table_name' as the actual table name.

    Declare the cursor tableNames IS select table_name from user_tables;
    numberOfTuples number (10);
    Start
    for tableNames line
    loop
    Select count (*) in the numberOfTuples of row.table_name;
    dbms_output.put_line(Row.table_name ||) « a » || numberOfTuples | "n tuples.");
    end loop;
    end;
    /

    ERROR on line 6:
    ORA-06550: line 6, column 46:
    PL/SQL: ORA-00942: table or view does not exist
    ORA-06550: line 6, column 1:
    PL/SQL: SQL statement ignored

    Published by: 938330 on 3.6.2012 09:08

    Yes. You must use "immediate execution" here.

    This SQL statement is a dynamic sql, that is, the full text is not known prior to execution.

    If you ask a fixed table as a student, employee, etc... You can query the table directly.

    Here, you generate the table dynamically via a cursor name. So here, Oracle is considering "row.table_name" in tabular form (as a student or employee) and saying table/view does not exist.

    Kind regards
    CSM. S/N

  • Creation of test data for a problem

    Hello

    I use this forum for a few months and it has been extremely helpful. The problem is that I really have no idea how to create some test data for a specific problem. I tried Googling, but to no avail. I had other users to create data test for some of my problems using a 'WITH' statement, but it would be great if someone could explain the logic behind it and how to address a specific problem where in the application, I use several tables.

    I know this is probably a stupid question and I'm relatively new to sql, but it would help a lot if I understand the process.

    Banner:
    Oracle Database 11 g Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production."
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    WITH construction is known as factoring request void.

    http://download.Oracle.com/docs/CD/E11882_01/server.112/e26088/statements_10002.htm#i2077142

    (Not easy to find unless you know what it's called)

    It allows you to start your request with a sub request which acts as a view definition that can then be used in your main query, just like any other view or a table.

    This example declares two views on the fly - master_data and detail_data, which are then used in the example query. Each query sub emulates the data in the table by selecting literal values in the dual table a line using union all to generate multiple lines.

    The two queries shows different results when an outer join is used in the second (+) {noformat} {noformat}

    SQL> -- test data
    SQL> with
      2      master_data as
      3      (
      4      -- this query emulates the master data of a master detail query
      5      select 1 id, 'Header 1' description from dual union all
      6      select 2 id, 'Header 2' description from dual union all
      7      select 3 id, 'Header 3' description from dual union all
      8      select 4 id, 'Header 4' description from dual
      9      ),
     10      detail_data as
     11      (
     12      -- this query emulates the detail data of a master detail query
     13      select 1 id, 1 detail_id, 'Detail 1.1' description from dual union all
     14      select 1 id, 2 detail_id, 'Detail 1.2' description from dual union all
     15      select 1 id, 3 detail_id, 'Detail 1.3' description from dual union all
     16      select 2 id, 1 detail_id, 'Detail 2.1' description from dual union all
     17      select 2 id, 2 detail_id, 'Detail 2.2' description from dual union all
     18      select 2 id, 3 detail_id, 'Detail 2.3' description from dual union all
     19      select 2 id, 4 detail_id, 'Detail 2.4' description from dual union all
     20      select 4 id, 2 detail_id, 'Detail 4.2' description from dual union all
     21      select 4 id, 3 detail_id, 'Detail 4.3' description from dual
     22      )
     23  -- main query
     24  -- to select from test data
     25  select
     26      m.description,
     27      d.description
     28  from
     29      master_data m,
     30      detail_data d
     31  where
     32      m.id = d.id
     33  order by
     34      m.id,
     35      d.detail_id;
    
    DESCRIPT DESCRIPTIO
    -------- ----------
    Header 1 Detail 1.1
    Header 1 Detail 1.2
    Header 1 Detail 1.3
    Header 2 Detail 2.1
    Header 2 Detail 2.2
    Header 2 Detail 2.3
    Header 2 Detail 2.4
    Header 4 Detail 4.2
    Header 4 Detail 4.3
    
    9 rows selected.
    
    SQL> edi
    Wrote file afiedt.buf
    
      1  with
      2      master_data as
      3      (
      4      -- this query emulates the master data of a master detail query
      5      select 1 id, 'Header 1' description from dual union all
      6      select 2 id, 'Header 2' description from dual union all
      7      select 3 id, 'Header 3' description from dual union all
      8      select 4 id, 'Header 4' description from dual
      9      ),
     10      detail_data as
     11      (
     12      -- this query emulates the detail data of a master detail query
     13      select 1 id, 1 detail_id, 'Detail 1.1' description from dual union all
     14      select 1 id, 2 detail_id, 'Detail 1.2' description from dual union all
     15      select 1 id, 3 detail_id, 'Detail 1.3' description from dual union all
     16      select 2 id, 1 detail_id, 'Detail 2.1' description from dual union all
     17      select 2 id, 2 detail_id, 'Detail 2.2' description from dual union all
     18      select 2 id, 3 detail_id, 'Detail 2.3' description from dual union all
     19      select 2 id, 4 detail_id, 'Detail 2.4' description from dual union all
     20      select 4 id, 2 detail_id, 'Detail 4.2' description from dual union all
     21      select 4 id, 3 detail_id, 'Detail 4.3' description from dual
     22      )
     23  -- main query
     24  -- to select from test data
     25  select
     26      m.description,
     27      d.description
     28  from
     29      master_data m,
     30      detail_data d
     31  where
     32      m.id = d.id (+)
     33  order by
     34      m.id,
     35*     d.detail_id
    SQL> /
    
    DESCRIPT DESCRIPTIO
    -------- ----------
    Header 1 Detail 1.1
    Header 1 Detail 1.2
    Header 1 Detail 1.3
    Header 2 Detail 2.1
    Header 2 Detail 2.2
    Header 2 Detail 2.3
    Header 2 Detail 2.4
    Header 3
    Header 4 Detail 4.2
    Header 4 Detail 4.3
    
    10 rows selected.
    
  • parallel for loops does not

    Hello.

    I'm learning the multi - thread programming. To start, I use "parallel for loops" and I was surprised that it does not work. One - thread loop work a few times faster (depending on settings) that multi - thread. I don't know why, and it is my request to correct my Vi to work properly.

    Lenovo, G580, Windows 7, 64-bit computer

    Intel Core i7 3632QM
    Ivy Bridge
    Specification Intel (r) Core i7-3632QM CPU @ 2.20 GHz
    Package (platform ID) Socket 988 B rPGA (0x4)
    Number of hearts 4
    Number of threads 8

    LabView 2011.

    Altenbach says:

    Gibbon wrote:

    What was 'strange' behavior?  In "linia dluga" when inside the loop is on '1' of the "spreed up' between one and multi-fil is about 3 times, when I put it in '20' this grow to 6.2. It was strange form me, becourse I expect a similar value.

    A parallel FOR loop has an overhead for parallelization (split the problem, then go back the results, etc.). If the code is very fast, the overhead is proportionally larger. If the Subvi takes a long time to complete, the overhead of parallelization is insignificant. It is often not worthwhile to parallelize the loops with a very simple and fast code.

    Gibbon wrote:

    Altenbach - I have another question if you can help me - how did you "seconds relative high resolution." VI "? -I want to say how did you know that there is this 'vi '. And thanks a lot for your modyfications.

    You can find it in vi.lib\utilities. It is well known.

    Maybe not well known enough!  the 'Hidden gems' package adds to your palattes.  It has also been considered by a nugget of the community

  • jump on a for loop

    Hi guys,.

    I have the impression that this is a stupid problem and know the solution if probably obvious, but I can't seem to find it

    I have a loop with several inputs and outputs in a Subvi.  When the Subvi is run all entries are read, the loop is skipped, and the outputs are sent.  Does anyone have any idea why the for loop is ignored?  Everything seems to be wired corretly?...

    The vi is attached.

    Thank you!
    Christopher

    I can't open your code due to my having LabVIEW 2009, but here's one thing to check: do you have automatic indexing on at all?  Perhaps, he does not run the expected amount of time due to a table being wired like 'auto-index' to your loop for?

    Another thing to check is try to place an indicator on the output of the variables 'N' and 'i' of the loop (letters of blue boxes that appear automatically).  That should tell you the "N" land of shadow of time it will perform an iteration and the value of the current 'i' reiteration.

    When you use the execution to highlight, you see it execute the code inside the loop?  If so, how many times?  And how did you expect?

  • Parallel for loop 2D table

    Hello

    I don't have any experience with parallel for loops, so I need your help.

    Goal: To do a calculation (average, average) on the rows (or columns) table 2D as quickly as possible. The calculations are independent of each other and I would get a table 1 d with the results.

    I read a few posts on parallel for loops and I would like to find an example for my trivial problem, but I can't.

    Could you help me, it is possible is improve it the effectiveness of the calculation on lines with parallelism in LabVIEW? and it is, could you post an example how to do?

    Thank you

    If the speed issues, do not write your own "average." First of all, it already is in the range of statistics, but then you must be inline your average VI or do the calculation explicitly (as shown below). the size of the array never changes for the duration of the loop, it seems redundant to get the size of the array on each iteration.

    Here's what you could do.

    On my bench, it's much faster than the use of 'mean.vi' of the palette. Average a overhead, Subvi (1) (2) needs to get N with each call and (3) is also an unnecessary error checking.

    (Sorry, I have 32 processors, so the number of instances is set a little high. Modify if needed).

  • Equium M50-244: loop problem internal ati2dvag.dll

    I had a M50-244 XP Home Edition (sp2) who have ATI onboard until I uninstalled it completely. The laptop has become totally useless vomit ati2dvag.dll inner loop problem and nothing seemed to heal so I decided to completely get rid of ATI.

    It started with VGASAVE which, with a few adjustments, work is fine and so my machine now. I disabled the video as controller he kept coming up with "new hardware found" and I didn't load the drivers more who would do what he started crashing again.

    Currently its on 'test' and I'm doing everything possible to see if it will crash once again, I hope not.

    Maybe I need another driver and activate the video controller, but I am hated for doing anything more now that his works normally, finally!

    Some said the installation of the graphics driver on the site omegadrivers.net and improves the performance of the graphics card.
    Maybe an installation of the driver from the site could be useful.

    Check it out

  • for loop in formula node does not

    Hello

    I; m trying to use for loop in the node of the formula, but it is does not work. I want the output (y1) product value in certain range (a and d, and of course one is smaller than d). I ' do not use primitive labview since a and d are keep changing (both are variable). I tried to put "return 0;" after the y1 equation but the error popup.

    The issue of the loop works not because it gives the last value (I average would be ""). It does not begin with an (initial) value.

    Please help me how to solve this problem...

    Pls ignore other variables not used in the equation. Thank you!! A lot

    Your code works.

    But why you use loop?
    You get the last value, so you can get it in a single step with x correct;

    Also why you say that can not use primitives?
    If you use wire instead of terminals or local variable States values constant.

    Y1, y1_2, y1 3 is the same values calculated differently.

  • For loop runs with the value of N unwired

    In this case will be a loop run connected to the loop N worthless? I have seen a few examples of the loop for run without a certain number of times set to be ran wired or for example a size of table or something like that.

    PauldePaor wrote:

    Here's a program I am and as you can see the image that the program runs without the loop N being wired. The program will run without problem

    As everyone else has said, you don't have to plug something on N.  If you wire up a table for loop for input "auto-index", the loop for will run automatically the smaller table size.

    Perhaps an example will help:

    This makes a loop on my table size (in this case, long of 5 elements).  On the edge of the loop for which resembles [] brackets, indicates that it is auto-indexé.  The loop should go through each item one at a time (1, then 2, then 3, then 4, then 5).

  • Préallouée VI environment in paralleled for loop

    Hello

    I searched a bit and couldn't find that everything about this specific issue.

    If I have a Subvi in a parallelized for loop and the Subvi is set upon reentrant preallouee clone, the Subvi register also several characteristics of memory depending on the number of loop iteration For? My specific application is a Subvi containingvibration Analytisis screw using the previous data in their spread and filters.

    Thank you!


  • For loop creates 1 d data table

    Hello, I am building the circuit below, and I'm running into a lot of problems with the loop, creating a table 1 d of data from certain types of data such as the ERROR OUT and the VISA NAME of RESOURCE. I understand why it does this, but I only need the last value in the table (the value of the last iteration of the loop for). This is true for me for the error, resource name of visa, and I was thinking of using the Boolean value that indicates when the for loop.

    Is there a simple way to extract the last value in the table 1-D so that it is correct to pass along trails, VISA and ERROR type?

    You actually create a block diagram, not a circuit.  A circuit is an electrical system including devices and wires.

    If you right-click on the tunnel and choose disable indexing, then you get the value of the last iteration rather than a 1 d table.

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

  • Restarting a task for the acquisition of data inside a For loop

    Hello

    I need iterate through my acquisition of data. Currently, I'm doing this through the creation, implementation and tasks for the acquisition of data inside a loop For which is iterated according to the needs of compensation. Unfortunately, the creation of these DAQ tasks slow down my code.

    I would like to be able to create the tasks outside the loop, pass them in and revive the tasks at the beginning of each iteration. Is there an easy way to do this?

    Otherwise, is there a way to make the standard DAQmx digital startup trigger trigger several times (so that it starts each pulse data acquisition in a long pulse rather than just the first pulse train)?

    Thank you!

    -Evan

    I whent before and created this example for you (and many others.)

  • For loop within a while loop

    I have for loop within a while loop... admission to the for loop N comes from the VI selection... the while loop I a condition essentially statement it stops just after to finish all the iteration in loop...

    Entrance to the N loop is bascially driven by a local variable... that's the problem Iam having:

    When I press the Start button to run the program... regardless of the output of the select VI is gives the N of the for loop, then the loop starts and then ends in place... and when the output of the select statement takes a different value (the N of the loop for) loop not work until I restart the program again... What can I do so that the for loop runs again for another value of N, the RUN program button is enabled.

    1. clean your diagram.  Style guides suggest keep the pattern of a single screen.  With a little effort, I was able to get your DB less than 1600 x 1000 pixels.

    2 then I can see (some) it happens all at once. This thing does nothing?

    3. local variables can lead to race conditions.  Output in Angle position may be a race condition, although is probably not what you wanted to do.  What does the wired local time at the moment present terminal meter? (Ooops! Two controls with the same name - which can be quite confusing as well!)  If you need or want two components of façade having the same text, use the legends.  Make the labels is different so the comic is more readable.

    4. having more than one Dequeue function on the same queue will lead to unpredictable results.  When an item is removed, it is removed from the queue and is not accessible to any other Dequeue function.  In parallel loops, you have no way of guessing which Dequeue will seize any particular element.

    5 use Boolean reverse instead of Select with wired False to true and true cable at the entrance to false entry. Better, just make the case of forgery in the structure of the case within the for loop the real deal. No required reversal.

    6. I was not looking for to determine the logic of the code within the structure of this case. It seems I could have posted a much simpler way to do this several weeks ago.

    7. use multiply from the Digital Palette rather than a node form multiply by 4 or 1.8. Uses less space BD and is much easier to read.

    8. as has been suggested, learn how to work the machine architecture and the State of producer/consumer.  They can make your life much easier.  Do not try to convert immediately to these models.   It's too much bite to at some point.  Learn how they work first.  Make a few simple examples.  Then rewrite this program in this format.  Probably faster than fixing what you have now.

    Lynn

  • FOR loop does not update the local Variable

    I am newer to labview, and I can't wrap the head around why not a habit of local variable to update in the code if it updates on the dashboard. Anything im missing?

    Assume that you are talking about the local variable of the 'State of the cell. The terminal updates every 500ms in the small top loop, the local variable indicates simply that the indicator and thus updates also.

    The problem is "dataflow" and you need to familiarize yourself with the concept!

    Once the while loop starts, the local variable is reading and inside the loop begins. Most likely, the local variable is read before it is updated in the small loop, so most likely returns the value of a fade on the first iteration of the while loop. Now the small loop continues to go twice per second for about five seconds. Only after the loop FOR (and everything else inside the while loop) completed, the while loop will go to the next iteration, date on which the local variable is read once more, this time with the last value of the last for loop iteration of the previous iteration of the while loop.

    In summary, the local variable updates very well, it's just that the code does not read the new value around most of the time.

    Your VI is full also potential competition conditions caused by the over-use of the local variable. You need to respect the proper execution order by eliminating local variables.

    So what is the solution? Hard to say without knowing what the VI is supposed to do. Most likely, you will need to remove the inside OF the loop and use it outside while loop for everything.

  • Creating tables in a nested for loop

    Hi all.

    I was stuck in this problem for quite a while now and I still don't know how to continue. Some outside the entrance would be greatly appreciated!

    I'm doing the following:

    -Take an array of numbers, to check if they are within a certain range (e.g. between 2 and 4)

    -Build two new arrays: one with all the numbers that are inside the beach and the other with the rest.

    An additional condition is that the amount and value of the range conditions will change (for example, it could be between 2 and 4 only / 2, 4 AND 6 and 7 according to the entry)

    To treat this, I created two nested for loops - one that goes on a table that contains conditions of the beach and inside that actually go and check if the values are in the range. I think I did that part successfully, but the next part is confusing to me - how to actually create the tables separated within two loops for?

    My apologies if I did not explain it well. Another method to support this problem is I want to translate following LabVIEW:

    Ranges of table / / [1 5 7 10] exodus-> This means we want to divide numbers based on those who are in (1,2) and (4.5) against those who are not

    Table of values / / [2 3 6 11 3]

    EndOperationDelegate table / / array of values within the range
    Table outValues / / Array of values out of range

    for m = 1:size (ranges)

    for n = 1:size (values)
    If (THE NUMBER IS on the INSIDE of EACH RANGE)
    EndOperationDelegate = [EndOperationDelegate NEWNUMBER]
    on the other
    outValues = [outValues NEWNUMBER]
    end

    end
    end

    Sounds easy enough, but it gets so chaotic with Labview that I don't know what to do. I have attached a reference image - insertion in the array function is not in fact add to the table, it creates a new table. How can I save that for when the nested for the ends of the loop?

    I have seen a few examples with shift registers which lie in a loop and I couldn't successfully that transfers in my block diagram.

    Any help/direction would be greatly appreciated.

    Hello!

    See the following example to understand how you can create a table in the loop For

    In your case, you also can uce conditional terminal to create a table only when then located nearby. It makes the code much cleaner that the structures of the case

    Hope this helps, if not, let me know if I can help you!

    Marcin

Maybe you are looking for

  • iphone7 more

    Cannot connect I have these errors 4013 also 21 and -18 can not enter in the parameters. Only had the phone a few hours? any ideas? Mark

  • Cannot move the window around the screen with the mouse since the last update

    The only way to change its position on the monitor is to right-click, choose move and use the arrows on the cursor on the keyboard.

  • El Capitan and Time Machine

    First my setup. I am El Capitan running on my Mac Mini. My House is hard wired Cat 6 for a central switch. I have a 1st gen Time Capsule to the location of the switch to connect the Ethernet switch and he also manages the wi - fi for my wireless devi

  • How to support multiple users at the same time?

    Hi all I have a Labview program that controls a parser via GPIB connector. When the user uses the software, user B must wait is made. But in fact, the parser is not very busy, when the user uses the software. I want A, B, C and D of the user may use

  • File of adjustment disorder on CD

    When I insert a CD (CD - R) and hit copy a file, it says please insert a disc on drive d.