A comparison to run using a structure case

Hello

I'm writing a simple program, but I can't seem to understand how to write it.

I have a dynamic series of data (about 16 000 values) running inside a while loop.

I want to add 180 a value if that value is less than 30.

My idea was to:

1 make a comparison: 'x '.< 30"="" to="" get="" a="" true="" or="" false="">

2 send the Boolean value and allow to use a case structure to tell if it is real

2. then, if it is 'real' x = x + 180, if 'false' x = x (just pass directly through the structure of the case)

However, he always adds 180 to the value.

Help, please!

Thanks, Jake

Hello

If my uderstanding is correct, this should help you... Please see the image as an attachment...

Accept as sollution if solved the problem...

Thank you

Yogesh

Tags: NI Software

Similar Questions

  • Tension running from negative to positive to a negative value again using a structure case

    Hello

    I a VI that takes place (not shown) DAQ hardware and want to do the following with it:

    By feeding the starting value (the maximum negative value of voltage), increase (positive) and the end value (maximum positive) voltage for the DAQ hardware TRADERS (should be

    shown in the digital display) should go to gradually change from negative to positive maxima and do the reverse process of return to the starting value

    which is the maximum negative value.

    for example

    If I put - 3V to the starting value, 0.5 as increment, + 3 V to the end value, I should get the following:

    -3, -2,5, 2,...,.0,..., 2.5, 3 and then 2.5, 2..., 0,...,-2, 2.5-3, then stops.

    I managed to get the first which is negative to positive Maxima but he never do otherwise. Can anyone help with this.

    Thank you very much

    Alain

    Study the attached example.  Instead of having just a graph showing each DC voltage at each iteration, I made a graph that will update to show all the steps as they occur.  The waveform that is the scale of things is to properly size the chart so you can see each stage without having the graph resize with each iteration of the loop.  You can pass values to your DAQ hardware to get the real exit.

    I used a second shift for such direction suggested by Altenbach register.  It is to go to the best (maybe the only way).

  • Default structure case

    My complete code is a while loop with a clock of 100 ms. My code uses a feedback control to set the temperature, it takes a few iterations. Once the temperature games, I need to acquire a value and store. I do this by using a structure case followed by shift registers. The problem is that structure matter outputs the value read for the shift to the real register case, but if you fake, I'm forced to read a default value (0). It's just completely delete my records because of iterations when the temperature is set. Is there a better solution to this?


  • write the multiple value series buffer using the structure of the case

    In this VI, I am generating waves by using the sliding bar. After that I compare it to a value as 0.6. If the value of wave is higher than 0.6 then led flashes and structure case written 1 value serial buffer. If it is less than 0.6 became led off and structure written case value 0 in the stamp series. now, I want to add another condition if the chart value is between 0.2 to-0.2 written structure case 2 series buffer value. can you tell me how can I do this?


  • Need help using the structure of the case

    I was wondering how to control a structure case if the condition is false. I tried to define if the entered string matches perform multiplication, or else if the input string is not just matches to retain the previous value. Directly to say take no action if the input string does not match.

    -lucky.

    Thank you much for the local variable solved my problem...

    -lucky

  • Passing values between tabs, using a structure of housing.

    At the risk of exposing my ignorance, I have a problem of substance; How to pass values in a controlled tab structure of the case.

    I have a simple user interface that uses a control tab control container a structure of all cases wrapped in a while loop. I use

    LabVIEW 2012.

    The basic intent is to run VI in tab 1, whose results would be available for the VI tab 2 ect...

    (See the attached example; an experience I wish that changes to the controls to page 1 int & string will appear

    the indicators corresponding to page 2).

    I can "pass" the values of a case outside the case itself (through a tunnel of output) structure, but can't seem to do

    available for all other cases by a tunnel entrance.

    I tried to tunnel of the case in a registry to lag on the while loop, but am upset by retrieving that data again in another case.

    I tried to use local variables, but obviously do not understand the paradigm brought LabVIEW for variables. I can create a local

    variable but can't seem to 'plug in' to an indicator on the second page.

    First question: is a reasonable method for execution of the loop control program structure business controlled within a certain time tab?

    I chose it because I have literally dozens of parameters to define, validate and want to manage Visual space

    for the operator. For example, I would that this sequence:

    1. Question and list of facilities available on my PC
    2. Select a device to use, make sure it works properly
    3. Set the parameters for this particular device (30)
    4. run the device, collect data and save the results

    Second question: it is clear that I don't know how to use variables, and the examples I read involve transmission of data to parallel structures

    and not in a case. Is a local variable to a reasonable method of transmission of data between the "tabs"? I will gladly make

    accept the reprimand to 'RTFM' until 'FM' required is identified.

    Thank you in advance for your kind attention to my wisely first year survey

    Shift registers are simple to get data from.  Where is your problem with their use?  However, have you considered just using the terminals directly in the case of the Page 2?

    You must learn to use the Structure of the event.  You shouldn't care what tab you are on.  It's all in the same VI.  Therefore use a Structure unique event for all your control value changes.

  • by using a structure of the event to restore a Boolean control with change in value for the menu ring

    I'm trying to get two Boolean buttons to reset when the value of a ring menu.  For this I use a structure of event defined to execute with a ring value change.  However I have another code that should be run while the structure of the event expected to change value.  I place my structure of the event inside the while loop buttons reset as expected but my other code is not run (except when the value of change). If I place it outside the loop the rest of functions code as expected, but the buttons do not reset.  Any help you offer is much appreciated.

    Hello

    ADD TIME OUT EVEN AND GIVE DELAY OF 100 MS.

    Adds the case-application-timeout event

  • How do I step manually in code that uses a structure of the event, when I want to select a particular event?

    I use an architecture of producer/consumer for an application with a structure of the event in the upper loop. Events are triggered by the user from the control panel using Boolean switches that are "change when you press on" and "release switch. My question is how can I manually step through the code using various events? It doesn't matter what I'm still not in the same event.

    Thank you.

    You can view the code? Is what event still enter? I did have problems step by step in code that uses a structure of the event. You must be patient, but because the application is slowed down a bit and it can take a while to get into the case of the specific event depending on what events you deal. Usually, I place a breakpoint in the case I am interested and run the application as usual. Once I hit the breakpoint is when I turn on highlighting of execution.

  • Simple question of LabVIEW on accountant Boolean signal off structure case

    Hello

    In my current program, I am trying to carry a Boolean signal (elapsed time) on a structure case to stop a while loop.

    http://zone.NI.com/images/reference/en-XX/help/371361E-01/loc_bd_casestatus.gif

    The loop on the left is basically what I want to do again every time I do this, I get a green tunnel box with a White Center.  It I cannot run the program by saying that there is a missing assignment in the tunnel.  What can I do to work around this problem?

    White Center means that there are some cases where you do not have a Boolean value wired to the exit tunnel. The tunnel exit value is the value that is wired slots in the case that runs, a value must be available in all cases.

    There are two possible solutions.

    (1) [normally preferred wire] a Boolean value in the tunnel of release in all cases. Exit tunnel will then travel to a solid color.

    (2) right click on the tunnel and select 'Use default if unwired' you will notice that the White Center will get smaller. It's like a constant false wiring for each of the cases with no wire. The drawback here is that it can hide errors in logic. You might expect over something, but not out of the Park, and no syntax error was reported.

    Rod.

  • Add using a Structure

    I need to run an append query by using a structure to pass in one of my fields of data. Is not a difficult thing to do normally, but that's a little unusual. I'm basically migration around 1.5 million records in a single table in a relational database data dump.

    The first query gets all the NUMBERS of CASE unique from the receipt of data and places them in a table called Box_Details. Then I go and get the values of the primary key (PK) for all the unique boxes just to add to the table. I store the PK and the box number in a structure called box_Struct.

    Now comes the hardest part. I have to run another query of data even discharge and I need to replace the Box_Number field with the appropriate value contained in the box_Struct structure. The last query, called AddItem, shows what I'm trying to do. Basically, I need to pass the value of the query SELECT, which runs inside the query (INSERT INTO) add to the structure of box_Struct so I can use the Box_ID as my foreign key in the table item_description. I know how I shoot everything in CF, but I don't feel more like 1.5 million records in a loop so I need a better way to make this substitution. Any ideas on how I can make this substitution inside the query work?


    < CFQUERY NAME = "AddBoxDetail" DATASOURCE = "#Request.DSN_RW #" >
    INSERT INTO box_detail (trans_id, uval_trans_id, agency_id, box_type, box_number, box_desc, box_begin_date, box_end_date, stype_id, vault_loc, barcode, RotFreqCnt, Box_Date_In)
    SELECT DISTINCT #GetMax.MyMax # AS trans_id, 0 AS uval_trans_id agency_id, box_type, box_number, box_desc, box_begin_date, box_end_date, stype_id, vault_loc, barcode, 1 AS RotFreqCnt, Box_Date_In
    OF ImportRITSData
    < / CFQUERY >

    <!--> get the pharmacokinetics of records comes to be added
    < CFQUERY NAME = "GetBoxID" DATASOURCE = "#Request.DSN_RW #" >
    SELECT box_id, box_number
    OF box_detail
    WHERE box_number IN (Select DISTINCT box_number OF ImportRITSData)
    < / CFQUERY >

    < CFSET box_Struct = StructNew() >
    < CFOUTPUT QUERY = "GetBoxID" > < CFSET box_Struct ["#box_number #" ""] = box_id > < / CFOUTPUT >

    < CFQUERY NAME = "AddItem" DATASOURCE = "#Request.DSN_RW #" >
    INSERT INTO item_description (item_type, item_number, box_id, form_number, years_inclusive, retent_reqmt, description)
    SELECT item_type, item_number, box_number, #box_Struct [box_number] # AS box_id, form_number, years_inclusive, retent_reqmt, description
    OF ImportRITSData
    < / CFQUERY >

    Thanks in advance for the help!
    Have a day Ordianry...
    KomputerMan ~ |  :-)

    One issue is that in your final request, input values do not match, you have 7 fields but 8 values

    So, assuming your version value struct is the additional value, and assuming that the box_number is a single value, you should be able to do this...

    INSERT
    IN item_description
    (
    item_type,
    item_number,
    box_id,
    form_number,
    years_inclusive,
    retent_reqmt,
    Description
    )
    SELECT item_type,
    item_number,
    (select b.box_id from box_detail b where ird.box_number = b.box_number) AS box_id,.
    form_number,
    years_inclusive,
    retent_reqmt,
    Description
    OF ird ImportRITSData

  • First HP: help using the command CAS.solve (STRING1, STRING2) within a program

    Hello and hope you can help me with my problem!

    I write a somewhat complicated program (operating mode no case) who has a subroutine called STSOLVE where his entry is always a string from the main program that contains a formula as "'I' = 'V' / 'R', 'R'" and its goal is to replace all the variables contained in "" to the compatible standard CASE generated automatically variable (teiXX where XX is a unique number) and then use the command solve to assess this formula (say final temporary formula "tei1 = tei2 / ') tei3, tei3"). Before returning, he replaces the temporary variables, generated automatically with the original on the result, so the original formula will be sent back solved in the main program.

    My problem:

    It returns the result {UNDEF} or simply {} even in expressions that absolutely work if used with the command solve manually, in the main screen of calculators CASES when the CAS.solve command is used either! Even though I know that the entry of this order is correct according to the tutorials I've read in the forums, I can't work properly.

    I tried all methods of writing the order and I only managed to get a result when I wrote this:

    RPART1: = cas.expr (RPART1);

    RESLT: = case. Solve (RPART1, "tei2");

    .. .or RPART1 contains, say, the part 'tei1 = tei2/tei3' (NOT AS A STRING!) and "tei2" SHOULD be written as shown here, a chain, entered manually just for test (can be 'tei1' or 'tei3' too for this particular case). However, if I put "tei2" in RPART2 of local variable in the subroutine as a string and then pass this variable to the solve command, say:

    RPART1: = cas.expr (RPART1);

    RESLT: = case. Solve (RPART1, RPART2);  RPART2 contains the string "tei2", "tei1" or "tei3.

    Here again, I get a {} as a result!

    I tried so already a lot of things that I don't know exactly what mention here, but I hope I described the main situation enough to start detailed and of course, I'll give you any other information you might need to give me more help. I tried to paste the entire subroutine, or even the entire program, but I don't have any windows pc to connect the first HP and copy the program. I am writing from an Android Tablet and I should maybe type the everything here is not very easy, I will of course if you ask.

    Perhaps, I should also note that the generated vars tei1, tei2 etc. do not exist as variables in the calculator, but if I copy channels same as the program tries to run in the command CAS.solve and manually write in case screen (not a string of course) then they get solved without problems.

    Hope to get help and learn from you and I wish I could found more help about it online, but it seems very difficult and also all the tutorials I found on the cas.solve command in the programs did not work in my case!

    Andreas

    It works, or is this not the problem?

    CAS.solve ("tei1 = tei2/tei3", "tei2");

    I get output: {tei1 * tei3} which is correct.

  • Why code simple structure case block?

    Hello

    in this code structure case has two cases in one of them, there is a structure to a single event.

    with one button, I have just conrtol State mechine.

    After playing with this button, labview is suspended.

    a few times after an ot twice a few times after more than 10...

    It crashes because you can get in a situation of the structure of the event is not currently available (so the events are not handled), but an event she in the meantime.

    You have "Panel Lock" selected in the value change case event that just as it is said, locks the façade until the event is handled.

    Sometimes you get a race condition where

    -you click on to disable the button

    -a value change event is placed in the event queue

    -you set your state variable to 1 (disable event handling)

    the structure of the event will never, then run the event does not get managed, and the front remains locked.

    You should never have a loop of events implemented to manage the events that cannot perform to manage these events!

    I can't tell what you are actually trying to achieve with this code - it's a strange way to proceed. I think you need to plan your States a bit more and work on what you're trying to do and maybe look at some examples of State machines and architecture of producer consumer if you want to handle events and have a functioning of State machine.

  • How to use a structure of the event in a Subvi

    I am using a structure of the event within a Subvi.  The Subvi has a table constructor that built tables and the structure of the event is used so that when the program runs, it allows you to change the elements of the array.  It works, but when I apply within a Subvi, it does not work properly.  This goes into a Subvi, because it will be part of a much larger progrram, so it must be modular.

    If you are using a structure of the event, it is not a Subvi.  If you worry about modularity, you should not use the structure of the event.

    You seem to have a fundamental misunderstanding of modularity.  An event structure must be placed in a while loop.  If you have a while loop in a Subvi, you have transferred control of your program to the Subvi.  You are not at this stage modular.  Your higher level GUI has no control.  You would have to create a stupid system of variables to pass data down to the loop to stop the loop and return to your main VI.  This is not a good design decision.

    Instead of searching for a way to make something broken, you should spend effort trying to understand what you really want to accomplish.  You should also spend some time to learn how to work the event structures.

    This application is small at the moment and it is already on the way to the unreadable.  It's a terrible thing to do for you.  Break these habits now.  variables are only when absolutely necessary.  Using subVIs to accomplish individual tasks, do not run the entire application.  With the structures of the event, use a value of stop button change event for will not be held hostage to the time-out.  If your variable is '2' in it, you're doing something wrong.  It has to be something different between set points, put it in the name.  If you want to make the subVIs, create an icon.

    But first and foremost, invest time in understanding dataflow

  • Can I control with structure case tab control pages?

    Hello!

    I'm quite new to Labview and my company wants me to do some programs for electronics testing. I am currently working on the GUI and I would like three pages in a tab with control buttons control.

    I've only had the Labview 2009 base package, so I can't use the structure of the event.

    If you open my .vi you can see I have a control tab with three pages. On the first page, I had a 'Start' button which should open the next page in the tab control. On the Central page, I have a "Back (back)" button that should go back to the previous page. The button called "Lagre (Save)" should work as a next button and go to the last page. On this page, I have a 'back (Back)', 'Ny test (new test-> go to first page again)' and 'Avslutt (Quit).

    The buttons on the tab control of cases something that I copied an example just to try. It works perfectly, but I can't change the Structure of the event in the example.

    Is it possible to solve with Structure box? Or maybe there are other solutions? Feel free to edit my .vi if you wish

    Thanks for the help!

    Kind regards

    Same Myhre

    Test engineer

    Hello again,

    I made a fundamental change in your VI.  Only the first box in the first tab works, but I guess that you can sort the rest of them.  I hope it helps to start with.

    Dani

  • I have iphone 4s, icloud locked trying to get in touch with the owner to give it back or unlock it he won't talk, it's gsx is useful in this case? owner is not interested in the phone!

    I have iphone 4s, icloud locked trying to get in touch with the owner to give it back or unlock it he won't talk, it's gsx is useful in this case? owner is not interested in the phone! and he has been blocked me on whatsapp about 6 times when I tried to get in touch with 6 different number what can I do I login apple, name and telephone number of the owners, in the name of the country

    anyone here to help me? am ready to give her phone or money for if it unlock the phone

    * someone sell me the phone on class based internet site

    Thank you

    It's between you and him, Apple won't help you. So if he wants too that the phone doesn't help you, I advise you to stop bothering him, it's a little cheesy, don't you think?

Maybe you are looking for