Installing PLECS Blockset

Note: If you are using MATLAB R2013b, see this solution regarding a bug in MATLAB, which may cause it to freeze after you install PLECS Blockset.

Microsoft Windows

  1. If you already have a license file *.lic for PLECS, copy it to your harddisk.
  2. Run the installer executable by double-clicking it. PLECS can be installed for the current user or for all users of a computer. To install PLECS for all users, the installer must be executed with administrator privileges.
  3. After the installer has finished, it will automatically start the PLECS Blockset Installation Wizard.
  4. On the License File page you can choose to browse the the license file on your harddisk, install a license for the PLECS Viewer or proceed without a license file (e.g. if you are going to request a trial or student license).
  5. Review the MATLAB Search Path page and click Continue.
  6. Start MATLAB and enter plecslib or choose the entry PLECS in the Simulink Library Browser to open the PLECS Library.

    See a video on how to install PLECS Blockset on a Windows operating system here.

 

Mac OS X

  1. If you already have a license file *.lic for PLECS, copy it to your harddisk.
  2. Expand the package file plecs-blockset-x-y-z_maci.tar.gz or plecs-blockset-x-y-z_maci64.tar.gz by double-clicking it and move the extracted folder plecs to a location of your choice.
  3. Run the application PLECS.app inside the folder plecs by double-clicking it. This will start the PLECS Blockset Installation Wizard.
  4. On the License File page you can choose to browse the the license file on your harddisk, install a license for the PLECS Viewer or proceed without a license file (e.g. if you are going to request a trial or student license).
  5. Review the MATLAB Search Path page and click Continue.
  6. Start MATLAB and enter plecslib or choose the entry PLECS in the Simulink Library Browser to open the PLECS Library.

    See a video on how to install PLECS Blockset on a Mac operating system here.

 

Linux

  1. If you already have a license file *.lic for PLECS, copy it to your harddisk.
  2. Open a terminal and expand the package file plecs-x-y-z_linux64.tar.gz by entering the command
    tar -xvf plecs-x-y-z_linux64.tar.gz
    in a directory of your choice.
  3. Still within the terminal execute the program PLECS.setup inside the folder plecs/bin/glnxa64. This will start the PLECS Blockset Installation Wizard.
  4. On the License File page you can choose to browse the the license file on your harddisk, install a license for the PLECS Viewer or proceed without a license file (e.g. if you are going to request a trial or student license).
  5. Review the MATLAB Search Path page and click Continue.
  6. Start MATLAB and enter plecslib or choose the entry PLECS in the Simulink Library Browser to open the PLECS Library.

 

Licensing

If PLECS cannot locate a valid license when it is loaded by MATLAB, it will open the PLECS License Manager, which shows the exact problem.

Choose Install license file... if you have a received a license file *.lic that you want to install or if you want to install the PLECS Viewer license that is bundled with PLECS.

Choose Request trial license... to request a time-limited trial or student license.

Without a valid license you will still be able to open or save Simulink models containing PLECS circuits. However, you cannot modify a circuit or run a simulation.

Note — PLECS scans the license file only once when the module is loaded by MATLAB. Therefore, if you reinstall the license file, you need to clear the PLECS module before the changes can become effective. You can do this by entering plecsclear at the MATLAB command prompt.

 

License File Location

Both PLECS Standalone and PLECS Blockset search for license files named *.lic in the following directories:

Platform Search Paths
Windows C:\Users\<USER>\AppData\Local\Plexim\PLECS\licenses
C:\ProgramData\Plexim\PLECS\licenses
Mac OS X ~/Library/Application Support/Plexim/PLECS/licenses
/Library/Application Support/Plexim/PLECS/licenses
Linux ~/.local/share/Plexim/PLECS/licenses
/usr/local/share/Plexim/PLECS/licenses

The PLECS License Manager will install license files in the first directory listed for each platform because this location is usually writable by the user. However, an administrator may choose to install license files to be used for all users in the other directory.

If none of the search directories contains any license file *.lic, PLECS uses the environment variables PLEXIM_LICENSE_FILE and LM_LICENSE_FILE to locate the license file.

 

Configuring the MATLAB Search Path

The recommended method to register PLECS Blockset with MATLAB is to add appropriate addpath commands to the startup file startup.m in your MATLAB startup folder. For information on the startup.m file, enter doc startup in MATLAB. The PLECS Blockset Installation Wizard will assist you in creating or updating this file.

Using this method has the advantage that if you update MATLAB after having installed PLECS, the new MATLAB version will automatically know about PLECS. The disadvantage is that each user must setup their startup file individually.

As an alternative method you can register PLECS with a specific MATLAB installation using the MATLAB Path Browser or by directly editing the file pathdef.m in the directory matlabroot/toolbox/local/. This method may be appropriate if PLECS will be used by multiple users sharing the same computer. You need to add the PLECS directory and its subdirectory demos to the MATLAB search path.

 

Installing Different PLECS Versions in Parallel

If you want to keep different versions of PLECS installed in parallel on one computer, you must ensure that only one version is on your MATLAB path at any time during a MATLAB session. Otherwise, loss of data may occur. Before changing the MATLAB path, be sure to clear the currently loaded PLECS module by entering plecsclear at the MATLAB command prompt. As an additional precaution you should restart MATLAB after the change.

 

Uninstalling PLECS Blockset

To uninstall PLECS from your computer, follow the procedure below.

  1. Locate the directory where PLECS is installed by entering
    which plecs

    in the MATLAB command line.

  2. Remove the PLECS directory and its subdirectory demos from the search path. Depending on how the directories were added to the path during installation, this is done using the Path Browser or by editing the file pathdef.m in the directory matlabroot/toolbox/local/ or your MATLAB startup file startup.m.
  3. Quit MATLAB.
  4. On Windows, deinstall PLECS by choosing the appropriate entry in the Windows control panel. On Mac OS X and Linux just delete the PLECS installation directory.