Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a DLL for DAQ communication

Hi,
 
This is my first time using a DAQ and programming with any hardware device.
I need to program the DAQ, and want to be able to control it/call functions from python.
So, do i need to create a DLL file for it in Visual Studio probably? inorder to communicate with the DAQ ?
And how am i supposed to link these DLL files in my python code ?
 
Thanks
 
 
0 Kudos
Message 1 of 5
(3,373 Views)
HI,
You want to plug your hardware in and talk to it with a DLL, or a com port with simple commands via whatever programming language you choose.

This is the case with many IO products.
Unfortunatley much of the ni stuff is geared towards DAQMX, an extra application/interface that works with ni applications like teststand and labview.The approach is geared towards using ni hardware with ni software in an ni way.
In my opinion it's a bulky and often more unreliable way to go, so I suggest getting an ADAM module or something like a TOP16, both of which come with a ready made straight forawrd dll or set of serial port commands that will work with any language on linux or windows, with no hassles, and complete reliability....
You want your system to look like this:
You app -> dll -> hardware

Not this:

ni software -> daqmx -> daqmx dlls and drivers -> ni hardware

hope that helps.
0 Kudos
Message 2 of 5
(3,352 Views)

Hi There Numbers,

 

Yes you are right NI hardware and software belong together and it works just fine.

A DAQ device with a serial interface is something completely different then a DAQ PCI (Express) device.

 

You say ‘In my opinion it's a bulky and often more unreliable way to go’

 

Using Labview is a good and great solution to make DAQ applications and any other programming.

It is certainly not bulky and not unreliable. These items are mostly a result of the programmer. Smiley Wink

 

Of course there are others solutions (HW and SW) that also will work just fine if you match the solution with the job, but that does not mean that the NI solution is bad.

 

0 Kudos
Message 3 of 5
(3,349 Views)
Thanks for posting!  I would recommend directly calling the DAQmx C dlls directly from Python.  You can do the rest of your programming in the Python environment.  Since we do not officially support Python, I cannot provide any advice on how to do this.  However, this is where the discussion forums prove to be a powerful tool.  Good luck on your application! 
Rod T.
0 Kudos
Message 4 of 5
(3,328 Views)
FYI, you need a module to call libraries in Python. 

http://starship.python.net/crew/theller/ctypes/

Again, we do not currently support Python but I though I would share this with anyone interested.
Rod T.
0 Kudos
Message 5 of 5
(3,326 Views)