Labview Code Optimization

Hi masters, nice to cyber with you agian.
I have just come back from NI DAY and I have heard there about Labview Code
Optimization.
I think this is really very interesting so I would like to learn more about
this but, where?
Do you know any good site ?
Maybe Greg could help?
Thanks in advance!
Francisco Javier Fernandez Luna
Ingeniero Tec. Industrial en Electronica.
Tel: 619 81 98 31
[email protected]
ó [email protected]
Would you like your answer in spanish? Please, let me know.
Si prefiere que conteste a sus preguntas en español, por favor, hagamelo
saber.
"Let's make things better" (PHILIPS)

> I have just come back from NI DAY and I have heard there about Labview Code
> Optimization.
> I think this is really very interesting so I would like to learn more about
> this but, where?
> Do you know any good site ?
> Maybe Greg could help?
>
I did a presentation at NIWeek that covers some common performance
problems and has some VIs that show how different techniques compare.
Goto to
ftp://ftp.ni.com/support/niweek/software_track/
and you can find the Optimization presentation, or at least the VIs
used. I'm on a Mac; so I'm not certain what is in there.
The Optimization presentation isn't strictly focused on code speed, and
spends more time on things like panel appearance, but it does cover
performance to a certain extent. It tries to cover some of the mo
st
common issues. The performance chapter in the User manual, used to be
chapter 29, covers the issue pretty well too. Finally, there are some
low level Tech Notes somewhere on the NI web site.
If you have specific questions, post them away.
Greg McKaskle

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

  • I am trying to have some LabVIEW code called in a New thread exit when the testStand sequence terminates

    I have a Sequence that launches a sequence in a New Thread that happens to launch some LabVIEW code.  The problem is when the LabVIEW code finishes, it will not close even when the TestStand sequence terminates. Is there a way to tell this LabVIEW code to Exit, I've tried the Quit LabVIEW function, but that causes a C++ RunTime Error.  The LabVIEW code does end though, and it is set in the VI properties to:
    Checked - Show Front Panel When Called
    Checked - Close Afterwardds if originally closed
    The sequence call that the LabVIEW code is launched from has the following options:
    - New Thread
    Unchecked - Automatically wait for the thread to complete at the end of the current sequence
    Unchecked - Initially Suspended
    Unchecked - Use single threaded apartment
    Any clues on this would be appreciated.

    Hi ADL,
    Everything should close correctly if you check the checkbox "Automatically wait for the thread to complete at the end of the current sequence" in the thread settings.
    With it unchecked, I am seeing the behavior you are. 
    Gavin Fox
    Systems Software
    National Instruments

  • How can i convert .gif/.bmp/.jpeg file to labview code(vi)?

    Hi,
    I am having a .gif file which consists of vi code. I want to convert that .gif file into vi & complile it. I am using LV 6.1 & 7 express. Is is possible?
    Reverse is surely possible like we can convert the vi diagram into .gif/.bmp file? But above i dont know?
    Your help will really appreciated.
    Best Regards,
    Nirmal

    If I understand your desire, it's to be able to convert a graphical image (bit map or screen photo, for example) into a functional block of LabView code, with all of the wire work done, etc. This is a task approximately equivalent to performing optical character recognition.
    In the case of a non-system subvi, unless that subvi is loaded, so that it's graphical representation can be recognized by comparing the bit-map image for the subvi on the photo with the available vi's.
    Another difficult problem to solve is when the bit-map has been scaled up or down, such that there's a pixel count mismatch between the VI iconic bitmap and the photographic bitmap you wish to import into your code diagram.
    And if you try to do recognition on objects that have h
    ad their RGB color representations changed, as can happen when JPG compression or other compression forms are used that reduce to total number of colors saved, that challenges the object recognition further.
    Also, what you're interested in having is only of value to Labview programmers, so there's not a very large market for such a tool to be sold to - unlike bitmaps of scanned text to ASCII or wordprocessor applications - traditional OCR software.
    All this ins't to say it can't be done, but that it's difficult, and for the person or company that undertakes it, the sales potential is limited.
    Regards,
    Bob Donnell

  • GPIB: I am having some problem in running Labview code properly.

    Hello,
    I have written a labview code to drvie my stepper motor (using GPIB function). This code is supposed to move
    the stepper motors and keep updating the current position of motors. I am having an unique problem. This code runs fine for trial no.1st, 3rd, 5th and so on. While it fails to update for trial no 2nd , 4th, 6th and so on.
    The main code is "motion_update_Final_Newport.vi". It will work for labview 7 as well as 7.1.
    You may not be able to run this code. However, you may be able to understand my error easily as I have figured out where is the error. The update is based on a function, which returns (string) 0 for motion not done and 1 for motion done. This value is diaplayed in "output 1" and works fine. However, "check 2" which is an indicator does not work for trial no 2nd , 4th, 6th and so on.
    If you go where I have "output 1", there is a while loop and "check 2" is an indicator for check. It remains on for trial no 2nd , 4th, 6th and so on.
    I am attaching the code and this is for ESP 300 motion controller Newport co. I am certain that some of you would be able to figure out the error without running the code.
    Thanx in advance,
    DushyantMessage Edited by Dushyant on 04-18-2005 04:43 PM
    Attachments:
    modified_Motion_Update_Final_7.zip ‏228 KB

    Thanks a lot for trying to help me.
    I am sure that I am not moving any subvi.
    Steps that I am trying to accomplish:
    (i) I am moving the stepper motors for a relative distance.
    (ii) Then I am trying to get the motor position after delay (ms) [defined in front panel].
    Now, how I am trying to accomplish:
    First outer stacked sequence:
    seq 0 of outer: This sets GPIB as controller in command (without this I was having trouble when I was combining this with photodiode code). Please avoid this seq.
    seq 1 of outer: The motor moves to certain relative distance. (I do not think that there is anything wrong here).
    seq 2 of sequence: This part does updates the motor coordinate after delay (ms). Inside this, there is a case structure to choose whether I want the update.
    If I want the update, then following steps take place inside the case structure:
    Inner stacked sequence:
    seq 0 of inner: [This is where I think that error is taking place] Inside this, There is a while loop which terminates when the "Motion Done?"
    function returns "1", else "0". Inside the flat sequence structure, first sequence "updates" the motor coordinate while second check
    whether the motion is done .
    Seq 1 of inner: Controller wait till motor stops.
    seq 2 of inner: The motor coordnate is updated for the last time.
    seq 3 of outer: It clears the GPIB.Message Edited by Dushyant on 04-19-2005 10:22 PM
    Attachments:
    Wait_Till_Motor_Stops.vi ‏13 KB

  • How to send data to labview code at run time while using with (or executing the sequence)the teststand

    Hello
    I am new to the Teststand.
    I am using labview8.0 with teststand 3.1
    I have developed some labview codemodules as vi's without using the teststand utility library pallete
    Now i have to run them in teststand.
    While executing them(as a sequence) in teststand,i need to enter the data to the labview code at run time.For this labview front panel should appear as GUI or popup (while executing).Is it possible to do this without using teststand pallete.
    or i need to change the code with teststand pallete(i think it is difficult now to change the code)
    Plz provide a solution to this problem
    Also one more,how and where to use the 'pass by reference' option
    Thanks and Regards
      Mudigondla

    Hi,
    see your other post http://forums.ni.com/ni/board/message?board.id=330&message.id=13914
    Also, you can, specify to display the front panel of your VI when you specify your VI in your sequence file.
    There are examples, for dialog panel using LabVIEW, in the examples folder of TestStand and on the NI Web Site.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • NI Motion Assistant LabVIEW Code Generation Error

    Hello, the following is my current setup:
    NI PCI-7334 motion control board
    NI UMI 7774 splitter board
    3 x NI P70530 Drives
    3 x NI CTP12ELF10MAA00 Stepper Motors
    3 x Power supply units for drives
    LabVIEW 2010
    NI Motion Assistant 2.6
    Motion and Automation Explorer 4.7
    I have built a three axis motion system that I am trying to configure with labview. After verifying that everything was set up correctly, I opened MAX, updated the firmware to my motion control board, and intitialized the controller. Since then, I have created many basic programs using the Motion Assistant Software to test the movement of my device. Everything works fine while using the Motion Assistant software (I have three axis movement, multidirectional control, and can perform various straight line and arc moves). My problems begin when I try to use the code generation feature.
    When trying to use the code generation feature to output a labview diagram, I run into a problem where a dialog box pops up and says "Find the vi named ...."
    Some examples of the names that come up are: Configure Vector Space.flx, Vector Space To Control.flx, Motion Error Handler.flx.
    To be clear the program in Motion Assistant that I am trying to export to LabVIEW code is composed of two individual steps. One that tells X,Y, and Z motors to move forward 25 revolutions, and one step that tells them to move backwards 25 revolutions.
    I have made many other programs in Motion Assistant that run fine, but I always receive similar errors when trying to use the code generation feature to export to LabVIEW. Is there something that I can do to solve my problem?
    Thank you for your help.

    Hi Joe,
    I am using Ni-Motion Assistant 2.6, Ni-Motion 8.1, and Motion and Automated Explorer version 4.7.
    The code I posted is supposed to tell Axis 1 to move 40 revolutions at 400 rpm. It works fine in Ni-Motion Assistant but when I try to generate a LabVIEW diagram I receive the following error, "Find the VI named 'Motion Error Handler.flx'". I have had it search my directory, as well as the disk that I installed both LabVIEW and Ni-Motion but no luck. Thanks for your help.
    Attachments:
    1111.vi ‏9 KB
    1 axis movement.zip ‏8 KB

  • Is there a tool to clean a directory structure of unused LabVIEW code?

    I could write this from scratch as follows:
    Load all of my LabVIEW code including dynamically-called VIs into memory, then list all these VIs.
    List all VIs in the directory structure I want to clean.
    For each VI in the directory structure that's not in memory, delete it. If this leaves that VI's parent directory empty, delete that parent directory.
    There is probably already a tool or VI that does this, but I can't find it. Does such a thing exist?

    bmihura,
    I to have had the need/desire to do this.  At my previous employer I wrote a tool that assisted with that function.  Unfortunately I no longer have access to that tool.  If you have a very big program you may have memory and speed related issues when you load "all the VI's into memory".  
    Good Luck
    WW
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • Visual C/C++ code/Labview code for interfacing NI Hardware

    Hi,
     i need Visual C/C++ code/Labview code for interfacing NI Hardware and sample project example.

    Duplicate - http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Visual-C-C-code-Labview-code-for-interfacing-...
    You are just spamming now.

  • How i can generat VHDL or Verilog code from labview code

    how i can generat VHDL or Verilog code from labview code ( i have a labview code and i want to convert it to VHDL or Verilog code how i can do that )

    Mouath,
    There is no feature in LabVIEW to export your VIs as VHDL files. You are able to include your own HDL in your LabVIEW VI (using the HDL node). I encourage you to provide your feedback related to this issue at ni.com/contact. The product suggestion submitted are taken seriously and reviewed by National Instruments.
    Cheers,
    Jonah
    Applications Engineer
    National Instruments
    Jonah Paul
    Marketing Manager, Embedded Software
    Evaluate the LabVIEW RIO Platform! - ni.com/rioeval

  • How to use LabVIEW code in a Thesis?

    Hello,
    If I write some code, for example, in MATLAB or C++, that I want to include in my thesis as part of a discussion or in the Appendix, it's a fairly straightforward process: copy/paste
    However, this isn't really an option for LabVIEW code. Even a screen cap wouldn't work very well - especially for situations with case structures or nested SubVIs.
    I was wondering if anybody has any thoughts as to a good way to show / convey some of the work done in LabVIEW in a situation like this?

    Robber_Tom wrote:
    Hello,
    I was wondering if anybody has any thoughts as to a good way to show / convey some of the work done in LabVIEW in a situation like this?
    A former co worker of mine had a 50 page thesis, with 30 pages of print screen source code.  In my opinion LabVIEW source shouldn't be in a thesis, and for that reason I didn't have any in mine.
    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.

  • Hello sir,i need labview code for a code which is written in matlab,latter one is attached with this message.

    hello sir,i need labview code for a code which is written in matlab...
    clc;
    close all;
    clear all;
    Ez= zeros(1,200);
    Hy=zeros(1,200);
    Ca=1;
    Cb=.4519;
    n=1;
    while(n<1500)
    for k = 2:200
    Ez(k)=Ez(k) + Cb*(Hy(k)-Hy(k-1));
    end
    Ez(1)=1;
    for k=1:199
    Hy(k)=Hy(k)+Cb*(Ez(k+1)-Ez(k));
    end
    plot(Ez,'b')
    hold on
    plot(Hy,'r')
    hold off
    pause(0.001);
    n=n+1;
    end
    thanku

    Well, this code is quite trivial and if you have to learn LabVIEW anyway, you might as well try to implement it.
    A few things to remember:
    The first array element in LabVIEW has index #0, while in matlab it has index #1, so everything dealing with array indices needs to be adjusted slightly.
    The zeroes function equivalent is "initialize array".
    Keep the array in a shift register as you update elements.
    use FOR loops.
    Use one of the graphs to display the data.
    LabVIEW Champion . Do more with less code and in less time .

  • Labview code for closing the command window

    Hi,
    This is naveen.Actually we are using 3rd paty test software for our mobile hardware testing which creates an DOS or Command window after execution.We have automated to execute this software using labview.the problem we facing is that we couldn't run the test software unless we close or kill the dos window opened in the previous run.So i like to know whether you have any labview code for closing or killing the DOS window ,i request you help me in this regard.
    regards,
    Naveen 

    Use the System Exec VI Owning Palette: Libraries & Executables VIs and Functions.
    And take a look here http://www.tech-recipes.com/rx/446/xp_kill_windows_process_command_line_taskkill/
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Looking help for developing labview code [Urgent]

    Hi,
    I need help in developing labview code. I am new to labview and will appreciate if someone can help me in this matter. I need to control the intensity of AC load (halogen lamp with 2kW,230V,50Hz) using Labview and Arduino. But my project using interrupt in Arduino, so it is not possible to use Labview Interface For Arduino(LIFA).  I searched and it might be possible to use VISA serial in this matter. Attached is the circuit and the code of Arduino. Someone who is expert in this matter can help me?
    The concept of my project is almost same with https://www.youtube.com/watch?v=oeVJ5bs6E8M&feature=youtu.be
    Solved!
    Go to Solution.
    Attachments:
    Zero Cross Circuit.docx ‏203 KB
    Triggering Circuit.docx ‏48 KB
    Coding for Arduino.txt ‏7 KB

    Hi,
    You will find all information you need and LabVIEW VI examples on the LabVIEW Interface for Arduino
    LabVIEW Interface for Arduino
    Regards,
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Can some body help me to develop labview code for generating pulse to drive ac servo motor

    can some body help me to develop labview code for generating pulse to drive ac servo motor... i am using NI 9401 card ....tnx

    Driving an AC servo motor would (I missed AC on the previous msg) requires some complex hardware. This is generally done by drivers specifically designed for this purpose. I doubt you will be able to accomplish this with the hardware you currently have and it might be cheaper to just buy a driver for it and control the speed through the driver.

