This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TSW1400EVM: Python Script for Data Capture from TSW140x

Part Number: TSW1400EVM

Hi Experts,

Our customer is looking into buying a 4 CH (~50 MSPS/ch) ADC for a prototyping application. They plan to capture about 1 ms of data every 100 ms for each channel. 
They noticed that we have a data capture card (TSW140x) that supports the ADC card. It looks like the capture card has a USB interface (which may be slightly slower than what they need). 
He was wondering if we have any python script that will allow them to capture the data directly from the on-chip memory instead of using the GUI? If so, can you please share?

Kind regards,

Gerald

  • Gerald,

    Unfortunately we have nothing like this available. Our evaluation capture cards were not designed for real time processing of captured data.

    Regards, Chase 

  • Hi Chase,

    Thanks for the info. The customer does not need real-time, they can work in save-in-memory and extract for memory mode. If you have something that will allow them to extract 100 ms of data every few seconds that could potentially work.

    Kind regards,

    Gerald

  • Gerald,

    I'm not as familiar with the speed of capture for the TSW1400EVM with HSDC Pro automation. For instance, if we can set the number of samples low enough, it might be do-able to capture 100ms of data once every few seconds. We have examples with  using the HSDC Pro Automation DLL in python but I would like to everything is functional first. Next week after returning from business travel, I will be able to provide this for you. What are the minimum requirements for the customer's timing?

    Thanks, Chase

  • Hi Chase,

    The customer said that it might be okay. Their minimum timing requirement would be to grab 100 ms of data every 5 seconds or so. Can you please share the script? Thank you.

    Kind regards,

    Gerald

  • Hi Gerald,

    Certainly, I will work on this. Please allow me a few days to get this.

    Regards, Chase

  • Hi Gerald,

    Attached is a python3 script that enables reading data from HSDC into a numpy array as well as saving the data to a CSV.

    First, import the "ADCdataToImport.csv" file into HSDC Pro. 

    To import this in HSDC Pro, click File -> Import Data File. Choose 2 channels, set the resolution to 16 bits, and make sure 2s complement is checked. (see image below)

    Next, run the python script "main.py".

    The script should print a 2x4096 array of values. The first column represents the data from channel A. The second column represents the data from channel B. Each channel will have 4096 samples. Channel A will be a ramp from the values 0 through 4095 while Channel B will only contain 0's.

    handoff_reading_codes_from_HSDCPro_python3.zip

    Regards, Chase