This is machine translation

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


Specify callback function to execute when CD, CTS, DSR, or RI pin changes state


You configure PinStatusFcn to execute a callback function when a pin status event occurs. A pin status event occurs when the Carrier Detect (CD), Clear to Send (CTS), Data Set Ready (DSR) or Ring Indicator (RI) pin changes state. A serial port pin changes state when it is asserted or unasserted. Information about the state of these pins is recorded in the PinStatus property.

    Note   A pin status event can be generated at any time during the instrument control session.

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

  • The event type as PinStatus

  • The pin that changed its state, and pin state as either on or off

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

To learn how to create a callback function, refer to Creating and Executing Callback Functions.



Serial port

Read only


Data type

Callback function


The default value is an empty character vector.

See Also




PinStatus, RecordStatus

Was this topic helpful?