Array via UDP in Simulink

Hallo,

Is it possible to send an array of values via UDP using Arduino Uno?

I am trying to send a vektor via UDP in Simulink but it doesn’t seem to work.

Please check Attachmens.

Thank you in advance

You haven't given any usefull information. Please read How to use this forum and try again.

Pieter

PieterP,

No offense, but what do you mean? In the Picture, there is the full code of what i am trying to do, and even the error i get. I also mentioned what my goal was. What Informations do you need?

AKJ:
PieterP,

No offense, but what do you mean? In the Picture, there is the full code of what i am trying to do, and even the error i get. I also mentioned what my goal was. What Informations do you need?

I had to Google both UDP and Simulink, and I still don't know what you want to do.
No offence, but just fix the errors mentioned in the error message.

JohnLincoln,

For my project, i need to receive some sensors data from an arduino uno, do some computations and send them to a simulator through UDP, similar to - YouTube , but instead of imputing value, they all need to come from the sensors which are connected to the arduino.

I first started with the Arduino IDE, but running 3 differential equations on the arduino itself was very low and this resulted to a non-real-time simulation. So i decided to run the equations and the complete computation of my pc, while arduino is only used as a hub to transfer data.

Now, after collecting and computing the data in Simulink, i want to send the data to the simulator on my PC using UDP. These data are stored in a vector and when i try to send more than one values through UDP, i get an error message (as shown in the attachment above).

I would solve the error, if i knew how to.

Thank you.

I think you'll have more luck on a Simulink forum.

One remark: even though the coefficients of the differential equations might change, the overall form of the solution will most likely be the same. Use a symbolic mathematics tool to find the solution as a function of the variable coefficients, and evaluate that function on the Arduino.

What is the equation you want to solve?

Maybe you could even create a LUT to speed things up.

UDP is an internet protocol. Unless there's more infrastructure than you're telling us about, an Arduino Uno doesn't do UDP.

I'm guessing you want to use Serial protocols in Simulink rather than UDP. I haven't used Simulink in ages so couldn't help with the specifics.

I'm guessing also that this is a case of an "XY Problem".

PeterP,

The equations weren't the cause of the issue i had.

Thank you

MrMark

Yes, i forgot to mention that the arduino is connected to an ethernet shield to send the UDP.

And thank you. I managed to solve the issue using an add-on.