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.
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:
Do you have any examples that I could use as inspiration, or any ideas?
Solved! Go to Solution.
Problems solved :
import numpy as np
from nidaqmx import *
test_Task = nidaqmx.Task()
test_Task.timing.cfg_samp_clk_timing(rate= 10, sample_mode= nidaqmx.constants.AcquisitionType.CONTINUOUS, samps_per_chan= 5)
test_Writer = nidaqmx.stream_writers.AnalogSingleChannelWriter(test_Task.out_stream, auto_start=True)
samples = np.append(5*np.ones(10), np.zeros(10))