Bug of output conditional Boolean autoindexing

It's a little subtle, so I apologize in advance for the possible confusion.

Start with a While loop and conditionally autoindex a scalar:

Example 1

As noted, the Boolean result is a scalar.

Now try the same thing with a loop (DO NOT REPLACE THE WHILE LOOP above by a For CREATING a BRAND NEW LOOP FOR loop):

Example 2

OK, so now the Boolean result is a table. Cool, that's what I wanted with the While loop above, but could not achieve.

Now you can play with replacements:

In example 1 above, replace the While loop with a loop For. Here's what you get:

If you CAN produce a Boolean scalar value in a loop For, but you have to go through a While loop to get it.

Now replace the loop in example 2 by a while loop:

All right, here's my table Boolean output. But I had to go through a While loop to do.

I'd say it's a bug, and the Boolean result of conditional indexation should be a table (not sure if there would be any how to have it be a scalar; last exit value?).

Tested by LavBIEW 2013 SP1 64 bit

Sam is correct: the conditional Terminal is not out of the loop for. When you "dragged through" the sequence you actually create an output of indexation of array of Booleans (unconditionally). Click on "cleaning chart" and you will see this. (I guess it might be a bug that LabView allows two nodes to overlay on the same place in the loop).

Moreover, you can always get a scalar to a loop for. right click on the tunnel, set it to "last".

Tags: NI Software

