User`s guide

2 MATLAB 6.1 Release Notes
2-16
Serial I/O
MATLAB’s serial port interface provides direct access to peripheral devices
such as modems, printers, and scientific instruments that you connect to your
computer’s serial port. This interface is established through a serial port object,
which you create with the
serial function.
Freeing the Serial Port on Windows Platforms. The serial port object uses the
javax.comm package to communicate with the serial port. However, due to a
memory leak in
javax.comm, the serial port object is not released from memory.
You can use the
freeserial function to release the MATLAB hold on the serial
port.
freeserial is necessary only on Windows platforms. You should use
freeserial only if you need to connect to the serial port from another
application after a serial port object has been connected to that port, and you
do not want to exit MATLAB.
Events, Callbacks, and Function Handles. Action properties and action functions are
now referred to as callback properties and callback functions. This new
terminology is reflected in new names for the associated properties and
functions. The general rule for the name changes is to change “Action” to “Fcn”
for properties, and “action” to “callback” for functions. For example,
TimerAction has been renamed TimerFcn, and instraction has been renamed
instrcallback.
Additionally, if you want to automatically pass the object and event
information to the callback function, then you must specify the function as
either a function handle or as a cell array. Note that you can also specify the
callback function as a string. In this case, the callback is evaluated in the
MATLAB workspace and no requirements are made on the function’s input
arguments.
Enhancements to Existing Properties.
Terminator Property – You can configure Terminator to a decimal value
ranging from 0 to 127, to the equivalent ASCII character, to
CR/LF or LF/CR,
or to empty ('').
Timer events – Some timer events may not be processed if your system is
significantly slowed or if the
TimerPeriod value is too small. The minimum
TimerPeriod value is now 0.01 second.