How to implement this code in labview?

How do implement this pseudo code in labview? Please keep in mind "a" and "c" in the code below ARE VARIABLES
for i =0 to i=maxvalue
       if i <= a 
           output = output2
       else if i > a AND i<=c
           output = output2
       else if i < c 
           output = output3
       else i = d
           output = output4
I understance i can use a case structures and modify the label, but i do not know how to make the label dependent on a variable value. 
Thanks 

Try an array of boudaries and use threshold array. See this old example:
Now just iterate over an array of values using a FOR loop.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Best way to implement this code in labview

    Hi
    What is the best way to implement this code in labview programming.
    I have an analogue input which triggers a boolean light when it reaches a certain voltage. but at the same time i would like it to enable two other outputs one for a set period of time and the other stay on until another statement becomes true.
    For example
    case 1:
    Set output high
    Delay(2000ms)
    Set output low
    Case 2:
    Set output high
    If statement 2 is true
    then set out put low
    if not then repeat until statement is true
    Thanks for your help

    Hi David,
    The code you posted will work, although note that the front panel becomes 'unresponsive' - as changes in the controls are only read once per iteration.  The wait function is an example of an execution timing VI, however if we want to do software timing (like a 2 hour wait) - we should use software timing VIs.
    Check out the following example (note we can stop execution during run-time):
    Regards,
    Peter D
    Attachments:
    SoftwareTiming.vi ‏26 KB

  • How to create this code in labview

    hello...
    please helpe me for this Question
    i have create this code "c" in " labview "... 
    ex c :
    if portc.f1==1 {
        portc.f0=~portc.f0
    ex labview :
    if push button  ==1 {
       round led =~ round led
    thanks...
    Solved!
    Go to Solution.

    pjr1121 wrote:
    See attached image.
    Why do people insist on using property nodes to get the value.  It has the same issues with race conditions as the local variable but is extremely slow (forces a thread swap to the UI thread).  Besides, you should be keeping the value of the LED in a shift register.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Toggle LED.png ‏16 KB

  • How to implement this attribute ?

    Hi,
    I've this problem.
    In our application to control healthcare expense I've implemented a cube with 6 dimensions. (here for who knows Italian : http://www.oracle.com/global/it/customers/profiles/profile_77.html )
    The biggest dimension is the "patient" one, with 1.500.000 units at 5th level, grouped in geographic aggregates, until the entire city at highest level.
    Now customers wants to have the possibility to select patiens with chronic disease from these. There are about 500 kinds of chronic diseases.
    Every patient can have no one, one, or (and this is the problem) more then one of these chronic disease.
    How to try to implement this? as a new dimensions or as an attribute ?
    I've thought that best way is to introduce a new (chronic diseases) dimension, to have a way to select one or more of these diseases at all levels of patient dimension.
    I'm asking how to solve the problem that a single patien can also have more than one disease.
    Is there any way to implement this ?

    thanks to everyone for the answers
    I've some questions.
    to olapworld:
    have you any sample code to show me how to implement the dimensionalized valueset and the customizations needed ??
    to scott:
    I think I'm not understanding your suggestion:
    my target is to add the "ilnesses" selection to other ones. The most important cube of my applications analyze
    healthcare expenses from six dimensions. Customer wants analyze cube "adding" a way to select only "ilnesses" patients and elvaluate their expense.
    I'm in doubt becouse a patient can also have more then one ilness, so I can't simply add a "ilnesses" dimensions to the cube and mapping it to an "ilness_id" in the fact table.
    How can the two dimensioned cube to help me in this ?
    to Rafalm1:
    in any case, implementing Count(Distinct patient) would be useful for me, to have a way to count the number of patients who had a healthcae assistence. Can you suggest me how to implement this ?

  • How to implement this Java Script?

    Hello,
    I have this script to remove the link from titles of web parts.  I am new to SharePoint 2013 development. I am not sure where to put it. Not sure what file to put it and how to implement it.  How can ensure this code gets run on pages through out
    my SharePoint 2013 site.
    jQuery(document).ready(function () {
           $('a').filter("[href='###']").each(function () {
            $(this).replaceWith($(this).html());
    Reference
    https://expectedexception.wordpress.com/2012/01/30/how-to-remove-the-list-view-web-part-title-bar-link/
    Paul

    Get the page Url from the website and go to Sharepoint Designer and browse the page and add the script within a scritp tag <script>jQuery(document).ready(function
           $('a').filter("[href='###']").each(function () {
            $(this).replaceWith($(this).html());
     });</script>
    how to open a site in SP Designer:
    https://support.office.com/en-ie/article/Open-a-SharePoint-site-94d33d70-3f07-4a8e-b5b5-1137a9c36e74
    another option is to find the global file that contain the scripts and add it as a method there. You can check these files by viewing source of the page.
    note also that the Jquery reference is needed for this code to execute.
    Fouad Roumieh

  • Can someone please tell me on how to modify this code so that I dont have to enter the file name at all?

    Hello
    can someone please tell me how to modify this code so that I dont have to enter the file path at all? When i give the same file path constants to both the read and write VIs I'm getting an error message.
    Attachments:
    read and write.vi ‏11 KB

    Yup use the low level File I/O opening the reference once, and closing it once.  
    As for the path selection you have an unwired input which is the path to use.  Programatically set that and you won't be prompted to select a path.  Usually this is done with a path constant to a folder, then using the Build Path, to set the file name in that folder.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How to implement this in Oracle Apps 11i

    Hello Friends
    I am working as a consultant for a manufacturing company.
    They have a format for charging Excise and Sales tax on their products (example below). I dont know how to implement this using oracle apps. Please help me ASAP.
    eg.
    Product A:
    MRP = Rs. 100
    Assessable Value (i.e. the value at which I have contract with the Government to pay Excise Duty) = 60% of MRP = Rs. 60 in this case.
    Excise Duty = 16% of AV =0.16*60 = Rs. 9.6
    Now, let’s suppose I am selling my product to a dealer at 30% discount.
    Therefore, Sale Price = 70% of MRP = Rs. 70
    Sales Tax = 4% of Sale Price = 0.04*70 = 2.8
    Therefore, total revenue from the deal = 70-9.6-2.8 = Rs. 57.6

    you can use Advance Pricing or creating discount or attiribute while calculating.
    this is not much complex, possible even with Advance Pricing too. Thanks
    Shiv

  • How to implement this aggregate logic at target column in odi inteface mapp

    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    how to implement this aggregate logic at target column in odi inteface mappings

    Hi
    if you don't want to aggregate try to define a user function
    analytic_sum($(value))
    implémented by
    sum($(value))
    after that
    replace your
    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    by
    analytic_sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)

  • Anyone knows how to make this code to netbeans??

    anyone knows how to make this code to netbeans?? i just want to convert it into netbeans... im not really advance with this software... anyway..just reply if you have any idea...or steps how to build it... etc.... thanks guys...
       import javax.swing.*;
       import javax.swing.table.*;
       import java.awt.*;
       import java.awt.event.*;
       import java.util.regex.*;
       public class FilterTable {
         public static void main(String args[]) {
           Runnable runner = new Runnable() {
             public void run() {
               JFrame frame = new JFrame("Sorting JTable");
               frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
               Object rows[][] = {
                 {"AMZN", "Amazon", 41.28},
                 {"EBAY", "eBay", 41.57},
                 {"GOOG", "Google", 388.33},
                 {"MSFT", "Microsoft", 26.56},
                 {"NOK", "Nokia Corp", 17.13},
                 {"ORCL", "Oracle Corp.", 12.52},
                 {"SUNW", "Sun Microsystems", 3.86},
                 {"TWX",  "Time Warner", 17.66},
                 {"VOD",  "Vodafone Group", 26.02},
                 {"YHOO", "Yahoo!", 37.69}
               Object columns[] = {"Symbol", "Name", "Price"};
               TableModel model =
                  new DefaultTableModel(rows, columns) {
                 public Class getColumnClass(int column) {
                   Class returnValue;
                   if ((column >= 0) && (column < getColumnCount())) {
                     returnValue = getValueAt(0, column).getClass();
                   } else {
                     returnValue = Object.class;
                   return returnValue;
               JTable table = new JTable(model);
               final TableRowSorter<TableModel> sorter =
                       new TableRowSorter<TableModel>(model);
               table.setRowSorter(sorter);
               JScrollPane pane = new JScrollPane(table);
               frame.add(pane, BorderLayout.CENTER);
               JPanel panel = new JPanel(new BorderLayout());
               JLabel label = new JLabel("Filter");
               panel.add(label, BorderLayout.WEST);
               final JTextField filterText =
                   new JTextField("SUN");
               panel.add(filterText, BorderLayout.CENTER);
               frame.add(panel, BorderLayout.NORTH);
               JButton button = new JButton("Filter");
               button.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                   String text = filterText.getText();
                   if (text.length() == 0) {
                     sorter.setRowFilter(null);
                   } else {
                     try {
                       sorter.setRowFilter(
                           RowFilter.regexFilter(text));
                     } catch (PatternSyntaxException pse) {
                       System.err.println("Bad regex pattern");
               frame.add(button, BorderLayout.SOUTH);
               frame.setSize(300, 250);
               frame.setVisible(true);
           EventQueue.invokeLater(runner);
       }

    its okay onmosh.....what we need to
    this...forum....is to have a good......relationship
    of programmers......and to start with .....we need to
    have a good attitude........right.....???.....no
    matter how good you are in programming but if you did
    not posses the right kind of attitude....everything
    is useless.....in the first place....all we
    want....is just to ask...some....help....but
    conflicts......but unluckily......we did not expect
    that there are members in here which......not
    good...to follow.....just as suggestion for those
    people not having the right kind of attidude...why
    can't you do in a very nice message sharing in a very
    nice....way....why we need to put some
    stupid....stuff...words.....can't you live with out
    ******* ****....its not.....lastly especially you
    have your children right now and people around...that
    somehow......idiolize...you even me....is one of
    them......but showing but attitude....is not
    good......tnx....hope you'll take it this....in the
    positive side.....be optimistic...guys....the
    world..is not yours....all of us will just past
    away....always..remember that one.....treasure..our
    stay in this....temporary home.....which...is
    world....Whoa. That post seems to be killing my brain.
    URK
    Join........us..........do not be..........afraid.......

  • How to implement this C code line: for ( int i = 0; i G_ReadLen; i = i + 2 )

    I want to implement the following C++ code in labview but i cannot make or loop to increase by two
    int j = 0; for ( int i = 0; i < G_ReadLen; i = i + 2 ) {
    BYTE AD_H = ByteArray.GetAt(i);
    BYTE AD_L = ByteArray.GetAt(i + 1);
    ValueArray[j] = AD_H << 8;
    ValueArray[j] = ValueArray[j] + AD_L;unsigned long Temp = ValueArray[j] >> 12; Volts[j] = ((float)ValueArray[j]) * 0.0048875;Message.Format("%X , %X - %X, -- %d, +%.3f Volts", AD_H, AD_L, ValueArray[j], ValueArray[j], Volts[j]); m_output_ep1i.InsertString(0,Message);
    j = j + 1;
    Thanks
    Solved!
    Go to Solution.

    Your code will not work.
    You are replacing elements of an empty array. A no-op in LabVIEW.
    Besides there is a lot easier way to do this:
    I just hope this is not a homework assignment.
    And for completeness sake here is Mikes solution (seen below):
    Ton
    Message Edited by TonP on 11-14-2008 12:55 PM
    Message Edited by TonP on 11-14-2008 01:03 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Read as U16.png ‏2 KB

  • How to implement this calendar function in ABAP code

    Hi everyone,
    Our requirement is : Give a date (e.g. YYYY.MM.DD, 1983.12.26), then we need to know which weekday it is. Is there a existing FM for this fuction? or how to implement it in ABAP?
    Thanks a lot for any hint
    Best regards
    Deyang

    Hi Deyang Liu,
        Could you please check these the below links they would give you some idea ....[SAP Calendar Control|http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/BCCICALENDAR/SAP_KALENDER.pdf]
    [Calendar functions |http://help.sap.com/saphelp_nw04/Helpdata/EN/2a/fa00f6493111d182b70000e829fbfe/content.htm]
    [SAP Functions|http://abap4.tripod.com/SAP_Functions.html]
    [Determine calendar |http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa00e9493111d182b70000e829fbfe/content.htm]
    Regards,
    S.Manu

  • How to implement wafer mapping using LabVIEW?

    Hello LabVIEW Masters!
    I am having an incoming project which includes controlling and gathering information from a PROBER. One of the difficulties I am having now is how to implement a WAFER MAP using LabVIEW. According to my customer requirements, the wafer element ranges from 6k to 23k. I guess doing all the element (one die = one led ctl/indicator) will be a hell of a task, especially on how to effectively manipulate each elements. Does anyone have better idea on how to this?
    Please, I badly need your help.. 
    Thanks and Regards,
    Dennis DG
    Solved!
    Go to Solution.

    Hi Dennis,
    Is it okay if you send to me the working VI also?
    No, it's not ok. I made that program for my customer...
    As I am not too familiar in using intensity graph.
    That's no reason to hand over programs for free...
    My customer also request me that if the cursor hover on the wafer map, he wants the x,y corrdinates to be displayed.
    I also have such a feature. Did you notice the little yellow cursor near the center of the wafer? One could easily change that to use a MouseMove event instead...
    He also wants to select some elements in the wafer map and come up with the coordinate values to do some testing.
    That's related to the cursor thing...
    Some points:
    - You have a customer that pays you. Why should I offer work for free?
    - You can send me contact dates of your customer, I will make him an offer...
    - When you take an job to provide software you should be able to code the software...
    - The VI(s) are now some years old. I didn't code so well back those days and don't want to hand out those VIs as they are right now.
    - I included some "license management" deep inside that program, I would have to remove this and spend time on testing afterwards...
    - The VIs are based on the PROBER output format used by the customer. All the file handling has to be changed for/by you...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to implement this typical sign workflow? Urgent

    Hi Adobe Experts,
    I am new to LC (two months only). Recently company is doing some evaluation on LC 8.2 and my boss assigned the following task to me  (I simplified it):
    Form: (Enclosed)
    * Two text fields: CommentTextField1 and CommentTextField2
    * Two signature fields: SignatureField1 and SignatureField2
    I've associated the SignatureField1 to lock CommentTextField1 and associated the SignatureField2 to lock CommentTextField2.
    The progress to implement is:
    Step 1) Ray Woodard open the form in workspace, type in CommentTextField1, Sign the SignatureField1, Submit.
    Step 2) Alex Pink open the form in workspace, type in CommentTextField2, Sign the SignatureField2, Submit.
    Any suggestions on how to implement the progress? Please help! Thanks a lot!
    (What I am able to accomplish so far is the step 1, but I am not confident about that. Please point me the right solution. Should I use xfaForm or Document Form, render/submit as default or PDF, submit as XDP or PDF etc...? I am so confused and frustrated now!)

    Steve, thank you so much!!!
    Your example helped me a lot. I am able to run the process, but I still have three doubts:
    1) When I set "Submit As" to "PDF" rather than "XDP" by default, I am not able to submit the form in the workspace client with "Adobe Reader" installed. But I am able to submit the form in the workspace client with "Adobe Acrobat" installed. Is it normal?
    2) What does "Form Bridge" do in this whole process here?
    3) If I don't want to hard code the submit URL  in the form, do I have another option, like using other renders?
    Thanks again!
    Wayne

  • How to implement this? please help

    In my java class, I have a string array called strarray which hold serveral elements, some of the elements have the same value , for example, the first element is "swimming", the forth element is also swimming. I use a for loop to get each element and give it to arrayHolder which is also a array with the same size as strarray. Now, what I want is: I defined a Vector called element I want this vector to filter out the element from arrayHolder, get the name of non-duplicated name from the arrayHolder, the result should be inside the element vector (swimming,walking,running,dancing), no duplicated name. My code is like follows:
    import java.util.*;
    import java.io.*;
    public class arrayTest{
    public static void main(String arg[]){
    String[] strarray={"swimming","running","walking","swimming","dancing","running"};
    String[] arrayHolder=new String[strarray.size];
    Vector element=new Vector();
    for(int i=0;i<strarray.length();i++){
    arrayHolder[  i  ]=strarray[  i  ];
    /* What should I do next to get the non-duplicated element from arrayHolder and
    * add them into the element vector????
    I did not finnish it, since I am a little bit confused, how to implement? Need some help. thanks.
    Message was edited by:
    Mellon

    Not sure if I see the use of strArray & arrayHolder (I've not looked at your code - you might use code tags next time (check the "code" button above the message textarea), but may I suggest using a Map of some sort instead of a Vector? It will prevent duplicates for you.
    Good Luck
    lee

  • How to implement bar code in Unix environment - EBS 11.5.8 ?

    Hi All,
    I need to implement bar codes in an AR Invoice in Unix environment. I have barcode.pfa that is the font file. Is the equivalent file from ttf file in windows environment.
    I have read different papers in metalink that say that for example the name of the directory is this /usr/lib/X11/fonts/type1, but in my AIX server I haven't found something similar like this.
    I wrote this statement in order to find the directory but I didn't find it.
    find . -name fonts -print (fonts is the name of the directory)
    Can you help me?
    Best Regards,
    Mariano.-

    Hi Hussein,
    I've read Note: 466531.1 - How To Implement An AFM / PFA Barcode or MICR Font Within A UTF8 EBS Instance. It says that I have to
    copy the Barcode.pfa to the ORACLE_HOME directory. However, in this directory I don't have another pfa or ttf file, so how can unix relate the font?
    Best Regards,
    Mariano.-

Maybe you are looking for

  • Class not found in applet using 2 jar files

    I have an applet which has been working for years as a stand alone or connecting directly to a derby database on my home server. I have just changed it to connect to MySQL on my ISP server via AJAX and PHP. I am now getting a class not found error in

  • Finder is not displaying some folders and files

    Most folders and files are displaying properly, but some are missing.  I can find them by typing their names into the search window, but they are not displaying automatically in Finder.

  • Problems debugging PL/SQL [JDev 9.0.3.1035 Prod]

    When debugging a PL/SQL procedure/function JDev creates a temporary procedure, usually called JDEV_TMP_PROC_n. From time to time it happens, that this procedure remains in the database after termination. In this case, it can not be dropped neither wi

  • Convert SQL statements to JAVA Code ?

    Using SQL queries Can I convert SQL statements to JAVA Code ? Edited by: user11238895 on Jun 7, 2009 10:54 PM Edited by: user11238895 on Jun 7, 2009 11:12 PM

  • SAP Binaries Backup online or offline

    Hello! I woulld like to know, how to execute the regular SAP OS backup and have the following questions regarding this issue: 1) How often should I backup the SAP-Binaries-partition \usr\sap\...? (daily, weekly, 1 times month) 2) Should the DB, SAP R