LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C code and labview

ok.... now i'm able to to load my dll to labview..... and i have an front
panel where i have didgital control (as input) and digital indicator(as
output)....so i get my output value....correct there....

Now the thing is.... i still have to do create .c for the function that i'm
gonna use from the dll.... which is kinda counter productive for
me....cuz...i already have the code for the function in the dll..... and all
the parameters as passed into my dll code thru my debugger code(written in
c++).... Also, i need all the functions defined in the dll to be used by
labview....how could i go bout that??


wat i really wanna do is something... where i can load the dll into labview
and it some how gets the values of the parameters from the d
ebugger code
instead of me giving it .....

Thx again......
Abhimanyu Rastogi
0 Kudos
Message 1 of 4
(2,897 Views)
I know that this can be done using Visual Studio. Basically, you build a debuggable DLL and make LabVIEW the calling application. You can check this link on microsofts MSDN site for more info.

http://support.microsoft.com/support/kb/articles/Q85/2/21.ASP

If you are not using Visual C++, your debugger might have a way of doing something simmilar.
0 Kudos
Message 2 of 4
(2,897 Views)
I just don't want to debug it...... i think u mixed up with the visual c++
debugger.... and the debugger i mentioned in my post....

the debugger i'm using is written by my company...and we use it for some
testing on our cards.... and now we want to test more than one card at a
time...so we planned to use labview...

so to do this i made a dll using borland c++ which contains all the routines
to commuincate with the card.... and the debugger(which we wrote) uses it as
well....but it can only do one card at a time...
and there is no automation...

so...i wanted to know in wat way should i use labview....so that i can avoid
using that debugger...

thx
Abhimanyu

Aaron Marks wrote in message
news:5065000000050000004B330000-993342863000@exchang
e.ni.com...
> I know that this can be done using Visual Studio. Basically, you
> build a debuggable DLL and make LabVIEW the calling application. You
> can check this link on microsofts MSDN site for more info.
>
> http://support.microsoft.com/support/kb/articles/Q85/2/21.ASP
>
> If you are not using Visual C++, your debugger might have a way of
> doing something simmilar.
0 Kudos
Message 3 of 4
(2,897 Views)
> I just don't want to debug it...... i think u mixed up with the visual c++
> debugger.... and the debugger i mentioned in my post....
>
> the debugger i'm using is written by my company...and we use it for some
> testing on our cards.... and now we want to test more than one card at a
> time...so we planned to use labview...
>
> so to do this i made a dll using borland c++ which contains all the routines
> to commuincate with the card.... and the debugger(which we wrote) uses it as
> well....but it can only do one card at a time...
> and there is no automation...
>
> so...i wanted to know in wat way should i use labview....so that i can avoid
> using that debugger...
>

To answer the earlier question about the dialog and creating the .c file.

Use the dialog to configure what and how you need to transfer between
the LV diagram and the DLL function. You do not need to use the Create
..c file menu item unless you want to. It is for those starting from
scratch and deciding from LV what they are passing in.

The dialog for the parameter configuration is needed mostly because
a C header file, a .h file, doesn't have enough information to
construct a call from LV. What type of string and array does the DLL
expect? If the DLL were given an automation interface and made into
an ActiveX server, then this wouldn't be necessary and you could use
the invoke node. The parameters would automatically be configured,
because in the process of making the automation interface, you would
more accurately specify the way parameters are passed.

Anyway, I hope that you have everything working now.

Greg McKaskle
0 Kudos
Message 4 of 4
(2,897 Views)