
ADC_AutomationControls_PM01 (AutomationDirect) asked a question.
Ever have that bit of code that you absolutely nailed, and wish there was an easy way to use it again and again? There is! Use the Task Library to easily save and reuse tasks across all your projects!
What is the Task Library?
The Task Library is a special folder in your Task Management panel that holds tasks you want to save for later. Like the standard Tasks section, the Task Library appears as a folder in the tree. Subfolders within (in the image above, Default and Structure Conversions, for example) are saved as separate library groups. Each group can contain subfolders for further organization. Tasks in the library contain all required tag and UDS definitions for the task, simplifying use.
How to create a library entry
Library tasks start like any other task. Once you have completed a task, drag it to a folder (or create a new one) in the Task Library tree. This will take a snapshot of your code and add it to the Task Library for later use. This snapshot includes any tags or user-defined structures required for that code to run.
How to use a Task Library entry
Importing a task from the library is as easy as dragging and dropping the task into your program. When you do that, a dialog will open, showing a list of tags that are included in the library. If any conflicts exist, they can be resolved here.
One situation worth considering is when multiple instances of a library task are needed in your program. The Productivity Task Library function handles this with ease: Simply drag another instance of the library task into your program and rename any desired tags in the import dialog. A new task will be created, with all the relevant tag names already changed to match what you’ve chosen.
Task Library Options
Just like the main program, the Task Library can be customized with folders and with task comments. This can be helpful when organizing and sharing code. A good example of this is the IO-Link drop-in code library (available here). Every task includes a brief description, a version code, and if necessary, tips for integration. Task Folders group tasks by device manufacturer, making it easy to find a task you may need.
Sharing (and saving) Task Libraries
By default, your Task Library files are saved in C:\ Users\[Your User Name]\Documents\AutomationDirect\Productivity Suite. Library files have a .adtkl extension. Importing and exporting Task Library Groups is easily accomplished in the programming software with a right-click. Right-click over an existing Task Library Group and select Export Group to save the selected library to another folder. Right-click on the main “Task Library” folder and select Import Group to bring an outside file into your Task Library.
Summary
Whether it’s backing up code, using drop-in code from AutomationDirect, or quickly deploying tried-and-true tasks that you’ve already written, the Task Library takes the frustration out of code re-use, saving you valuable time in the process. Feel free to spend a little more time cleaning up that ladder, because you can easily use it over and over again!
Productivity PROtips: Task Library