Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

The PCI6602 gives DMA channel not available error

I have a PCI 6602 counter/timer board with a Lab Windows CVI interface program. The application uses two counter channels. If the program runs and terminates properly, it can be run again without any problem. If the program terminates improperly due to a programming error, an error indicating no DMA channels are available is generated when the second counter is armed. It appears that the board does not free up the DMA channels under these circumstances. How can this be avoided? Each time it occurs, the PC must be powered down.

Frank
0 Kudos
Message 1 of 4
(3,787 Views)
Hello Frank,

Are you using Traditional NI-DAQ or NI-DAQmx? If Traditional, try calling Init_DA_Brds() at the beginning of your code; if DAQmx, try calling DAQmxResetDevice(). Both of these functions return the board to an initialized state. Let me know if this does not help.

Regards,
Sean C.
0 Kudos
Message 2 of 4
(3,777 Views)
Sean,
Thanks for the tip. Unfortunately, it didn't work. I'm using Traditional NI-DAQ. I'm not having such a problem right now since the program now usually terminates properly, but it will be a problem again with new applications.

Frank
0 Kudos
Message 3 of 4
(3,758 Views)
Hi Frank,

Try using the Set_DAQ_Device_Info() function. Use ND_DATA_XFER_MODE_GPCTR0 for the info type and ND_UP_TO_1_DMA_CHANNEL for the info value. Do this for both counters in you application. Please refer to the Traditional NI-DAQ Function Reference Help for help with this and any Traditional DAQ function.

If this still does not work for you, please attach a portion of code which will reproduce this behavior and I will try to reproduce the problem on my system.

Regards,
Sean C.
0 Kudos
Message 4 of 4
(3,744 Views)