Discussion:
DAQmxCreateTask and CreateFile
(too old to reply)
Ruzz
2008-05-28 11:10:08 UTC
Permalink
Hi everyone, im trying to develop a DLL for my NI pci board. This driver, the base, have been done using a Wizard from another Program called ISaGRAF, because i need to follow few steps to do a Easy IO driver that allows ISaGRAF comunicate with the NI board. When u create the project (VC++) using this wizard, is empy(what else:P). And i need to fill hte functions:OPEN_Driver -> opens boards that are managed by this driverCLOSE_Driver -> Closes boards that are managed by this driverREAD_Driver -> reads all the channels on boards that are managed by this driverWRITE_Driver -> writes all the channels on boards that are managed by this driverREADONE_Driver -> reads one channel on boards that are managed by this driverWRITEONE_Driver -> writes one channel on boards that are managed by this driverOPERATE_Driver -> operates one channel on boards that are managed by this driverVery easy as concept.I will use NIDAQmx drivers in my custom DLL. But heres my question:As i can see, the OPEN_Driver function is the one for open the boards. Are the function CreateFile from kernel32.dll and the function DAQmxCreateTask similar in functionality? or should i use first the CreateFile to create a Handle for my Ni devices and handle them, or DAQmxCreateTask is enough?.Sorry if the question sounds stupid. But im quite new in this.Thanks in advance,Ruzz.
Loura
2008-05-29 09:40:07 UTC
Permalink
Hi Ruzz,
I've never used the software you are mentioning and so I'm not sure this is the answare you are looking for. But from the DAQmx point of view, you don't need any file to access the DAQmx hardware. Basically a task is a collection of one or more channels with timing, triggering, and other properties. Conceptually, a task represents a measurement or generation you want to perform. So Create a Task means open a connection to the driver to allocate resources for your measurement.
If you are new with DAQmx maybe this kind of document is usefull for you:
<a href="http://zone.ni.com/devzone/cda/tut/p/id/5409" target="_blank">http://zone.ni.com/devzone/cda/tut/p/id/5409</a>
Hope this help.
Clara

Loading...