Integrate a very sophisticated formula in labview

Hello all
in my Phd i have a very sophisticated formula that i need to integrate in my labview code .
please ho know a solution that can make easy this integration in my project 
please see the example attached
Solved!
Go to Solution.
Attachments:
formula.JPG ‏58 KB

You can enter it more or less straight from that text into a FORMULA NODE.
If you're interested in simplicity, that's the way to go.
If you're interested in better performance, you'll have to factor it, same as you would for any other language.
Instead of stating "2*pi*i*k" all those times, figure it once, and use it several times.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Similar Messages

  • How to integrate RFSG driver with sampling theorem labview code

    hi all, 
    I got the labview code of sampling theorem from labview-> find examples. How can I integrate this code with PXI system? How can I integrate the RFSG driver with labview code?

    Hi Nieman,
    LabVIEW 2014 should be compatible with the 9068 and the cRIO 2.1 drivers.  I verified it should work as expected earlier today.  Please make sure you are using the example cRIO PN-IO Device when you are moving the module over to the new target.  If you are already accessing that, please navigate to this folder:
    <Program Files>\National Instruments\LabVIEW 2014\Targets\NI\FPGA\cRIO\other
    Please let me know if you see a CS_cRIO-PNAD folder. This folder provides all the files necessary to discover and use the module in the project.  If we do not have that folder there, we will be unable to locate the module.  If that is indeed the case, then it may be the driver did not install correctly.  
    If after finding this folder and it is still not working, please send me screenshots of the error that you are seeing and a MAX Technical Report.  Thanks!
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Cannot use formula in LabVIEW 8.5 library error

    Hi,
    I'm not able to open the Formula function.  It says the library is not accessible.  I just installed LabVIEW on this machine.  Any ideas?
    Thanks,
    Vara

    Vara,
    I'm with smercurio, and think that a reinstall is probably your only option.  You could try to delete the files that are causing the issue and then try another repair, or you could do the reinstall and know you're going to fix it.
    And Jeff is correct that in older versions of LabVIEW it was a little ambigeous what needed to be installed but starting in 8.6 we added the "Installed with:" field to the help, and it 2009 we changed the name to "Requires:".  This makes it easier to know what the VIs installed with.
    The picture below shows the 8.5 help next to the 2009 help:
    Justin Parker
    National Instruments
    Product Support Engineer

  • Implementi​ng Formula in LabView

    I seem to have a rather odd problem. I just can't figure out why isn't a certain calculation (refractive index) working properly.
    Background info: I measured a high purity silicon plate using an instrument (THz-TDS), suffice it to say that the formulae for calculating refractive index from my raw data is very well established and published. But when I implement this formulae in Labview and run it, I don't get the expected result for
    silicon (the published refractive index for high purity silicon is around 3.45), instead I get values around 1.
    Any ideas or explanations on what I'm doing wrong are appreciated.
    Attached files:
    3 VI's where one is the Main. On the Main VI just load the two *.dat files provided and type 0.00198 for sample (silicon) thickness and it should run.
    Attached is also the formulae in *.jpeg format.
    and a *.doc showing the correct ref. index graph for silicon. Unfortunately I don't have the matlab code that this was originally done from.
    Thanks again
    Kas
    Attachments:
    To Post.zip ‏67 KB

    I actually tried that but with no luck.
    There is one thing I'm curious.
    there is a line code in MatLab called: phas1=unwrap(angle(z_face1),pi).
    Is that the same this as "theta" from the polar form of FFT? 
    I made few phone calls and managed to get the MatLab code that calculated ref. index. Attached is the code.
    He didn't seem to have implemented the formulae as he should've. But he claimed he had various other samples measured and got the correct answer with this routine.
    Again, I tried implementing the same routine but no luck.
    is it possible to convert this MatLab into LabView code in a more efficient manner. I might have made a mistake translating from one language to another.
    Thanks again
    Kas
    Attachments:
    MatLab Code.txt ‏2 KB

  • Can I integrate my exe program into my LabView software?

    I developed a LabView software. Can I integrate my old xx.exe program into this LabView software? Any information on this point would be appreciated.
    Yun

    The way to do this is to redirect the text output from the program to a file, and then read the file into LV. I unfortunately don't have all the information with me, but do a search in the archives here. The way I learned about is was a discussion a couple years ago. You can also check online for information related to writing DOS batch files--which is how you actually run the DOS program--that should get you pointed in the right direction.
    So it is possible, messy, but possible.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Change the parameter in the formula by Labview?

    I need to set up a formula (Since I need to analysis data, so everytime have differece formula, but I can't build up a new VI everytime),for example sin(a*x)*exp(b*x). If a & b & the formula are fixed, I can do it. But now, I need to make the a & b to be a set of values, like "a" is 0:1:10 and b is 50:0.1:100. That means when "a" is 0, "b" will go from 50 to 100 with step 0.1. And I need to be able to use the same VI for other formula. I try a few different way but still not able to come out the answer. Please help
    ====================
    =Labview 7.0 & 8.0 & 8.5=
    =====================

    Hello asd,
    for a & b parameters you have to use 2 nested loops with your formula inside and you get a 2d-array with results.
    You can also change the formula if you use the "Eval Formula Node" in Analyze->Mathematics->Formula (not in base package). But I recommend to use this for not too big loops, because this function is slow...
    Best regards
    Gerd
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Formula in LabVIEW

    Hi,
    We have purchased LabVIEW 8.0 and currently working on a project based on LabVIEW. I have to write out the result from a formula calculation to a parallel port. The result of the formula is a 11 digit decimal number. I need to display the result in HEXADECIMAL format and write it to 3 16bit registers in an external board. But after executing the formula, I'm not able to convert the result to hex format.
    I look forward to your reply at the earliest.
    Yours faithfully,
    Vishnu Rajendran,
    JRF,
    BCG,
    CDAC Trivandrum.

    Check the numeric representation of the result of your calculation. If its a float it has no hex representation - at least in the sense that an integer does.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Very slow performance of LabVIEW 6.1 under Windows XP

    I am using LabVIEW 6.1 under Windows XP. I found that sometimes it takes a long time for the operating system to load LabVIEW. Does anybody have the same experience?

    I have the same configuration on a PC and a laptop and I haven't had any problems. I also have >256MB RAM on both machines.
    My guess is that you have more than the LabVIEW recommended 64MB RAM on your machine but RAM is really the only thing that comes to mind for me. If you have a bunch of other applications running then it could take a while for LabVIEW to load to memory.
    Just a thought.
    -scraggs99
    -scraggs99

  • Mathematica output formula to labview mathscript

    I've been working on developing general error propagation equations based upon empirical equations in mathematica, and the outputs are extremely long.  Instead of sitting and copying each line of the output to labview mathscript, is there a quicker way to copy this over?

    You can save all the equations to an m-file and then import the whole file.
    Jarrod S.
    National Instruments

  • Very very simple formula... bug?

    Hi!! I simplified a case I found...
    Sample/Basic app/db, created a new accounts dyncalc member (Media) with the following formula:
    if(@ismbr(Jan))
         1;
    else
         2;
    endif
    Results 100% OK, fetch 1 for Jan and 2 for other members:
         100-10      New York      Actual
         Sales      Media      
    Jan      $678.00      $1.00      
    Feb      $645.00      $2.00      
    Mar      $675.00      $2.00      
    Apr      $712.00      $2.00      
    May      $756.00      $2.00      
    Jun      $890.00      $2.00      
    Jul      $912.00      $2.00      
    Aug      $910.00      $2.00      
    Sep      $790.00      $2.00      
    Oct      $650.00      $2.00      
    Nov      $623.00      $2.00      
    Dec      $699.00      $2.00      
    Year      $8,940.00      $23.00      
    BUT
    if I change the formula to
    if(@ismbr(Jan))
         1;
    else
         @MOVAVG (Sales , 3);
    endif
    Essbase ALWAYS fetches @MOVAVG, INCLUDING Jan:
         100-10      New York      Actual
         Sales      Media      
    Jan      $678.00      $678.00      
    Feb      $645.00      $645.00      
    Mar      $675.00      $666.00      
    Apr      $712.00      $677.33      
    May      $756.00      $714.33      
    Jun      $890.00      $786.00      
    Jul      $912.00      $852.67      
    Aug      $910.00      $904.00      
    Sep      $790.00      $870.67      
    Oct      $650.00      $783.33      
    Nov      $623.00      $687.67      
    Dec      $699.00      $657.33      
    Year      $8,940.00      $8,922.33      
    Just try it ... Am I doing something wrong? Or there´s a bug?
    Thanks in advance

    OK, I took sample basic and created a member called test and added the formula
    IF (@ISMBR(JAN))
         test = sales;
    Else
         test = @MOVAVG (sales,3);
    endif
    I made the formula dynamic and retrieved in excel and got the following:
              Product     Market     Scenario
         test     Sales          
    Jan     31538     31538          
    Feb     32069     32069          
    Mar     31940     32213          
    Apr     32399.66667     32917          
    May     32934.66667     33674          
    Jun     33893     35088          
    Jul     34965.33333     36134          
    Aug     35743.33333     36008          
    Sep     35071.66667     33073          
    Oct     33969.66667     32828          
    Nov     32624     31971          
    Dec     32713.66667     33342          
    This seems to do the correct calculation. I will say it will probably be wrong for upper levels of time and I would modify the if statement
    What version are you trying this on? Perhaps there is something in that version.
    One other thing, if you really want sales instead of a 1 for Jan (and Feb) you don't need to put in special coding, MovAvg is a trailing average, since you are doing a 3 month average, the first two months of the year will not be averaged. If you want Feb to be a two month average, you would have to put an else in the do a movAvg(sales,2)
    Message was edited by:
    GlennS

  • Very Sophisticated Phishing attempt!!

    I recieved an email today about my Apple Live ID telling me that it would be frozen due to my account information not being verified.
    This email is almost a perfect fake, comparing to a real email from apple there are only 2 discrepencies;
    It comes from a different email address ([email protected]) whereas all of my other emails from apple have come from ([email protected])
    The link it gives me leads to (http://updatecgiaple.byethost8.com/cgi.d) that is not an apple server, it is a free hosting website.
    Please be careful of this as there are almost no indicators of errors.

    If you still have the email then you could forward it to Apple : [email protected]

  • Why do very few programmers use LabVIEW unit labels

    I've been developing code for 8 years and once I discovered unit labels I fell in love with them and have used them consistently ever since.  And I have to say, I have never smashed a spaceship into Mars!  However, other coders at my company avoid them and I've never seen example code or instrument drivers that use them.  For instance, if a company has a laser power measurement instrument and provide instrument drivers to return the measured power, why don't they add power units to the output?  It seems so obvious and simple.  Does anyone know why these are not used?

    Wise Owl wrote:
    I've been developing code for 8 years and once I discovered unit labels I fell in love with them and have used them consistently ever since.  And I have to say, I have never smashed a spaceship into Mars!  However, other coders at my company avoid them and I've never seen example code or instrument drivers that use them.  For instance, if a company has a laser power measurement instrument and provide instrument drivers to return the measured power, why don't they add power units to the output?  It seems so obvious and simple.  Does anyone know why these are not used?
    Some people may think you need an extra label, caption, or free text - and avoid it due to the fuss involved (alignment, font, forgetting to display it, moving it accidentally, etc).
    If more people knew how to format unit labels into indicators, I think more people would use it. You can do it pragmatically with a property node (this is great when the unit may change, such as going from seconds to minutes), or you can just edit the Properties of an indicator in Advanced Editing Mode and put it there. Easy!
    Message Edited by Broken Arrow on 04-27-2010 02:05 PM
    Richard
    Attachments:
    lbl.jpg ‏52 KB

  • Formula node to integrate

    good afternoon,
    i need a help from anyone regarding writing a function .i need to integrate a function but i cannot find the right syntax to do so. CAN i do integration using formula node or need to use math script? wat is the syntax for integartion? hope can get a simple example thanks?

    What is your function or formula? You can calculate almost any formula using LabVIEW functions, but some people prefer the formula nodes.

  • Is it possible to populate cell A with the formula in cell B as opposed to the value of the formula in cell B dynamically?

    Hello,
    I am wondering if the following scenario is possible:
    Cell B contains a formula which refers to a number of other cells.
    Cell A refers to Cell B such that the formula in Cell B is applied in Cell A.
    I am aware that I can copy and paste, but I am wanting to do this dynamically, for the following reason.
    In order to avoid constructing a very complicated formula which involves lots of tricky IF functions, I use a formula with a chain of simpler IF functions, such as follows:
    =IF(A1=1,B1,IF(A1=2,B2,IF(A1=3,B3,IF(A1=4,B4,IF(A1=5,B5,IF(A1=6,B6,IF(A1=7,B7,"" )))))))
    Then in B1-B7 I include the complicated formulas, and depending on which value is actually in cell A1 that particular formula is applied in the cell (i.e the cell is populated with the respective formula).
    Is it possible to use Numbers in this way, or if not, is there another way of achieving my goal (i.e. to avoid having to construct one very long and complicated formula)?
    Thanks,
    Nick.

    It depend of what you want to achieve.
    Here, in standard cells of column B the formula is :
    =IF($A=1,C,IF($A=2,D,IF($A=3,E,IF($A=4,F,IF($A=5,G,"")))))
    Here, in standard cells of column C the formula is :
    =$A*10
    Here, in standard cells of column D the formula is :
    =$A^2
    Here, in standard cells of column E the formula is :
    =$A*12345
    Here, in standard cells of column F the formula is :
    =$A+10000
    Here, in standard cells of column G the formula is :
    =20000-$A
    Here, in standard cells of column H the formula is :
    =OFFSET($A$1,ROW()-1,A+1)
    Here, in standard cells of column I the formula is :
    =CHOOSE($A,C,D,E,F,G)
    Here, in standard cells of column J the formula is :
    =IF($A=1,$A*10,IF($A=2,$A^2,IF($A=3,$A*12345,IF($A=4,$A+10000,IF($A=5,20000-$A," ")))))
    As you see, the formulas used in column B,H, I, require the use of the columns C, D, E, F, G
    The one used in column I doesn't require these columns.
    When a task requires a complex formula, I often used the columna A thru G
    then when I'm sure that the formula in column B return behave exactly what I want, I replace in the formula of column B the references to columns C thru G by the formula embedde in the pointed columns minus the equal symbol.
    It's what I did to build the formula of column J.
    If you build the sample table, you will see that the formula in column I isn't perfect because it return a red triangle when the cell in column A is empty.
    I decided to leave it as is and created an enhanced synthetic formula for column K:
    =IFERROR(CHOOSE(A,$A*10,$A^2,$A*12345,$A+10000,20000-$A),"")
    As you see a single problem may receive different answers.
    Sometimes, one is clearly the best, sometimes it's matter of taste.
    Here my best choice would be the very last one which I added for column K.
    Yvan KOENIG (VALLAURIS, France) mardi 23 août 2011 16:44:11
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How can I install (download) a Labview FPGA code onto Altera FPGA chip using Labview FPGA module?

    Hi there
    Guys i'm a very new labview user (PhD student), my project is about ( design and implementation of a high speed-yet sophisticated system using Labview environment then install this project's code (using Labview FPGA module) onto Altera-made FPGA chip).
    so kindly, can any body help me in this?...is there any way to connect labview with Altera FPGA?...please anything would be said 'd be of great benifits
    thanks a lot in advance.

    as previously mentioned, labview fpga only supports national instruments targets utilizing xilinx fpgas. the hdl generated by labview fpga is encrypted and cannot be used to synthesize a design outside the labview fpga design flow. 
    however, if you must use labview for your project, it might be possible for you to design the system in labview and use one of the labview embedded modules ( http://www.ni.com/embedded )to generate c code which you can then port to systemc and compile for the altera fpga. i'm not saying it will be easy, but it should be possible. 

Maybe you are looking for

  • Problem connecting from Windows XP to 10.4.7 server.

    I have an old G4 tower running as a server. I had OS Xserver 10.3.x running on a single disk in this machine. Everything worked fine. I then inserted a mirrored disk pair in the machine and installed OS X server 10.4.7. The machine is set up as a sta

  • Can same os user be used to install all fusion middleware products?

    hi We are using "oracle" os user as database owner for R12 EBS. We now want to install collab suite & application server (AS) to later integrate these with EBS. Can we use the same "oracle" user to install colab & AS. Is it like each fusion middlewar

  • A question about RSA1

    Hello everybody. I meet a problem when use RSA1 it popup a messagebox says "You can only work in client 000". And I login the server on client 900.  I think maybe it's some wrong configuration on the server.  How can I solve this problem,  what confi

  • SLA Calculation needed to exclude Holidays, Weekends and Off business hours

    Hello all, I am to create a function that will calculate the minutes between two dates for company work hours, excluding the weekends.  The function here from RSingh() is ideal for this purpose; however I am now asked to excluded company holidays als

  • Uneven Keys on Keyboard

    Maybe I'm being a perfectionist, but I have an issue with my new MacBook Pro (from about 3 weeks ago). I love it so far, but one thing that irks me is that the keyboard's keys are decidedly uneven. Not insanely so, but the keys on the left-hand side