Documentation Center

  • Trial Software
  • Product Updates

Contents

ObjectVisibility

Control access to serial port object

Description

The ObjectVisibility property provides a way for application developers to prevent end-user access to the serial port objects created by their applications. When an object's ObjectVisibility property is set to off, instrfind does not return or delete that object.

Objects that are not visible are still valid. If you have access to the object (for example, from within the file that creates it), you can set and get its properties and pass it to any function that operates on serial port objects.

Characteristics

Usage

Any serial port object

Read only

Never

Data type

String

Values

{on}

Object is visible to instrfind.

off

Object is not visible from the command line (except by instrfindall).

Examples

The following statement creates a serial port object with its ObjectVisibility property set to off:

s = serial('COM1','ObjectVisibility','off');
instrfind
ans =
     []

However, because the hidden object is in the workspace (s), you can access it.

get(s,'ObjectVisibility')
ans =
	off

See Also

Functions

instrfind, instrfindall

Was this topic helpful?