LabVIEW basics - Cahnging Boolean State question based on the input signal

Hi all

I would like the State to change the Boolean indicator based on a simulated sine wave signal. I have partially managed to do this but need help to develop it.

See the attached vi. At the present time changes Boolean false to true when the value of the signal is greater than 8 or lower than-8.

The focus I need is:

Once the signal passes more than 8 (and the Boolean value becomes true), I hope it becomes false again to a value of 9, but only after the peak value was passed or when the signal is down.

Similarly on the negative side of the graph, I want the Boolean value to become reality at 8-under, stay true until after the peak value was passed and then back to false when the value is greater than-9.

Any suggeastions?

Thank you

While Crossrulz responded, I had a little look.

Don't let me spoil your pleasure with the VI attached. Have a go yourself.

Tags: NI Software

Similar Questions

  • Change the structure of program based on the input file

    I have a program that takes parameters of an input file and then executes a Visual acquisition, using IMAQ, controlling some other hardware at the same time.  The duration of the various stages of this process control settings.

    There is a sequence stacked structure to control the playback of the input file, the initialization of the hardware, and then a while loop on the last image to actual purchase.

    The user of the program now wish to have several games acquisition in the same race, possibly with different time settings.  This would mean different iterations of the final loop, based on the parameters of the input file.  There could be 5 games of acquisition on occasion, 3 on another, etc., in a performance of the program.

    The structure VI already seems a little baroque, and I don't want to make it even more complicated.

    I would appreciate advice on how best to proceed, because I'm really a novice of LabView.

    If you use a "State Machine" architecture, you can do exactly that.

    Instead of having a structure of stacked sequence, it is essentially a case structure in a while loop.

    Each case represents a State.

    So in your case, you would have a State for:

    -reading the input file

    -initialization of hardware

    -data acquisition

    You can have the user controls the number of iterations of the State for the acquisition of data that you want to run.

  • Highlight the line in the standard State is based on the value in the column...

    I'm trying to highlight the lines of a standard report based on the value of the TICKET_TYPE column.

    I followed the post: highlighted a line in a tabular form based on a column in the row

    but the difficulty. I have the following error:

    ORA-06550: line 1, column 34: PLS-00201: identifier 'SHRIMP' must be declared ORA-06550: line 1, column 7: PL/SQL: statement ignored

    ERR-1025 expression PLSQL treatment error. SHRIMP = "SHRIMP".




    My report query is:

    Select T.TRIP_ID,
    T.TRIP_ID trip_show,
    T.TRIP_ID trip_select,
    T.DAYS_AT_SEA,
    T.NBR_OF_CREW,
    T.TRIP_START_DATE,
    T.VESSEL_ID,
    o.ticket_type ticket_type
    TRAVEL t, o one_ticket_type
    where t.dea_permit_id =: G_DEA_PERMIT_ID and t.trip_id = o.trip_id

    I created a new template called a ticket-enhancement.

    line 1 = tempate < td #ALIGNMENT headers # = "" #COLUMN_HEADER # "class ="t14data"style =" background: red "> #COLUMN_VALUE # < table >"
    model condition rank 1 = use based on the expression of pl/sql
    template expression rank 1 = #TICKET_TYPE # = "SHRIMP" (* I also tried without the quote)


    any thoughts? Thank you!!

    Edited by: KEH813 may 25, 2010 11:10

    I'm not sure of the JavaScript. Whenever you sort the report, coloring disappears and you can send the page again.

    PS Don't forget to mark the answers as Correct or useful.

    Best regards
    Mathieu Gosselin

  • In Labview 8.5, what happens if the input signal exceeds the scope of the signal defined by the DAQ Assistant?

    Hi all

    This should be a pretty simple question, but I can't seem to find the answer online and currently do not have the functionality to test this:

    I'm using LabVIEW 8.5 and have a VI that imports data from sensor through the DAQ Assistant. In the configuration tab, there is a range of signal input. What happens if my sensor exceeds this range? I get a warning? The default value is the maximum (or minimum)? I was interested in writing a code to display an error that I approach the limits of this range, but did not know if I also need to include code to display an error if the scope is exceeded as well.

    Thanks for the help,

    Tristan

    Hello, Tristan,.

    The behavior depends on the selected range and the device you are using.

    If you are using a device with a single input range is valid, we will use this range, even if you set a smaller minimum and maximum in the DAQ Assistant.  So, if your device only supports ±10V and you set the range to ±8V, you will still continue to get valid data after your top sensor 8V until what you approach 10V.  When you reach the limit of the extent of your device, the output will be 'rail', and simply return the maximum value until the signal is less than the maximum value again.

    Note: A device that is nominally ±10V usually has a go-around (such as ±10.2V) which are usually specced in the manual.

    However, if you use a device with several ranges of entry then things become more complex.

    NOR-DAQmx player will choose the smallest range that entirely covers the interval you choose.  For example, suppose that your device supports the following input range: ±0.2V, ±1, ±5V, ±10V and you choose 0V - 3V as the range in the DAQ assistant.  The NOR-DAQmx driver will focus on the input range and the list of the entry lines that your hardware supports and choose the smallest encompassing the entire range that you set.  This would be the ±5V, because this is the only beach that contains up to 3V.  Thus, all between ±5V input signal is returned and none outside this range will be 'rail' to the maximum or minimum value.

    We do this because using small beaches make more efficient use of the resolution of the ADC.  So, we try to use the most effective range based on what you ask without picking up a range that will make you miss data.

    Let me know if I can clarify it more.

  • Dynamic creation of a control based on the input

    Hello

    Is it possible to change a control on the front panel?

    If the entry is a string I want to show a string. If the input is an integer, I want to show a cursor for example.

    I have a plan to implement on the different tabs and display the tab which must be shown, but maybe there's a faster, easier way?

    Thanks for the help!

    Kim

    Hi Kim,

    Thanks for the additional info.

    The dll and its manual to define what can be output and that's why you need to refer to the manual.

    When you call a dll in LabVIEW, you must set the parameters of static output and so data cannot be of a type for example if set it as a table, it will always be a table. This look for the 'node of function call' in the range of functions-> connectivity-> libraries & Executeables.

  • 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)

    Start

    IF pi_from_range is not null and pi_to_range is not null

    THEN

    I'm in pi_from_range... pi_to_range

    LOOP

    ON THE OTHER

    I'm in pi_from_range... pi_to_range

    LOOP

    END IF;

    .......................

    .....................

    ..............

    END LOOP;

    end sp_pins_deactivation;

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

    Start

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

    loop

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

    end loop;

    end;

    /

  • Workflow based on the input parameter

    I use JDev 11.1.1.6.

    I have an application that uses a workflow with 'ExecuteWithParams' to get the parameter from a URL and display the records on a page.

    I have it using a Bind Variable on the VO that corresponds to the InputParameter on the control ExecuteWithParams.
    What I would like to make is the flow to another page, depending on the parameter used in the URL.

    Example:

    If param in the URL is '? TEAM = 1 "then I go to the TEAM page and display records for TEAM 1.

    If param in the URL is '? REGION = 3 "then I would go to the REGION page and display records for REGION 3.

    Thank you
    Ray

    This could probably be resolved using a router activity or a custom default activity in the workflow method. Then from the method/router, can easily get to the desired activity of the TF based on an input parameter. For example if the parameter is route 'region' to executeRegionIteratorWithParams, which, in turn, can "go" to view displayRegions activity.

  • How to change a region title based on the input parameter?

    Hi all

    I need to change the title of the dynamic region based on the value of a selection list in another region.

    Can someone help me in this?

    Kind regards
    Santini.

    Hello

    You can use & P1_ITEM_NAME. (including the & and the.) the title of region - this string will be replaced by the value of the item page called P1_ITEM_NAME, then change the name according to your order of the day of the page

    Andy

  • Navigation based on the input textfield value?

    Hi all.

    I use Captivate4. In my project, I would like to navigate from one slide to another slide based on the value entered in the input textfield (as if as a drop down menu).

    slide1.jpg

    The image shows, if the user enters the values, it must navigate to slides respectively. So, I got a tip in this way action.

    actions-dialog.jpg

    Hello

    Welcome to the Adobe Forums,

    In order to reach the workflow that you specified in your post that you need several "check if ' for all defined slides the tip on the button click Action.

    For Ex.

    For "a" TI will look like this:

    Because if "two" will look like this:

    Rest allows you to change the variable, just make sure that these all will be on this same script for a button

    It could be useful!

    Thank you

    Vikram

  • Change cell color in a table based on the input

    Hi guys

    Please refer to my example, I have attached. I had a 2d with som information table. 1 row = 1 component information and it's electric. This table is put in a table when you press "Update" in the front panel. My goal is that based on index 1 of table (col2 'Edge'), the color of the TableRow should change color. If the contents of the line is S20-1, the color should be red and so on. It works a little bit, but I'll have a few bugs:

    -You must press "Reset" twice in order to remake the Whiteboard.

    -The first colorchange also changes the color of the entire table. I want my whiteboard and lines to change color (header and TableRow unused must be white).

    You can change the first element in the array constant of S20 - 1-S20 - 3 and you will see that my program brings to the whole blue table on the first colorchange.

    Is this a mistake on my part? Or is this a bug in LV (which I doubt)?

    Property nodes are running up and down, and you have the reverse order. You set the color first, and then the active cell, which means that the colour be trolling a run.

    Your code is also too complicated. Here's a quick draft how this could be done. Let me know if you have any questions.

  • How to get these substrings based on the input string

    Hi friends
    I want the substring entered the string
    the chain is something like this: 1234,3653,7684,3254,8777,987,234
    now, I want to
    the substrings between commas

    can someone help me with this pls

    in the first substring I need 1234
    in the second, I need 3653...
    so on until the end...
    regardless of the channel is to the last

    pls help

    Hello

    You can do something like this:

    SELECT     txt
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 1)     AS part_1
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 2)     AS part_2
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 3)     AS part_3
    --     ...
    FROM     table_x
    ;
    

    If there are less than n parts, then the technique above will not raise an error; It will just return null for part_n.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
    Explain how you get these results from these data.
    What you want if the entry is like this.
    {code}
    "foo, bar".
    {code}
    ? You want to treat this as 2 pieces ('bar' is the 2nd) or a 3 s (the 2nd is NULL, and 'bar' is the 3rd)? Include examples in your sample data and results.
    Always tell what version of Oracle you are using.

  • Gets the number of records in the report based on the input of the user on the date and the number of days.

    Hello

    I need where there are quick dashboard that selects the date, second interval column consists of >, <, = and the third column is seen number (in days)

    for example, the user enters: 12 18, 2015, <, 9. here I report who should get the data (records) 9 days earlier from the date specified (from 12/10/2015 to 18/12/2015).

    Similarly for > =.

    How to get there. I'm unable to write the script and I use the column date in my report. Ask that you please advice how to solve this problem.

    Please find below the screen for reference.

    timediff.jpg

    Kind regards

    Chandra Khalil.

    Hello

    Not exactly why you're doing the report this way. If the user must select, basically, a period of dates, would not easier to have a column of data with a between the operator and the user would select 2 dates (upper and lower intervals)?

    In any case, it is possible to achieve what you want to do as a result of your approach. You could use when's CASE and have a more complex filter, but I think that it is better to have a few nested filters where you use the range operator to determine what date filter that you use (see image below)

    Some notes about my filter. First of all, I am making the assumption that the operator is "=", then the number of days specified must be ignored and you just return the data for the selected date. You will notice also that in my filters, I got a cast so far, but if you are using a column that is already a timestamp so it won't be necessary.

    This should achieve what you want.

    See you soon,.

    Pedro

  • Use this.submitForm () to submit e-mail messages based on the input from the user

    I am using the function this.submitForm () in order to allow users to send the form instead of the integrated due to various e-mails depends on the user of a text field input.

    Under work - except that I want the pdf file to send instead of fdf data. I'm trying to make it work using the cSubmitAs: input parameter, but can't seem to get the right syntax...

    if(manufacturer.value == "Manufacturer A") {
     this.submitForm(
      "mailto:[email protected];[email protected]?&[email protected];[email protected]&subject=New Service Request Submittal"
      );
    }
    else {
     this.submitForm(
      "mailto:[email protected];[email protected]?subject=New Service Request Submittal"
      );
    }
    

    After doing a little research, I came with:

    var manufacturer = this.getField("manufacturer");
    var nEmail = "mailto:[email protected];[email protected]?&[email protected];[email protected]&subject=New Service Request Submittal";
    var allEmail = "mailto:[email protected];[email protected]?subject=New Service Request Submittal";
    if(manufacturer.value == "Manufacturer A") {
     this.submitForm({nEmail, cSubmitAs: "PDF"});
    }
    else {
     this.submitForm({allEmail, cSubmitAs: "PDF"});
    }
    

    But I seem to be getting errors JavaScript no matter what I try...

    When you use "{" a "}" in a method indicates you specify the name of the parameter and then the value, and not only the value of positional parameter. If the statements of 'this.submitForm' are the following:

    this.submitForm ({cTo: nEmail, cSubmitAs: 'PDF'});

    and

    this.submitForm ({cTo:allEmail, cSubmitAs: 'PDF'});

  • Conditional WHERE clause based on the input of parameter

    When the restriction of data based on a parameter I generally use the following syntax:

    AND p.start_date = NVL (p_start_date, p.start_date)

    so IF the parameter is null, THEN I join only on itself, OTHERWISE we filter on parameter.

    New requirement means greater than or equal to, so I tried this:

    AND THE CASE
    WHERE (p_start_date = NULL) THEN
    p.start_date = p.start_date
    ON THE OTHER
    p.start_date > = p_start_date
    END;

    but, at least, is syntactically incorrect.

    Any suggestions?

    Thank you!

    Do not use = with NULL - change IS null

  • AutoFill the form based on the input field

    Hey everybody,

    I have a form on the EMP table, with a text field containing the empno.

    When I get a (valid) empno, I want to give all the necessary information (ename, job,...) automatically in the fields.

    I read somewhere that I just write a query for each input field + dynamic action that refreshes the entire region with the shape when I change the value empno.

    Now is it possible to ignore the write request and only use the RFA process?

    Thanks in advance,

    Jules

    If you don't want to again... You can use DA, which executes PL/SQL code, with the code as ' select yyyy in: PXX_ITEM "for example...

    To trigger this DA, you can anyway implemented by the DA, or you could set it as "CUSTOM" event and pressing this extraction, enforce a jscript that would un.event.trigger ("Custom_name") $;

    Who should do to avoid submission... If that's what you want.

Maybe you are looking for

  • Toshiba excites AT10LE Pro supports USB HOST?

    Clearly, I need to know if this tablet EXCITED AT10LE-A-108 supports usb host I can't get any information on the web... anyone? Thank you

  • Support Windows XP question

    I am running Windows XP, support for it ends in April, can I install Windows 8.1 or do I need a new computer, my computer is about 7 years old.

  • Skype connection error

    I tried to sign in to Skype and it returns an error and needs to close.  Several times I sent a report to Microsoft and still the same error occurs.  I even uninstalled and reinstalled Skype.  I ran my antivirus program.  Still nothing.  Can anyone h

  • Keep to withdraw safely hardware popup

    Original title: remove the device icon Hi, my safely remove hardware icon keeps flashin and and I have nothing connected to my USB ports that must be deleted.  I have tried everything to make him stop and I can't.  Is there something that can be done

  • How to send photos by mms from the server?

    Hello I am currently working on mms app.what I do is first download the image of the server and then send. but there is a string currentLocation (location of the file we want to fix) parameter to MessagePart. so I use it directly from server how can