Port

Specify platform-specific serial port name

Description

You configure Port to be the name of a serial port on your platform. Port specifies the physical port associated with the object and the instrument.

When you create a serial port or VISA-serial object, Port is automatically assigned the port name specified for the serial or visa function.

You can configure Port only when the object is disconnected from the instrument. You disconnect an object with the fclose function. A disconnected object has a Status property value of closed.

Characteristics

Usage

Serial port, VISA-serial

Read only

While open

Data type

String

Values

The value is determined when the instrument object is created.

Examples

Suppose you create a serial port and VISA-serial object associated with serial port COM1.

s = serial('COM1') 
vs = visa('ni','ASRL1::INSTR')

The Port property values are given below.

[s vs].Port
ans = 
    'COM1'
    'ASRL1'

See Also

Functions

fclose, serial, visa

Properties

Name, RsrcName, Status

Was this topic helpful?