status = GPCTR_Config_Buffer (deviceNumber, gpctrNum,
reserved, numPoints, buffer)
Purpose
Assigns a buffer that Traditional NI-DAQ (Legacy) uses for a
buffered counter operation.
This function configures the buffer for the counter operation. So, you should only need to run it before the loop to configure the buffer and not in the loop where you read from the buffer. For a C example of buffered counter measurement in Traditional NI-DAQ (Legacy) you can examine the example program called STCsingleBufPeriodMeasure.C. By default, this example is installed to the following path:C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\CtrAlso, I noticed that you are using the PCI-6602. This device is supported by our latest driver, NI-DAQmx, which is the main focus of our development moving forward. In addition to being the more recent driver, NI-DAQmx also offers multithreading, improved state model, simplified synchronization and easier transitions between operations as compared to Traditional NI-DAQ (Legacy). If you are beginning new development and are not required to use Traditional NI-DAQ (Legacy), I would very much recommend that you use NI-DAQmx for your programming. Like Traditional NI-DAQ (Legacy), NI-DAQmx is also free and contains example programs to help you get started.
You are correct that GPCTR_control (m_nDeviceNumber,
m_nCounterNumber, ND_RESET) does not reset the device, but returns to the power
on state. ND_RESET can also be used when you want to halt the operation
the general-purpose counter is performing. Below are two quotes from the
Traiditional NI-dAQ (Legacy) C Function Reference Help. I would also highly suggest and recommend doing this application using DAQmx, as it is a newer and more full featured driver.
<img src="http://forums.ni.com/attachments/ni/40/5151/1/ND_Reset1.JPG"> <img src="http://forums.ni.com/attachments/ni/40/5151/2/ND_Reset2.JPG"> Message Edited by David L. on 07-27-2007 06:25 PM
ND_Reset1.JPG:
http://forums.ni.com/attachments/ni/40/5151/1/ND_Reset1.JPG
ND_Reset2.JPG:
http://forums.ni.com/attachments/ni/40/5151/2/ND_Reset2.JPG
- GPCTR_Set_Application
- GPCTR_Change_Parameter
- GPCTR_Config_Buffer
- GPCTR_Control "
My intention is to solve the problem using Traditional NI-DAQ.( It is clear for me the advantage of DAQmx but I can not afford this for the moment).
So which is the set of commands to be run in next loop, only to program the GPCTR without to configure it?
Thanks
cristi