Greetings, I have 4 NI-6511 (64 bit digital in) boards installed in a PC. I've written code (Delphi) which does the following (the prefix DAQmx stripped from the orignal DLL function calls):
enumerate installed boards (GetSysDevNames) Create a Task for each installed board (CreateTask) Create 2 Channels for each task (CreateDIChan - Channels are 'Dev#/port0_32' & 'Dev#/port4_32') Start each task (StartTask) Read data 1 sample/channel specified (ReadDigitalU32)
All are successful with the following exception: ReadDigitalU32 returns only the first channel in the task. These channels are 32 bits wide, so is there a limitation that I can only read 32 bits worth of data with this function call ?
I expected to see DataArray contain the data for Dev1/port0_32 and DataArray the data for Dev1/port4_32, but this was not the case. I then expanded the array to be a multidimensional one (UINT32 ArrayData[2,100]) but this also did not produce the desired results. Any suggestions ?
Other Question: I currently use a system timer to generate the reads every 70ms or so. Is there a call I can use with the 6511 board that creates a continuous read task ? I tried CfgHandshakingTimng, but DAQmx_Val_ContSamps is not defined, and trying DAQmx_Val_SampleContinuous (or whatever it's defined as in DAQmx.TLB) produces a GPF.
You can consider using the function: DAQmxReadDigitalLines to read from the individual lines. The PXI-6511 supports unstrobed digital input only (software timed), hence your current method of using the timer is the way to go.