03-31-2007 10:50 PM
04-01-2007
02:27 PM
- last edited on
07-30-2026
03:45 PM
by
Content Cleaner
Hi Aware,
I have a C code for the Lab window, for the interfacing of the following hardware. I have to modify the code in LabView.[snip]I am not a programmer just a physicist. I know there is way to use the external code option in LabView, but I really dont understand the terms. Please guide me in very simple way so that I can interface in Labview. Thanks in advance.
(i think) You're requesting "very simple" instructions on how to accomplish a somewhat complex task! ... I mean, how would you respond to someone who asked: "Please guide me in very simple way so that I can build a microwave-oven?"? - Ok, maybe it's not that bad. ![]()
From what you've described, you (or someone) should identify a set of "steps" - now performed in C - that need to be performed by LabVIEW ("steps" is my term). What pieces of data are required-by and returned-by each "step"(?) You may want to create new C-functions - one for each "step" - and "export" these new functions in a DLL to LabVIEW's "Call Library Function Node". Possibly, most of your existing C source-code can be used without changing it.
You might start by learning how to write a simple C-function; then "export" it as part of a DLL; then use a LabVIEW CLF Node to run your DLL function! There is much NI documentation [link removed; article no longer available] on this subject. ![]()
Cheers!
Message Edited by tbd on 04-01-2007 02:36 PM
04-01-2007 02:47 PM
04-01-2007 03:32 PM
Hi aware,
I'm sorry, but email is not convenient for me!
... but you'll find much more help HERE anyway. The best way to get an answer, is to ask a very specific question, supplying as much background-information as possible - attaching a picture or example code is encouraged. I think contributors, here, are less patient with questions that reflect a lack of effort [by the poster] to answer they're own question. It will help to become very familier with LabVIEWs HELP\"Find Examples" and the "search" tool at the top of this page.
Cheers!
04-02-2007
10:02 AM
- last edited on
07-30-2026
03:47 PM
by
Content Cleaner
Hi aware,
Like TBD I'm not sure I completely understand with what you are experiencing trouble. If you are having difficulty with calling an external dll in LabVIEW, you may want to take a look at this example program [link removed; example no longer available] that simply uses a call library function node to play a Windows sound.
If you are interested in converting LabWindows/CVI code into LabVIEW, you should be able to do this with little difficulty. Most functions in LabWindows/CVI have the same or a very similar name as they do in LabVIEW. Therefore, using the search function on the functions palette, you should be able to locate all the functions you need to convert your code.
Please do not hesitate to let me know if you have any further questions.
Best of luck on your application, and have a great day!!
04-03-2007 01:28 PM
04-03-2007 01:36 PM
04-03-2007 02:11 PM
04-03-2007 02:31 PM
04-04-2007
09:45 AM
- last edited on
07-30-2026
03:47 PM
by
Content Cleaner
Hi aware,
You can either use your LabWindows/CVI program and convert it into LabVIEW function by function, or you can just create a dll that you call in LabVIEW.
If you would like to create a dll from you LabWindows/CVI program, please take a look at this document. The link I provided in the previous post is an example that shows you how to use the call library function node you would use to access the LabWindows/CVI in LabVIEW.
Please let me know if you have any further questions by replying to this post. Best of luck on your application, and have a great day!!