Hello to all,
My institution has several NI tools for my thesis.
We have a chassit 1033 and two NI 44-98 cards allowing the recording of vibration in a sample via accelerometers.
We have recently acquired a NI 6323 card and two SCB 68A.
The AO ports of the two SCB68A are connected to amplifiers connected to speakers.
I would like to find a simple way via python to emit the desired signals, to transmit them to the amplifier which itself will transmit them to the speakers. This allows me to have a total control of my source.
For the moment, I can't find any example in python similar to what I would like to do.
I started to code a piece of code, but it doesn't work.
import nidaqmx
rate = 40000 # Sample rate in Hz
duration = 10 # Duration in seconds
samples = int(rate * duration)
list = []
for x in range(samples):
list.append(x % 2)
with nidaqmx.Task() as task:
task.ao_channels.add_ao_voltage_chan("Dev1/ao1")
task.timing.cfg_samp_clk_timing(rate)
task.write(list, auto_start=False)
task.start()
Do you have any examples that I could use as inspiration, or any ideas?
Sincerely,
Thomas