02-15-2011 03:41 AM
I'm working on an application programmed in borland builder 6. At higher output rates of +- 40 samples per second, the application works fine and the output voltages are send to the analog output without any problems.
At lower output rates < 40 samples second, the DaqmxWriteAnalogF64 function returns an error, which tells me that the value written is above or below the output range. This is definately not the case.
If this error occurs, the 'sampleswritten' variable is set to a very high number. I later discovered that the value in the sampleswritten variable, is actually the taskhandle of a different task, which was read before the analog output write was called.
The problem only occures when I have 2 output channels in my task, with just one output channel, the problem doesn't occur. Has anybody seen this behaviour before, or can explain me whats happening?
02-18-2011 06:10 AM
Dear Stroompje,
I'm no borland expert, I'm more experience with Labview, but the driver stays the same.
If I create a task with two channels, I have to offer an array with two elements to the DAQmx write function (DAQmx write N channels 1 sample); N channels has to be the same number of channels you specified with your task.
Best regards,