Maybe you are looking for

  • Projector changed my startup resolution

    I had to hook up my macbook to a low resolution projector and it changed my screen resolution. I changed it back in system preferences but the gray screen with the gray apple is low resolution then it loads to the set resolution. it doesn't seem to e

  • How do I install my old places.sqlite file to get my old bookmarks?

    Bought a new computer. Trying to bring in my old bookmarks, so on the old machine, I saved the file: places.sqlite. Trying to install it from a jump drive on the new machine. I tried the restore feature, but that only restores what you save on the ne

  • How do I get rid of an ad that is underneath the toolbars at the top of the browser?

    There is an ad for the Harry Potter movies that is underneath the two tool bars at the top of my browser. How do I get rid of it and return to the default

  • L7600 printer driver does not install on Windows 8.1 HP Pavilion x2

    I am trying to install the full package on my laptop. I get to the point where it is trying to execute something in this folder- C:\Users\Winston\AppData\Local\Temp\7zS0EB0\setup\devicediscovery and I get an error message above.

  • Unicode encoding in java

    Hi all, I have a file which contain data in UTF-16BE format, i want to send that data to SMS, but to send data in SMS i usually have in following format cmpmessage="\u0645\u0639\u0632\u0632\u0635\u0627\u0631\u0641" Now when i copy data from file it c