How to set up a Simulink model to use external clock on my Arduino Mega 2560?
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi, all, I have an Arduino board all configured, two potentiometers connected to it at the same time, pins A0 and A1, however, simulation runs a lot slower than real time. It is funny, but it seems, the lower the sampling frequency, the faster the simulation time. For instance, it takes about 13 to 14 seconds to simulate 1 second of data acquisition. It takes about a second to run 18 seconds of simulation with sampling frequency about 10 Hz. The samples appear in scope in real time, but the X axis is off, that irritates me, and I am afraid it will also hinder adequate data acquisition. I have read that you can configure external clock in older versions of Matlab, but I cant find this option in R2019b.
If you happen to know how to configure my board to run in real-time, please, do share!
Best regards, Alex
UPD. It seems that sampling is affected somehow, i only get 350 samples a second (the real-time second) with sampling freq 1000 Hz
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!