How Can I Call DAQmx C Functions in Python? Primary Software: Driver Software>>NI-DAQmxPrimary Software Version: 8.7.1 Primary Software Fixed Version: N/A Secondary Software: LabVIEW Development Systems>>Professional Development System
Problem: I would like to use the DAQmx C functions in my Python application. Is this possible? Solution: It is possible to call C functions from within a Python application. You must first have the “ctypes” foreign function interface (FFI) package. The Package is included in Python 2.5 or higher, and can be downloaded from the related links section. The ctypes FFI package will allow you to call functions in DLLs and shared libraries and has facilities to create, access and manipulate C data types in Python. The package must first be imported into your application before use. You can import the package into your application a number of ways, but one of the most common methods is “import ctypes”. Please note that the Python language and this package are not supported by National Instruments. This knowledgebase is included for the convenience of our customers only. Related Links: Sourceforge ctypes Download Page Python ctypes Package Information Page Python ctypes Package Tutorial KnowlegeBase 3v09OJNY: Location of ANSI C NI-DAQmx Shipping Examples and DAQmx Library File for Windows Attachments:
Report Date: 07/17/2008 Last Updated: 08/06/2008 Document ID: 4NGMPBMO |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
