LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL routines

I am trying to write a routine to interface with a DLL on a PC which is
controlling a robot. This is something I have never done. Can anyone suggest
a good place to start from?

Yours sincerely, Chris McCrory Project Engineer
______________________________________________ SP Technology Limited E-mail:
c.mccrory@sp-tech.com Website: www.sp-tech.com Tel: +44 (0) 1382-880088 Fax:
+44 (0) 1382-880099 The information in this e-mail is confidential and for
use by the addressee(s) only. If you are not the intended recipient or
responsible for delivery of the message to the intended recipient, please
notify us immediately on +44 (0) 1382 880088 and delete the message from
your computer; you may not copy or forward it, or use or disclose its
contents t
o any other person. As Internet communications are capable of data
corruption, SP Technology Ltd do not accept any responsibility for changes
made to this message after it was sent. For this reason it may be
inappropriate to rely on advice contained in an e-mail without obtaining
written confirmation of it. Please note that SP Technology Ltd does not
accept the liability or responsibility for viruses and it is your
responsibility to scan attachments, if any. Opinions and views expressed in
this e-mail are those of the sender and may not reflect the opinions of SP
Technology Ltd.
0 Kudos
Message 1 of 5
(2,837 Views)
Chris McCrory wrote:

> I am trying to write a routine to interface with a DLL on a PC which is
> controlling a robot. This is something I have never done. Can anyone suggest
> a good place to start from?
>

Check the manual for more in depth info.
Basically all you need is a Call Library Function. Drop one on the diagram
right click and select configure. Fill in the information about the path to the
DLL
the name of the function and the input parameters and the return parameter
Once you wire this up all should be fine.

Kevin Kent
0 Kudos
Message 2 of 5
(2,837 Views)
"Kevin B. Kent" wrote:

> Chris McCrory wrote:
>
> > I am trying to write a routine to interface with a DLL on a PC which is
> > controlling a robot. This is something I have never done. Can anyone suggest
> > a good place to start from?
> >
>
> Check the manual for more in depth info.
> Basically all you need is a Call Library Function. Drop one on the diagram
> right click and select configure. Fill in the information about the path to the
> DLL
> the name of the function and the input parameters and the return parameter
> Once you wire this up all should be fine.
>
> Kevin Kent

Ah yes, but it's the input parameters and the return parameters that are the hard
part. How do you know/find out what to they are if you didn't create the DLL?

Ed Bogart
0 Kudos
Message 3 of 5
(2,837 Views)
Ed Bogart wrote:

> "Kevin B. Kent" wrote:
>
> > Chris McCrory wrote:
> >
> > > I am trying to write a routine to interface with a DLL on a PC which is
> > > controlling a robot. This is something I have never done. Can anyone suggest
> > > a good place to start from?
> > >
> >
> > Check the manual for more in depth info.
> > Basically all you need is a Call Library Function. Drop one on the diagram
> > right click and select configure. Fill in the information about the path to the
> > DLL
> > the name of the function and the input parameters and the return parameter
> > Once you wire this up all should be fine.
> >
> > Kevin Kent
>
> Ah yes, but it's the input parameters and the return parameters that are the hard
> part. How do you know/find ou
t what to they are if you didn't create the DLL?
>
> Ed Bogart

Well yes that is the hard part.
1) Contact the vendor - this is the best way,
2) Use software tools to probe the dll - tricky at best
3) Guess - - could take quite some time and a number of reboots.

Your only real option is #1. If you don'y have any documentation on the DLL
you will have to get the vendor to supply it. They generally are willing to do this.

Kevin Kent
0 Kudos
Message 4 of 5
(2,837 Views)
A way to get the *names* of the functions inside a DLL is to open it using QuickView
(under windows). (Shift-right-click)

Create a vi with the CIN (Code Interface Node) or the one right next to it that allows
you to talk to dll's - and double click on it; browse to the path where the dll of
interest is. Then type in a function name you found under the QuickView (see the Export
section) and you'll get a function prototype for the function of interest, which may or
may not be useful to you:

int grabFrame(uint devnum, long * buf)

This gets you a little farther anyway. The best is detailed function call parameter and
return value info from the manufacturer of course...

Good luck.
-Helen

"Kevin B. Kent" wrote:

> Ed Bogart wrote:
>

> > "Kevin B. Kent" wrote:
> >
> > > Chris McCrory wrote:
> > >
> > > > I am trying to write a routine to interface with a DLL on a PC which is
> > > > controlling a robot. This is something I have never done. Can anyone suggest
> > > > a good place to start from?
> > > >
> > >
> > > Check the manual for more in depth info.
> > > Basically all you need is a Call Library Function. Drop one on the diagram
> > > right click and select configure. Fill in the information about the path to the
> > > DLL
> > > the name of the function and the input parameters and the return parameter
> > > Once you wire this up all should be fine.
> > >
> > > Kevin Kent
> >
> > Ah yes, but it's the input parameters and the return parameters that are the hard
> > part. How do you know/find out what to they are if you didn't create the DLL?
> >
> > Ed Bogart
>
> Well yes that is the hard part.
> 1) Contact the vendor - this is the best way,
> 2) Use software tools to probe the dll - tricky at best
> 3) Gue
ss - - could take quite some time and a number of reboots.
>
> Your only real option is #1. If you don'y have any documentation on the DLL
> you will have to get the vendor to supply it. They generally are willing to do this.
>
> Kevin Kent
0 Kudos
Message 5 of 5
(2,837 Views)