Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Input by active power on line

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

0 Kudos
Message 1 of 2
(3,396 Views)

Hi Matthias,

 

Pull-Down Resistors are only available on the DIOs of your USB-6259 as stated in the manuel (http://www.ni.com/pdf/manuals/371291h.pdf) on page 7.

 

Best Regards,

 

Manuel

0 Kudos
Message 2 of 2
(3,255 Views)