User libraries – Yaskawa MP2000iec Series User Manual

Page 13

Advertising
background image

MP2000iec Series QRG Rev 3.3

User Libraries

Overview

Create a Library

Step Description

Detail

1

Rename the project and save in the Libraries
folder (Optional, Best Practice)

File -> Save As.File -> Save Project As / Zip Project As…
Navigate to Libraries folder
Edit the file name to reflect the intended usage as a user library and revision control.
For example, "TrainingLibrary_V001"

2

Delete unnecessary POUs and datatypes
(Optional, Best Practice)

In project tree leave one LD program POU with an instance of each user FU/FB.
Leave one ST program POU with data initialization.
Leave 1-2 tasks to run both programs (for compile). I/O assigned to unused tasks must
be reassigned.

3

Prefix all POUs and Datatypes (Optional, Best
Practice)

Example Prefix: "YTTS_". Typical to leave LD programs YTTS_Palette and YTTS_Init
running in YTTS_Tsk, using YTTS_CustomDatatypes.

4 MAKE the library project

Click "MAKE" and resolve all errors.
A project that has only been renamed requires a new "MAKE"

5

Save the library project as ZIP (Optional, Best
Practice)

File -> Save Project As / Zip Project As...
Navigate to the Libraries folder (for organization purposes)
Choose ZIP as the file type
Best Practice: Do NOT change the name when zipping. Change the name in Step1 and
re-MAKE first.
Under "Zip Options" check boxes for "User Libraries" and "Front-end Code".
Click the Zip button.
Single portable library file with revision name is produced

Use a Library

Step Description

Detail

1 Acquire a ZWE (Express) or ZWT (Pro) file

Use your own, or download from Yaskawa.com Product Page
Follow links to save the file
In Windows Explorer, copy the file to C:\Documents and Settings\All
Users\Documents\MotionWorks IEC xxx\Libraries (For oranization purposes)

2 Unzip the library project to the library directory

In MotionWorks IEC... File-> Open Project / Unzip Project
Click "Yes" to unzip to the Library directory (File was copied here in previous step) or
click "No" if opening directly from CD or Download folder
"Skip All" to Extracting Firmware Libraries dialog
"Yes to All" to Overwrite Page Layout

3 Check for Dependent Libraries

Project Tree -> Project Tab, Expand Libraries folder
Take note of any User Libraries, indicated by the "blue book" icon. Or special Firmware
libraries such as "Ymotion", indicated by the "red book" icon

4 Start new / open existing project

File -> New, or File -> Open

5 Insert the Library and any dependent libraries

In Project Tree, "Project" tab, R-Click "Libraries" -> Insert -> User Libraries
Navigate to find the Library (if you unzipped it to the "libraries" folder, you will see it
right away)
Also insert any dependent libraries noted in Step 3

6 Delete duplicate project data types

In Project Tree, "Project" tab, expand "Data Types" folder for both the user library and
the project library.
Delete any duplicates of "PLCTaskInfoTypes" or "MotionBlockTypes" from the project
library.
R-click -> delete (or open, delete text)
These data types are already defined within the imported library. Repeating the
definition here causes compile errors since the same data types would be defined two
times, even though the definitions are identical.

7 Use FB from new group in edit wizard

Click on programming worksheet whitespace.
Open Edit Wizard and the group dropdown list will have the library name.
User Library blocks appear as Blue by default
Help for Yaskawa "Application Code Toolbox" user libraries is available on the website,
but is not integrated with the Right-Click menu as it is for the pink colored Firmware
Library function blocks.

User Libraries are just normal project files imported into another project file as a library.
"Application Code Toolboxes" from Yaskawa are simply User Libraries created at Yaskawa

* If you wish to use a Yaskawa "Application Code Toolbox" user library in a project along with your own custom library project, you must insert
the Yaskawa library directly in your custom library project. You may NOT insert both libraries individually into a new project.
A project with two libraries that both have the same datatype definitions will not compile, and so both libraries must be combined into a single
library.
Specifically, your library project will have the MotionBlockTypes and PLCTaskInfoTypes defined, which are also defined in a Yaskawa library,
such as PLCopenPlus Toolbox or Cam Toolbox. Insert one library into another and delete the duplicate datatypes for a successful MAKE.

Page 13 of 15

Advertising