From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxCreateTask and CreateFile

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 driver
CLOSE_Driver -> Closes boards that are managed by this driver
READ_Driver -> reads all the channels on boards that are managed by this driver
WRITE_Driver -> writes all the channels on boards that are managed by this driver
READONE_Driver -> reads one channel on boards that are managed by this driver
WRITEONE_Driver -> writes one channel on boards that are managed by this driver
OPERATE_Driver -> operates one channel on boards that are managed by this driver

Very 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.

0 Kudos
Message 1 of 2
(3,056 Views)

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:

http://zone.ni.com/devzone/cda/tut/p/id/5409

Hope this help.

Clara

0 Kudos
Message 2 of 2
(3,041 Views)