Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

CreatePulseChannelFrequency() does not relinquish output pin

 

Jason, John -

 

Preparing to try the Device::Release() routine ...

 

Meanwhile, found this on the NI site at http://digital.ni.com/public.nsf/allkb/485201B647950BF886257537006CEB89

 

Case 7:
Failing to properly clear a task and release its resources. When a DAQmx task starts or otherwise enters the Reserved or Committed states (See NI-DAQmx Help for Task State Model), resources associated with that task such as clocks, channels, trigger lines, or buffer memory are acquired exclusively by the task. Because the task has reserved these resources, any task that tries to access these resources will encounter Error -50103.

You can resolve this by doing one of the following:

  • Wire a True to the auto cleanup input of the DAQm Create Task.vi
  • Add a DAQmx Clear Task.vi at the end of the task
  • Add a DAQmx Control Task.vi at the end of the task, and set its action to unreserve

Note: Case 7 also includes the situation when you try to run an application a second time that failed to properly clear a task after its first execution

 

 

Are these the equivalent of the Device::Release()?  If not, what C++ API would I use?

 

Also,  about the DLL issue -when I ran the Uninstaller, I was presented with a list of NI utilities to uninstall.  I picked the ones that seemed most likely - can you give me what entries in the list I need to uninstall?

 

Thanks

 

--John

0 Kudos
Message 11 of 12
(1,881 Views)

JBravo686,

 

Have you seen the C Reference Help?  It can be found at: Start»Programs»National Instruments»NI-DAQ»Text Based Code Support.

  1. You can see the create task entry in the C reference help but there is no Auto Cleanup in Text based you must use Clear Task.
  2. int32 DAQmxClearTask (TaskHandle taskHandle); will allow you to clear the task as recommended with the create.
  3. int32 DAQmxTaskControl (TaskHandle taskHandle, int32 action); will allow you to unreserve the task.

 

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 12 of 12
(1,865 Views)