How can I wire a string value to the case selector terminal and depending on that value, execute a selected case?

Hi Everyone
In the block diagram of the posted VI, thru serial comm, byte #2 is either 00 or 01 (Hex). This byte should dictate which case to execute. If Hex value = 00 executes case #1, If Hex value = 01 executes case #2. If neither, nothing should execute.
How can I do this? I am fairly new to LabVIEW any feedback is highly appreciated.
Thanks
Mahir
Solved!
Go to Solution.
Attachments:
testing whole string Bank A & B.vi ‏24 KB

easier to just wire in the integer to the case structure rather than convert to string.  
Then just go up to the case selector and type what you want.
Paul <--Always Learning!!!
sense and simplicity.
Browse my sample VIs?

Similar Messages

  • How can I print a Safari page without the links being printed and cover other text?

    How can I print a Safari page without the links being printed and covering other text?

    Try printing the page as PDF.
    From your Safari menu bar click File > Print > Save As PDF then print the PDF file.
    If you don't want to do it that way, reset the print system.
    Mac OS X: How to reset the printing system

  • How can I unlock my ipod touch?  The screen is locked and has various languages on the sliding bar.  It wont let you touch it

    how can I unlock my ipod touch?  The screen is locked and has various languages on the sliding bar.  the screen is grey and the normal screen saver is gone.

    As a first attempt, try a reboot by holding both the power and home buttons untl the apple logo appears and it restarts, ignoring the red slider if that appears.

  • How can I use Hash Table when processing the data from cdpos and cdhdr

    Hello Guru,
    I've a question,
    I need to reduce the access time to both cdhdr and cdpos.
    Because may be I'll get a huge number of entries.
    It looks like that by processing cdhdr and cdpos data will take many secondes,
    it depends on how many data you need to find.
    Hints : Putting instructions inside a form will slow down the program?
    Also, I just want use Hash table and I need to put a loop-instruction going on the hash-table in form.
    I know that it's no possible but I can declare an index inside my customized hash table.
    For example :
    DO
    READ TABLE FOR specific_hash_table WITH KEY TABLE oindex = d_oindex.
    Process data
    d_oindex += 1.
    UNTIL d_oindex = c_max_lines + 1.
    Doing this would actually not necessary improve the performance.
    Because It looks like I'm having a standard table, may be there's a hash function, but it could be a bad function.
    Also I need to use for example COUNT (*) to know how many lines I get with the select.
    FORM find_cdpos_data_with_loop
      TABLES
        i_otf_objcs TYPE STANDARD TABLE
      USING
        i_cdhdr_data TYPE HASHED TABLE
        i_objcl TYPE j_objnr
    *    i_obj_lst TYPE any
        i_option TYPE c
      CHANGING
        i_global TYPE STANDARD TABLE.
      " Hint: cdpos is a cluster-table
      CONSTANTS : objectid TYPE string VALUE 'objectid = i_obj_lst-objectid',
                  changenr TYPE string VALUE 'changenr = i_obj_lst-changenr',
                  tabname TYPE string VALUE 'tabname = i_otf_objcs-tablename',
                  tabnameo1 TYPE string VALUE 'tabname NE ''''',
                  tabnameo2 TYPE string VALUE 'tabname NE ''DRAD''',
                  fname TYPE string VALUE 'fname = i_otf_objcs-fieldname'.
      DATA : BEGIN OF i_object_list OCCURS 0,
                objectclas LIKE cdpos-objectclas,
                objectid LIKE cdpos-objectid,
                changenr LIKE cdpos-changenr,
             END OF i_object_list.
      DATA : i_cdpos LIKE TABLE OF i_object_list WITH HEADER LINE,
             i_obj_lst LIKE LINE OF i_cdpos.
      DATA : tabnamev2 TYPE string.
      IF i_option EQ 'X'.
        MOVE tabnameo2 TO tabnamev2.
      ELSE.
        MOVE tabnameo1 TO tabnamev2.
      ENDIF.
    *LOOP AT i_cdhdr_data TO i_obj_lst.
      SELECT objectclas objectid changenr
        INTO TABLE i_cdpos
        FROM cdpos
        FOR ALL ENTRIES IN i_otf_objcs
        WHERE objectclas = i_objcl AND
              (objectid) AND
              (changenr) AND
              (tabname) AND
              (tabnamev2) AND
              (fname).
      LOOP AT i_cdpos.
        APPEND i_cdpos-objectid TO i_global.
      ENDLOOP.
    *ENDLOOP.
    ENDFORM.                    "find_cdpos_data

    Hey Mart,
    This is what I met, unfortunately I get the same performance with for all entries.
    But with a lot of more code.
    FORM find_cdpos_data
      TABLES
        i_otf_objcs TYPE STANDARD TABLE
      USING
        i_objcl TYPE j_objnr
        i_obj_lst TYPE any
        i_option TYPE c
      CHANGING
        i_global TYPE STANDARD TABLE.
      " Hint: cdpos is a cluster-table
      CONSTANTS : objectid TYPE string VALUE 'objectid = i_obj_lst-objectid',
                  changenr TYPE string VALUE 'changenr = i_obj_lst-changenr',
                  tabname TYPE string VALUE 'tabname = i_otf_objcs-tablename',
                  tabnameo1 TYPE string VALUE 'tabname NE ''''',
                  tabnameo2 TYPE string VALUE 'tabname NE ''DRAD''',
                  fname TYPE string VALUE 'fname = i_otf_objcs-fieldname'.
    *  DATA : BEGIN OF i_object_list OCCURS 0,
    *            objectclas LIKE cdpos-objectclas,
    *            objectid LIKE cdpos-objectid,
    *            changenr LIKE cdpos-changenr,
    *         END OF i_object_list.
    ** complete modified code [begin]
      DATA : BEGIN OF i_object_list OCCURS 0,
                objectclas LIKE cdpos-objectclas,
                objectid LIKE cdpos-objectid,
                changenr LIKE cdpos-changenr,
                tabname LIKE cdpos-tabname,
                fname LIKE cdpos-fname,
             END OF i_object_list.
    ** complete modified code [end]
      DATA : i_cdpos LIKE TABLE OF i_object_list WITH HEADER LINE.
      DATA : tabnamev2 TYPE string.
    ** complete modified code [begin]
    FIELD-SYMBOLS : <otf> TYPE ANY,
                    <otf_field_tabname>,
                    <otf_field_fname>.
    ** complete modified code [end]
      IF i_option EQ 'X'.
        MOVE tabnameo2 TO tabnamev2.
      ELSE.
        MOVE tabnameo1 TO tabnamev2.
      ENDIF.
    **  SELECT objectclas objectid changenr
    **    INTO TABLE i_cdpos
    *  SELECT objectid
    *      APPENDING CORRESPONDING FIELDS OF TABLE i_global
    *      FROM cdpos
    *      FOR ALL ENTRIES IN i_otf_objcs
    *      WHERE objectclas = i_objcl AND
    *            (objectid) AND
    *            (changenr) AND
    *            (tabname) AND
    *            (tabnamev2) AND
    *            (fname).
    ** complete modified code [begin]
      SELECT objectid tabname fname
          INTO CORRESPONDING FIELDS OF TABLE i_cdpos
          FROM cdpos
          WHERE objectclas = i_objcl AND
                (objectid) AND
                (changenr) AND
                (tabnamev2).
    ASSIGN LOCAL COPY OF i_otf_objcs TO <otf>.
      LOOP AT i_cdpos.
      LOOP AT i_otf_objcs INTO <otf>.
       ASSIGN COMPONENT 'TABLENAME' OF STRUCTURE <otf> TO <otf_field_tabname>.
       ASSIGN COMPONENT 'FIELDNAME' OF STRUCTURE <otf> TO <otf_field_fname>.
        IF ( <otf_field_tabname>  EQ i_cdpos-tabname ) AND ( <otf_field_fname> EQ i_cdpos-fname ).
          APPEND i_cdpos-objectid TO i_global.
          RETURN.
        ENDIF.
      ENDLOOP.
      ENDLOOP.
    ** complete modified code [end]
    **  LOOP AT i_cdpos.
    **    APPEND i_cdpos-objectid TO i_global.
    **  ENDLOOP.
    ENDFORM.                    "find_cdpos_data

  • TS1702 I purchased black op zombies from the app store and it will not load for me to play the game.  How can I get a refund or get the game to load and work?

    I purchased black ops zombies and I can not get it to load to play it. How can I get a refund or get to run so that I can play it?

    The terms of sale state that: "All Sales are Final. There are no refunds."
    However, I've always found iTunes support to be helpful. So, go here, plead your case & hope for the best:
    http://www.apple.com/support/itunes/

  • How can I remove all or part of the information in headers and footers? For example, date and time of printing.

    I cannot find where I can suppress the printing of the date and time of printing or if I want a header and/or footer at all.

    If using the traditional menus, in the File menu select Page Setup
    If using the orange Firefox button, click on it, then select Print and then Page Setup
    Once you have the page Setup dialog displayed, go to the "Margins & Header/Footer" tab. You need to change all of the options for header and footer to "--blank--"

  • How can i get a macbook pro in the caribbean especially trinidad and tobago

    I have been a pc user for years and I am tired of them not living up to standard. I viewed the presentations about macbook pro and I am wondering why I never used it before.
    Anyway I am a teacher and loved what I saw the the iwork software was capable of but I have no where of accessing a store to purchase one. Is there any way I could get access to purchasing one?
    In Trinidad and Tobago pc's arepopular but I think if teachers got a chance to experience the capabilities of a mac they would switch. Any ideas on how I can get one?

    You can look for an actual Apple Authorized Reseller here - http://www.apple.com/lae/buy/ 
    Trinidad & Tobago are listed in the first "find a reseller" list there, so there should be some.
    see https://locate.apple.com/tt/en/ - I entered Port of Spain here and it popped up with at least 6 resellers.

  • How can i activate my iphone 4 without the old apple id and password?

    please help me, i erased all contents in my iphone 4, it is bought second hand here in the Philippines, then when it opened it asks for an activation id and password of the first owner, sad to say we dont know who owned it since it is bought second hand only. please help me because can no longer contact the person. itr was a gift from my mom, we cannot afford to buy brandnew phone  my phone cannot be used anymore. please email me on my yahoomail thank you and Godbless
    <E-mail Edited by Host>

    FYI: not a wise idea to post your email address in a public forum. The hosts
    may edit it for you, but expect a full inbox courtesy of the spiders.
    You have run into Activation Lock. Without the requested AppleID and password,
    you will not be able to activate the iPhone. Return it for a refund if you can.
    There is no workaround for Activation Lock. You can learn more here:
    iCloud: Find My iPhone Activation Lock in iOS
    http://support.apple.com/kb/HT5818?viewlocale=en_US&locale=en_US
    http://support.apple.com/kb/TS4515

  • How can I use my iPhone 4 to view my iCloud photo and video files that I had from previous phones?

    I want to view my saved to iTunes and or I cloud  photos and videos, where do I go to see them and can I do it with my iPhone or do I need a pc?

    iTunes is not a photo management application so no photo are saved to iTunes.
    By videos, do you mean videos from iTunes or videos created with the iPhone?
    If from iTunes, they can be downloaded and played on any iOS device.
    If videos created with the iPhone, they are not synced to PhotoStream.
    Pictures taken with an iOS device are uploaded to and viewable in PhotoStream on any iOS device, Mac, or Apple TV using the same Apple ID.
    It is not currently possible to view a PhotoStream for a different Apple ID, but this will be changing with iOS7.

  • How can i make 2 combo boxes as the same data source and group by each combo box items separately?

    I have 2 combo boxes  If I have data table like below
    TableA
    ID  NAME
    1     A
    2     B
    3     C
    4     A
    I make "TableA" as data source of "combobbox1" and "combobox2" like
    combobox1.datasource = TableA
    combobox1.displaymember = "ID"
    combobox2.datasource = TableA
    combobox2.displaymember = "Name"
    I want when combobox2 select index at "A"  , Combobox1 show only the items at ID = 1 And ID = 4
    Thanks 

    This is not actually a question to be posted in SQL Server. Here is a link for ASP.NET forum.
    http://forums.asp.net/
    It looks like there is a filter that can be applied in .NET dataset and populate the results in your combobox1. You may get better help from .NET forums for this question.

  • How can i fix my iphone 4s ? the screen went black and wont turn back on.

    ugh

    Hi sandy,
    Have you tried a reset? Hold down the Home and Power buttons at the same time for up to 20 seconds. Hopefully the Silver Apple will display, which will mean the phone is resetting (no data will be lost). As soon as the Silver Apple appears, release the buttons, and wait until the Home screen comes back on.
    You should be OK after that.
    Good luck!
    Cheers,
    GB

  • How can I configure CTRL+Backspace to delete the previous word only and not the preceding space?

    The title pretty much explains it all. I'm using a different computer than usually and I'm pretty sure it used to only delete the word and not the space.

    Your observation is correct: Ctrl+BackSpace shouldn't delete the preceding space. However, if words are separated by two spaces, one of those spaces will be deleted.
    Stefan Blom, Microsoft Word MVP
    This is not the observed functionality in every case. It seems that MSWord haphazardly either removes the space or doesn't remove it.
    As an example, if I type "and when" and hit CTRL+Backspace, it will either delete the word only or the word and the space, but in most cases it will remove the space as well ("and when" becomes "and"). It seems to toggle between the two but I have no idea
    what is triggering it.

  • How can i sync my iphone with Itunes cuz I do it and it says error

    how can i sync my iphone with Itunes cuz I do it and it says that there is an error?
    Is it posible that there is something wrong with my IPhone?

    Hello, I had this problem A few times. But there isn't A way I know. Keep the music on your computer and add them back after is what I do.

  • How can we captured Excise Duty Payable at the time of billing

    Hi,
    i have created billing at that time i did not take excise duty payable and i have made the document and my question is and how can we captured excise payable with out reverse or manual JV,and i heard that we can do through excise table can any body tell me the procedure
    Regards,
    Harish

    Dear,
    have you created Excise Invoice? If not then you can create through J1IIN.
    Br,Vivek

  • How can i write a string into a specified pos of a file?

    How can i write a string into a specified pos of a file without read all file into ram and write the whole file again?
    for example:
    the content of file is:
    name=123
    state=456
    i want to modify the value of name with 789
    (write to file without read all file into ram)
    How can i do it? thank you

    take this as an idea. it actually does what i decribed above. you sure need to make some modifications so it works for your special need. If you use it and add any valuable code to it or find any bugs, please let me know.
    import java.io.*;
    import java.util.*;
    * Copyright (c) 2002 Frank Fischer <[email protected]>
    * All rights reserved. See the LICENSE for usage conditions
    * ObjectProperties.java
    * version 1.0, 2002-09-12
    * author Frank Fischer <[email protected]>
    public class ObjectProperties
         // the seperator between the param-name and the value in the prooperties file
         private static final String separator = "=";
         // the vector where we put the arrays in
         private Vector PropertiesSet;
         // the array where we put the param/value pairs in
         private String propvaluepair[][];
         // the name of the object the properties file is for
         public String ObjectPropertiesFileName;
         // the path to the object'a properties file
         public String ObjectPropertiesDir;
         // reference to the properties file
         public File PropertiesFile;
         // sign for linebreak - depends on platforms
         public static final String newline = System.getProperty("line.separator");
         public ObjectProperties(String ObjectPropertiesFileName, String ObjectPropertiesDir, ObjectPropertiesManager ObjectPropertiesManager)
         //     System.out.println("Properties Objekt wird erzeugt: "+ObjectPropertiesFileName);
              this.ObjectPropertiesFileName = ObjectPropertiesFileName;
              this.ObjectPropertiesDir = ObjectPropertiesDir;
              // reference to the properties file
              PropertiesFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
              // vector to put the param/value pair-array in
              PropertiesSet = new Vector();
         //     System.out.println("Properties File Backup wird erzeugt: "+name);
              backup();
         //     System.out.println("Properties File wird eingelesen: "+PropertiesFile);
              try
                   //opening stream to file for read operations
                   FileInputStream FileInput = new FileInputStream(PropertiesFile);
                   DataInputStream DataInput = new DataInputStream(FileInput);
                   String line = "";
                   //reading line after line of the properties file
                   while ((line = DataInput.readLine()) != null)
                        //just making sure there are no whitespaces at the beginng or end of the line
                        line = cutSpaces(line);
                        if (line.length() > 0)
                             //$ indicates a param-name
                             if (line.startsWith("$"))
                                  // array to store a param/value pair in
                                  propvaluepair = new String[1][2];
                                  //get the param-name
                                  String parameter = line.substring(1, line.indexOf(separator)-1);
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  parameter = cutSpaces(parameter);
                                  //get the value
                                  String value = line.substring(line.indexOf(separator)+1, line.length());
                                  //just making sure there are no whitespaces at the beginng or end of the variable
                                  value = cutSpaces(value);
                                  //put the param-name and the value into an array
                                  propvaluepair[0][0] = parameter;
                                  propvaluepair[0][1] = value;
                             //     System.out.println("["+ObjectPropertiesFileName+"] key/value gefunden:"+parameter+";"+value);
                                  //and finaly put the array into the vector
                                  PropertiesSet.addElement(propvaluepair);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while reading property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   // System.out.println("in ObjectProperties");
         // function to be called to get the value of a specific paramater 'param'
         // if the specific paramater is not found '-1' is returned to indicate that case
         public String getParam(String param)
              // the return value indicating that the param we are searching for is not found
              String v = "-1";
              // looking up the whole Vector
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = new String[1][2];
                   // trying to get out the array from the vector again
                   s = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we look up the value and write it in the return variable
                        v = s[0][1];
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // giving the value back to the calling procedure
              return v;
         // function to be called to set the value of a specific paramater 'param'
         public void setParam(String param, String value)
              // looking up the whole Vector for the specific param if existing or not
              for (int i=0; i<PropertiesSet.size(); i++)
                   //the String i want to read the values in again
                   String s[][] = (String[][]) PropertiesSet.elementAt(i);
                   // comparing the param-name we're looking for with the param-name in the array we took out the vector at position i
                   if (s[0][0].equals(param) == true)
                        //if the param-names are the same, we remove the param/value pair so we can add the new pair later in
                        PropertiesSet.removeElementAt(i);
                        // making sure the for loop ends
                        i = PropertiesSet.size();
              // if we land here, there is no such param in the Vector, either there was none form the beginng
              // or there was one but we took it out.
              // create a string array to place the param/value pair in
              String n[][] = new String[1][2];
              // add the param/value par
              n[0][0] = param;
              n[0][1] = value;
              // add the string array to the vector
              PropertiesSet.addElement(n);
         // function to save all data in the Vector to the properties file
         // must be done because properties might be changing while runtime
         // and changes are just hold in memory while runntime
         public void store()
              backup();
              String outtofile = "# file created/modified on "+createDate("-")+" "+createTime("-")+newline+newline;
              try
                   //opening stream to file for write operations
                   FileOutputStream PropertiesFileOuput = new FileOutputStream(PropertiesFile);
                   DataOutputStream PropertiesDataOutput = new DataOutputStream(PropertiesFileOuput);
                   // looping over all param/value pairs in the vector
                   for (int i=0; i<PropertiesSet.size(); i++)
                        //the String i want to read the values in
                        String s[][] = new String[1][2];
                        // trying to get out the array from the vector again
                        s = (String[][]) PropertiesSet.elementAt(i);
                        String param = "$"+s[0][0];
                        String value = s[0][1];
                        outtofile += param+" = "+value+newline;
                   outtofile += newline+"#end of file"+newline;
                   try
                        PropertiesDataOutput.writeBytes(outtofile);
                   catch (IOException e)
                        System.out.println("ERROR while writing to Properties File: "+e);
              catch (IOException e)
                   System.out.println("ERROR occured while writing to the property file for: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
         // sometimes before overwritting old value it's a good idea to backup old values
         public void backup()
              try
                   // reference to the original properties file
                   File OriginalFile = new File(ObjectPropertiesDir+ObjectPropertiesFileName);
                   File BackupFile = new File(ObjectPropertiesDir+"/backup/"+ObjectPropertiesFileName+".backup");
                   //opening stream to original file for read operations
                   FileInputStream OriginalFileInput = new FileInputStream(OriginalFile);
                   DataInputStream OriginalFileDataInput = new DataInputStream(OriginalFileInput);
                   //opening stream to backup file for write operations
                   FileOutputStream BackupFileOutput = new FileOutputStream(BackupFile);
                   DataOutputStream BackupFileDataOutput = new DataOutputStream(BackupFileOutput);
              //     String content = "";
                   String line = "";
                   // do till end of file
                   while ((line = OriginalFileDataInput.readLine()) != null)
                        BackupFileDataOutput.writeBytes(line+newline);
              // error handlig
              catch (IOException e)
                   System.out.println("ERROR occured while back up for property file: "+ObjectPropertiesFileName);
                   System.out.println("ERROR CODE: "+e);
                   System.out.println("this is a serious error - the server must be stopped");
         private String cutSpaces(String s)
              while (s.startsWith(" "))
                   s = s.substring(1, s.length());
              while (s.endsWith(" "))
                   s = s.substring(0, s.length()-1);
              return s;
         public String createDate(String seperator)
              Date datum = new Date();
              String currentdatum = new String();
              int year, month, date;
              year = datum.getYear()+1900;
              month = datum.getMonth()+1;
              date = datum.getDate();
              currentdatum = ""+year+seperator;
              if (month < 10)
                   currentdatum = currentdatum+"0"+month+seperator;
              else
                   currentdatum = currentdatum+month+seperator;
              if (date < 10)
                   currentdatum = currentdatum+"0"+date;
              else
                   currentdatum = currentdatum+date;
              return currentdatum;
         public String createTime(String seperator)
              Date time = new Date();
              String currenttime = new String();
              int hours, minutes, seconds;
              hours = time.getHours();
              minutes = time.getMinutes();
              seconds = time.getSeconds();
              if (hours < 10)
                   currenttime = currenttime+"0"+hours+seperator;
              else
                   currenttime = currenttime+hours+seperator;
              if (minutes < 10)
                   currenttime = currenttime+"0"+minutes+seperator;
              else
                   currenttime = currenttime+minutes+seperator;
              if (seconds < 10)
                   currenttime = currenttime+"0"+seconds;
              else
                   currenttime = currenttime+seconds;
              return currenttime;

Maybe you are looking for

  • Writing Fixed Length rows in SQL*Plus

    Hi all, I am trying to build an extract file for our external customer. Each row in the file must be fixed length of 82 characters. The last column in the table is a social security number. Since the social security column in the source table contain

  • Error importing ""import javax.servlet.ServletContext;""

    Hello: I have a JSC update 2 application. My problem is this: In the file ViewHandlerImpl.java (only read) i have an error ipmorting javax.servlet.ServletContext, and i have another error in this lines: if (!(context.getExternalContext().getContext()

  • How to read mp4 on a mac

    How can I open a mp4 file on a mac? Quicktime doesn't work...

  • Dismiss keyboard when naming a new Journal

    I can't dismiss the keyboard when typing in the name of a new Journal. If I type nothing and just push the "Create Journal" button, it gets published as "My New Journal" and then the next one is "My New Journal 1" and "My New Journal 2". I'd really r

  • How to get songs out of a used ipod touch then reassign

    My son gave his old Ipod touch to his little sister. i think its a 1st gen. He has about 1200 songs and wants to be able to transfer all his songs onto his iphone. Hasn't used it in so long, he doesn't remember his login and password into his old itu