11-06-2013 01:22 PM
Hi,
We have been using the NI6534 card for moving data from our system into a PC. It is working on both traditional driver and DAQmx. We are using handshanking timing for data transfering. Recently, we want to raise the data transfering speed and need to change the timing from handshaking to sample clock timing(pattern IO in traditional version). We got it work by using traditional driver, but not by DAQmx. I always get an error code when trying to start data aquiring. Error code -89129 - Terminal is not valid for the device. Here is C code for configure and start the card:
DAQmxCreateTask("",&m_taskHandle);
DAQmxCreateDIChan(m_taskHandle,"Dev3/port0_32","",DAQmx_Val_ChanForAllLines);
m_numofSampletoRead = 2000000;
// continue generating samples until stop.
bRet = DAQmxErrChk(DAQmxCfgSampClkTiming(m_taskHandle,"Dev3/PFI2",20000,DAQmx_Val_Falling,DAQmx_Val_ContSamps,m_numofSampletoRead));
// specify the buffer size
bRet &= DAQmxErrChk(DAQmxCfgInputBuffer(m_taskHandle, BUFFER_SIZE));
once it passed the configuration and after the function DAQmxStopTask(m_taskHandle) got called, it returned that error code I mentioned above.
As for traditional version, I just added a call to funtion below and it worked fine.
if (!(status = DIG_Block_PG_Config( m_deviceNumber,
m_group,
1, /* Enable pattern generation using REQ edge latching */
1, /* REQ source - External REQ */
-3, /* timebase - 50ns this is for internal clock */
1, /* REQ interval */
(i16) 0))) /* enable or disable external gating */
Can you help me how to make it run with DAQmx? Thanks.
Solved! Go to Solution.
11-07-2013 09:22 AM
Hi,
Have you tried running one of the C examples included with DAQmx? The example ContReadDigChan-ExtClk.c (NI-DAQ->Examples->DAQmx ANSI C->Digital->Read Values->Cont Read Dig Chan-Ext Clk) appears to be somewhat similar to your application and may help narrow down the problem a bit more.
11-07-2013 10:23 AM
Thank you, James. The example helps. The function I called:
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev3/PFI2",10000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));
I missed the leading slash highlighted in RED. I was allowd passed this function call, but got stuck at the next function call, DAQmxErrChk (DAQmxStartTask(taskHandle)), which misled me.
Thanks again for your help.
02-09-2014 04:00 PM