Jump to content
  • 0

Analogue input scan interferes with output scan



Hi! In my application I need to output periodic signals. I'm simultaneously updating one analogue output and the digital output channels at 500 kHz (the max frequency for this device). This works as expected on its own. The signals are output continuously, with a 25k S/ch buffer (~50 ms).

I also need to collect input data. I'm reading 6 AI channels at 200 kS/s (again, the max for 1808X). This also works as expected when done alone. 

One of my digital output channels is connected as an input to the ITRIG terminal to trigger the input scan (which collects a fixed number of points).

In my code, I first start the output scan, then I start the input scan some time later. I get unreliable results when starting the input scan. Once it worked as expected, but almost always the output values stop outputting their periodic signals or begin to output high frequency noise on the digital channels and a high value on the analogue channel (not what was set). 

What can I try to fix the problem? Do I need to slow down the scan speeds? is there a better command or scan option required to run input/output scans that don't interfere with each other? am I running out of buffer space? Or usb bandwidth? The analogue output signal is a DC voltage, only the digital channels need to update at a high frequency for my application.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @calebcob.

Please provide additional detailed information regarding your PC specs, OS, software applications, any attached hardware, and wiring.  You mentioned that it did work.  Do you recall what may have changed with your code, OS or hardware?  Do you have other instruments, pumps or ovens nearby emitting EMF?

Given that I do not have your complete external hardware configuration, please provide a working example of your code that I can test with an USB-1808X.




Link to comment
Share on other sites

  • 0

Computer is M1 MacBook Pro, Mac OS Ventura, program in python 3. Wiring are all 50 ohm BNC coax cables terminated in simple wires for screw terminal condition (< 6 inches bare wire at DAQ side. There are several source meters and signal generators (keithley or similar bench top test and measure equiptment on the same bench). The USB connection is routed through a hub the also handles various ethernet and other USB connections for automation of other parts of our system.

Nothing was different about the code or setup the time that it worked. As far as I can tell the success was random. 

I have since tried turning down the frequencies and found that it works consistently at max AI scan speed and lower output scan frequency. 0 fails below ~100 kHz output rate and fails less frequently at 200-400kHz. 

I actually don't need high scan frequency on the analogue output, so I changed the code to control analogue output with a_out, and use d_out_scan with an int buffer (instead of daq_out_scan with a float buffer). I still encounter fails at 500 kHz but it appears stable at 400 kHz digital output scan speed. I think that performance is acceptable for my purposes. I was going to cobble together a version of the code that can be shared publicly but with this approach I think my problem is effectively resolved now. 

I do have a follow up question on input/output timing: I am triggering the input scan on one of the DIO output pins. I would like the clocks to be synchronized such that if I run the output scan at 400 kHz and input scan at 200 kHz, that point N in the input sequence will be temporally synced with the 2*N point of the output scan over many seconds. Are the input and output clocks synchronized by design? Or do I need to use OCLKO to drive ICLKI to ensure this? 

What is the relationship between the ICLKI frequency and the input rate? i.e. If I tell the DAQ I want 200 kS/s input scan rate and provide an arbitrary input clock frequency (e.g. 400kHz), what is the result? does the input clock expect a specific frequency? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...