Hi,
I'm trying to write a simple C++ routing (Visual C++) using the NIDSA functions that generates a sine wave and captures the response data.
I can generate a sine wave using NIDSA_configure_source(), but I can't figure out how to get the response data.
I tried calling NIDSA_configure_capture_buffer() and then NIDSA_read_capture_single_chan() but then I get an "Unknown Error" from NIDSA_read_capture_single_chan(). (Error code = 0xffffd5d0)
Sample Code:
rc = NI4551_ConfigureSource(1,0);
// configure capture buffer
rc = NI4551_ConfigureCaptureBuffer(numMeasurements);
// read single channel
rc = NI4551_ReadSingleChannel("0", numMeasurements, pResult);
rc = NI4551_ConfigureSource(0,0);
I don't know if I've got the correct functions to generate the sine wave and capture data or if I'm even calling them in the correct order.
Is there any sample code out there??
Thanks!