Go Down

Topic: Read data sent by multiple sensors over the serial (Read 1 time) previous topic - next topic


Hi everybody,

I have a Simulink model with 6 systems to control, each of them has its own controller and sensor that reads an angle. I'm trying to perform a HIL (Hardware-In-the-Loop) sending the values read by the sensors to an Arduino UNO board via serial, which computes 6 command variables to send back to Simulink in order to control the 6 systems.
I'm able to communicate with Arduino thanks to the "To Instrument" and "Query Instrument" blocks on Simulink, sending 32-bit float variables.
How can I synchronize the communication, i.e. how can the Arduino recognize which sensor is sending the data??


Go Up