07-12-2011 06:31 AM
Hello!
I want to do some Digital Data Acquisition with USB-6259. I'm using the following construct:
int32 error=0;
TaskHandle taskHandle=0;
TaskHandle handle=0;
char chan[256],clockSource[256];
uInt32 *data=0,sampsToRead = 1600000;
int32 i, sampsRead;
float64 rate = 100000;
char errBuff[2048]={'\0'};
uInt8 dummy[32];
if( (data=malloc(sampsToRead*sizeof(uInt32)))==NULL ) {
MessagePopup("Error","Not enough memory");
}
/*********************************************/
// DAQmx Configure Code
/*********************************************/
DAQmxCreateTask("",&taskHandle);
DAQmxCreateDIChan(taskHandle,"Dev2/port0","",DAQmx_Val_ChanForAllLines);
DAQmxSetChanAttribute (taskHandle, "", DAQmx_DI_InvertLines, 1);
DAQmxCfgSampClkTiming(taskHandle,"/Dev2/PFI12",rate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,sampsToRead);
/*********************************************/
// DAQmx Start Code
/*********************************************/
DAQmxStartTask(taskHandle);
DAQmxCreateTask(buffer,&clockHandle);
DAQmxCreateCOPulseChanFreq (clockHandle, "Dev2/ctr0", "name2", DAQmx_Val_Hz, idle, 0.0, frequency, 0.5);
DAQmxCfgImplicitTiming (clockHandle, DAQmx_Val_FiniteSamps, sampsToRead);
DAQmxRegisterDoneEvent(clockHandle,0,DoneCallback,"clock");
DAQmxStartTask(clockHandle);
/*********************************************/
// DAQmx Read Code
/*********************************************/
DAQmxReadDigitalU32(taskHandle,-1,10.0,DAQmx_Val_GroupByChannel,data,sampsToRead,&sampsRead,NULL);
DAQmxStopTask(taskHandle);
DAQmxClearTask(taskHandle);
This seems to work theoretically but the problem is, that the device I want to read data from has to pull the power from the active line. So I need power on on the line I want to read from, so that the device can pull down the power.
Is this possible with USB-6259?
Best regards,
Matthias
08-08-2011
01:39 AM
- last edited on
09-10-2025
09:30 AM
by
Content Cleaner
Hi Matthias,
Pull-Down Resistors are only available on the DIOs of your USB-6259 as stated in the manuel (https://www.ni.com/docs/en-US/bundle/pci-pcie-pxi-pxie-usb-6259-specs/page/specs.html) on page 7.
Best Regards,
Manuel