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.

TSW14J56EVM: HSDCPro Automation DLL with MATLAB

Part Number: TSW14J56EVM

I have a TSW14J46EVM and and ADS54J40EVM aand I am trying to use the HSDCPro Automation DLL to automate the data capture using MATLAB. I have a few questions on getting it to work

1. My board serial number is T827D8un as written on the board - so when I pass the board serial number, have it asT827D8un-TSW14J56revD ?

2. Also when passing the ADC device name, is it supposed to be passed as ADS54J40 or the actual ADS54J40_LMF_8244 ?

3. I am running MATLAB R2020a and when I try the commands with int32_t I am given a prompt to use int32 instead. Is this to be expected? 

4. Whenever I run the commands like connect_board, disconnect_board, etc I get an int32 vector of different lengths as the result, What is this vector of numbers supposed to represent and how to make sense of it? 

5. When I run the command connect board with the HSDC Pro GUI open, am I supposed to see the changes in thge GUI corresponding to the command given? I do not see the changes currently

  • Hi Aravind,

    1. My board serial number is T827D8un as written on the board - so when I pass the board serial number, have it asT827D8un-TSW14J56revD ?

    You can use either way "T827D8un" or "T827D8un-TSW14J56revD".

    2. Also when passing the ADC device name, is it supposed to be passed as ADS54J40 or the actual ADS54J40_LMF_8244 ?

    You will have to use "ADS54J60_LMF_8244"

    3. I am running MATLAB R2020a and when I try the commands with int32_t I am given a prompt to use int32 instead. Is this to be expected?

    I don't think there is a command called int32_t in matlab you will have to use INT32.

    4. Whenever I run the commands like connect_board, disconnect_board, etc I get an int32 vector of different lengths as the result, What is this vector of numbers supposed to represent and how to make sense of it? 

    Are you talkinng about the error? If the the connect_board or disconnect_board was successful it should show error = 0.

    5. When I run the command connect board with the HSDC Pro GUI open, am I supposed to see the changes in thge GUI corresponding to the command given? I do not see the changes currently

    Yes you should see the changes on the GUI and HSDCpro actually connecting to the board and status actually saying connected or disconnected. 

    Regards,
    Neeraj

     

  • Hi Neeraj

    Thanks for the responses. 

    Reg 3 above, I followed the commands mentioned in the automation manual and hence used int32_t as suggested there. So I will continue using only int32. 

    Reg 4, I do not get the error=0 message which suggests to me that there is some error happening and hence the commands are not successfully executed. I only get a vector of numbers back. How do I proceed forward understanding wherein the error lies? 

    Reg 5, I do not see any changes in the GUI when the commands are executed which again suggests something is off. Do you have any suggestions to for troubleshooting? I am running HSDC Pro 5.20 and am following the steps mentioned in teh automation manual and the example m file.

  • Hi Aravind,

    Can you please make sure you get have following package installed on the PC.

    https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-compiler

    Also can you add the following commands at top of the script before you load HSDCpro DLL.

    addpath('C:\Program Files (x86)\Texas Instruments\High Speed Data Converter Pro\HSDCPro Automation DLL\Manual and Examples\Automation DLL Matlab Example\64Bit Matlab'); %for the MATLAB to use the Additional dependency files like Thunk files, header files etc..
    if ~libisloaded('HSDCProAutomation_64Bit')
        [notfound,warnings]=loadlibrary('C:\Program Files (x86)\Texas Instruments\High Speed Data Converter Pro\HSDCPro Automation DLL\64Bit DLL\HSDCProAutomation_64Bit.dll', @HSDCProAutomationHeader);
    end
     
    Regards,
    Neeraj
  • thank you, I will try the suggested steps.

    Also, when I read through the manual, it seems like I can only get the FFT results of one channel ( the active channel whichever it is)  using the Get_FFT_Data command. Is it the case? I was interested in getting the FFT results of the two channels to MATLAB when sampling coherently. Is there a way to do that ?

  • Hi Aravind,

    Yes your assumption is correct the you can only get the FFT data from active channel. 

    One way to get the data for other channel is get the FFT data from active channel. Change the active channel by changing the channel index see command below. 

    [Error_Status] = calllib('HSDCProAutomation_64Bit','Select_ADC_Channel',ChannelIndex,TimeoutInMs);

    Get the FFT data for this channel then change the active channel back to original and repeat. 

    Regards,

    Neeraj

  • Thanks for clarifying that! In that case, the FFT I get of the second channel will not be corresponding to the same time block as the first channel, right? 

  • Hi Aravind,

    You will get the same time block for both channels. When you capture the data it will capture both channels simultaneously. So the data is already in the memory for both channels. By changing the active channel after you have captured the data will give you same time block just different channel.

    Regards,

    Neeraj