Is AOutScan function of Universal Library working with USB-3102? I am trying to set the OutPut value for All AO and can`t. I`m receiving wrong values on the Output device. This is my example:
double[,] array = new double[4, 1] { { dataArray[i] }, { dataArray[i] }, { dataArray[i] }, {dataArray[i] } };
bufArray[i] = MccService.WinBufAllocEx(4);
globalStatusInfo = MccService.WinArrayToBuf(array, bufArray[i], 0, 1, 4);
globalStatusInfo = myBoard.AOutScan(0, 3, 4, ref outFrequency, SelectedChanel.Range, bufArray[index], AOOptions);
dataArray - has values in float.
Can you please provide me what I am doing wrong.
- Job Title: Software Developer
- Industry:
- Application: Universal Library
18 months ago
Grunoff
Brasov
Answers
The USB-3102 is a slow device, meant for occasional/DC writes, not waveform creation. For Waveform creation, consider the USB-3101FS. When using AOutScan with the USB-3102, you can only send 1 sample per channel, as you are doing. Your data array must be ushort, and are effectively in the units of “raw D/A counts”. i.e. values from 0 to 65535 for a 16 bit D/A converter. You can run the C# example named ULAO02, and it will demonstrate this for you.
18 months ago
Measurement Computing
Was this answer helpful?
Yes (0) /
No
(0)