Genetic algorithm for use within LabVIEW

I want to use a genetic algorithm to optimise a control system.  I was going to use MatLab because I can write the GA with that, but I cannot get it running fast enough with my C-DAQ.  The alternative is to use LabView, but I could not write a GA VI.  Do you know of a GA for use in LabVIEW?

Hi Jack@Newcastle,
Take a look at the following example of Genetic Algorithm implemented in LabVIEW (https://decibel.ni.com/content/docs/DOC-13699).It should give you an idea how to write your own code.
Regards,
Edvin

Similar Messages

  • Building an AppCloud App for use within your organization only.

    I am re-posting this from, Register your App because, it was a good point this should have been a separate discussion.
    Scott
      Scott Kent Jul 14, 2014 4:56 PM
    I am trying to get more details on how to Build/Register "Private" AppCloud Apps and confirm at design time that we can deploy our in-house AppCloud Apps on several of our Eloqua instances without publishing them.
    My assumption is that one would setup the App under the Provider section for each of the Eloqua instances so that each Eloqua Instance can see and install our our in-house private app and use it without publishing. I worry about this method because it give the impression the AppCloud App is in development or testing.
    Or
    I was hoping there was some way to officially register our app so we are using a production workflow but our app is not published or listed anywhere?
      T.J. Fields Jul 14, 2014 6:06 PM (in response to Scott Kent)
    Hi Scott,
    The best practice here would be for you to:
    1. Register as a Provider in a development instance of Eloqua.
    2. Build out your app and Register it, along with your Service(s) under that Provider.
    3. Whitelist any Eloqua client installs that you wish to allow to use your App.  Do this by clicking the Publish to Another Site button.
    4. Give the App install URL (found at the bottom of the App Details page under Catalog) to any of those clients that you whitelisted to use your app.
    This way, only those clients that you've specified will be able to install and use your App, and it's not listed anywhere.  You could also click the Publish to App Cloud button, which simply whitelists every install.  The App will never actually be listed anywhere, as there is not yet a mechanism in the framework to do this.  The only way to find and install your App is by using that install URL, so you'd have to give it out.
    If you are a client that is building an App for use within your organization, you could also use your company's Eloqua install to register your provider, but as a development partner, your developer instance is intended to be used to register and manage your services.
    Hope this helps.

    Thanks, scott.kent ! I'm sure many will benefit from your great post!

  • Error when compiling my API Programm thant i want to generate DLL for use in Labview!

    Pls see the attachment!!I use API "GetComputerName" to programm in vc6.0 to make a dll file for use in Labview.But i get the error in the attachment. Pls give me a hand!
    Attachments:
    machinename.zip ‏1493 KB
    error_when_compiling.txt ‏1 KB

    Hi,
    If you are using the CVI libraries on this you can use the GetCompName() function from the programmer's toolbox. However, your code looks fine, the only thing that you need to change is the data type of the paramenters in CompNameLength. Just declare them using the predefined Windows data types; like this:
    LPTSTR computerName;
    DWORD compNameLength = MAX_COMPUTERNAME_LENGTH+1;
    computerName = malloc(MAX_COMPUTERNAME_LENGTH+1);
    GetComputerName(computerName,&compNameLength);
    printf("%s",computerName);
    free(computerName);
    Don't forget to include windows.h where those types are defined.
    Good Luck!
    Juan Carlos
    N.I.

  • I would like convert a c++ dll for use in labview--my device has no labview dll

    I have a piezoelectric control board (Piezomechanik gmbh) that I would like to use through LabView.  Currently, the company does not offer any support for Labview.  Windows sees the device (It came with a driver file), but the company only provides dll files for C++ and Visual Basic.  Can I convert these files to a format Labview can use?  How can I get Labview to communicate with the control board (and ultimately the piezoelectric device attached to it)?  Thanks!
    Solved!
    Go to Solution.

    This will only help you when you have the header file for the DLL, otherwise you will have to create the wrapper manually using the "Call library node" and the DLL api description or write an header file for the DLL yourself based on the api documentation and use the wizard.
    Regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Is it possible to render pages for use within a Graphoc (OpenGL) environment to create 'textures' of any web page? Thanks.

    In my app - on Android (Java) and iPhone (Objective-C) - I have an OpenGL Graphics context where I'd like to display any web page on a 'sign' or 'virtual screen'.
    Are there libraries which I could plug in to to render pages as a texture for use with OpenGL 'objects'?
    Many Thanks

    WebGL should meet your needs https://developer.mozilla.org/en-US/docs/Web/WebGL

  • How do I write a Dll to perform a union in visual studio for use in LabVIEW?

    Hello,
    I'm new to writing dll(s). I'm attempting to write a Dll that will perform a union on a number from LabVIEW and then return the result to LabVIEW for my use. I've been struggling with this for a few days and I'm finally giving in to get some help.
    This screenshot is the only description that I have to help me with what I am trying to do. Basically, I'm trying to pass a value that will be different based on a measured partial discharge value. In the screen below, the value used is "1061111989" This number is my reading. I need to pass this value from labVIEW into my dll to perform a union on it.
    In my Dll, I need to write MeterReading.IntVal's value and get the MeterReading.FloatVal back.
    I have Visual Studio 2012 Full and LabVIEW 2012 Full, I'm LabVIEW CLAD and I've written 17 test floors in the US to date; however, I've never had any need of Visual Studio until now. Can anyone help me out with this?
    Thanks in advance, -Chris
    -Chris
    "You must be some sort of an engineer?" -Close Friend
    Solved!
    Go to Solution.

    Sometimes, I try to solve simple issues in very complicated ways. What got me so confused here was the solution from the engineer of the device that I am reading from was using a union to get the value. I'm not familiar with unions so I thought that it was some structure that was not creatable in LabVIEW. Anyways, a typecast to single point gave me the proper value. Thank you.
    -Chris
    "You must be some sort of an engineer?" -Close Friend

  • Convert VI llb from LabVIEW 5 for use in LabVIEW 8.6

    Hi Everybody! 
    Firstly, I'd like to say how much I have enjoyed working for NI and especially supporting the online community in my spare work time. I have to say it is a great place for NI, long term users, new users and everything else LabVIEW - and you guys have fun! Excellent. 
    I am now back at university and I am looking to use LabVIEW for some robotic work. During my research I have found some manufacturer's VIs for the hardware: however their 'latest' version appears to be in LabVIEW 5.
    Would someone be so kind to convert my VIs into at least LabVIEW 6, or up to LabVIEW 8.2.1 (Last version that can open LabVIEW 5 VIs) that would be great. My LabVIEW 8.6 should be able to open VIs saved in LabVIEW 6 or greater. (Obviously not LabVIEW 2009!)
    Reference: How to Upgrade or Revert a VI to a Different Version of LabVIEW
    Thanks ever so much in advance (I miss the day I had every version of LabVIEW - and NI software on my machine!)
    Regards,
    James Hillman  
    Message Edited by Hillman on 10-04-2009 10:16 AM
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!
    Solved!
    Go to Solution.
    Attachments:
    Koala_PC.zip ‏328 KB

    Mass compile in 7.1
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    Attachments:
    Koala_PC.zip ‏274 KB

  • Logitech Game Controller for use in Labview and dealing with possible disconnects

    Hello all, I would like to see if there are any suggestions on the following issue. In effect I am using a Logitech game controller to manipulate large scale robots. During operation with these robots I need to plan for the inevitable "accidental" disconnection of the game controller from the computer running labview while it is under operation. Simple to say I can throw the system into standby upon the "ERROR" messages I get, but I want to programmatically be able to "reset" the controller (ie wait for it to be plugged back in) and have the program continue working. However with my work and research thus far that isn't the case. I end up with the same error (even when reconnected, attempted re-initialize, closing the connection, with time delays, and re-initailizing after closing all connections). Nothing seems to work other than closing the program and restarting it (which for the consumer this would be quite frustrating). Suggestions?
    Also on a similar note if anyone has any ideas on how to scan for devices prior to using them would be helpful too.
    I currently am running Labview 2009 in windows 7. I do realize windows has its unique way of dealing with plug and play devices, and suspect that I may have to play with these features, but I don't know this topic very well.
    Thank you all in advance!

    Hey Dashiva,
    I am assuming that the Game Controller that you are using is connected via USB. Does it show up in the computer's Windows menu when it is plugged in? If so, you can make calls to it using .NET controls that could access the device once it is re-connected. I would also try simply hitting F1 and see if that allows the program to reset the controller.
    Good Luck,
    Doug B
    National Instruments
    Applications Engineer
    Applications Engineer
    National Instruments

  • Suggested in-process database for use with LabVIEW?

    I've been researching databases for a few days looking for something lightweight that I can use when developing applications. I saw the post by Anthony Lukindo on Expressionflow (http://expressionflow.com/2007/07/05/labview-based-utility-to-package-deploy-ms-sql-server-2005-expr...), but I'm not really looking to use an enterprise level db and it sure seems complicated. I looked at both MS SQL Server Compact 3.5 and SQLite, and they both look to be about what I'm looking for, but I haven't found any LV interfaces to these things. There appeared to be an aborted effort to get a SQLite interface made as an OpenG toolkit (SQLite database toolkit (Windows)), but it seems to have inexplicably vanished. I like the idea of SQLite better than the MS product because it seems to only include the things I'm looking for, and it's cross platform (and public domain) and I am thinking about starting to write an interface myself. I'd appreciate any comments on the topic.
    I do have the LV DB toolkit, but I would rather not have all the overhead associated with speaking to an out-of-process db through external components (plus the headeaches associated with deploying the thing). I am pretty much a nubie in this area though, so maybe I can be convinced otherwise.
    Thanks,
    Chris

    SQLite is propably the best performing free open source disk based database for a "single-threaded" applications or for reasonably sized multi-threaded applications that do not require row-level or table-level locking. So do not consider SQLite only as a development time alternative... it is a good alternative for many purposes.
    You can connect to SQLite with a  ODBC driver, I think, and do not need a native LabVIEW support for SQLite. Just google SQLite ODBC.I have not tested this, but if so, you can use any of the ODBC database toolkits for LabVIEW, even the National Instruments one
    A different thing is that if you need a database for development purposes, should you actually set up one? I'm a friend of a software-as-a-service and currently use hosted mysql databases at Mosso. I use them for web development project but I see no reason to use them with LabVIEW as well, as long as your development computer  is online. The good thing about hosted services is that they really are zero-configuration and zero-maintenance. When ever I've a problem or don't know something, I simply chat with the support person online Another good thing is that my hosted databases come with online administrative interface, phpMyAdmin, which simplyfies the database management, especially during the development phase when everything is not working as expected. Furthermore I can use MySQ Workbench to visualize the structure of my database for documentation purposes.
    p.s. Mosso pricing starts from $100/month which may be over your budget, but the support is simply superb. For the price you get practically unlimited number of databases of you choice such as MySQL and MS SQL 2005, and practically unlimited number of hosted web sites running in a load balanced cloud with either Linux or Windows or mixed. The downside is you cannot install new programs such as LabVIEW and you have to do with the services they provide. When your computational needs exceed certain limit of processor cycles a month, you need to pay more. This limit is something like a single processor server.If you decide to go for mosso, use the following referral code "REF-EXPRESSIONFLOW" to get the second month free. The promotion is valid until the end of September and after that you get $50 off from the first month price.
    Tomi Maila

  • How to deploy jar file for use within mapping user-defined fcn

    Hi all,
    I have a java class I'd like to called from a mapping user-defined function.
    Here's what I've done (but hasn't worked)
    1. Added 'package com.<mycompany>.xi.util.base64 to the source class file and compiled it.
    2. Created a sda with a plain provider.xml file, i.e. no references were made to any other library files.
    3.  Deployed the sda to the xi 3.0 j2ee server successfully using SDM.
    4.  Under the Visual Admin tool, I see that the library was deployed successfully.
    5.  In the import text box in the user-defined function (design time), I enter com.<mycompany>.xi.util.base64.*.
    A syntax check returns an error indicating the package could not be found. 
    Can anyone give me pointers as to how I can get this working?
    Thanks,
    --jtb

    Hey James,
    No! That's not the right way!
    What you have done is for accessing external JMS & JDBC drivers in their corresponding adapters. For the access inside a mapping user defined function, it's enough if you import the jar files.
    Look at this blog and you will be very clear!
    /people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
    regards,
    Felix

  • How can I use an image from an ip address for use in labview as image data?

    I want to use a stand-alone webcam on ethernet as the source for imaging control.

    Greg,
    Lots of possibilities here, depending on what your Webcam software serves up and how flexible you need to be with image types and whatnot.
    Assuming the Webcam server provides raw JPG images that you can get at with a simple URL, one way to go is to use DataSocket, using a little trick where you append "[txt]" to the end of the URL and get the raw content back. I've attached an example that grabs a JPG from the NI site and displays it.
    Best Regards,
    John Lum
    National Instruments
    Attachments:
    JPG_to_picture.vi ‏50 KB

  • Help with an Algorithm for using a level sensor to estimate consumption.

    I'm developing a small HMI-Scada application for monitoring the level of Diesel in four vertical tanks similar to the screen shot below.
    Tank Information:
    20 Feet High
    8 Feet Inside Wall Diameter
    5,000 Gallons Capacity
    (These Tanks supplies four Caterpillar Generators)
    Since each tank already has an Ultrasonic Level transmitter installed (accuracy is plus or minus one Inch) I was thinking of using this Tank level information coming from that sensor to estimate consumption.
    The problem I'm having right now is figuring out the correct math to use inside VB.Net to make this calculation work, considering that Diesel not used by the Generators will be returned back to the tank.
    The consumption data we need is not needed in real time necessarily it is more like at the end of the day we need to know how much diesel was used by each generator, this will help management figure out and print a report with the total carbon emissions
    for that day.
    The HMI-Scada application is going to have a Microsoft SQL Sever collecting the Tank Level Information every one minute.
    To avoid further complications when Mr. Diesel comes with his truck to refill the tanks we are planning to have him manually enter into the HMI-Scada application the total amount of gallons pumped into each tank.
    Do anyone in this forum have an idea of how this can be done?

    Hi,
     Is the 20 feet actually measured from the inside Bottom to the inside Top of the tank? Is the Inside Diameter actually 8 feet all the way from the bottom to the top of the tank?
     If those two answers are true then it seems like it would be easy enough to calculate.
     20 feet * 12 inces = 240 inches
    5000 gallons / 240 inches = 20.833333333333333333333333333333 gallons per inch
    So, if i am right then for example, if you had 200 inches of fuel at the beginning of the day and 80 inches at the end of the day it would be:
    20.833333333333333333333333333333 * 200 = 4166.6666666666666666666666666667 gallons to start with
    20.833333333333333333333333333333 * 80 = 1666.6666666666666666666666666664 gallons at end of day
    So the gallons used would be
    4166.6666666666666666666666666667 - 1666.6666666666666666666666666664 = 2500.00 gallons used for the day
    Example code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim GallonsPerInch As Double = 5000 / (20 * 12) 'Gallons Per Inch
    Dim StartingInches As Double = 200.0 'get inches at Start
    Dim EndingInches As Double = 80.0 'get inches at End
    Dim GallonsUsedToday As Double = (StartingInches - EndingInches) * GallonsPerInch 'Gallons used from Start to End
    MessageBox.Show("Gallons Used = " & GallonsUsedToday.ToString)
    End Sub
    If you say it can`t be done then i`ll try it
    Thats right Razerz.
    So where height is the change in the tank levels the volume is
    V = (pi)(radius ^ 2)(Height)
    V = (3.14)(4)(4)(Height) = 50.24 (height) cubic feet
    V = (50.24 cuft) (7.48 gal/cuft) (height) = 376 (height) gallons
    So for an inch of height:
    V = 376/12 = 31.3 gallons per inch
    Just for fun
    5000 gals / (12)(31.3) = 13.29 feet high
    Normally the tank does not fill to the top.
    Check my math.
    So all you need to do is Constant(change in height) = gals. Once we get the constant right.
    PS In fact it would be best to just measure the depth when the gas man fills the tank and calc the constant. I doubt the tank is exactly 8 feet. I mean you calc the constant once. And at that time check it is linear ie the tank is a cylinder.

  • Best compression of video for use within dvd studio

    i am doing a dvd with lots of 1 min clips to choose from - what is the best method to give me the highest quality of video within the project? do i use compressor's dvd settings or is there a better way to do it.
    thanks
    mr C

    It all depends on the total length of footage you plan to include. A bit budget is crucial before an encode.
    http://www.videohelp.com/calc.htm
    Once you have the correct bitrate you can set it up in Compressor. However, it my depend on the type of footage you have as well. Compressor VBR isnt very good so a CBR encode might be a better option. Basically, there's no objective answer.

  • Unable to add reference for Excel Object Library for use within Script Task

    I have a requirement to use a Script Tax that needs to reference the Excel Object Model. There are numerous articles on using this such as
    http://www.databasejournal.com/features/mssql/article.php/3921141/SSIS-Script-Task-and-Microsoft-Office-Automation.htm.
    Simply, I need to add a reference to the Microsoft Excel 12.0 Object Library.
    I have selected this from the Object List on the COM tab and when this adds the reference it states 'The System cannot find the reference specified', even though the referenced file for this Object is C:\Program Files(x86)\Microsoft Office\Office12\Excel.exe
    and this file location exists on my local machine ?

    Please search where "Microsoft.Office.Interop.Excel.dll" exist in your system and try adding the reference.
    If you don't find the dll there then there might be problem while installing.
    To install the PIAs by using the redistributable package
    http://www.microsoft.com/en-us/download/details.aspx?id=3508
    http://www.microsoft.com/en-us/download/details.aspx?id=18346
    Regards, RSingh

  • Using mingw to make a .dll for use in labview ?

    I have seen some posts on this, but none of them take it all the way from C code to configuring the shared library node...
    My code is heavily based on this:
    http://forums.ni.com/ni/board/message?board.id=170&thread.id=171056
    Here are my files:
    //reedll.h
    #ifdef BUILD_DLL
    // the dll exports
    #define EXPORT __declspec(dllexport)
    #else
    // the exe imports
    #define EXPORT __declspec(dllimport)
    #endif
    // function to be imported/exported
    EXPORT void tstfunc(int A, int B, int C);
    and:
    //DLL_Test.c
    #include "reedll.h"
    EXPORT void tstfunc(int A, int B, int C)
      C = A + B;
    Its meant to be as bare bones as I can get it. No crazy pointers or anything.
    I compile as follows usin MinGW:
    g++ -c -DBUILD_DLL DLL_Test.c
    g++ -shared -o tst.dll -Wl,--out-implib,libtstdll.a DLL_Test.o
    And it appears to compile fine.
    When I go to import the .dll into the shared library node the "Function Name" field is garbled and says "Z7tstfunciii" instead of "tstfunc".  Needless to say the shared library function icon that results doesnt work

    You should tell the mingw compiler to not name mangle the symbols. Most likely you use a cpp file enxtension and then mingw as Visual C will invoke the cpp compiler instead of c which by default name mangles function names.
    If you want or need to use cpp, you can also try to declare your exported symbols like this:
    #ifdef __cplusplus
    extern "C" {
    #endif
    EXPORT void tstfunc(int A, int B, int C);
    /* all the other function prototypes you do not want to be mangled */
    #ifdef __cplusplus
    #endif
    Not sure if __cplusplus is defined by mingw, if not you have to find how it indicates that C++ mode has been invoked.
    Message Edited by rolfk on 03-24-2010 02:48 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • I can not use my mouse or keyboard when I am trying to install windows via boot camp

    Please can you help! I can not use my mouse or keyboard when I am trying to install windows via boot camp

  • Export Control /Legal control: need user exit to customize

    I have a situation where I want to determine the export control license for a sales order. SAP uses the function module RV_EXPORT_CONTROL to carry out the required check. The FM uses the country defined for the ship-to-party as the destination countr

  • Images open in PS4 greatly reduced in viewer

    If I open PS4 and open a previously saved file, the window opens with a tiny speck in the middle.   Titlebar confirms that the image is .054% of size.   When I use the zoom tool,  8 or 10 clicks brings it back to the correct magnification.   If I lef

  • APEX_UTIL.GET_BLOB_FILE_SRC function

    I started with tutorial "Defining and Viewing BLOB Data in Oracle Application Express 3.1" When I realized the links is broking"(http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/api.htm#CHDICGDA)" I founded about the "APEX_UTIL.GET_

  • Form Fields Blank after save

    I have a perculiar problem that has only just started happening. We fill out forms to send to customers who in turn sign them electronically using a third party service. As of this morning we have been filling out the forms as normal to send, but upo