Loop inputs Updting

Hi friends!

I'm getting crazy almos here with a problem that is certainly simple to solve:

The main VI has an inditator to show the operator value to the process. In the background there is a running process control state machine. To make it simple, lets things say there are 3 States: calculation, waiting for response and action. The entire structure should work like this:

#1 in the State of computing read the value of process and determine the desired output

#2 in the State of release, that the output is applied to the process

#3 in the State waiting for answer that the machine waits until the output applied previously to affect the process

The indicator is updated permanently, it relates a VI acquisition in the outermost loop. The problem is that the value used during the calculation step is still related to this indicator. So, as I could debug, right after the computer leaves the Calculatoin State, data acquisition equipment deliver a new reading of the procedure, a TI keep it permanently. In this way, when the machine returns to the State of computing, several cycles of outer loop, the value of avaiable in the tunnel we a former that happened just after leaving the State of computing, not the last of them acquiring hardwre read.

It is important that acquiring VI remains in the outer loop, in order to get the update indicator. The number of States and their features is also quite imutable. It seems to me that all my problems would be charging if the case structure used in the state machine could use hust the last value source of the materials.

I'm ugly, I'm sorry for the text of los, but someone have an idea of what could be the gift in this case?

Thank you very much


Tags: NI Software

Similar Questions

  • PL/scope

    Hello experts,

    I'm trying to understand what makes PL/scope and how it might help with the programming. What I understand, it seeks all identifiers in PL/SQL (variables, loops, input/output parameters etc.) and records in a table.

    Can what additional information I turn on PL/scope? and how dangerous is it possible because I saw a caveat on some sites you might need to restart the database or drop it:

    Oracle PL/SCOPE

    Do not try this with any database, that you are not ready to give up

    Best regards


    IgorS. wrote:

    Hello experts,

    I'm trying to understand what makes PL/scope and how it might help with the programming. What I understand, it seeks all identifiers in PL/SQL (variables, loops, input/output parameters etc.) and records in a table.

    Can what additional information I turn on PL/scope? and how dangerous is it possible because I saw a caveat on some sites you might need to restart the database or drop it:

    Oracle PL/SCOPE

    Do not try this with any database, that you are not ready to give up

    Best regards


    Just watch, and that the warning is just recompile the standard package of in the SYS schema with the option of identifiers: PL/SCOPE.

    I agree, that doesn't look like a good idea.

    Read the documentation and use it to your own code, not for stuff SYS.

  • How to: display a message while for loops, with no required user input

    Hi everyone, I'm relatively new to LabView, using 8.5.

    I want to display a message all in one for the loop runs, requiring no user input to delete the dialog box (that is to say, the box disappears after the end of the loop For).

    Any ideas?

    Thank you


  • OR 9403: Digital Input/Output slows timed loop?

    Hi all

    I use a loop timed sample of 7 current channels (NI 9023), 3-channel (NI 9025) voltage at 1000 Hz in scan mode and it works fine. However, when I add for 8 output channels of the input/output module digital module NI 9403 for timed loop, CAPAS sampling cannot exceed 1000 Hz. According with time stamp data I wroten in file, it seems that I have in all ten milliseconds, I missed a miliseconds.

    I would like to ask is there a reason for this? The digital I/o module affect the timed loop?

    Thank you much in advance.

    I'm not familiar with the FPGA code, so I can't comment there.  However, I noticed that you call writing to text file twice in the timed loop.  Can you only collect data and then write the files after the time loop?  This would save a lot of time.  For each entry, the program needs to access the hard disk, find the end of the file, add him and return to write on the hard drive.  A lot of your time, especially since the files are getting bigger.

  • Digital inputs delivered to 0 when all loop stops. Extract attatched

    Could someone please tell me how do I get my digital inputs on the left hand side reset to 0 when the loop Gets the signal to stop?

    Very much appreciated

    Here's an easy way to do it.

    PS - If I had LV2009 I would download this excerpt and make much more simple or die trying.

  • Table created from a text input fields for loop

    I am new to AS3 and animate CC. I'm not a programmer. I learn how the code I want (from YouTube and various web sources). I put the next set of various web tutorial. What I'm trying to do is create a user input field and input variable which will set the number of new text fields created by a loop for. Then store the text fields in a table to access their values to use elsewhere. The problem is, I don't know how to access the values of the input fields created in the table.  The loop for works to create the new text entry fields, I do not know how to retrieve their values.  In fact, I don't know even if the text that I entered new fields is currently stored in the table. I think that the text field itself, as an object, is stored but not the text I enter the text field (which is what I want).  I hope someone can help me...

    to import flash.display.SimpleButton;

    import flash.events.Event;

    import flash.text.TextField;

    import flash.text.TextFormat;

    import flash.text.TextFieldType;

    var captureText: Array = new Array();               meant to be the text of "aTextFields" of the "aTextFields" table values

    var text3: String;                                               variable as containing "captureText [0]"

    var aTextFieldsText = new TextField();             dynamic text field called 'TextFieldsText '.

    aTextFieldsText.border = true;

    aTextFieldsText.width = 100;

    aTextFieldsText.height = 25;

    aTextFieldsText.x = 300;

    aTextFieldsText.y = 55;

    addChild (aTextFieldsText);                              Add "TextFields" to the value of the scene and the variable "Text3" poster

    var nTextFields: number = 2;                          creates the number of input fields, and would be attached to an entry on the scene.

    var aTextFields: Array = new Array();              array that contains ""input TextFields text fields " "

    for (var int i; i < nTextFields; i ++) {/ / loop for who created him ""text fields of seizure of TextFields " based on the "nTextFields" value"}

    aTextFields [i] = new TextField();

    aTextFields [i] .Guy = "entry";

    aTextFields [i] .width = 100;

    aTextFields [i] .height = 25;

    aTextFields [i] .border = true;

    aTextFields [i] .text = "";

    aTextFields [i] .x = 150;

    aTextFields [i] there = 15 + i * aTextFields [i] .height + i 5;

    captureText.push (aTextFields [i]);                 Push the table 'captureText '.

    addChild (aTextFields [i]);


    var MyButton: SimpleButton = new Button;

    myButton.x = 339;

    myButton.y = 268;

    addChild (myButton);

    myButton.addEventListener (MouseEvent.CLICK, test1, false, 0, true);  "Text3" variable on captureText set button [0]

    function test1(event: MouseEvent): void {}

    Text3 = captureText [0];                                "Text3" variable to captureText [0]

    aTextFieldsText.text = text3.toString ();       displayed in the text field "[TextField object]" instead of the text value of the entry at index [0]

    trace ("aTextFields =" + aTextFields);

    trace ("captureText =" + captureText);

    trace ("Text3 =" + Text3);


    captureText is an array of textfields and not a textfield. This line:

    Text3 = captureText [0];

    Maybe should be:

    Text3 = captureText [0] .text;

  • Why do not perform proxy &amp; line input on a loop?

    Hello group,

    Why does not run the line where the substitution variable is affected by the loop. only the first time.
         v_flag NUMBER(1):= 0; 
         v_counter NUMBER(1):= 0;
              v_flag := &input;
              v_counter := v_counter + 1;
              EXIT WHEN v_counter = 9;
         END LOOP;
    Thank you.

    A substitution variable is something that SQL * more (or whatever until you use) replace before sending the block PL/SQL (or SQL) to the database. SQL * Plus has no idea that your substitution variable is inside a PL/SQL block and still less that it's inside a loop. He will never ask a value once and then it will send the block to the database where the PL/SQL is executed to process.


  • multiple inputs and nested loop problem

    Hello world

    I'm using Labview 2009.

    I want to change the value of a variable by using the wheel or keyboard.

    So I downloaded a button and the screws of the keyboard that suits my needs of multi-rotation forum.

    These two screws are running inside a WHILE loop. Because I would be constantly updating the variable I will run my main screw that houses these two screws also looped a WHILE.

    Problem is that while loop within a while loop I couldn't run my main VI because of this problem.

    I tried in 2ways

    1 including them as an auxiliary in my main VI but as the two screws screw contains a few other variables inside of the inside while loop that LabVIEW displays error as auxiliary screws will not work

    2. I also tried to copy paste the two screws as it is in my main screw but could end up only in a lot of errors.

    How to deal with this problem of nested while loops?

    Please guide me.

    Kind regards


    You make a mistake of data flow. The outer loop can turn only if all of the code that he has completed. The structure of the event cannot complete because inside while loop has not finished, and if inside so that the loop ends, the loop cannot turn because the structure of the event stalls. You can only go to the next iteration after all both have completed, from the mess.

    All you need to do to incorporate ALL the code inside the structure of the event. Attached, it's a simple project (LV 9.0), modify as necessary.

    See if it makes sense for you. (there are a few minor bugs probably)

  • Loop of work based on the input (as if... else) variables

    HI friends,

    This is my first, if I'm not following all the rules excuse and say to those.

    I want to use the loop for based on the variable passed.

    Under code is wrong, but you can understand my intention.

    CREATE OR REPLACE PROCEDURE sp_pins_deactivation)

    pi_prepaidcard_no IN STR2048_TBLTYP, - Table type

    pi_from_range IN VARCHAR2,

    pi_to_range in NUMBERS)


    IF pi_from_range is not null and pi_to_range is not null


    I'm in pi_from_range... pi_to_range



    I'm in pi_from_range... pi_to_range


    END IF;





    end sp_pins_deactivation;

    create or replace procedure nTtest (nT nTable, start_val number: = null, end_val number: = null) is


    I'm in coalesce (start_val, nT.first, 1)... COALESCE(end_val,NT.) Last, 10)


    dbms_output.put_line (I |) ': ' || (-case when nT.exists (i) and (i) nt end of another "no entry");

    end loop;



  • Appearance strange when a loop in the movieclip of input fields

    I have a loop that goes through each element of movieclip as a validation script.

    Everything works fine, unless I tab through the first option field. Then he seems to find new items, and I'm not sure of what they is why they exist all of a sudden. You will notice that I also excluded '_searchKey '. Another element that I don't know how it came into existence.

    The elements are:




    The code is simply set up a SQL or SQL INSERT UPDATE.

    you need to decompile the textinput component or find someone else who already has to know all the things he does.

  • How can I delay the t0 to a waveform based on user input without affecting the beginning of another form of wave in the while loop?

    I would like the Waveform generated with the signal generator to wait until the user presses a button to start. I tried this implementation with a structure of the case, but have failed. The problem is that I don't know what to make out of case for when the user has not yet pressed the button.

    Consider using the structure of the event instead of the structure of the case. So pass the generator of waveform in the structure of the event, so that it will be executed when an event like the mouse click occurs. http://zone.NI.com/reference/en-XX/help/371361J-01/Glang/event_structure/

  • Variable loop AppleScript

    Hi, I have a script that works with the .txt file and takes a number, do a little with her in the loop and should create a new file where to save the results of calculation. Now my script can open a file, see a words it contains, add a certain number of words. But I didn't know how I can send results to loop to another file or as a result. For example, loop works with the file, which have four numbers as text. Loop takes a number, second, third, but as result remember fourth result only.

    Open a txt file, it cannot because the file is already open and loop takes a number to it, if I try to create a second file, applescript takes error.

    Help, please

    loop at the bottom of the script

    thisFile to Choose file with guest "choose an image file:

    say application "Imagine the Photo.

    the value thisImporter for import graphics thisFile

    if the component error of thisImporter is not equal to 0 then

    thisImporter close

    display the dialog box "Not an image file that quicktime recognizes."


    end if

    the value {x, y, xDim, yDim} to the limits natural of thisImporter

    define thisDocument to make new document window properties {size: {xDim, yDim}}

    the value the destination of thisImporter to thisDocument drawing

    thisImporter trace

    thisImporter close

    -The section which follows should be replaced according to the pixel value class

    the value pixelValueRect to {x, y, xDim, yDim}

    the value pixelValues1 to get the pixel values of thisDocument with properties {class of pixel values:pixel in the rectangle, rectangle boundaries: pixelValueRect}

    thisDocument close

    -class (pixel points) as a list

    -' class pCol' as a list - цвета координаты разнесены по классам с именами, приводим к списку и

    end say

    say application "Imagine the Photo.

    -the value pixelValues1...

    the value t to my to_s (pixelValues1)

    end say

    say application "TextEdit".

    say (do in new document)

    the value sa text to t

    end say

    end say

    on to_s (a)


    a: nothing

    Returns the Unicode text: textual representation of a


    local astid0

    point of the value astid0 to AppleScript text delimiters


    {'class AAAA ': a}class BBBB ".

    on error t - t = "could not get 'category BBBB' of {"YYYY category": a}.


    the value Point text delimiters to AppleScript {' {"YYYY category":} "}

    the value t to t text elements 2 thru -1 as Unicode text

    the value {"Point text delimiters to AppleScript {" "}"}

    the value t to t elements text 1 thru -2 as Unicode text

    the value Point text delimiters to AppleScript astid0

    back t - t = a, which is in Unicode text

    on error number errn errs

    the value Point text delimiters to AppleScript astid0

    error number errn errs

    end try

    end try

    end to_s

    say application "TextEdit".

    say front document

    say STI text - NB "sound." We need the reference TextEdit, not the text itself.

    -Remove (paragraphs-3 thru - 1).

    the value noneedenttext to (shift of "pixel points" (it as text)) + 13-"he text" should that "offset" because the actual text.

    the value noneedenttext1 to (shift of "colors of the pixels" (it as text)) - 2-"he text" should that "offset" because the actual text.

    the value noneedenttext2 to (shift of "colors of the pixels" (it as text))-16

    delete (characters 1 thru noneedenttext)

    delete (characters noneedenttext1 via noneedenttext2)

    game of nonech to (shift of '}} ' (it as text)) определяем - лишние скобки за координатами

    game of nonech1 to (shift of "}}}" (it as text))-определяем лишние скобки за цветами

    delete (character nonech) стираем - нахуй

    delete (characters (nonech1 - 1) through the intermediary of nonech1) стираем - нахуй

    display the dialog box "Количество цветов в картинке от 2 12 dizinine Введите" answer "4" buttons by default {"OK"} default button 1

    copy the result list to {button_res, value_res}

    If button_res is 'OK' then

    the value colors_inpic to the value_res

    -put words of the doc is key word to keyword_repl

    the value color_span to 65000 / colors_inpic - определяем сколько делить цифру для упрощения количества цветов цвета на

    end if

    the value word_count to count words of (he text you thong)

    define character_count to count characters of (he text you thong)

    the value pixel_amount to the word_count / 5 as number - количество пискселей

    the value word_pixels to the word_count / 2.5 - количество слов-координат

    the value pixel_data to words 1 thru word_pixels - String оставить, все ряд одно число как в пишет если

    the value pixel_col of words (word_pixels + 1) thru -1 + 1 значит без последнего слова конца dizinine знаит-1

    game counter to 1

    the value ad_i to 1

    -say (brand new)

    Pixel_amount repeat them time

    the value x to Word (counter) in whole

    the value y of Word (compared with + 1) in whole

    game from r to ((Word ((word_pixels + ad_i))) / color_span) as integer

    the value of g to ((Word ((word_pixels + ad_i + 1))) / color_span) as integer

    game from b to ((Word ((word_pixels + ad_i + 2))) / color_span) as integer

    game of full_pixel to x & "" & y & "" & r & "" & g & "" & b

    value counter to the counter + 2

    the value ad_i to the ad_i + 3

    Display alert "" & full_pixel

    -set its text on full_pixel

    end Repeat

    -end tell

    end say

    end say

    end say

    It is not quite clear to me what it is you are trying to do - and your script is very specific to your needs, so it is not obvious.

    Can you explain more what you're trying to do - specifically what data you have ('4 integers"?) and what you try to do with them (write them to a file)?

    Can you give an example of what might be your input values (for example a list: {123 456 789, 4.321} and you want the output file to look like?)

  • Satellite L450D-119 recovery is stuck in a loop of reboot running TUPIT

    It's the kind of a question answered itself to halfway!

    I had to reinstall Windows 7 Home Premium 32 - bit "Product recovery" DVD from Toshiba. He went through a complex process involving many Windows CMD copy stuff on a HD recovery partition (I think). Then, he went through the installation of Windows 7 from scratch. Then it restarts Windows 7, but whenever it starts, it opens a full screen splash screen saying "the installation may take several minutes. Please do not interrupt or shut down the computer. This continues for about 5 minutes or more (sometimes much more), then it restarts and does all this many times.

    I let her do this about 10 times and got bored. It may be interruped with CTRL-ALT-DELETE, but if I try to start the task from the Task Manager window manager is immediately covered by the start screen. I can also break the command prompt that starts everything, but then the PC restarts after a short while. I had to stop once and he seemed to be in a State of some drivers, but the progress bar was not progressing.

    When it starts every time, the splash screen graphic Windows, it displays "Preparing for first use Windows" or something similar and it goes through the same process.

    Is this normal?

    An update, I pass by another loop 10 min + while I was typing this and it ends up wearing a screen asking me in user name, password and the input locale. My heart is squeezed then I saw "Preparing Windows for first use" and then "preparing your desktop... '. ", but fortunately he got at the installation of McAfee.

    It has now completely installed, but it would have been nice for the booklet to tell what he do and give us some advance warning that this will take hours...

    Yes this is normal. Laptop restarts again and again and the installation of any recovery may take about two hours.
    I put t understand how you can say he's bored. It is the installation process which should not interrupt. If you do this, you can start from the beginning. Please contact don t nothing until the installation of recovery is not over.

    You are right. This statement about a few minutes is a good joke. On my laptop, it takes more than two hours for a complete installation.

    In the end, I must say that this recovery facility is very uncomfortable.
    What do you think?

  • Film loop with automator doesn´t stay full screen.

    I m doing a video art installation with a 30-minute film that should loop several times. Simply put, I want the film to go as soon as the computer is started. Do that I ve done a soft in automator that I use as a start object. The app tells quicktime to open the movie and he play full screen and pass it when it s over. My problem is that the isn´t movie full screen every second time it s loop and every second it is. Does anyone have a solution for this? It must be full-screen all the time.

    I m using ver El Capitan 10.11.1 and quicktime 10.4


    There is another bug of the Automator action.

    Workaround solution, use this script in the "Run AppleScript" action:

    on run {input, parameters}
        set x to item 1 of input
        tell application "QuickTime Player"
            tell (open x)
                set presenting to true -- full screen
                set looping to true
            end tell
        end tell
    end run
  • Other results: preliminary report does not properly during the first run in a loop

    I have an unusual problem with NI TestStand 4.1. I have a loop For and it contains, I have a call from sequence configured as a test of numerical limit. This test is configured to report additional results. All other results are preconditioned test cases. Here's the unusual part: during the first iteration of the loop, the test passes yet additional results for the parameters of all inputs are reported (output parameters are not presented at the time, but more on this later). Spend all additional this test iterations in the loop For and additional results are not reported.

    Regarding output parameters... If a test fails I'm expecting (input and output parameters) results to report. However when I encounter a failure only the additional results that are output parameters are displayed on the test report. Input parameters are not reported.

    If anyone else has experienced this? My expectation was that all additional results would be declared in case of failure. In addition, in the absence of a failure I expect not to see additional results. Thanks in advance!

    The short answer is that the condition of additional results for input is evaluated before it's called the subsequence, so that it uses the value of the previous iteration Step.Result.Numeric (or by default on the first).

    You can see this described as stage 15 in the following link:


    Kind regards

Maybe you are looking for