SIMULINK AND ARDUINO. PLEASE HELP!

Hey guys,
I'm a 2nd year electrical engineering student and am currently working on a project in which i have an arduino physically interfaced with an IMU 6DOF razor ( http://voidbot.net/razor-6dof.html). [My goal is to have an inertial navigation system by the end of the project].
My problem is that i need the 6 inputs in my razor to appear on my MATLAB simulink scope in 1 graph so as to have 6 different outputs in 1 axes.
How can i have multiple outputs on one scope? Must i adjust my arduino code or change the physicality of the simulink diagram too?
Help will be highly appreciated!
Thanks!

回答(2 个)

Paulo Silva
Paulo Silva 2011-3-10

0 个投票

Use a Mux block before connecting to the scope

5 个评论

I was previously using a DeMux as the output connecting to the scope is coming from a packet input, hence just one output. With a Mux im going to need 2 outputs, so how can i alter that?
remove the DeMux and connect to the scope
so if i connect the mux to the scope, i use both its inputs from the single output of the pachet input?
I don't know what's "packet input", what I know is when there's the need to compare signals they are muxed and connected to the scope.
Another alternative might be the use of the Floating Scope but I never used it in my simulations so you must find out if you can select you signals with it.
The thing is, i only have 1 port that is being used, but this port is connected to an Arduino that is reading 6 different inputs, where i wish to display each of these inputs onto the same graph. That is why i cant use a mux, because i only have one port being used. You understand why im stuck? :/
I dont know how to display multiple signals all coming from one port onto one graph.

请先登录,再进行评论。

Mark
Mark 2011-3-11

0 个投票

The general idea is that "Scope" blocks have one graph per input port. If you want to have more than one signal displayed on a graph, you need to combine those signals using a "Mux" block to produce a single matrix/vector signal to connect to a single port on the "Scope".

3 个评论

The thing is, i only have 1 port that is being used, but this port is connected to an Arduino that is reading 6 different inputs, where i wish to display each of these inputs onto the same graph. That is why i cant use a mux, because i only have one port being used. You understand why im stuck? :/
I dont know how to display multiple signals all coming from one port onto one graph.
If you have multiple signals coming from one port, it means that you have a wide signal (width>1) - you should be able to connect this signal to a scope directly and see what you need. If you see any errors when you try this, please post the exact error message.
I'm not certain that I understand the 6-to-1 combination going on with the signal. Is it a signal of width 6, or is it multiplexed across time, or something else?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Arduino Hardware 的更多信息

产品

提问:

2011-3-10

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by