Hello everyone,
i have a problem with sending binary data in Simulink. There is a micro-controller connected via USB at COM-Port. For testing i send a multiplexed sine signal with 'serial send' -block from Simulink to this controller(Px4 flight controller). When i look at the logged data from the micro-controller i can see the sine but with delays in it:
This is not acceptable as i need the data to get to the controller in real time.
In the lower graph(of the above log) you can see the time difference between two consecutive samples, where are significant peaks, when the delays occur.
and that is what the sine signal looks like before it enters the 'serial send' in simulink(hence what it ideally should look like when entering the micro-controller):
i also tried the 'To Instrument'-Block with same behaviour as result. Furthermore i tried to send it using the standard serialobject within a MATLAB Function Block with the same result.
Sending the same sine signal via 'serialobject' from a matlab-script works fine; no delays.
Has anyone a suggestion how i could solve this problem?
Thanks for your help
Simon