Have no values shown in scope. What may be the problem?

3 views (last 30 days)
Hi Matlab community,
I am currently using Simulink to run an arduino system. I wanted to test encoder output (it varies from 0 to 2.6 V). So I attached it onto an analog input pin and hope to have it run onto a simulink scope (very simple build, one Arduino Analog input block connected to one normal scope block). However, when I click deploy to hardware button it said that it doesn't allow variable step (so I change the type to fixed step). When I tried deploying it to arduino again the scope displays absolutely nothing (empty plot). Any suggestions as to the reason? Is there some extra settings I have to input for live scope readings from an arduino? Thanks!
Additional Note* The hardware is connected since I've ran some arduino models with simulink before (I just have not gotten arduino inputs to work with scope).

Accepted Answer

Madhu Govindarajan
Madhu Govindarajan on 2 Nov 2015
Can you provide more details like what type of Arduino you are using and what version of MATLAB you are using?
Have you tried reading the encoder using digital input pins? because they are doing it using the Digital pins in this example - http://www.mathworks.com/help/releases/R2015a/supportpkg/arduino/examples/drive-with-pid-control.html
  1 Comment
Lynx Lu
Lynx Lu on 3 Nov 2015
I realized that I never turned the setting to external mode. It works perfectly fine after. Thanks for answering though!

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!