Similar Questions

  • While and loop output conditionally scenario

    Hi all

    I have a loop that I want to go 5 times (for or while loop), GOLD output conditionally using a button at any time. that each iteration takes 5 minutes to complete, and to Midway through the iteration 2 I decided that I wanted to stop the process, which is currently (and I appreciatte it is normal behavior) is the loop ends the iteration 2 and then continues for a for an iteration. Therefore, stopping after iteration 3.

    Is it possible to keep it from begin iteration 3 at all?

    Thank you very much

    Force your stop command to read when the process is complete.

  • Bug in the conditional for loop with an array empty

    There seems to be a bug in the loop with a conditional terminal.

    If an empty array is connected to an indexed table auto entry tunnel, a tunnel of output array has an element instead of zero.

    The constant matrix is left empty.

    High loop without the conditional Terminal produces an empty array.

    Conditional down with a terminal loop never true generates an array containing a single element

    Thanks to LabVIEW version 8.5


  • can I store the output of boolean values in a table?

    the codification output here is '1' and '0'...
    I want to store only '1' and '0' in a table...

    but I can't do it please help me...

    How to store?...

    DECLARE
    EID VARCHAR2 (20);
    BOOLEAN BL: = TRUE;
    BEGIN
    SELECT EMP_NO
    IN EID
    OF LEAVE_FORM
    WHERE EMP_NO = 1;
    BL: = TRUE;
    DBMS_OUTPUT. Put_line (sys. DIUTIL.bool_to_int (BL));
    insert into t1 (BL) values; - error
    EXCEPTION
    When no_data_found then
    BL: = FALSE;
    DBMS_OUTPUT. Put_line (sys. DIUTIL.bool_to_int (BL));
    END;

    Published by: 794244 on February 9, 2011 03:11

    No, you can't. BOOLEAN is no SQL, PL/SQL data type. You did not post structure of table t1. Assumimg t1 column has the number value, use:

    DECLARE
        BL BOOLEAN := TRUE;
        N  NUMBER;
    BEGIN
        N:= sys.DIUTIL.bool_to_int(BL);
        DBMS_OUTPUT.PUT_LINE(N);
        insert into t1 values(N);
        BL := FALSE;
        N:= sys.DIUTIL.bool_to_int(BL);
        DBMS_OUTPUT.PUT_LINE(N);
        insert into t1 values(N);
    END;
    /
    select * from t1
    /
    
            BL
    ----------
             1
             0
    
    SQL>  
    

    SY.

  • Pass the Boolean b/t parallel threads

    Dear Board of Labview,

    I have two Labview processes running in parallel.   Entering the data and the other data output are done.   They where originally designed to operate independently of the other, but today I need them to make some modest integration.   The two processes are very complex, so I would avoid a costly reconstruction.   I am looking for a quick fix and dirty.

    I need #1 process (which is loop based) temporarily hold the execution based on a condition (Boolean flag) process #2.   I'm not familiar with the techniques of parallel processing in labview, and I wonder if I'm doing this more difficult it really is.   Can I put a wait loop in a process which refers to an indicator in another process?   What is the best way to pass Boolean data between parallel threads?

    Thank you

    Zach

    That vi is perfect.

    In your case by using a variable is probably correct. But do not use a global - use a local! I would stay again far using variables-you never know what the future holds. Maybe you end up adding a few other loop. Maybe you want to add error checking and loops to stop on error of the signal.

    There is a significant difference between Globals functional and just a simple variable. Since the FG is a vi that one instance can run at a time *. With a variable, you have no way of knowing which is written or read what or when, unless you use semaphores or structures from sequence.

    * unless you make it reentrant

  • Generate analog output waveform finish on request

    Hello.

    I have a VI that reads in two data channels (400 samples at 400 Hz), calculates the characteristics and classifies data based on a model.  If the class is a certain State, a Boolean value called "Détection" is set to True.  A second Boolean value called "Stimulation" is also set to true and flip flops and turn off every second up to what the "detection" is more true.  Now that I am reading and classify a second data, Boolean values may only be updated once per second.  I am wanting to generate output "Stimulation" Boolean is true analog.  I had been accomplish this by generating a sinusoidal signal all the time and write to a buffer in a separate loop (500 samples per writing @ 10 kHz) and multiplying by zeros if "Stimulation" was false.  I have a code that more or less does what I want, but there is a delay of ~ 200ms between 'Stimulus' is set to True and AO generation, and I feel like it could be simplified.  I was wondering if it would be better to generate a waveform finished and trigger to write with the Boolean value of 'Stimulus' (i.e. write 1 second of a sine wave to the changing state rather than write 20 sections of a sine wave in a second, while the Boolean value is True).

    Y at - it a good way to do this with daqmx functions? (Generate a waveform of defined duration when a control changes)


  • How to implement an OR condition for 2 strings?

    Hello, I have a flash memory external data from serial port to LV, and I would sense when incoming data is complete. In my microcontroller code, I attributed a characters EOS (to mark the end of the data), however, I would like to check if EOS is arrived OR a continous FFFFFFFFFFFF is sent by flash mem (indicating that there is no more Flash). How can I make ORing these two strings?

    After reviewing your post, I indicated my own question.  See attachment.  As stated earlier, you will need to determine where the F 10 is received.  You could just output a Boolean to the Golden Gate, once you have received enough Fs or string as in my example.  Your choice.

  • Output to a text file

    Nobody knows how to output to a text file.

    I have a timestamp and when a key is pressed at the last level I want to output a Boolean variable in a text file, preferably to the desktop

    It is a simple .swf that I created.

    OK, I've managed to do:

    var file:FileReference = new FileReference(); Create a filereference object

    var flag: Boolean = false; Create the variable

    function taketheticket(event:MouseEvent):void

    {

    trace ("change is" + flag); prints the value of change

    leader. Save (flag, "result.text"); saves the value of the indicator in a text file named result.text

    gotoAndStop (8); go to the section 8 and stop

    }

    When the above method is exectuted it allows you to select a particular destination.

  • Conditions based on user groups

    Hello

    I already use the permission that I don't want to make any changes.

    I want to limit the column using the user group.
    If my group of user is admin or unique then show the item and if the user group helpdesk or test and are not displayed.

    I'm using condition: boolean return of PL/SQL function
    declare
    Start
    Return apex_util.current_user_in_group (p_group_name = > 'admin');
    end;

    It works very well for only the Administrators group. If I need display the column to the group admin or uniqueuser, then please could you say the term for this.

    Concerning
    Harinder

    Harinder Hello,

    What about
    return apex_util.current_user_in_group (p_group_name-online 'admin') or apex_util.current_user_in_group (p_group_name-online 'yourOtherGroup');

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Demodulation

    Hi all

    I'm doing EVM measurement signal (modulated using 16QAM) OFDM using VST SMU-5645R.

    But I get 0 and one EVM constellation evil.

    I am not able to solve the problem. Can someone help me please? I have attached the image of the part of demodulation of the code with this message.

    Thank you

    Anupama

    Thanks, Anupama. The new link works.

    Your EVM measurement occurs only on the data passed out of your loop to demod. I noticed that you have no output condition on this loop, with the exception of a mistake. In this case, the data passes out will be empty (the only mistake might be a time-out of the dequeue item or symbols calling card MT). I don't know how the loop could out at all because there was no time limit set on the primitive dequeue item.

    Second, remember your last post you must set samples by the symbol of an even number.

    "With the samples per symbol being two, beginning for the input stream being relaxing ' Output Stream Start Trigger", and the reading block size 16000, I was able to get the data. Oh, I plugged in also the loop demod to leave first data table size is greater than 0; otherwise, the extent of EVM is never executed. Do you want the EVM measurement in your loop demod? Note that the data was not very good. I don't know exactly why, but would it be a problem with your calculations demod? Is there a reason that you do not use the MT demod VI?

    With all that said, what you're trying to do with this project? If you try to measure EVM to a QAM signal, have you tried running the "MT RFSG generate QAM' and"MT niRFSA QAM Demod"example screws at the same time? You try to make a few additional calculations?

  • Limit high and low AI in DAQmx

    What is the way easiest to measure an analogy of entry line in DAQmx while placing a threshold up and down for the input and output a Boolean value if the value is not within the limits?

    You need to do a comparison of the table read you and see if the value of MAX exceeds your limit. This will generate a Boolean result. The DAQmx Read by itself does not do anything except the signal s cut if the signal exceeds the range that you set.

  • Subvi in MUX 4 entry and PIN

    I have a problem with a LabVIEW 2009 issue:

    P4.3) create a Subvi than four multiplexed inputs to a single output. The Subvi should have four digital controls floating-point (labeled 1 thru In4), a digital indicator floating point (noted by outside), and a control unsigned integer 8 bit (denoted by Select). If the option = 1, then Out = In1; If the option = 2, then Out In2 =, if the option = 3, then Out = In3; If the option = 4, then Out = In4. (Tip: Select function programming VI > range of comparison may be useful.)

    -Where can I find the entire control 8-bit unsigned?

    -How to do the desired function?

    -How the select function in the indication would be able to help at all?

    I do not fear responses that force me to think. I am trying to learn this stuff.

    Any help would be greatly appreciated. Thanks, Matt

    Make a comparison on the U8. The result of the comparison is a Boolean value. Wire output for Boolean input select.

  • "Wait for activity of façade" - Timeout?

    The function to wait for Front Panel activity has no output to tell if it has expired or detected activity of façade. Is there a way to output a Boolean value true if the service expires as opposed to the detection of the activity of the public Service?

    If not, is there another functions I could combine to create a work around?

    James

    Hi James,

    This should work for you.

    Mike

  • Valid algorithm loops

    Dear friends,

    I need algorithm / VI to check a table that contains items and loop start tags (text) (While and For) and (for End) and End While loop end tags. Loops can be nested to any level and can be mixed (While loops inside loops and vice versa). I need a VI that can analyze this (String) table and output a Boolean value if the curls are not logically placed (number of loops of departure is not not in number of for loops, loops starting end before beginning loops etc.) and a text indicating the problem. Can anyone help!

    Thank you very much!

    Pleasant day to you!

    Taking your example of an illogical nested loop:

    put "For".

    put 'While '.

    Now the stack is:

    While

    For

    and we get an end tag 'For' that would assess:

    pop == 'For'-> 'In ' ==' to'-> false

    and now, we can also use two tags to display: 'End for' encountered where 'End While' was expected.

    Back home, I have little code (in development) that analyzes xml and must manage the opening and closing xml tag. I'll have a look if it helps and post it in case.

    Felix

  • Essbase on domain - a guest to 1 dimension to restrict a prompt on the other?

    Hi all

    On a line of dashboard, I have two dimensions, we'll call products and the region. Each Sun has 3 levels/columns, and I have a dashboard command prompt that contains 3 columns of each dimension.

    If I select a value among the guests produced is it possible to limit guests to the region?

    This field is based on a model of Essbase, so there isn't really much you can do in the deposit so much as I know.

    Any ideas?

    OK I finally did it. I spent this AggExternal issue by returning the original as well as the concatenated column column. Also a little more complicated, I've got the same invite & analyses on a scoreboard twice because it is a tool to compare products/regions.

    Overall, it was a combination of sql logic in a condition Boolean fancy in the analysis criteria, variables, and guests. No idea if what I've done is the best way or not. It might take a bit of effort to describe so I'll have to wait until I get some time. Can post on my blog @ http://www.hypersbase.com/ . If anyone tries to do something similar in the meantime then move a line.

    Feel like I can sleep tonight now.

    SideTrack: Interesting article I read on Boolean conditions in this: SQL WHERE clauses: avoid CASE, use Boolean logic

Maybe you are looking for