Help with case structure

In the VI that i'm enclosing, i have used a boolean array of two booleans to operate two case structures. Inside the case structure, when the boolean is true the shift register value is to be incremented once.The difference between the two incremented values is taken as count. I am facing two problems, firstly, the increment takes place continously instead of just once every time the boolean is true, secondly, the count switches to zero when the switch is turned back to false.
Thanks in advance.
Attachments:
New.vi ‏11 KB

Try something like this.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
NewMODCA.vi ‏8 KB

Similar Messages

  • Need help with case structures- please help :)

    Hey all.
    I'm currently trying to program a infrared furnace. I'm setting a temperature, subtracted my set temperature from the actual temperature (thermocouple hooked up to SCB-68), and voltage is being sent to the controller of the furnace accordingly. However, I need to hold the set temperature for a certain amount of time. I need help programming this: when the VI reads the set temperature from the thermocouple, it results in a timer running down. When the timer runs down to 0, the While Loop ends. I'm thinking case structures is most appropriate, but if you have a better suggestion, please let me know.
    Thanks

    You should probably implement a state machine.
    The state machine would keep track of the temperature and making ajustments on a timely basis.
    There is a template of a state machine is you select under the File menu > New > From Template.
    You can also look under Help > Find Example > and do a search for state machine.
    There are lots of state machine examples on this forum, some of which may be quite useful.
    RayR

  • Can I control pages in tab control with case structure?

    Hi there!
    I'm quite new to Labview and my company wants me to make some programs for testing of electronics. I'm currently working on the GUI and I would like to control three pages in a tab control with buttons.
    I only got the base package of Labview 2009 so I can't use Event structure.
    If you open my .vi you can see I have a tab control with three pages. In the first page I got a "Start" button that should open the next page in the tab control. In the middle page I have a "Tilbake (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 that page I have a "Tilbake(Back)", "Ny test(New test -> go to first page again)" and "Avslutt (Quit)".
    The buttons under the tab control where something I copied from an example just to try out. That works perfectly, but I cannot edit the Event Structure from the example.
    Is this possible to solve with Case Structure? Or maybe there are other solutions? Feel free to edit my .vi if you like
    Thanks for the help!
    Regards,
    Even Myhre
    Test engineer
    Regards,
    Even
    Certified LabVIEW Associate Developer
    Automated Test Developer
    Topro AS
    Norway
    Solved!
    Go to Solution.
    Attachments:
    Test GUI.vi ‏29 KB

    Hi again!
    Well it solved my problem, but I got a strange error while running my program.
    When I press "start", the tab control changes page. When I press "tilbake(back)" it is totally random how many clicks it is necessary for it to change back to the first page. It can be from 1 to 20-30 clicks. Which is very strange since all other navigation buttons works perfect. "Tilbake(back)" button on the last page works correctly and has the same structure as the "tilbake(back)" button on the middle page.
    I have tried all the different options on how the button will response on a press.
    Regrads,
    Even
    Regards,
    Even
    Certified LabVIEW Associate Developer
    Automated Test Developer
    Topro AS
    Norway
    Attachments:
    Test GUI2.vi ‏28 KB

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • Need help with XML structure

    Hello, I would like to create an extention that will help to
    manage a
    glossary.
    First I need to decide on the structure of the xml document
    that will
    contain all glossary entries. Since I don't have much
    experience with XML in
    extention content, I was wondering if there are certain
    recommendations I
    should follow.
    What is preferable: using attributes that will holt the
    content or rather
    having xml-elements. What is easy to parce?
    I would greatly appreciate any tips, help and suggestions.
    Olyalyu

    .oO(olga)
    >First I need to decide on the structure of the xml
    document that will
    >contain all glossary entries. Since I don't have much
    experience with XML in
    >extention content, I was wondering if there are certain
    recommendations I
    >should follow.
    I would start as simple as possible, for example with
    something like
    this:
    <glossary>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    <entry>
    <term>...</term>
    <explanation>...</explanation>
    </entry>
    </glossary>
    Of course it also depends on what you want to do with this
    structure and
    if you need additional informations.
    >What is preferable: using attributes that will holt the
    content or rather
    >having xml-elements. What is easy to parce?
    There's no real rule-of-thumb whether to use elements or
    attributes.
    If unsure, use elements.
    Micha

  • Help with ABAP Structure to XML - Simple Transformation

    Hi guys,
    I need help with a Simple Transformation. I am trying to convert a structure in ABAP to XML String but i ma getting short dumps...
    Can any of you help.
    Thanks in advance.
    *& Report  ZTESTXML
    REPORT  ZTESTXML.
    class demo DEFINITION.
       PUBLIC SECTION.
       CLASS-METHODS main.
       ENDCLASS.
       CLASS demo IMPLEMENTATION.
         method main.
           data : begin of account,
                    partner type bu_partner,
                    primary(1),
                    update(3),
                    email(50),
                    memberid(4),
                    telephone(12),
                    fax(10),
                    dept(20),
                    end of account.
            data : xmlstr type xstring.
                    account-partner = '12345'.
                    account-primary = 'N'.
                    account-update = 'Yes'.
                    account-email = 'zz at hotmail.com'.
                    account-memberid = '555'.
                    account-telephone = '123-448-6710'.
                    account-fax = '345-123-7899'.
                    account-dept = 'Info Systems'.
                    call TRANSFORMATION ztest_inttable
                                        SOURCE account = 'account'
                                        result XML xmlstr.
           call FUNCTION 'DISPLAY_XML_STRING'
               EXPORTING xml_string = xmlstr.
           ENDMETHOD.
           ENDCLASS.
           start-of-SELECTION.
             demo=>main( ).
    Transformation
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="account"/>
      <tt:template>
        <IGT_CRM_AccountInfo>
          <Account>
            <tt:ref name=".account">
              <tt:attribute name="Id" value-ref="PARTNER"/>
              <tt:attribute name="Primary" value-ref="primary"/>
              <tt:attribute name="Update" value-ref="update"/>
              <Contact>
                <tt:attribute name="EMail" value-ref="email"/>
                <tt:attribute name="Member Id" value-ref="memberid"/>
              </Contact>
              <Communications>
                <tt:attribute name="Telephone" value-ref="telephone"/>
                <tt:attribute name="Fax" value-ref="fax"/>
              </Communications>
              <IGT>
                <tt:attribute name="Department" value-ref="dept"/>
              </IGT>
            </tt:ref>
          </Account>
        </IGT_CRM_AccountInfo>
      </tt:template>
    </tt:transform>
    Dump message
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_ST_REF_ACCESS', was not caught in
    procedure "MAIN" "(METHOD)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The goal was to access variable "PARTNER". However, this access was not
    possible.

    to convert abap itab or variable into xml string use ABAP key word call transformation.
    call transformation (`ID`)
                source output = itab[]
                result xml xml_out.
    where itab is your internal table or any abap variable.
    xml_out is type string which will hold the resulting xml.
    ID is the transformation program. if you wanto use your own transformation, use your XSLT or ST program there.
    Raja

  • Broken Arrow with Case Structure Input Selector

    Generally We get a broken arrow when a case structure 
    is wired incorrectly to its case selector .
    I found that even after this is fixed, the arrow remains broken.
    however when you click on the broken arrow, the VI 
    starts to execute instead of highlighting the error.
    Seems like a compiler Issue.
    I want to know if anyone has faced this issue.
    I am currently using LV 8.6
    Regards,
    Sundar.

    SUNDAR.N wrote:
    Generally We get a broken arrow when a case structure 
    is wired incorrectly to its case selector .
    I found that even after this is fixed, the arrow remains broken.
    however when you click on the broken arrow, the VI 
    starts to execute instead of highlighting the error.
    Seems like a compiler Issue.
    I want to know if anyone has faced this issue.
    I am currently using LV 8.6
    Regards,
    Sundar.
    I can confirm that. I HAve seen it with type defs as well as LVOOP classes.
    I have never been able to reproduce it on demand but it always seesm to be associated with situations where a type or class definition was changed. I think I have seen this issue on and off from LV 8.2 thru LV 8.6.
    Ben
    Message Edited by Ben on 07-31-2009 06:59 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Possible to do this with case structure?

    Essentially I want the case structure to do: If case1 = run OR case2 = run, do this, else do case3++
    I'm using a string case structure right now, where for example, the inputs could be SWEEP_A or SWEEP_B but I want the case structure to use case SWEEPAorB. This is so I can have different names for the input string BUT run the same case (this is to avoid redundant code for what I'm doing).
    Thanks.

    For more complex logic use can use create a boolean array and convert it to a number.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Help with CASE MANAGEMENT

    Hi Experts,
    I am working with Case Management, and I have to create Cases with all its specifications automatically. Anybody knows how I can create it? or Anybody have any suggestion or documentation to start with this.
    Thanks in advance.
    Regards,
    Beatriz.

    Hi,
    Easy transaction to Case Management customizing is SCASE_CUSTOMIZING. There you have an overview of the customizing of case management.
    Also carryon these steps one by one...
    Case Management Basic Settings :
    Define Number Range Intervals for Case
    Define Case Types
    Determine Permitted values for attribute
    Create values for "Category" attribute
    Create values for "Cause" attributes
    Create values for "Priority" attribute
    Create values for "Reason" for escalation attribute
    Assign escalation reasons to an attribute profile
    Create values for "Authorization level" attribute
    System Modifications
    Create status profile
    Create Text profile
    Create Text Ids
    Create Text Profile
    Define Logical system for external objects
    Enhanced System modifications
    Note About Enhanced System Modifications
    Define Processes
    Set up registry
    Create/Change Case Record Model
    Create Profiles
    Create attribute profile
    Create function profile
    Create terminology profile
    Create Activities for authorization check
    Activate application log
    Define processes
    Create/Change Case Record Model
    When u open the Transaction SCASE_CUSTOMIZING , there will be Registry Steps...
    Follow them step by step.
    For any queries reply.
    Regards,
    Eswari.

  • SQL query help with CASE

    Hi All,
    I have 2 tables like below. now i have a requirement which i need to do it in CASE OR DECODE. because i have to implement this logic IN SELECT STATEMENT for a column.
    In table T1 if Lang = 1 and State = 'P' then display Lang = 'english' in table T2(which is Lang=2 in table T1) Or else display null.
    Can we do this logic using CASE or DECODE? pls help
    T1
    Lang  State
    1      P
    2      N
    T2
    Lang  Dscr
    1     central
    2     english

    Something like this ?
    SQL> ed
    Wrote file afiedt.buf
      1  WITH t1 AS (SELECT 1 lang, 'P' STATE FROM DUAL UNION ALL
      2              SELECT 2 lang, 'N' STATE FROM DUAL
      3             )
      4     , t2 AS (SELECT 1 lang, 'central' dscr FROM DUAL UNION ALL
      5              SELECT 2 lang, 'english' dscr FROM DUAL
      6             )
      7  SELECT t1.lang,t1.state,CASE
      8           WHEN t1.lang=1 AND t1.state='P'
      9           THEN (SELECT t2.lang FROM t2 WHERE dscr='english')
    10           ELSE NULL
    11           END "lang"
    12* FROM t1
    SQL> /
          LANG S       lang
             1 P          2
             2 N

  • Help with Event Structure!.

    Hello,
    I am trying to config one event structure in the way I could change the range of sample graph to analyze it. 
    I have 3 graphs. The upper is the signal input.  In the middle is the signal fitted with some calculations and the bottom is the graph where I fix the sample width to analyze with anothers values.
    I put event structure in the way I read from file and later update the array of data to force the execution of Case "array 2". 
    Its only one example but I would like to change the value of "start" and " length" of sample signal but I cant get the data to show again. I tried diferent options, like put another event source inside of event case "array 2".
    I could join case 1 and 2, but the problem is with "start and lenght" control, I can`t get its display when i change the values.
    I created a example since its part of my program, to simulate the similar way i need.
    Thank in advance, Fred.
    Solved!
    Go to Solution.
    Attachments:
    example-eventStructure.vi ‏56 KB
    006_RR.txt ‏7 KB

    altenbach wrote:
    billko wrote:
    crossrulz wrote:
    You need to wire up the value of Array 2 to the output tunnel of the event case.  Currently, that output tunnel is set to "Use Default if Unwired".  So since you didn't wire up that tunnel, the value going into the shift register will become an empty array.
    That's one thing I am totally paranoid about.  I hate that the tunnels in an event structure are "Use Default if Unwired" by default, yet they don't show that little dot that suggests that it is.
    Of course they do! What makes you say they don't?
    I actually like the current behavior, especially for the boolean going to the stop button. I would not want to wire it in all the other cases where the loop should not stop.
    Maybe the behavior could be a bit fine-tuned. Automatic "Use default if unwired" should only apply to scalars. Tunnels for arrays and clusters, etc. should require a manual "use default if unwired" setting.
    Ha - it's because of my own paranoia about the "Default if Unwired" that led me to believe this.  I guess I always have something wired to every single case so I haven't seen it in ages.  I created one just now and specifically looked for the dot, and when I added a second case, there it was.  Of course if I wire something to that second case, it disappears.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Still need help with case sensitive strings

    Hello guy! Sorry to trouble you with the same problem again,
    but i still need help!
    "I am trying to create a scrypt that will compare a String
    with an editable text that the user should type to match that
    String. I was able to do that, but the problem is that is not case
    sensitive, even with the adobe help telling me that strings are
    case sensitive. Do you guys know how to make that comparison match
    only if all the field has the right upper and lower case letters?
    on exitframe
    if field "t:texto1" = "Residencial Serra Verde"then
    go to next
    end if
    end
    |----> thats the one Im using!"
    There were 2 replys but both of them didnt work, and the
    second one even made the director crash, corrupting even previously
    files that had nothing to do with the initial problem..
    first solution given --
    If you put each item that you are comparing into a list, it
    magically
    makes it case sensitive. Just put list brackets around each
    item.
    on exitframe
    if [field "t:texto1"] = ["Residencial Serra Verde"] then
    go to next
    end if
    end
    Second solution given--
    The = operator is not case-sensitive when used on strings,
    but the < and > operators are case-sensitive.
    So another way to do this is to check if the string is
    neither greater than nor less than the target string:
    vExpected = "Residencial Serra Verde"
    vInput = field "t:texto 1"
    if vExpected < vInput then
    -- ignore
    else if vExpected > vInput then
    -- ignore
    else
    -- vExpected is a case-sensitive match for vInput
    go next
    end if
    So any new solutions??
    Thanks in advance!!
    joao rsm

    The first solution does in fact work and is probably the most
    efficient way
    of doing it. You can verify that it works by starting with a
    new director
    movie and adding a field named "t:texto1" into the cast with
    the text
    "Residencial Serra Verde" in the field. Next type the
    following command in
    the message window and press Enter
    put [field "t:texto1"] = ["Residencial Serra Verde"]
    You will see it return 1 which means True. Next, make the R
    in the field
    lower case and execute the command in the message window, it
    will return 0
    (true).
    Now that you know this works, you need to dig deeper in your
    code to find
    what the problem is. Any more info you can supply?

  • Help with case suggestion

    I need the searching power of the Apple Community, for my efforts have produced few results!
    I was a blackberry user (the 8310 Curve) and I really liked the case I had. Leather case, magnetic strap, swivel clip and I was able to pull the phone out whenever I needed to.
    I am trying to find something similar if not exactly like this for the iphone. Slim is nice, but I really want that swivel clip so that I can angle the case and pull out the phone whenever i need too. (I see some cases have a strap overtop)
    Any suggestions are greatly appreciated.

    It depends on your budget. I plumped for one of these http://www.vajacases.com/ as i've had them in the past and the quality is top notch. However, I couldn't decide between two different ones so I also went with one of these as well and i'll chop & change as & when I feel like a change. I couldn't resist as they look so cool http://www.miniot.com/miniot/index.htm
    I also like the blackberry cases, however, i've found that the belt clip doesn't last all that long. One has broken on me and the second one is on it's way out now. The first option from vaja sounds more like what you are looking for though. Hope this helps.

  • Need help with case cracking - Defect?

    I have a macbook (white) a1181 that I purchased in 2008...
    I handle my computers very delicatly and if they travel with me, they are packed very well with support...
    The body (case) of the laptop back by the fan underneath has a long hairline crack.
    There is also one where the front lip is as well.
    NOW,
    Apple Genius Bar wants ME to pay outright to get it fixed.
    It was not my fault at all!!!!! And it was not accidental damage either.
    SO I called Apple who wouldn't help me because I don't have phone support Or apple care. So if I pay the $50 for phone support, they'll tell me the same thing they told me in the store the operator told me.
    FIRST OFF, I didn't know that my Apple Care expired and even if I had it, it wouldn't really help me I was told...
    I paid so much money for this laptop and scrimped and saved up and I feel like I'm being dragged through the mud.
    I need to contact someone higher-up ASAP - this is absolutely ridiculous.
    I did not do anything to cause this cracking..
    I am so upset as I really saved up for years for this computer only for 3-4 years later for it to be cracking worse and worse. I paid so much...
    Any advice or help would be greatly appreciated.
    Thanks,
    aj

    ajsonnick wrote:
    I need to contact someone higher-up ASAP - this is absolutely ridiculous.
    Did you ask to speak to a manager while you were at the Apple store?

  • Help with Server Structure and File Identification / Test vs Remote vs Local

    I inherited a website at a new job.  I have 0 experience with building websites, let alone DW and have only been through the beginning tutorial.  I feel I am ready to make my first edits to the website. 
    We have two servers, test and remote.  I have files saved in C: under wamp folder.  When I am connected to test server, the folder structure doesnt change, but the folders turn red.  If the folders are not red, I am working from the local file?  If the folders turn red, I am working from the Testing Server copy?  And if so with the red folders, why is the file path still the same, C:\wamp etc...?
    Thanks -
    John

    Sounds about right. 
    I have my local site folder inside WAMP/www/  so when I save local files in DW, they're immediately saved in the testing server.  This also allows me to see parsed content in Live View or Live Code. 
    Nancy O.

Maybe you are looking for

  • Problem working with HttpClusterServlet

    hi:           this is the first time i work with weblogic6.1(NT platform) cluster.           i config the DefaultWebApp as web application which will proxy requests to           my cluster which consists of two weblogic server running on the same hos

  • Setting scroll bar to inbisible when not needed

    Here is the post again, some quotation marks came out as letters before. This is correct version I'm using AS 2.0, and have added a scroll bar with instance name: ...................sb1 a dynamic text field with instance name:.... tb1_txt an external

  • HT201401 iPhone 4S rear camera black screen but front facing camera perfectly fine and freezing updated to iOS 7.0.4

    iPhone 4S brought couple of years ago, no apple warranty or AppleCare and since updating to iOS 7.0.4 there has been trouble with the rear facing camera, i dont want to go to apple store because i know that they will be like "You have to pay £200" an

  • Help to extract the Column Name depending on the row values

    Hello All, I have a table with below format Table Name: Employees Emp Name Monday Tuesday Wednesday Thursday Friday Saturday John yes NULL yes yes NULL NULL Michael NULL yes NULL yes yes NULL Smith NULL yes yes NULL yes yes In the above I have explic

  • Zen Micro Recovery M

    I have had some unfortunate experience with ZEN MICRO recovery mode. I want to suggest to creative that they provide more user feed back on the device after each phase of recover mode, clean up ..it should tell you when you've completed the task. For