Installing 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. If you need to start the wizard manually at a later time, you will find a shortcut in the "PLECS Blockset" folder in the Windows Start menu.
  4. On the License File page you can choose to keep an existing license file, copy a new license file from your harddisk or 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. Open the downloaded disk image by double-clicking it and copy the folder PLECS Blockset (x.y) to the Application folder or to another location of your choice.
  3. Run the application PLECS.app inside the folder PLECS Blockset (x.y) by double-clicking it. This will start the PLECS Blockset Installation Wizard.
  4. On the License File page you can choose to keep an existing license file, copy a new license file from your harddisk or 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 keep an existing license file, copy a new license file from your harddisk or 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 and Demo Mode

If PLECS cannot locate any license file when you start it, it will show a message that it is unlicensed.

Choose Start in demo mode to use PLECS in a restricted demo mode that lets you build models and run simulations. Saving models or data is disabled in this mode.

Choose Open license manager... to open the License Manager, which lets you install a license file or request a time-limited trial or student license.

If PLECS does locate license files but they do not contain a valid license (e.g. because it has expired) it will immediately open the License Manager without the option to start the demo mode.

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

Note that the Windows Explorer and Mac Finder may hide some or all of these folders by default.

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.