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.

HSDC Automation DLL

Hi

Ive been working with the DLL and MATLAB example provided for a bit. But is it not possible to obtain data without opening the HSDC GUI? And is there a reason why LABview engine is used as opposed to developing Ti's own?

The script takes a while to get started (using MATLAB R2013b) and opening the GUI eats up more time than I hoped to reduce using the script.

Thanks,

Jay

  • Hi Jay,

    The GUI only has to open once. Once it's running the scripts simply send commands to HSDCPro. Opening the GUI shouldn't be part of the automation process. Once HSDCPro is open, you can use Matlab to issue a capture command and then save the data as a CSV file. This file can then be imported to Matlab for processing. The CSV file will have a column for each channel of the ADC with data stored as 2's complement raw codes.

    Regards,
    Matt Guibord

  • Hi Matt, 

    Thanks for your quick reply.

    Then is it not possible to get data from TSW1405 without opening HSDC? I saw past post here that seem to show interfacing the DAQ board by MATLAB straight away. (http://e2e.ti.com/support/data_converters/high_speed_data_converters/f/68/t/196854.aspx) 

    The running of example .m code provided in HSDC was too slow for my need. Manually clicking the save .csv data seem to be a faster option even. I just need to capture the ADC data but I need to capture it fast as possible. The analysis of data can happen at a leisurely pace later. 

    Kind regards,

    Jay

  • Hi Jay,

    We are not able to support direct communication with the TSW1405.

    Note that there should be no difference in time between manually clicking and accessing HSDCPro through Matlab, except having to navigate through the files. You should make use of the HSDCPro Ready function in your automation to be able to move from step to step as quickly as possible.

    If you have a capture/save script that you can send me, I'd be glad to take a quick look to see if there is something wrong in your code.

    Regards,
    Matt Guibord

  • I ran the HSDCPro_Automation_DLL_ADC_Example_64bit.m provided with the HSDC software. But this takes too long to intialise, it takes around a minute before the first message (Asking for the HSDC GUI to be on before continuing ) appears. Is this normal? If it is I dont see how this will be quicker than just clicking. 

    I am using 2013b version of MATLAB.

    Regards,

    Jay

  • Jay,

    It is assumed that for automation you would strip out the unnecessary parts of the script. For instance, the very top of file loads the appropriate libraries. You only do this once, it does not need to be part of your loop. Opening HSDCPro should be done before the file is run, but once it's open you can just leave it open. Part of the file is connecting to the TSW1400, you do not need to do this every time, just connect once and it's set. In fact, you connect to the TSW1400 when you open HSDCPro, so you don't need to do this in your automation script.

    Your automation routine should be stripped down to the following 3 function calls, placed in a loop. The library needs to be loaded before you start the sript and you need to have HSDCPro setup and capturing properly. You can then just run your script to repeat the capture over and over.

    fprintf('\nStarting Normal Capture...');
    [Error_Status] = calllib('HSDCProAutomation_64Bit','Pass_Capture_Event',TimeoutInMs);
    fprintf('\nError Status = %d (%s)',Error_Status,HSDCPro_Automation_Error_to_String(Error_Status));
    fprintf('\n\nChecking if HSDCPro GUI has completed all its operations...');

    [Error_Status] = calllib('HSDCProAutomation_64Bit','HSDC_Ready',TimeoutInMs); % Waiting to check if HSDCPro has completed all its operations.
    fprintf('\nError Status = %d (%s)',Error_Status,HSDCPro_Automation_Error_to_String(Error_Status));

    fprintf('\n\nSaving ADC Raw Data as CSV file at %s', CSVFilePathWithName);
    [Error_Status] = calllib('HSDCProAutomation_64Bit','Save_Raw_Data_As_CSV',CSVFilePathWithName,TimeoutInMs);
    fprintf('\nError Status = %d (%s)',Error_Status,HSDCPro_Automation_Error_to_String(Error_Status));

    Regards,
    Matt Guibord

  • Yes just had a look through the code in more depth. The most time consuming part was at the begining; addpath(genpath('../../..')). 

    Now it is much faster, definitely faster than manual clicking. 

    I will keep your function advice too when I edit it in future.

    Many thanks for your help.

    Kind regards,

    Jay

  • Hi Jay,

    Glad it's working out now. I think you'll find this automation interface to be very easy to use compared to the work that would need to be done to interface with the board directly.

    Regards,
    Matt Guibord