08-02-2018 03:07 PM
First: I am completely new to this world (I am a web developer).
I need help regarding a small program that I need to develop.
Basically, I need to send voltage to the 2 output channels on a NI USB-6251 device. Each time I write, something will move (hardware) and then I move it again somewhere else.
foreach (var point in points) { _logger.Log($"Sending voltage: X: {xAxixVoltage}v Y:{yAxisVoltage}v"); Writer.WriteSingleSample(true, new double[] { point.X * _voltagePerUnit, point.Y * _voltagePerUnit }); CurrentPosition = point; }
And the I have this message:
Attempted writing analog data that is too large or too small. Change Minimum Value and Maximum Value to reflect the range of the channel.
Data: 5.029183
Specified Range Minimum: -5.0
Specified Range Maximum: 5.0
How can I buffer those writes to the output? And how can I know when one is done?
Thank you all so much!
08-03-2018 12:59 PM
Hi!
Did you check the documentation and examples using hardware:
Text Based NI-DAQmx Data Acquisition Examples
Using NI-DAQmx in Text Based Programming Environments