12-09-2021 01:59 PM - edited 12-09-2021 02:33 PM
Hello,
I apologize if this is the wrong board, but I need some help with my acquisition setup using Python. I have a PXIe1082 chassis with a 4464 and 4461 board. I am using Python to control them but have run into an issue. I am able to send and receive synchronized signals, but after 30 acquisitions or so my DAQ crashes and gives an internal software error. Reseting the host computer (Windows 10) and the DAQ eliminates the problem, but it would be better if this were not required. I have included the code below. I have tried continuous acquisition and transmission using a callback function but need to sacrifice over half my sampling rate to achieve seamless function. Any help or advice would be greatly appreciated.
The code:
task = nidaqmx.Task()
task.ao_channels.add_ao_voltage_chan('PXI1Slot6/ao0')task.timing.cfg_samp_clk_timing(rate=200000,sample_mode=nidaqmx.constants.AcquisitionType.FINITE.samps_per_chan=2000000)
SignalStreamer = nidaqmx.stream_writers.AnalogSingleChannelWriter(task.out_stream, auto_start=False)
SignalStreamer.write_many_sample(Signal)
#Create rcv channel task
rcv = nidaqmx.Task()
rcv.ai_channels.add_ai_voltage_chan("PXI1Slot2/ai0")
rcv.ai_channels.add_ai_voltage_chan("PXI1Slot2/ai1")
rcv.ai_channels.add_ai_voltage_chan("PXI1Slot2/ai2")
rcv.ai_channels.add_ai_voltage_chan("PXI1Slot2/ai3")
rcv.timing.cfg_samp_clk_timing(200000,sample_mode= constants.AcquisitionType.CONTINUOUS)
rcv.timing.DAQmx_RefClk_src="/PXI1Slot6/PXI_Clk10"
rcv.triggers.start_trigger.cfg_dig_edge_start_trig("/PXI1Slot6/ao/StartTrigger")
reader = AnalogMultiChannelReader(rcv.in_stream)
Sorry for formatting.