Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

NI USB-6008 write analog out with Python

$
0
0

Hello,

how do I write to the DA output of the USB-6008 with python?

I installed the latest version of NI-DAQmx runtime (18.10) and installed the nidaqmx python package with pip.

Could you please give me an example how to simply write a value to one analog output?

When I use (as mentioned in the documentation):

import nidaqmx
from nidaqmx.types import CtrTime

with nidaqmx.Task() as task:
	task.ao_channels.add_ao_voltage_chan("Dev1/ao0")
	task.write([1.1, 2.2, 3.3, 4.4, 5.5], auto_start=True)

I got the error message:

nidaqmx.errors.DaqError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_AO_Max
Requested Value: 10.0
Maximum Value: 5.0
Minimum Value: 0.0
Channel Name: Dev1/ao0

Task Name: _unnamedTask<0>

Status Code: -200077

Isn't there a simpler method to write to the DA?

What does the failure message mean?

 

Thank you very much in advance!

- Olli


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>