Rank: 138318 based on 0 downloads (last 30 days) and 0 file submitted
photo

klob

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by klob View all
Updated File Comments Rating
10 Mar 2013 Embedded Coder Target for Arduino Custom target for Arduno and other processors Author: MathWorks Embedded Coder Team

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

09 Aug 2012 Simulink Support Package for Arduino Uno Hardware (R2012a) Simulink block library for creating standalone applications for the Arduino® Uno platform Author: MathWorks Simulink Team

Is it possible two send two signals from arduino to simulink throught this arduino target?

Contact us