Serial port time stamping question.

2 Ansichten (letzte 30 Tage)
Adam
Adam am 7 Jul. 2011
Beantwortet: Leonard Classen am 27 Mär. 2019
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

Akzeptierte Antwort

Adam
Adam am 9 Aug. 2011
Ended up timestamping with a NIDAQ box for high accuracy. MATLAB's not "real-time" enough.
  1 Kommentar
Walter Roberson
Walter Roberson am 9 Aug. 2011
I agree, that is the only feasible solution for reasonable accuracy.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (3)

Hydro9 Hisz
Hydro9 Hisz am 7 Jul. 2011
t=now; %serial time
  1 Kommentar
Adam
Adam am 7 Jul. 2011
That is time in a "serial" format. Does not answer my two questions. Where is "now" being pulled from?

Melden Sie sich an, um zu kommentieren.


Hydro9 Hisz
Hydro9 Hisz am 7 Jul. 2011
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 am 27 Mär. 2019
Hi,
which NIDAQ box did you use?
best regards

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by