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.

CODELOADER: How to control an EVM by Matlab

Part Number: CODELOADER
Other Parts Discussed in Thread: LMX2581E, , TICSPRO-SW

Hi,

I have an Evaluation Module for LMX2581E IC. Currently I am using TI's CodeLoader software for setting up the device. But now I need to use Matlab for automatic communication. Is there a way to control the board with Matlab or link Matlab to CodeLoader?

Thanks!

  • It is possible to communicate using ActiveX.  You will want to be using a 32 bit instance to control TICS Pro.

    You will notice the file, C:\Program Files (x86)\Texas Instruments\TICS Pro\ActiveXTICSPro.tlb

    This should be loadable by Matlab and provide you with the functions in ActiveXTICSPro.dll.

    73,
    Timothy

  • Sorry, I noticed you used CodeLoader... TICS Pro (TICSPRO-SW) is our most recent EVM software supporting our devices.  It is possible to use CodeLoader, see instructions for CodeLoader at . There is a section for automation.

    73,
    Timothy

  • Thanks for the reply. Now there are some questions regarding the programming.

    First, in the file "CodeLoader 4 Operating Instructions (Rev. A)" page 7, there are defined commands. Can I use these commands in Matlab?

    Second, if I go with TICS Pro can I use the same commands as in the file "CodeLoader 4 Operating Instructions (Rev. A)" page 7 for automation?

    Thanks

  • Another important question,

    In Matlab documentation it says that "You cannot use a 32-bit in-process DLL COM object in a 64-bit MATLAB application." Also, I found in earlier posts at TI's forum, in "TICS Pro Control With Matlab", that one fellow had a problem of automation with Matlab because of the mentioned issue. Thus, the question is does the ActiveXTICSPro.dll COM object work with 64-bit Matlab? If not, what is the way around this problem?

    Thanks

  • Hello Kaisarbek,

    Can you use a 32 bit version of Matlab?  I see that R2015b and earlier appear to have 32 bit versions.

    Otherwise we have some plans to add a TCP/IP server into TICS Pro, but I cannot advise a date.

    73,
    Timothy

  • I was preparing the automation function for another group which uses Matlab as the main control server in their system. Therefore I am not sure if I can go with the old versions. Anyways, thanks for your reply.

    In case if I can use the old versions, could you please give some more detailed directions or an example how can I start the automation with Matlab? Also, regarding my previous question in this thread. Do you have any clues?

    Thanks

  • Thanks for the reply. Just to give an update: I could communicate between Matlab and the TI's LVM board. All required is any Arduino board (Uno, Mega, Due, etc) which can do SPI communication. By connecting a few pins between the LVM board and Arduino, one can directly program the register bits through SPI communication of Arduino. Datasheet of the used chip and TICS Pro software can help to figure out what bits to send in order to get the desired output. The only thing left is to connect Arduino board to Matlab. This is straightforward and has many clear examples on Mathworks' website. In my case I only need to control the frequency and the output power, therefore the Matlab script is not complicated and the setup is robust. Hope that it may be helpful in the future for people who need to use Matlab for automation.

  • Hello Kaisarbek,

    Sorry you had to go through this effort.  Hopefully in the future, the TCP/IP solution will be the way to go.

    Here is an example to start automation.  It requires pywin32 to be installed.  This can be done with pip:
    python -m pip install pywin32

    --- Example script.

    import win32com.client

    def start_ticspro():
        ticsapp = win32com.client.Dispatch("TICSPro.ActiveX");

        devInfo = win32com.client.Dispatch("TICSPro.ActiveX_DevInfo");
        if hasattr(ticsapp,"Initialize"):
            ticsapp.Initialize(r"C:\Program Files (x86)\Texas Instruments\TICS Pro");

        print("\n\n\n ---== USAGE ==---")
        print(r"Use load_txt(r'c:\path\to\file.txt')")
        print("to load saved DPLL registers.")
        print("Note that TICS Pro will not properly reflect the updated values in the GUI.")
        return (ticsapp)

    #So now for example if you....
    tp = start_ticspro()
    tp.SetFieldValue("SOME_FIELD", 42)

    73,
    Timothy