How to program a C like pragraming in formula node?

I need to write a simple C like progarm in the the formula. The below is the program.
int x, i ;
float large;
large=a[0];
for(i=1; i<202; i++)
if(a[i]>=large)
x=i;
return x;
But Labview thinks there is an error in it. But I can not find the error.So, anyone can help me?

If you use a Formula Node, you need to do something like this.
int x, i ;
float large, large707;
large=a[0];
for(i=1; i<202; i++)
if(a[i]>=large)
large = a[i];
x=i;
large707 = large * 0.707;
Then you need to add Formula Node outputs for large and large707.
Note that I added the line large = a[i]; to save the new max to large.
If you use Array Max & Min, use the Multiply function from the numeric palette to multiply the max value by 0.707. Look at the LabView help for Array Max & Min.
Look at the attached example.
Attachments:
ArrayMax707.vi ‏26 KB

Similar Messages

  • How do I determine array size in a formula node

    I am feeding an array into a formula node to perform an operation on. However the size of the array can be an arbitrary size. How can I determine its size to use for iterating through a for loop?
    I suppose that I could add another input that is fed with the array size from the array palate but I would like to know if it can be done inside the formula node itself.

    Your own advice is the only and best one.
    greetings from the Netherlands

  • How to programming the forum like application

    Hi all
    I want to build an application like a forum that users can put their thing on the site. but I dont have any information and I didnt programming this sort of things.
    I dont think these huge information written by users are saving into databse. I think it will be placed in file somewhere in the server hard drive. Is that right?
    any way, please tell me about this kind of sites and help me out which technologies or API's are available in Java to doing so. I want to use JSF in my application.
    I am new in this field so any suggestion will be usefull and will be appreciated.
    regards
    Mohammad

    Hi
    See u need to follow the following steps
    first check whether ur J2EE Engine Server in your NDS
    the properties Productive USE shuld be "NO" and Debugging Mode to "ON".
    Then u can add break point at the left Corner of your source code and choose Run ¨ Debug... in the main menu.
    u can specify the debugger name adn the project to be debuugged and click on the debug button.
    jusct check whether ur Application is already deployed or not if not check the box deploy new Archive
    please get back for further issues
    Hope i solved your problem
    Krishna kanth
    Message was edited by: krish kanth

  • How can I specify simple math like in a Formula Node but on the front panel?

    If the Formula node had a "text" property, that would work for me, because I could limit my inputs and outputs to N floating-point numbers.
    LabVIEW once had such a thing but it was in an add-on math library, and I don't remember what it was called.
    Solved!
    Go to Solution.

    Thanks; that led me directly to what I was looking for. A combination of "Parse Formula String.vi" and "Eval Parsed Formula String.vi" works perfectly for me!

  • I connected an external monitor to my MacBook Pro, but it doesn't open any programs. It Just sits there with a blank screen.  How do I get it to open programs and act like a monitor?

    I connected an external monitor to my MacBook Pro, but it doesn't open any programs. It Just sits there with a blank screen.  How do I get it to open programs and act like a monitor?

    Dear Jean:
    It sounds like you are trying to get your external monitor to act as the primary viewing screen. For example it would have your Doc, Icons, Etc. In order to make the external monitor the primary screen you have to:
    Open System Preferences.
    Choose the Displays Icon
    There will be several tabs to choose from pick Arrangement
    Drag the toolbar to desired display
    Let me know if this helps at all!
    Lance

  • How can I get a display of all running programs in lion like I used to get when I did a 4 finger swipe in snow leopard?

    how can I get a display of all running programs in lion like I used to get when I did a 4 finger swipe in snow leopard?
    I liked to turn off running programs without a window that I was no longer using
    thanks.
    Best I can do now is to open the "force quit" window and click on programs I want to stop and then send each one a "command-Q" and then repeat as necessary
    Jeff

    Command + Tab is what you are after i think

  • When i try to open a screen pops up Says file firefox .Exe. what program would u like to open with it shows mozilla I click on it and issues

    as I said on top. Installed firefox 4 on 5/17. It was working okay until today. When I try to get online I click on my mozilla icon as always. A window pops up and says firefox.exe. what program would u like to use to open It shows me mozilla and I click on it. Then says do u want to run file and save.Browser opens tabs com up with search bar but the page is white blank. I have to go to the search bar and enter what wbsite i want to go to . Then I can pretty much go anywhere. What should I do? should I uninstall everything? can I still get back a older version like 3.6? How can I go about this.

    Does if help if you check the security tab in the properties of the file and remove a possible internet protection?
    Boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.
    *http://www.bleepingcomputer.com/tutorials/how-to-start-windows-in-safe-mode/
    Do a malware check with several malware scanning programs on the Windows computer.
    Please scan with all programs because each program detects different malware.
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
    *https://support.mozilla.org/kb/troubleshoot-firefox-issues-caused-malware

  • How to program mails to be sent in future date

    hi
    i would like to knwo how to program my mails to be sent in a future date.
    in the mail application and Outlook for Mac.
    (outlook for windows allows me to program de date a mail may be sent)
    best regards    

    You can use the Automator app to set an alarm on your calendar which sends the mail at a future time.
    It's simpler than it might sound.  This explains how:
    http://joannalaforet.wordpress.com/2010/02/08/schedule-mail-on-mac-the-easier-wa y-automator-ical-alarm/

  • How to program the simple tcp/ip connection?

    I would like to know how to program in labview the simple tcp/ip connetion.
    And is there some site with examples.

    Luciano Kan Horiuchi wrote:
    > I would like to know how to program in labview the simple tcp/ip connetion.
    > And is there some site with examples.
    You should probably start with the examples that ship with LabVIEW. For a good
    server-to-single-client example, check out Data Client.vi and Data Server.vi
    from the shipping examples, and for a good server-to-multiple-client example,
    try the Date Client.vi/Date Server.vi pair instead. All of these can be found
    in the following VI library:
    \examples\comm\tcpex.llb
    or via the Search Examples interface in LabVIEW. There are certainly
    additional examples on the NI site, but there's no better place to start than
    with these.
    Regards,
    John Lum

  • How to develop docking windows like the ones in NetBeans?

    Hello,
    I am looking for the answer to how to develop docking windows like that in NetBeans?
    I have been going through APIs of NetBeans' source code. I find the package org.netbeans.swing.tabcontrol. And I have tried the demo program in the folder. But I still do not know how the docking is implemented?
    Can someone give me some hints or advice on this? Thanks.

    What if I want to use the source code of NetBeans?
    You know unlike Eclipse, it is developed by Swing. It is quite successful project with nice GUI, and most important, it is open source.
    But how do they implement in NetBeans?

  • How to use  Business Object like Vendor or PurchasingInfo

    Hi,
    How to use Business Object ( like Vendor or PurchasingInfo ) from my Object?
    For example:
    CLASS myEntity DEFINITION.
              PUBLIC SECTION.
                   METHODS: getVendor EXPORTING pVendor TYPE Vendor.
               PRIVATE SECTION.
               DATA: aVendor TYPE REF TO Vendor.
    ENDCLASS.
    CLASS myEntity IMPLEMENTATION.
    METHOD getVendor
               pVendor = aVendor .
    ENDMETHOD.
    ENDCLASS

    Hi,
    I am giving u a demo Program for ur doubt.
    REPORT demo_class_counter .
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS: set IMPORTING value(set_value) TYPE i,
                 increment,
                 get EXPORTING value(get_value) TYPE i.
      PRIVATE SECTION.
        DATA count TYPE i.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD set.
        count = set_value.
      ENDMETHOD.
      METHOD increment.
        ADD 1 TO count.
      ENDMETHOD.
      METHOD get.
        get_value = count.
      ENDMETHOD.
    ENDCLASS.
    DATA number TYPE i VALUE 5.
    DATA cnt TYPE REF TO counter.
    START-OF-SELECTION.
      CREATE OBJECT cnt.
      CALL METHOD cnt->set EXPORTING set_value = number.
      DO 3 TIMES.
        CALL METHOD cnt->increment.
      ENDDO.
      CALL METHOD cnt->get IMPORTING get_value = number.
      WRITE number.
    For more demo programs type 'abapdocu' in the command field
    U will be getting some demo programs.
    There select the abap objects.
    Regards,
    Jagadish

  • I know how to program in java(Should I learn c, c++?)

    I know how to program in java. I want to be able to communicate with the hardware on my pc. I also hear that C, C++ is a lower level than java. Lower level meaning it can communicate with the hardware. I know java is very portable could do interfacing and could do so many things with the java programming language. I find the java programmig language cool. Now when I read about the JNI(java native interface) I think I could communicate with methods from java to functions in c++. I want to learn c++ and use it with JNI.
    Posting this topic because I want to be sure about what I'm doing.
    Thanks
    George

    in fact, memory management is the main pitfall in C++ programming. The following may give you a few headaches:
    - destructors
    - header files which try to include eachother
    - "memory access violation"
    - templates (upcoming java includes generics, which is similar)
    - pointers
    If you can overcome the above problems, you'll find that c++ is much like Java, only a bit more low-level. Accessing hardware directly however is quite a challenge (espescially under Windows which doesn't allow direct access for as far as I know), but not impossible. I don't know exactly, but I think it involves developing a small driver layer.
    It's to bad you learnt Java before C++, the other way around would have been much easier.

  • How to program in java

    hey guys. i am an undergraduate student. graduating next spring 2007. i did all my programming languages which were required in my course in 2004 and since that i have not taken any programming classes. i got my internship as a database administrator so got into MSaccess and Sql and VbA scripting. since my graduation year is near i want to be strong in database and programming and i was just reading about the employers what kind of programming they prefer and most of the times out of 100 you can say 80% needs java. so i have realized if i have my skills good in java and database job wont be any problem. i would like you to tell me about books i can buy from amazon.com or resources on internet from which i can understand the concept of programming again and then once my concept is clear about all the data types and functions i can start learning java. i would like you to tell me good java books also and some advance. the only book i have is the second edition of Java how to program. Thanks alot for all your help.

    The perverbial List:
    Free Tutorials and Such
    Installation Notes - JDK 5.0 Microsoft Windows (32-bit)
    Your First Cup of Java
    The Java� Tutorial - A practical guide for programmers
    New to Java Center
    Java Programming Notes - Fred Swartz
    How To Think Like A Computer Scientist
    Introduction to Computer science using Java
    The Java Developers Almanac 1.4
    Object-Oriented Programming Concepts
    Object-oriented language basics
    Don't Fear the OOP
    Free Java Books
    Thinking in Java, by Bruce Eckel (Free online)
    Core Servlet Programming, by Merty Hall (Free Online)
    More Servlets, by Marty Hall (Free Online)
    A Java GUI Programmer's Primer
    Data Structures and Algorithms
    with Object-Oriented Design Patterns in Java, by Bruno R. Preiss
    Introduction to Programming Using Java, by David J. Eck
    Advanced Programming for the Java 2 Platform
    The Java Language Specification
    Books:
    Head First Java, by Bert Bates and Kathy Sierra
    Core Java, by Cay Horstmann and Gary Cornell
    Effective Java, by Joshua Bloch
    Enjoy
    JJ

  • How to program this in java? Please help

    How to program this in java?
    please explain steps, it has to come out like this:
    example
    input: 3b1w3b
    output:
    BBBWBBB

    import java.io.*;
    public class Test {
    static java.io.PrintStream o = java.lang.System.out;
    public static void main(String[] args)throws Exception {      
         BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
         System.out.print("Enter plot for printing: ");
         String s = BR.readLine();
         char[] cs = s.toLowerCase().toCharArray();
         for(int i=0, j=0; i < cs.length-0x1; i+=0x2, j=0)
              while(j++ < (int)(cs[i]-0x30))
                   o.print((char)(cs[i+0x1]-0x20));
    I tried changeing it to this so I can enter my own string, but I want to change it some more so that it can enter multiple input separated by space, so that it can form a sort of picture line by line. I tried using tolkenizer but I get errors. I dont know how to use tolkenizer properly can anyone please TEACH. you dont have to tell how or give me the code if you dont want to. yes I know Im a noob and I dont know java as good as everyone here, If everyone thinks I don't deserve help then DON'T help, I'm just trying to learn programming

  • How to program TestStand to open a Config VI always when a new step is inserted?

    I created a step type and packed it within a custom type palette (".ini" file). The code Module for this Step is a LabVIEW Express VI.
    Using the "Step Type Menu Editor" I included this new step within the "Insert Step>>"
    Menu.
    Question: How to Program TestStand or the step type, so that by the insertion of this new step within the
    sequence the configuration dialog box of the express VI automatically pops up? (this would be like using
    the option "Configure VI..." within the step context menu)
    I would appreciate a lot all the help about this issue!
    Thanks!
    - Caribe -

    Caribe,
    I. In order to accomplish this you need to insert a custom substep in your step type.
        1. Go to your step types properties and select the substeps tab.
        2. Select the ActiveX/COM Adapter from the Adapter list.
        3. Add a new custom substep.
        4. Rename it -> OnNewStep
        5. Specify the Module.
        6. Object Reference = Step.
        6. Object Class = Step.
        7. Call the Method -> EditCode.
    Now every time you insert your step, this substep will be executed and as a result you will get the Express VI configuration dialog.
    Best Regards.
    Rename the
    Message Edited by Antonio Lie (NI) on 08-23-2005 01:30 PM
    Message Edited by Antonio Lie (NI) on 08-23-2005 01:33 PM

Maybe you are looking for

  • No service for system sap*** client *** , sm58 error

    Hi Friends When I am trying to send message from My Xi system to R/3 system I am getting error., No service for system SAPSXD, client 001 in Integration Directory I had searched it on sdn n found that this is very common error. I had gone through blo

  • What can I do to get iTunes to make my past music purchases available for re-download?

    I lost my Itunes music from my computer. I've tried to re-download my iTunes purchased music from "Purchased" where they all show up but it gives me no option to download. I know that they are all in the "Cloud" because I've downloaded them to my 5s.

  • Depreciation run for legacy assets

    Hello, This is the first depreciation run in SAP for the month of April 2007. System is posting depreciation for those assets procured during the year i.e purchased in April but not posting for legacy assets i.e assets uploaded from legacy. Regards S

  • Kernel26 compile error (trying to install Synce)

    Hi! I'm trying to patch kernel26 (using files from abs, version 2.6.21.1-8), with this patch: http://synce.svn.sourceforge.net/svnroo … -wm5.patch I'm following instructions here: http://www.synce.org/index.php/Connecti … is-lite%29 I copied the kern

  • Missing Data in Table passed as Function Parameter

    I am running a JCO server & in my handleRequest(), I am trying to get the data from the tables paased as function parameters from the SAP system. Somehow I am not able to see any data in the tables, though the SAP system has put some data in the tabl