Controlling iMotion Using Matlab

Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
alirezrez
Level 1
Level 1
First question asked Welcome!

Hi,

I have a EVAL-M1-101T board which has IMC101T -T08 MCE on it. the eval board also has XMC4200 as the onboard debugger. The board is connected to PC via J Link and Matlab can see the COM port. 

How can I read the registers and send command using Matlab?

Thank you for your help!

0 Likes
1 Solution
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

Hi @alirezrez ,

  Yes, we can communicate from serial interface. The data needs to be sent as per the protocol, which is also mentioned in the iMOTION™ Motion Control Engine Software Reference Manual.

However, COM port (on board debugger) is connected to UART0 pin. By default UART0 is used by MCEDesigner. If you can use iMOTION link, it is possible to connect to UART1 and use User UART protocol to communicate to MATLAB.

To establish serial communication from matlab, refer to the functions given in the link https://in.mathworks.com/help/matlab/ref/serialport.html , and write a matlab script/code accordingly.

Best Regards,
Sai

View solution in original post

0 Likes
1 Reply
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

Hi @alirezrez ,

  Yes, we can communicate from serial interface. The data needs to be sent as per the protocol, which is also mentioned in the iMOTION™ Motion Control Engine Software Reference Manual.

However, COM port (on board debugger) is connected to UART0 pin. By default UART0 is used by MCEDesigner. If you can use iMOTION link, it is possible to connect to UART1 and use User UART protocol to communicate to MATLAB.

To establish serial communication from matlab, refer to the functions given in the link https://in.mathworks.com/help/matlab/ref/serialport.html , and write a matlab script/code accordingly.

Best Regards,
Sai
0 Likes