02-21-2007 03:30 PM
Hello Everyone,
I have a PCI 6602 Counter board and using Visual 6.0 C++.
I purchased the board to do the following:
Part 1:
Take in two TTL signals, one at 10MPPS and the other one at 1 PPS. The 10MPPS is the source of my counter to count at every rising or falling edge. The 1 PPS is used to reset the count back to zero. So at every 1 PPS event the counter starts counting from zero at a 10MPPS rate. I have the 10Mhz in Pin#10 (PFI0) && 1PPS on pin #2 (PFI39).
Part 2:
Generate a software interrupt when counter reaches a programmable count value that is within the 1 to 10e6-1 count range (proportional to 10MPPS). At each 1 PPS interval the count value will change; for example within the first 1 PPS interval, count value might be 100e3; for the next 1 PPS interval the count value might be 1e6, etc. etc. Whenever the counter equals the count value a software interrupt is made.
I was told by NI Reps. That the 6602 could do Part 1 & 2. I coded Part 1 but I have had no success in making it work. I keep getting an error which I show below. Can someone please review my code and provide assistance in decoding error?
Code:
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateCICountEdgesChan(taskHandle,"Dev1/ctr0","",DAQmx_Val_Rising,
0,DAQmx_Val_CountUp));
DAQmxErrChk (DAQmxStartTask(taskHandle));
DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandle,"/Dev1/PFI0",DAQmx_Val_Rising));
DAQmxErrChk (DAQmxSetStartTrigRetriggerable(taskHandle, TRUE));
COMPILE ERROR:
DAQmx Erro: Specified property is not supported by the device or is not
applicable to the task.
Propert: DAQmx_StartTrig_Type
Task Name: _unnamedTask<0>
Status code: -200452
End of Program, Press Enter Ket to Quit
Thank You,
a_perezjr
02-22-2007 08:14 AM