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

Similar Messages

  • 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

  • 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

  • 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

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

  • Max6675 for k-type thermocouple temperature reading using arduino and labview

    Hi; I am trying to measure temperature using arduino mega +labview 2013 +k-type thermocouple+max6675.
    I am using LIFA interface.
    The circuit digram  and labview file is attatched
    I am stuck on spi read/write palet. How to read 12 bit max reading and convert it to temperature in degree celcious?
    Max6675 produce output in 12 bit, and measure 0-1023 centegrade. According to this the
    Temperature (C0)= max6675 output (12bit)* 0.25. how to set this formula in labview?
    Pin connections are
    Max6675 breakout board pins
    Arduino Maega Pins
    GND
    GND
    VCC
    5 VOLTS
    SO
    50
    CSK
    52
    CS
    12
    Attachments:
    max6675.vi ‏38 KB
    max6675 vi diagram.png ‏42 KB

    Hi Saeed780,
    We have a discussion board specifically for questions about using the LabVIEW Interface for Arduino. Can you please post your question to the Arduino board?
    www.ni.com/arduino
    Catherine B.
    Applications Engineer
    National Instruments

  • Cross correlatio​n

    hi..
    can you please tell me how can i implement this formula in labview?

    i m attaching a vi that compares two jpeg images by extracting determinants.
    tell me how can the output of these deteminants be used with cross corelation formula?please send me sample vi of it.
    Attachments:
    matrix.vi ‏60 KB

  • Mod function in LabView's Configure Formula

    Hello, all.  Today is my first shot at using the Configure Formula feature in LabVIEW (7.1), and I'm not doing well at it.
    The kicker seems to be my (mis)understanding of the mod function.
    Here's the formula I have to work with:
    J=1+(((((C/100)%4)*5)+G)%7), where

    duplicate post, see: http://forums.ni.com/ni/board/message?board.id=170&message.id=161086
    LabVIEW Champion . Do more with less code and in less time .

  • Nonlinear Curve Fit LM Formula String in Labview 8

    hi, guys. I write a vi which use Nonlinear Curve Fit LM Formula String. When I run it ,the program says "Syntax error of parser." and I don't know what's wrong with it, so help me,Please. By the way ,you can fill the arrays as you wish.
    帖子被trinight在02-11-2006 07:51 PM时编辑过了
    Attachments:
    curve fitting.vi ‏16 KB

    You MUST wire initial estimates for the parameters. Attached modification works just fine.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    curveFittingMOD.vi ‏17 KB

  • HELP: Run-time array dimension in LabVIEW formula node

    I need to dimension an array at run time within a formula node as follows:
    int32 i,N;
    N = sizeOfDim(inputArray,0);
    float64 outputArray[N];
    for (i = 0; i outputArray[i] = myfunction(inputArray[i]);
    However, LabVIEW complains "Formula Node: index list expected". On the
    other hand, if I say
    float64 outputArray[1000];
    LabVIEW is perfectly happy. But that's not what I need to do! Is there
    an alternative
    way of accomplishing my goal?
    BTW, I've tried calculating N outside the formula node and then
    presenting it as
    an input with the same results. I've got a bad feeling that run time
    array dimensioning
    just isn't allowed.
    TIA,
    Hugh

    Can't you just use the Initialize Array function outside the formula node and pass that instead?

  • Serious bug in LabView 8.5 Formula Node

    Hello,
    Thought I would warn my fellow LabView programmers about a serious error in the Formula Node:
    The problem may be encountered by anyone running a non-us LabView installation:
    I am located in Norway, and over here we use the comma (,) as the separator in floating point numbers: So, the use 3.14 is written like 3,14.
    The problem is that the Formula Node accepts both formats, but only the US Notation is interpreted correctly !
    Example:
    float64 x1, x2;
    x1 = 3.14;    // Interpreted Correctly !
    x2 = 3,14;     // Interpreted as 3: One might say this leads to problems.......
    Message Edited by geirove on 06-13-2008 06:23 AM
    Geir Ove

    geirove wrote:
    JoeLabView wrote:
    Hi Geir,
    It is not a bug.  ............
     The node does not recognize localized decimal separators."
    Of course it is a Bug:  **Any** code that **any** compiler does not recognize, should be flagged with an error message ! I have written my share of compilers myself, and they all flag down code that is not accepted as an error.
    Failing to do so may cause serious, expensive and very hard to trace errors.
    Sorry, but I would expect that the NI team in their 20. year of LabView development is capable of better than this.
    Sorry to disappoint you! It's not a bug since that statement is absolutely valid albeit useless in that context.
    The Formula Node since LabVIEW 7 supports C syntax except some advanced features such as pointers. In C the comma in expressions is the sequence operator meaning it separates expressions that will be executed from left to right and the last one will actually be the result of the entire sequence expression. This is often used for the initilizer expression inside the for statement, to initilize several variables to a start value.
    And the NI team really is a lot better than you think. The online help may be a bit short about the reasons why the comma is not supported as decimal point but there have been many people thinking about this before it was made like that. It was either C syntax support without localized decimal point or some homegrown syntax with localized decimal point and they went for the first.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to use matlab program in formula node in labview?

    hi,
    i've got one equation of voltage regulation. so i did create program for that in matlab.and want to use it in formula node in labview.but i don't know how to do that.can someone please help me for that?
    regards
    bhavin

    If you have already written Matlab code it is easier to import it straight into a Mathscript node. If you use a Formula node you need to translate m- syntax to c-syntax which may take longer. Note that the Mathscript node
    may not support all the functions you used in Matlab so you may need to replace them with native LabVIEW functions. If you want to add inputs/outputs in your program you can just right-click on the border of the node to do that.
    These structures can be on the block diagram under Programming>> Structures.
    KostasB
    NI UK Applications Engineering
    Message Edited by KostasB on 05-28-2008 08:39 AM
    Attachments:
    mathscript-form node1.PNG ‏8 KB

  • Applying delay in formula node in labview

    hi every bod
    Solved!
    Go to Solution.

    If you have not done so yet, please go through the free on-line tutorials about LabVIEW.
    Rarely is the formula node the most appropriate way to write code in LV.  The native LV constructs may be a bit awkward at first for someone with a text-based programming background.  Once you learn to use dataflow and to recognize the functions by their icons, you may find that graphical programming can be both powerful and easy to read.  
    For delays use the Wait(ms) function found in the Timing palette.  If you need a delay in the middle of a calculation (which seems unlikely), you may need to split the calculation into two parts and put the Wait (ms) between the parts.  See the image below for one way to do this without any formula nodes.
    Lynn

Maybe you are looking for

  • "Word was unable to open the data source" error message in mail merge

    I am trying to do a mail merge in Word 2008 for Mac and receive this message when I try to open the Excel file for the data.  Can someone please help?  I tried changing the filename to .xls (originally .xlsx) but it didn't work.

  • TS3694 msvcr80.dll error 7 windows error 126

    itunes wont open, it tells me msvcr80.dll is missing from my computer, reinstall the program, followed by itunes was not installed correctly, please reinstall. error 7 (windows error 126). i reinstall itunes and it does the same thing over and over a

  • Picking colour for a new swatch from photos

    Often i paste some photos in indesign, I pick colour from it and then add colour to a vector graphic say I pick a shade of blue colour from a photograph and then fill a rectangle with that colour. How can I make a swatch for it? One way I know is to

  • Employee Mass Photo upload

    Hi All, Employee Mass Photo  upload: Is there any functional way for doing same like Tcode: OAAD/ We dont need any technical team to involve in this photo load Please let me know any thread related to this. Appreciating immediate response SD

  • Photo montage software that integrates well with iMovie and iPhoto?

    Hello, I need to do more complex photo montages that what iPhoto slideshow and iMovie has to offer. Does anyone have any recommendations for a software that integrates with the iLife software easily so it's fairly seamless? I need to produce professi