The problem about communication between lego ev3 robots

1 view (last 30 days)
I use the UDP/TCP receive/send block of instrument control toolbox of Simulink to make communication between two Lego EV3 robots. What we can currently achieve is: 1. send and receive data between two alone Simulink programs running in normal mode; 2. running the Simulink program linked to the Lego EV3 in external mode, then send data from this mode to the program which is running in normal mode, and normal mode program can receive the data and display it; The problems is: 1. running the Simulink program linked to the Lego EV3 in external mode, then use TCP or UDP to receive data from the program which is running in normal mode, but can’t receive and display any data, before do it, I have sent the message through UDP/TCP testing tool to unlock the receive mode of EV3, and the TCP monitor software show that there’s data to be sent from IP address A/port A to IP address B/port B(A is computer’s IP and port, B is EV3’s IP and port), but the EV3 don’t receive data from IP A/port A or IP B/port B, the TCP monitor software just shows there’s other ip/port exchanging data at the same time, why? 2. Running two program linked to two EV3 in external mode, use TCP or UDP block to test communication, made the ip/udp address and port matched, and establish the connection before test, but still can’t achieve exchange data; 3. Assume I don’t use TCP/UDP mode, I just want to real-time exchange data between multiple Simulink programs, how can I do it? I’ve ever tried writing and reading the same variable use write to workplace block between two Simulink programs, but it didn’t work. Maybe two program can’t occupy the same variable at the same time. So, if I want to communicate by write and read the same variable way, How can I achieve it?
  1 Comment
Benedict Bauer
Benedict Bauer on 10 Jan 2017
Hello xing,
I have the same problem here. Did you get some information about using TCP/IP communication on the Lego EV3 hardware with simulink?
Thank you for your help!
Best regards Benedict

Sign in to comment.

Answers (1)

xing
xing on 28 Jan 2015
no one know this?

Categories

Find more on MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!