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

Similar Messages

  • How can i implement this formula?

    Hello i've to use labview to implement the formula in the image;
    x with i, is a particolar element of the array nx1...
    what shall i do?
    Solved!
    Go to Solution.
    Attachments:
    Immagine.JPG ‏4 KB

    I don't think you even need a FOR loop. Try this:
    Message Edited by altenbach on 05-14-2009 11:25 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    formula20.PNG ‏5 KB

  • 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

  • Doubt Reg How to implement MDX formula in ASO Cube

    We are using Essbase 7x for implementing ASO application, We are struck in implementing MDX formuls in Accounts dimension members. As per the requirement
    We have to calculate
    Cost Per kilo[Total shipment Cost]/[Billed Weight]
    Fuel Surcharge cost per kilo[Fuel Surcharge cost]/[Billed weight]
    Need to implement these formula's for the mentioned Accounts members. As we are new to this concept plz let me know if
    we wrote these in MDX editor and how to link these to the particulr mrmber in the dimension.please help me out in implementing these formula's

    Hi,
    1. For ASO cubes also, you can have forumulas on your cube's outline individual members.
    2. If the dimension is "accounts" you can write MDX forumulas on the members of the accounts dimension
    3. The two members 'cost per kilo' and 'fuel surcharge cost per kilo' and their respective forumulas are Total shipment Cost/Billed Weight and Fuel Surcharge cost/Billed weight.
    4. If you have the members like Total shipment Cost,Billed Weight and Fuel Surcharge cost, create 2 account members for which you need to write formulas , then go to 'formula' tab of these members and write a simple division formula.For ASO cubes, no need to end them with semi colon.
    One can use MDX editor to write down queries and extract data too, i.e queries . More of it can be found in the DBAG .
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • How to implement logical equation as LabView?

    Hi,
    I have this bit test logic I need to implement as a Labview code.
    Should I use formula node or either something similar to this already in Labview?
    "((var & (1<<bit)) != 0)"  where 'var' may be 8, 16, or 32bit, 'bit' is a number 0 - 31 representing
    a bit number. 0 is the least significant bit.
    Thank you,
    Do
    Solved!
    Go to Solution.

    Rotate, And, Not equal to zero
    Message Edited by Ravens Fan on 08-10-2009 09:36 PM
    Attachments:
    Example_VI_BD.png ‏2 KB

  • Implement active filter in LabVIEW using Orcad

    Hello. My problem is as follows:
    I have to generate a filtered signal using LabVIEW and NI-5411(Arbitrary Waveform Generator)(A sinus sweep from 10KHz to 100KHz in LabVIEW --> filter it in LabVIEW --> AWG NI-5411). The filter to use is an active filter designed with Orcad. I had thought of two choices: integrating somehow Orcad in LabVIEW or using a mathematical expression via a Formula Node to characterize that filter. The question would be how should I do it and how do I implement it.Just started working with NI5411, so any help would be really valuable. Thanks.

    Nlquist, I am attaching a passive filter in this post. But please see that it is a very rough simulation, I have not yet finalised it. I have done using signal processing and butterworth filter  In this attached simulation, I have made a noisy sine wave and filtered it using Butterworth filter. Perhaps now you could be able to answer ny doubt in a better way. I am also attaching a pdf  on reading which, I was able to simulate the passive filter ..I have checked the wikipedia page which you are referring but it contains no information how to simulate it in labview. It just contain theory of active and passsive filter. Tell me any method -simple or difficult but please help me with this active analog filter
    Attachments:
    filter labview good.pdf ‏451 KB
    low pass and high pass filter.vi ‏83 KB

  • 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 .

  • 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

  • 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

  • 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

  • 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

  • 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

  • Reg: Implementing a formula in Matrix Reports

    Hi Everyone,
    i have a simple scenario, i have a matrix report with ROWS => EMPNO, COLS => DEPTNO, CELLS => SAL
    Using Matrix report wizard i am able to do this very easily... now i implemented summaries like {AVG,MIN,MAX,SUM } DEPTNO wise using default summary options provided.
    Now i want sum of squares of salaries as one of the summary along with {AVG,MIN,MAX,SUM}
    What is the method to access the cell information in order to use it in formula column.
    Regards,
    Sreekanth

    Hi,
    There are three salaries in a column per deptno, suppose for deptno 10 there are three matching values {10,20,30} now i want them to be (10 square + 20 square + 30 square) in a Formula column CF_1 and then return it into a field which would be placed along with summaries like AVG,MIN,MAX.
    To do the above my formula column code would simple be return(:sal * :sal) in the same group which contains 'sal' but i dont know how many would i get at runtime to sum them up and i tried without summing by giving just return(:sal*:sal) and connected it to a field along with summaries AVG,MIN,MAX and i am getting error:
    "REP-1213: Field 'F_1' references column 'CF_1' at a frequency below its group"
    Hope i am clear.
    Thnaks and Regards,
    Sreekanth.J.U.P

  • Implementing a quadTree in labVIEW

    I am trying to use a quadTree to efficiently store a 2-D map of data but have been having trouble figuring out how to go about it. I have written an implementation for a quadTree in Java and have been having some issues with the logistics for a labVIEW version. Has anyone else gotten something like this to work? I think it might be possible is I create a generic bundle for the quad nodes but I am unsure how to create it if the node would store its 4 children nodes inside of it. I am also a bit confused about how to deal with an empty node and how or if LabVIEW is able to deal with the concept of a "null" node. Thank you very much for your help.

    The "nodes" i am refering to are the individual elements in the tree so in the case of a quad tree each "node" would store some data as well have space for 4 references to "nodes" ie the nodes children. I have used clustering before and I thought it might be a good place to start I am just unsure how to create a new insance of a cluster, the "node", dynamicaly so I would not have to create a set number of "nodes" before the program starts. How the quadTree works in say java, is that if a new piece of data is added to a node that already has data, the node will split itself into 4 equal sized children and store the data which creates new nodes as the program is running. 
    With that in mind, I am looking to implement this quadTree functionality in labVIEW to store data about a 2-D environment efficiently with the ability to say find all objects inside a given search area. The data I want to store about each point will be minimul, probably just a char or single number, but the bounds of the 2-D environment will be defined at runtime. The data structure will be holding a lot of points, on the order of at least several hundered points, and also needs to be able to scale with out being bogged down to much. 
    Thanks again for the informantion. I have done a good amount of LabVIEW programming just not when dealing with creating advanced data structures. 

  • Implementing Differential Equations using Labview fpga modules on PXI-7811R

    Dear,
        I am working on   implementing dynamic systems modeled ordinary  differential equations on PXI-7811R FPGA using labview FPGA. Is there any body who can help me how to implement differential equation on PXI devices uding Labview FPGA, please? Is there any integrator in Labview FPGA, module. I used Discrete Integerator in LAbview FPGA  module in Maths palette, but i hesistated if it really works . I really appreciate your help,
                                        Gammee

    Thank you for posting on the discussion forum.
    You can solve differential equations using LabVIEW FPGA but you may run into some significant difficulties in doing so. If you are not tied to using FPGA, you could try using LabVIEW real-time, which may make things much easier. But if you would like to stick with FPGA, see the link below for a list of examples that may be helpful:
    http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/ssnav:ipn/q/differential%20e...
    Below is a link that you can review to better understand the functionality of the discrete integrator should you choose to go that route:
    http://zone.ni.com/reference/en-XX/help/371599B-01/lvfpga/discrete_normalized_integrator/
    I hope that helps.
    Best,
    Rachel
    Rachel D.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Release of PO

    Hi, As the need arises, we are either increasing or decreasing our PO ordered quantity and unit price. However, we have noted that decrease in ordered quantity or unit price are not subject for release again while the increase is. Where can we do tha

  • Performance Issue in using Oracle Rules SDK!!!!

    Hi, I am using Oracle rules SDK. I have created a dictionary and declared 9 global variables in it. Now, before testing my ruleset in my code, I populate those variables and update datamodel. Date startDate = new Date(); try this.dataModel.update();

  • Accessing back-ups on external hard-drive with Time Machine.

    Hi guys, I hope someone can help me with this problem. I am a novice at this so please be patient and forgive my ignorance. I backed up the internal hard-drive of my '06 iMac onto an external Iomega 500GB hard-drive using Time Machine. A couple of we

  • Refresh only a region in a Page automatically every second

    Dear All I have a page in my application which would display the remaining seconds like 20,19 etc and when it reaches 0 the webpage should redirect to the calling page. I have set a counter for the same and is calling meta refresh tag in the page hea

  • AR/AP

    Hi Gurus, how to default some field in AR/P creation screen ; xd01 and xk01 many thanks Cecile