{"id":18704,"date":"2017-02-01T11:17:40","date_gmt":"2017-02-01T19:17:40","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=18704"},"modified":"2021-06-11T10:45:32","modified_gmt":"2021-06-11T17:45:32","slug":"labview-dll-guide","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/labview-dll-guide\/","title":{"rendered":"LabVIEW DLL Guide"},"content":{"rendered":"<p>Have you ever been thinking that some task could be done quicker or better in C\/C++\/C#? But\u00a0then due to project requirements or other constraints, you had to code it all again\u00a0in LabVIEW. Don\u2019t waste your time again! If there is anything that can be done easier in another programming language \u2013 just do it and then use the code as a shared library in LabVIEW.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-19004\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/image7050279648277060627-600x403.png\" alt=\"\" width=\"600\" height=\"403\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/image7050279648277060627-600x403.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/image7050279648277060627-768x515.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/image7050279648277060627-800x537.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/image7050279648277060627.png 833w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>DLLs are sections of code that are linked to the main program at\u00a0run\u00a0time (dynamically linked). This has several advantages. The first is space. If many applications share a certain algorithm, you can compile it once as a DLL, and then use the same code in all the applications. DLLs also provide a way for code to be distributed in a fashion that easily allows higher level programs to access the code. A good example of this\u00a0are\u00a0hardware drivers, in which the interface between the application software and the hardware is often through a DLL.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium\" src=\"http:\/\/blog.mtapp.tech\/wp-content\/uploads\/sites\/2\/2016\/10\/02-Call-Library-Function-Configuration-Window-1.png\" width=\"677\" height=\"453\" \/><\/p>\n<p>Knowing how to include C# libraries into a LabVIEW project can be a very useful tool. There are many reasons why you would want to include C# DLL&#8217;s into a LabVIEW project but the two that come up most often for me is reusing legacy code that was initially written in C# and writing a C# wrapper when wanting to use a third party driver or library. Sometimes it\u2019s easier to write the wrapper in C# and then implement the library directly in LabVIEW. When interfacing directly to a third party driver\/library, the LabVIEW code to accomplish a relatively simple task can be very messy and cumbersome to read; hence the C# wrapper with simple implementation in LabVIEW being my preferred method.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19005\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-01-at-10.52.05-AM.png\" alt=\"\" width=\"513\" height=\"265\" \/><\/p>\n<p>Thank you for reading my blog post, for an more in depth\u00a0guide to using DLL in LabVIEW checkout this <a href=\"http:\/\/blog.mtapp.tech\/using-dll-in-labview\/\">link<\/a>. If you are interested in making a project using this tool but don&#8217;t have the right supplies, you can purchase a copy of\u00a0<a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW 2014 home edition<\/a>\u00a0and everything you will need to run\u00a0<a href=\"https:\/\/www.labviewmakerhub.com\/doku.php?id=learn:tutorials:libraries:linx:3-0:beaglebone-black-setup\">LINX 3.0<\/a>\u00a0and start making! Please comment below with any questions or comments you may have.<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-18704 jlk' data-task='like' data-post_id='18704' data-nonce='05046dc8ab' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-18704 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-18704 jlk' data-task='unlike' data-post_id='18704' data-nonce='05046dc8ab' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-18704 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-18704 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Explore what you can do with LabVIEW and other coding languages!<\/p>\n","protected":false},"author":42,"featured_media":19005,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4323,1563],"tags":[],"ppma_author":[4493],"class_list":["post-18704","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-guide"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-01-at-10.52.05-AM.png","authors":[{"term_id":4493,"user_id":42,"is_guest":0,"slug":"astanton","display_name":"Austin Stanton","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/0cc9db2caf6344c8f78ea46c21570f33a954c45596addf479125043e52431de0?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/18704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=18704"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/18704\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/19005"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=18704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=18704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=18704"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=18704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}