Serial port time stamping question.

조회 수: 11 (최근 30일)
Adam
Adam 2011년 7월 7일
답변: Leonard Classen 2019년 3월 27일
It's been a while since I've worked with MATLAB, so bear with me.
A few timing questions:
1.) What is the best way to timestamp data coming in on a serial port?
2.) What does MATLAB use to timestamp the data? Does using NTP make a difference?
Thank you for the help!
-Adam

채택된 답변

Adam
Adam 2011년 8월 9일
Ended up timestamping with a NIDAQ box for high accuracy. MATLAB's not "real-time" enough.
  댓글 수: 1
Walter Roberson
Walter Roberson 2011년 8월 9일
I agree, that is the only feasible solution for reasonable accuracy.

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Hydro9 Hisz
Hydro9 Hisz 2011년 7월 7일
t=now; %serial time
  댓글 수: 1
Adam
Adam 2011년 7월 7일
That is time in a "serial" format. Does not answer my two questions. Where is "now" being pulled from?

댓글을 달려면 로그인하십시오.


Hydro9 Hisz
Hydro9 Hisz 2011년 7월 7일
the now function or clock function is pulled from the system clock. If you want elapsed time between measurements without influence from the system try using the tic/toc functions with each iteration

Leonard Classen
Leonard Classen 2019년 3월 27일
Hi,
which NIDAQ box did you use?
best regards

카테고리

Help CenterFile Exchange에서 Clocks and Timers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by