05-25-2011 02:55 AM
Hi,
I am trying write an array of samples to digital and analog line of NI USB 6008. Writing one sample is working fine but I am confused about how to write more samples to the port.
In the function:
int32 DAQmxWriteDigitalLines (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt8 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);
Q1: it seems possible to write more samples to the line, but how is the timing controlled?
For example if my writeArray is {1, 0, 1, 0} then how is the sample rate (samples per second) decided by the user?
Q2: Same is my question for analog line
int32 DAQmxReadAnalogF64 (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, float64 readArray[], uInt32 arraySizeInSamps, int32 *sampsPerChanRead, bool32 *reserved);
Q3: The fastest possible sample rate as per datasheet for analog output is 150 Hz. What is the fastest possible sample rate for digital output?
Thanks in advance.
Regards,
RB
Solved! Go to Solution.
06-29-2011 10:15 AM
Hi RB,
AO and DIO on the USB 6008 are static, you can't give a number for the timing. You can only have a look at how fast your PC do this, therefore you have to benchmark it.
regards
Tobias