LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ6343 AO SWITCH SPEED (python)

Hi there,

 

The device is NI-DAQ 6343(BNC).

My work needs to switch the output voltage quickly.

But now it switches slowly  (about 8ms).

 

Can I adjust the speed of the analog output switch ?

 

My code is as follows:

task = nidaqmx.Task()
task.ao_channels.add_ao_voltage_chan('Dev1/ao0')
task.ao_channels.add_ao_voltage_chan('Dev1/ao1')
while(1):
for i in range(y_points):
for j in range(x_points):
y_v = XXXX
x_v = XXXX
task.write([x_v,y_v], auto_start=True)  

 

0 Kudos
Message 1 of 3
(722 Views)

You're using software timed-IO which means the speed at which the input/output changes depends on how fast the software tells it to.

 

This method is good for slow operations and it is not deterministic in other words, if you try to achieve an update rate of 1ms, it will not be precisely 1ms and for an unknown reason, your OS decides to allocate its processing power elsewhere (like windows update or antivirus scan), your 1ms update rate might fall short by a large factor.

 

You can achieve faster rates by using hardware timed-IO, here, you supply the DAQmx driver with an array of values that the hardware will update at a fixed rate called sampling rate ensured within the DAQ hardware and not impacted by your OS.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 3
(703 Views)

Ths for your reply. That helps me a lot.

0 Kudos
Message 3 of 3
(647 Views)