Hello Filipe,
Thanks for the posting. As you have suggested, I will be using DMA for the first three counters.
I am furnishing more details on the application, your suggestions/view points please.
Thanks,
MOHANDAS
The pseudocode for the application is
LOOP:
Step 1 -
Output 2 Analog Voltages(X,Y) usingPCI-6024E Analog output
Step 2 -
Generate a Gating Pulse using PCI-6024E (Internal 20 MHz timebase,use ND_COUNT_1,values of 20k/100k,Select_Signal(ND_RTSI_0)
Step 3 -
Set Counters 0 to 7 on PCI-6602 forBUFFERED_EVENT_CNT for gating Pulse arriving at ND_RTSI_0, ND_BUFFER_MODE, ND_CONTINUOUS, ND_INTERRUPTS(for all counters0 -7), ND_COUNTING_SYNCHRONOUS, GPCTR_Config_Buffer(iDevice, ulGpctrNum, 0, ulCount, cnt_0_Buffer);(
The problem happens at this point)
ND_PROGRAM each of the counter
STEP 4 -
ND_PROGRAM PCI-6024E to generate gating pulse
STEP 5 -
ND_RESET PCI-6024E and counters 0 -7 on PCI-6602 to stop counting
STEP 6 -
GPCTR_Read_Buffer to an Array
END LOOP
The LOOP(Step 1 - 6) is repeated continuously n times.
PROBLEMS:
A. Throws an errorGPCTR_Config_Buffer returned NI-DAQ Error - 10444 This occurs after looping around 160 times
B. Inordinate delay at GPCTR_Read_Buffer for either of these conditions
-If we dont pause after Step 4
-Use a buffer of size more than one to read counts
-Use timeOut >0 in GPCTR_Read_Buffer
C. If we use timeOut >0 in GPCTR_Read_Buffer the application runs without delay at GPCTR_Read_Buffer step, but only one buffer point is read(we require at least two readings)
Would like to know,
-Is there any need to pause between ARM and DISARM of counters
-How long we have to wait between ARM and DISARM of cou
nters for reading buffer properly.
-Ideal timeOut value.
-Overall whether I am headed in the right direction for having the Application count continously and output Analog Voltage.