Skip to main content

Kollmorgen Support Network

KAS Project File Clean-up | 12 May 2015 | |

KAS Project File Clean-up

If the KAS project file size is unexpectedly too large, it is likely that there are some legacy or possibly corrupt HMI project files included in the project.

To clean-up unnecessary and/or corrupt files, do the following:

  1. Close the IDE.
  2. Copy the .kas project file to a backup file.  Just in case you accidently delete a needed file.
  3. Open the .kas project file with 7-Zip.  For example, right click on the project file, select 7-Zip->Open Archive
    1. At the top level, if there are 2 folders named Controller, one of them will have a space at the end. Delete this one.
    2. Navigate to the HMI\KVB 2 directory.  Check the sub-directories and underlying files.  Delete any sub-directory that is not part of your KAS project.
  4. Remove the Kollmorgen Project folder for your user account:  %LOCALAPPDATA%\Kollmorgen\KAS\Project
    • This step is necessary to prevent new projects from inheriting all files and folders in the Project folder.
    • The following procedure will remove the entire Project folder. Note that the "Controller " folder (with a space at the end) cannot be removed by Windows Explorer.
    1. Open a Command Prompt window.
    2. Enter the following command.
    • rmdir %LOCALAPPDATA%\Kollmorgen\KAS\Project /s /q
  5. Open the .kas project file with the IDE.
  6. Re-compile to confirm there are no missing files and save the project file.

For example, the following 12MByte project only has one HMI device:

projectTree.PNG

And the .kas project file has 5x HMI projects:

projectFile.PNG

Notice the file names have strange characters.  The IDE was unable to automatically clean-up these files:

filenames.PNG

Deleting the legacy and/or corrupt HMI files, leaves behind the single HMI project directory used by the KAS project:

cleanedProjectFiles.PNG

The resulting cleaned-up KAS project file was reduced from 12 Mbytes to 260 kbyte.

And likewise, deleting the %LOCALAPPDATA%\Kollmorgen\KAS\Project will prevent the files from being included in future projects:

BEFORE:

ENTER COMMAND:

AFTER:

 

Comments

Submitted by mahendra.kane on Wed, 10/07/2015 - 03:16

I have seen that despite deleting the unwanted files from KAS project, the size is still big enough if the project contains integrated KVB2 project.
One way to reduce size of integrated KVB2 project is to compress it (using KVB software).
The process is as follows-
1. Open the KVB project from KAS project's left hand side menu (Project Explorer).
2. Go to Menu Project-Compress Project. Select path where the compressed project is saved.
3. After compressing the project, it creates a ZIP file on your PC.
4. Close KVB software. Go back to KAS project & delete the KVB project from Project Explorer.
5. Right click on Controller in KAS Project Explorer & import the compressed KVB project.

With this procedure & the procedure mentioned in above KDN article, I was able to reduce size of a KAS project from 25.8Mb to 1.77 Mb.
Don't forget to save a copy of the original project (before you try this) in worst case this backfires !! :)
 

About this Article

MoCon