Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

TimerFcn

Specify the callback function to execute when a predefined period of time passes.

Description

You configure TimerFcn to execute a callback function when a timer event occurs. A timer event occurs when the time specified by the TimerPeriod property passes. Time is measured relative to when the serial port object is connected to the device with fopen.

    Note:   A timer event can be generated at any time during the serial port session.

If the RecordStatus property value is on, and a timer event occurs, the record file records this information:

  • The event type as Timer

  • The time the event occurred using the format day-month-year hour:minute:second:millisecond

Some timer events might not be processed if your system is significantly slowed or if the TimerPeriod value is too small.

To learn how to create a callback function, see Create and Execute Callback Functions.

Characteristics

Read only

Never

Data type

Callback function

Values

The default value is an empty string.

See Also

Functions

fopen, record

Properties

RecordStatus, TimerPeriod

Was this topic helpful?