PulsePal()

Description

Initializes Pulse Pal and creates a global object representing the Pulse Pal device in the base workspace.

  • The function automatically searches all available serial ports and finds Pulse Pal if one is connected.

  • It then creates a PulsePalSystem object with the following fields:

      • GUIHandles (used only when GUI is launched)

      • Graphics (used only when GUI is launched)

      • CurrentProgram (contains a copy of the current program on the Pulse Pal device, including all device parameters)

      • FirmwareVersion (current firmware version - used to restrict functions unsupported by older hardware versions)

      • CycleDuration (the period of Pulse Pal's update cycle, in microseconds. This defines the minimum pulse feature duration.)

      • PulsePalPath (The path to the Pulse Pal MATLAB client)

      • SerialPort (Pulse Pal's MATLAB serial port object)

    • If successful, a confirmation will be printed to the MATLAB command window. For example, "Pulse Pal connected on port COM3".

Syntax

PulsePal(SerialPort)

Parameters

    • SerialPort: The optional serial port string (i.e. 'COM3' for PC, '/dev/ttySXXX' for Unix). If no string is specified, an auto-detect algorithm will find the correct port.

Returns

None

Example

PulsePal;