• TI Thinks Resolved

ADS58J89: How to export data real-time to Matlab

Prodigy 120 points

Replies: 13

Views: 816

Part Number: ADS58J89

Dear Sir/Madam,

I am working with a ADS58J89 as my ADC and a TSW14J56 as the capture card.

I was wondering how to export real-time data of all the 4 channels from HSDCpro to Matlab for processing. Do I need to install any interface?

Thanks

Farshid

  • Hi Farshid,

    You can export the data from File>>Save Integer I32 Codes as CSV File
    There is also an example Matlab script that can be used to automate the data capture process.
    The script is located at: C:\Program Files (x86)\Texas Instruments\High Speed Data Converter Pro\HSDCPro Automation DLL\Manual and Examples\Automation DLL Matlab Example

    Thanks,
    Eben.
  • In reply to Ebenezer Dwobeng:

    Hi Eben,

    Thanks for the help.

    Well, I opened the Matlab codes and after putting the right serial number of the ADC and Capture card, and giving the right path and name of the firmware to Matlab, I ran Matlab. 

    First, HSDC pro stopped showing data on its screen. The following figure:

    I imported the right path of everything. Here is a screenshot of my Worksapce in Matlab.

    I went ahead and checked the directory the data is supposed be saved, but the CSV file is empty. Do you have any idea why it is not saving data? 

    Also, here is my command window:

    "

    Please open the HSDCPro GUI before using these Automation DLL functions.
    Press ENTER to start...


    Connecting to board : T825T9tu-TSW14J56revD
    Error Status = 0 (No Error)

    Selecting ADC Device : ADS58Jx_LMF_442
    Error Status = 0 (No Error)

    Configuration Settings:

    Passing ADC Output Data Rate = 250000000
    Error Status = 0 (No Error)

    ADC Input Target Frequency = 169990000
    Error Status = 0 (No Error)

    Number of Samples per Channel = 65536
    Error Status = 0 (No Error)Warning: Escaped character '\A' is not valid. See 'doc sprintf' for
    supported special characters.
    > In HSDCPro_Automation_DLL_ADC_Example_64bit (line 102)


    Error Status = 0 (No Error)

    Applying FFT Notch Filter Settings
    Error Status = 0 (No Error)

    Applying Trigger Settings
    Error Status = 0 (No Error)

    Start Normal Capture. Press ENTER to continue...

    Starting Normal Capture...
    Error Status = 7014 (Read DDR to File Timeout Error.)

    Checking if HSDCPro GUI has completed all its operations...
    Error Status = 0 (No Error)

    Saving ADC Raw Data as CSV file at C:/HSDCPro Data/ADCdata.csv
    Error Status = 0 (No Error)

    Test Selection Option = 1 (Time Domain-0; Single Tone-1; Two Tone-2; Channel Power-3)
    Error Status = 0 (No Error)

    Graph Plot Type = 2 (Codes - 0; Bits - 1; Real FFT - 2; Complex FFT - 3)
    Error Status = 0 (No Error)

    FFT Window Type = 3 (Rectangular - 0; Hamming - 1; Hanning - 2; Blackman - 3)
    Error Status = 0 (No Error)

    Saving ADC FFT as PNG image at C:/HSDCPro Data/ADCFFT.png
    Error Status = 0 (No Error)

    Selecting the ADC Channel Index = 0
    Error Status = 0 (No Error)

    Getting the FFT Data of the active channel.
    Error Status = 0 (No Error)

    Getting the Single Tone Parameter Values.
    Error Status = 0 (No Error)
    The Parameter Values are:
    SNR = 0 dBFs
    SFDR = 0 dBc
    THD = 0 dBFs
    SINAD = 0 dBFs
    ENOB = 0 Bits
    Fund. = 0 dBFs
    Next Spur = 0 dBFs
    HD2 = 0 dBc
    HD3 = 0 dBc
    HD4 = 0 dBc
    HD5 = 0 dBc
    NSD = 0 dBFs/Bin

    Disconnecting from the board
    Error Status = 0 (No Error)

    "

  • In reply to Farshid Tamjid:

    Hi Farshid,

    From your screenshots, it looks like the firmware was not loaded to the TSW14J56 EVM. So try connecting HSDCPRO manually to TSW14J56 and loading the firmware. After the firmware is loaded, start the matlab automation script.

    Thanks,
    Eben.
  • In reply to Ebenezer Dwobeng:

    Hi Eben,

    First, manually I loaded the firmware to HSDCPRO. It was sampling fine.
    Then, I opened Matlab and ran the codes. I saw an empty screen on my HSDCPRO (I put the photo in my last comment). I'm not sure it is only due to the firmware or not. In your Matlab codes, there is a line which calls the firmware as well. I gave same directory address I used to give to HSDCPRO manually. But, it doesnt work. Any idea how to fix it?

    Thanks
  • In reply to Farshid Tamjid:

    Hi Farshid,

    The 64bit Matlab DLL also requires you to download and install 64-bit labview 2014 run time engine. There is a readme.txt file in the Automation DLL Matlab Example>>64Bit Matlab folder with a link to download this run time engine.

    If you are using 32bit Matlab DLL, you do not need to install any extra run time engine.

    Thanks,
    Eben.
  • In reply to Ebenezer Dwobeng:

    Hi Eben,

    Actually I read the readme.txt file and I followed the instructions. I use 64bit Matlab DLL, so I installed 64-bit labview run time engine.

  • In reply to Farshid Tamjid:

    Hi Farshid,

    Can you try with the ini file attached. Put the ini file in the directory below and then restart HSDCPRO

    C:\Program Files (x86)\Texas Instruments\High Speed Data Converter Pro\14J56revD Details\ADC files

    Thanks,

    Eben.

    ADS58Jx_LMF_442_ALT_SYNC.ini

  • In reply to Ebenezer Dwobeng:

    Well, I opened the Matlab codes and after putting the right serial number of the ADC and Capture card, and giving the right path and name of the firmware to Matlab, I ran Matlab.
  • In reply to Ebenezer Dwobeng:

    HI Eben,

    I used the ini file you sent and ran Matlab codes, but again the data disappeared from HSDCPro window and it is not sampling anymore. It was sampling before running the Matlab codes though. What do you think about it? Here is a screenshot.

    Thanks

  • In reply to Ebenezer Dwobeng:

    Hi Eben,

    I was wondering if you have any idea how to solve the issue?