Hi,
I have a problem using the arduino target.
I am trying to send data via serial communication from a model running on arduino to a model running in my computer.
The problem is that I get wrong values when the data I am about to send are negative (i.e. the transmission is fine when I am sending values 0 or greater but wrong when they are below zero (instead of -4 I receive 252 etc)).
I also tried to send negative values through the example that you have (demo_arduino_serial_communication and demo_arduino_serial_communication_host), by changing the Analog input block with a constant block and once again it works fine when using values zero or greater but I am getting the following error message when I am trying to send negative values through the serial communication.
"Parameter overflow occurred for 'Value'. The parameter's value is outside the range that the run-time data type can represent. The specified value was saturated to the closest representable value. You can control this diagnostic on the Diagnostics pane of the Configuration Parameters dialog."
I thought to try and change something on the Diagnostics pane, but I thought that it would be wiser to ask someone more experienced first.
What do you think?
I have an arduino UNO and MATLAB R2011b.
Thanks in advance,
a desperate student
Comment only
25 Aug 2012
Arduino Target
Develop applications for the Arduino platform using Simulink®.
Actually I am interested sending the high level commands from matlab to arduino. For example, the desired motor speed, or motor position and the feedback control loop to be performed in arduino. Do someone has any sample program for this kind of problem
Thank you
Comment only
25 Jul 2012
Arduino Target
Develop applications for the Arduino platform using Simulink®.
Comment only