LabView programming techniques

Hello,
Can anybody recommend me some links/documents/papers where several LabView Programming Techniques are presented?
I know LabView (I think that pretty good) but I've learned it by myself.  And now, I have to do some (small-average size) projects that are not for personal use. So I would like to know how can I improve my VIs in order to be easily modified, debugged, tested, structured etc. If you can also recommend me some LabView tools/features that could help me to build "professional" LabView projects and VIs I would be thankful to you.
Thank you,
Paul

In addition to Ray's recomendations I'd also suggest you serach this site for "Design-Patterns" and become familiar with those (if you have not already).
I also posted a number of Nuggets on programming techniques as well that can be found in this thread of Nugget links.
If all of that info is "old-news" then try your hand at responding to questions here on the forum, and others will let you know how you are doing.
(another point! if your code resembles any of the examples found in this thread,  you may want to re-think your techniques. 
Now if you get through all of that and really want to test yourself against the best LV developers in the world, you can try your hand at answering Q's on LAVA (LabVIEW Advanced Vitual Architects).
Just trying to help,
Ben
Message Edited by Ben on 09-11-2008 08:16 AM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • How do I get audio output from a labview program

    We are modifying an existing labview program that reads data from a BNC-2140 DSA and displays as a graph. We want to be able to stream audio in audible range instead of a graphical display. Is there a VI available that can create audio? If not, how can I go about creating one?
    Thank you

    Hey Lost-
    There is a wonderful document on our external website that groups our knowledge on using sound with LabVIEW.
    Under the LabVIEW Resource Library (http://zone.ni.com/libraries/) choose -> LabVIEW -> Advanced Programming Techniques -> Using Sound.
    This page lists over 5 examples for playing sounds with LabVIEW through WAV, MP3, and other formats. Streaming audio might be tough, depending on your processor. It might be hard to translate your input into a format LabVIEW can play. I am not sure what sound format that input data you refer to would be. This will be a good starting point. Also, I have heard of a Microsoft ActiveX control, DirectShow, that might help you. I have not worked with this guy, but I would check into it at Microsoft's site -> www.msdn.
    microsoft.com.
    Post again if you have follow-up questions.
    ben schulte
    national instruments

  • I am trying to translate the labview program to a real time labview programming....i wan to know what te the main isse that i need to focus on

    currently i am doing a lift monitoring system which made use of labview. Due to time constraint, i have decided to use the real time labview program. However i have no prior experience on the real time programmng, can i be enlighten on the main issue and what are the thing i ned to look out for. is thre any documentation that i can use?

    Derek,
    Programming for LabVIEW Real-Time is very similar to programming for LabVIEW for Windows. Many VIs do not need to be changed in order to run in LabVIEW Real-Time RT Engines. However, here are some issues to consider:
    1) Drivers
    2) File I/O
    3) Dialog Boxes
    4) Shared resources
    1) Drivers. If you application was written in LabVIEW for Windows, and then ported to run on an RT Engine on RT Series Hardware, you need to be sure that the drivers you are using are supported on your platform. See KB 28G97MZ8: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/aad11f924e5b5fd086256a310053a094?OpenDocument
    2) File I/O: If you are running your programs on an RT Series DAQ Device, it has no storage device, so file I/O operations will crash. See KB 26FBO0KN:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/3c35f5e85476579d862569f50067462e?OpenDocument
    File I/O on RT PXI Controllers is supported in 8.3 filename format (no spaces in the filename allowed).
    3) When your application is deployed, (Operate>Download Application, Operate>Run, then File>Exit without closing RT Engine VIs), you VIs continue to run. However, the RT Engine runs headless with no keyboard, monitor (limited information displayed), or mouse, so any user interaction previously required by your VIs, such as Dialog boxes, will hang or crash your program. For user interaction with a deployed application, communicate to the Host PC using shared memory, VI Server, TCP/IP, DataSocket, or UDP. See ~\labview\examples\rt\rt communication.llb for examples.
    4) Even though your programs now run in a real-time operating system, you need to follow good real-time programming techniques. These include: using multithreading with critical tasks set to time critical priority. One time critical VI with no parallel loops. Avoid accessing or using shared resources in time crital VI (shared resources cause jitter). Shared resources include the memory manager (preallocate arrays used in time critical loops), global variables for interthread communcation (use RT Queues). For more information, visit the LabVIEW Real-Time Resource Library in the Developer Zone: http://zone.ni.com/devzone/devzone.nsf/webproducts/c25f8c664230613a862567df006abb06?opendocument

  • How do I use directional PDA buttons in LabVIEW programs?

    Hi all,
    I've been assigned to get a LabVIEW program to work on a Palm PDA with LabVIEW 7.0 and palm PDA module 7.0.  I am basically totally new to LabVIEW, and my possibly very simple problem is, the PC program requires input from a serially connected number pad for the 8, 4, 5, 6, and 2 keys which are used as four directions (8, 4, 6, and 2) and an enter (5). 
    I am trying to rewrite the input vi to use the directional buttons and middle enter button on the PDA itself but am having trouble figuring out what to use.  I am using a PDA simulator because of the PALM OS5 we own.  The input demo vi example provided will not build for PDA because of size so I am unsure of how to approach this.  Another thing is, we have LabVIEW and PDA module for pocket PC 8.0, and a Dell Axim PDA on order.  From what I understand off of this website, the latest PDA module has example button vi's.  I would still like to figure out the way to do this on 7.0 so I can have a better understanding of LabVIEW.  Eventually the program's endgoal is to be used on a PDA and inputting with a bluetooth keyboard, but we are going step by step right now.
    I guess my biggest questions are, how do I assign the directional buttons on the PDA in my program, and will this differ greatly when we switch to 8.0 and pocketPC.
    Oh and I did try to look at the example asteroid.vi but from looking at the input subvi, still couldn't figure out how they assigned the buttons.
    Thanks,
    Stephen

    I can't help with any specifics (no access to the PDA module at the moment and I didn't use the buttons anyway), but I would like to say that it probably would make a big difference if you used LV 8. 7.0 was the first version of the PDA module and was extemely limited and problematic (it didn't even have a tab control). 7.1 was somewhat better and I understand that 8 is even better (although still very limited and buggy).
    I also remember reading about several differences between Palm and PocketPC and I think you will generally be better off with the PocketPC as it's related to windows and will probably support more stuff.
    Try to take over the world!

  • How to open labview program with Quit Labview function inside?

    Hi Any idea how to open labview program with  Quit Labview function inside?
    I forgot to add and set the condition of the type for this program.
    If the program is an application, it would close straight away.
    If it is still labview work, it will go straight to editing program without closing.
    So I need to recover, open it and make some changes.
    Clement
    Solved!
    Go to Solution.

    Put the VI in a project and open it from there, then it shouldn't autorun. You can use App.kind property of application to decide whether to close or not.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Can multiple LabVIEW programs simultaneously access the same NI-DAQmx hardware?

    I am developing a test station system that, in essence, runs several
    seperate LabVIEW programs simultaneously on the same computer, each
    controlling a different set of I/O channels on one shared set of NI
    DAQ hardware (analog and digital I/O PCI boards with external signal
    conditioning).
    I have already gotten a system like this running almost flawlessly
    using LabVIEW 6.1, NI-DAQmx 7.1 with traditional channels, and older
    E-series DAQ hardware. So long as two programs do not try to write to
    the same output channel simultaneously, everything works exactly as
    expected--I can even read from the same (named) channel simultaneously
    from more than one program. The only issue I have had is that if
    one
    of the compiled applications is closed (not just stopped, but closed)
    while others are still running, Windows XP (SP1) will bluescreen on a
    driver error. This is undesireable, but acceptable (though if there's
    a fix/workaround, I'd love to hear it).
    I am now building a similar system using mostly the same software
    (with an upgrade to LabVIEW 7.1), and I've noticed that the new
    M-series DAQ hardware seems to offer much more bang for the buck than
    old E-series hardware and its kin.
    My question is this: It appears that I/O on M-series hardware must be
    performed with new mx channels, with traditional channels not being an
    option. I am therefore wondering if I will be able to do this kind of
    multiple simultaneous access with mx channels, or if I must purchase
    the classic hardware and use traditional channels for this somewhat
    unorthodox application.
    (Incidentally, the multiple simultaneous program thing is a
    requirement for this system, as it is the only clean way to run
    multiple
    identical copies of the same complete program that only
    operate on different I/O channels, and re-doing the program from
    scratch is not an option.)

    Dear Anonymous,
    Thank you for contacting National Instruments.
    To address your question, I don't know if multiple simultaneous access with mx channels is possible, but I do not see why it wouldn't be. The best way to find out would be to test it. I don't have your program or hardware, so I'm pointing you to some Compatibility VIs. These are VIs that look exactly like Traditional DAQ VIs except that underneath they call the DAQmx driver instead of the Traditional DAQ driver. If your device works when you substitute these Compatibility VIs in for the Traditional DAQ VIs, then you'll know the M Series boards will work for you.
    Here is the link for information about the Compatibility VIs:
    http://digital.ni.com/softlib.nsf/954feaeea92d90918625674b00658b
    83/9d67f671bcc6850586256e630059308b?OpenDocument
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments

  • How to get a signal from the serial port to start a labview program?

    I need to synchronize the data obtained from a program (which is not in Labview)with the data collected with Labview on a different computer. I can send some data strings to the serial port of the computer running the Labview program when the other program starts. However, I need to be able to read the trigger in my Labview program. Do you know what I should do? Thanks.

    If you don't have any other programs listening on the COM port, you need to let a LV program run BEFORE the signal comes, otherwise you won't be able to read it. You can have the program wait in a slow timed loop so that it doesn't use up too much CPU time, and when the required "trigger" comes, to move into the main part of the program.
    You basically need a while loop waiting for a certain string in the serial buffer. Once the string is found the while loop is exited, and the data acqquisition or whatever else you require from the progam can be performed.
    In the example attached the program wait for ANY text to be sent to the COM port. Please note that you need to configure the VISA resource before using it. Once there is something at the COM port, the loop will exit and the rest of the program will be executed.
    Hope this helps
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Wait for serisl message.vi ‏17 KB

  • Error when running the LabVIEW program

    hello...........
    I'm newbie in LabVIEW....I have a problem when i'm running the LabVIEW program...i want to analyse data using the LabVIEW through the real experiment....
    My problem is, there is an Error when i try to start the program...This Error forced me to restart the program several times until it can run.......By the way, i'm using Picoscopes 3206 to connect the LabVIEW program in PC with the real experiment.....
    Here, I'm attached the picture that I snap when the Error occur....
    Attachments:
    error.JPG ‏222 KB

    You have to try to isolate the problem...
    Use 'Diagram disable' or 'Case' structure to run special part of code or try write a specific code to access and manage your equipment.
    Several questions could help: 
    - Are you up to date with your hardware driver?
    - Do you call external ressources (ex: dll)? perhaps with instability
    - Do you properly close connection with your equipment after using? 
    - With your offline mode, do you load all the code, including hardware driver or do you use a special method without no loading the specific code?
    - When you are able to run after many tries, is the program stable? Can you re-start it without exiting LabVIEW?

  • Modification of Global channels In NIMax while Labview Program running, not updating in Labview

    Hello,
         Okay, here is my issue.  I have a program that reads data from a device using global channels in MAX.
    Step 1:  I open MAX with the systemExecute.vi with the parameters to wait till program finishes.
    Step 2:  I Modify a channel in Max, for example change the assigned daqMX Scale, or Min Max values.
    Step 3:  Save channel in Max.
    Step 4: Exit MAX with the file exit.
    Step 5: The Labview program continues, and I re-read the available global channels and global scales in the Labview vi but the properties have not changed to match what I change in MAX.
    If I stop the VI then start it again and read the global channels then the properties get updated.  How can I get the channel properties to update in Labview after changes are made in Max without stopping the labview vi and starting it again?

    Many properties of the channel can only be modified when the task is not running.  Have you tried stopping the task in LV before modifying the parameters, and then re-starting the task?
    Dan

  • I can not create an Installer, After install the Vision Builder Demo and then uninstall it. I can not create a Labview installer anymore, it asks me for a Vision Builder Installer, even if My Labview program does not have nothing to do with it...

    I can not create an Installer on LabView, After install the Vision Builder Demo and then uninstall it. I can not create a Labview installer anymore, it asks me for a Vision Builder Installer, even if My Labview program does not have nothing to do with it...
    Solved!
    Go to Solution.

     Hi Shada this can happen if you are including additional installers to your installer for example DAQmx. When you are doing this the installer has to include other files like MAX (Measuremente and Automation Explorer). Probably when you installed Vision Builder it updated MAX, so when your installer is trying to Include MAX, its asking for the source where it was installed in your computer in this case Vision Builder.
     Here you can cache the information so its not asked again, or you can download a newer version fo DAQmx, so it will update MAX and change de dependecy.
     You can find more details about this issue in this KB:
    KnowledgeBase 3S88PJMY: Why Do I Get A "Missing Distribution" Error When Trying to Build an Installe...
    And for keeping a copy here is more info:
     How Do I Stop the Missing Distribution Notification Each Time I Build An Installer?
    Best Regards
    Benjamin C
    Senior Systems Engineer // CLA // CLED // CTD

  • Using APT ActiveX methods to create a labview program for BPC 203 3 channel Benchtop Piezo controller

    Hi Everyone,
                      I am really very new to Labview and i am in great need for some help.I am assigned a task where i am supposed to create a labview program to control or moniter a BPC203 3 channel benchtop  Piezo controller. I created a program with the help of the instructions provided in the APT-Labview guide provided by Thorlabs.But th program doesnt run . Whenever i try to run it i get the same error which says that "Control HW Communications disabled".I have attached a snapshot of the error message.So i tried to create a small program in labview which would read the volage output.Even there i got the same error message.I suppose there is some mistake on my part which i am not able to correct due to the lack of proper knowledge.Could anyone please help me to solve this problem.A slight elaboration would be highly appreciated.Also i think the error lies in the use of invoke node with the get Voltage output method. I am not sure whether the parameters i have provided to the invoke node are correct.Any help of any sort would be highly appreciated.
    Attachments:
    Front Panel with error message.PNG ‏202 KB
    Block diagram.PNG ‏101 KB

    Hi
    I had the same problem today. However, I noticed that the piezo controller has 3 channels with separate slots and they are packaged in the same box. Therefore the whole box has a serial number, probably something like 71822280, and this is written with large letter. Now, in order to communicate with any of the channels, this does not help, but one needs to communicate directly with the interested channel and they have thier OWN SERIAL NUMBERS.
    For example channel 1 (my X direction in the nanoMax stage) has serial 91822281, Y has 91822282 and Z has 91822283. So try looking if you have the right serial number Hopefully you found out this yourself but this might help others, I took me3 hours to get this thing working when I started to plug-in the cables and everything.
    Lasse

  • How do I make a labVIEW program for a linear CCD camera?

    Hi, I'm pretty new at LabVIEW and I'm having a hard time figuring out how to connect my linear CCD image sensor (Toshiba TCD1304AP) with my computer. I know I need a DAQ device, what would work best for this particular CCD? After I got that connected, I need to create a LabVIEW program that displays the light detected by my CCD. Does anyone have a similar program or template I can use as a model? Any help would be appreciated. Thanks.

    Hello,
    I'm not sure the type of signal that is generated as an input to a DAQ device. This could either be an analog or digital input. The signal type will determine how you make your program in LabVIEW. You will also need to correlate the signal level to the light detected. That will be determined by your sensor. I don't have any programs or templates for this, but if you look at the basic analog or digital input examples, you might get a good starting point for DAQ device programming.
    -Zach
    Certified LabVIEW Developer

  • How to create a labview program and use it as a compiled prgram

    I am a mechanical engineer, and I have some formulas and equations that I used to obtain maximum thickness of pipelines and also in the design of steel structures, what I need now is to use Labview to put these huge number of formulas in one program. I can do that, but the problem after I make the program I want it to be used by anybody on  any PC which is not installed Labview on it, and that is the problem, I don't know if I can make an excel  sheet or something to be the interface that can be used by the user, and if I can, I hope that I can have the details of who to execute that.

    LabVIEW interacts with Microsoft Excel using its Active X hooks. Anything Microsoft has exposed in the Active X API, LabVIEW can do. This includes opening Excel, reading values, writing values, etc. Doing this can be tricky for a novice programmer and NI has created the Report Generation Toolkit for Microsoft Office that plugs into LabVIEW for a more streamlined experience. 
    The Developer Zone is a good place to start a search looking for Active X Excel examples: http://zone.ni.com/devzone/fn/p/sn/n16:en/sb/navsRel?q=microsoft+excel+labview&x=0&y=0
    As well as the Forum: http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391 
    Reading and writing to an open Excel file could become quite cumbersome however. If the Excel file is open and the user is interacting with it, writing to that same file will return an error saying that the file is currently open. It would have to end up like this: User opens file, modifies some fields, saves file and closes excel. LabVIEW program opens file, reads fields and writes a result, then opens Excel to display to the user the result.
    Is there any specific reason you want to use Excel as your user interface? You can use the front panel of a LabVIEW application to enter the data and display the results, all while writing this data to an Excel file for logging/reference in the future. 
    Message Edited by Stephen B on 11-17-2008 01:26 PM
    Stephen B

  • How to include .xml file while building a stand alone applicatio​n .exe file from a Labview program

    HI,
    I have a labview program which loads default values of all the variables from a .xml file when executed.  I am trying to build a standalone '.exe application'  using
    (Tools Menu --> Build Application from VI) , however I am not sure where to include this .xml file in the process?  I really appreciate if some one could let me know.
    Thanks
    Vish

    As GerdW said, it is preferable (and better practice) to use the project explorer. My guess, you didn't configure the build correctly (and probably used the default settings).
    First, you have to specify your xml file as Always included is the source file tab
    Now look at how the build folders are built:
    The .ini file (xml in your case) is in the data folder. So in the build the relative position of the xml file is not the same as in the development environment. You have to be aware of this difference and use a diiferent relative path for the exe. You can do this using a conditional disable symbol in the project and then use the conditional disable structure in your VI.
    Here in the deploy case the exe will look for the file in the data folder and in the development environment it will look in a folder name Files.
    Ben64

  • Executable run-time error: "Failed to process adress of Labview Program. Occurences will not work."

    When I run my VI it works fine. However, when I create it into an executable and try to run the exe, it gives me an error, "Failed to process adress of Labview Program. Occurences will not work." Why?

    I am using Labview 7.0. I have attached a screen shot and the code. thanks for checking it out and let me know if you need any more info.
    Attachments:
    Labview_Error.bmp ‏2305 KB
    Main.vi ‏230 KB
    PAIN_Generator.exe ‏2186 KB

Maybe you are looking for

  • WebCache Failed to start : Failed to assign port 80: Permission denied

    Hi All, I have three server running IAS 10.1.2.0.2, running forms and reports application. One Infra and two Midtier. Suddenly Midtier1 is crashed, but before it happen I have already backup with TAR : OracleHome and all its related configuration fil

  • Creation and transportation of query from development to simulation system

    Hello experts, I need to create a new Query in the development  system in the General Ledger folder in Financial reporting.  and then I need to transport the same to the  simulation system. what are the correct steps I  need to follow to do the same

  • Macbook pro using A LOT of memory

    Is it normal to use almost all of your 4g of ram for just normal internet browsing?  i don't think the sites i visit are that graphic intensive, but it seems like after 20 min of use, i'll notice in my activity monitor that my memory is almost used u

  • MRP SCHEDULING DATES IN R3

    Hi guys, I need to understand How MRP scheduling dates are calculated for <b>external procurement</b> I understand scheduling date is calculated from the following... Purchasing processing timePlanned delivery timeGR processing time... 1. What is the

  • Is it possible to use a Mac with an embroidery sewing machine?

    Is it possible to use a Mac with an embroidery sewing machine?