I want to generate a continuous sine wave with frequency=60 Hz and amplitude = 4V .
I want to use Python NIDAQMX for this(have NI 9269 module ,if that matters)
What is the best way to do this?
Here is the basic code I used, and works, for DC output. But not sure if there is any function generator for sine wave? or I have to make an array of points first and then send them to output channel? Is there any document available for beginners or examples showing how to do the basic tasks like this one? If I can get some basic code to do this that will be appreciated. but for me ,learning this stuff is important as well. Thanks.
code which works for DC output
import nidaqmx import numpy as np for x in range(100): with nidaqmx.Task() as task: task.ao_channels.add_ao_voltage_chan("cdaq2Mod2/ao2") task.write([1.0], auto_start=True)