Automating a Task? Start Here.


Automating tasks can improve quality and reduce the time required to complete projects, but certain considerations need to be taken to make sure time is not wasted.

Assigning humans to complete these aspects of a project can waste time and create errors as the worker becomes fatigued and inefficient. Developing custom tools to automate tasks can reduce errors and save time. Consider these aspects when thinking about automating a task.

What are you working with, and what tools are available?

Perhaps the largest consideration when designing an automated tool is what applications and files will it need to be able to interact with. For simple text or data manipulation the built in libraries of many programming languages may be able to accomplish the task.

When working with specialty software or file types, the developer will have to determine what application program interfaces (APIs) are available. Certain software packages may have built in tools or scripting languages such as VBA may aid in automating the task. For some programs, an automated process may be able to be developed using the built in functions of the software alone.

Who will be using the finished tool?

Project teams are made up of people with varying backgrounds and different levels of technical experience. If a tool is being built for personal use or a small group of engineers, code to validate input and handle errors may not be necessary; certain values may even be hard coded if the team can access the source code.

Building tools for a large user base or for teams that are not technically adept will require extra work to be user friendly. Many users may not be comfortable using the command line or shell, so a custom interface will need to be developed; this may take longer than writing the code in some cases. Documentation may also need to be provided to ensure team members use the software correctly.

What language to use

Once the tasks that the program needs to perform are determined, the programming language can be selected. Scripting languages like python make it easy to write code quickly, have large libraries, and can be run on multiple operating systems, but are usually slower to run and it may not be easy to build a user interface.

C# or VB can allow the programmer to make more complex interfaces and have better APIs available for certain programs, such as Microsoft Office, but they usually require more time to write the code and may require special development environments. The user machine also needs to be taken into consideration, as certain languages need to have a runtime environment installed that does not come standard on the operating system.

Is it worth the development time?

After all the design considerations are taken into account, the developer or engineer needs to determine if they will actually save time by automating the task. If a project task is only seldom done, then there may be no benefit to automating it.

Calculating the time saved vs. development time is useful because it may not always be apparent how much time someone is really spending on a task. The reusability of the code also needs to be taken into account. Slight alterations in the code or repurposing of major components of the program may make it useful for tasks besides the one being automated currently. The time saved from other tools created with the same code should be taken into account.

This post was written by John Gist. John is an engineering I at MAVERICK Technologies, a leading automation solutions provider offering industrial automation, strategic manufacturing, and enterprise integration services for the process industries. Maverick delivers expertise and consulting in a wide variety of areas including industrial automation controls, distributed control systems, manufacturing execution systems, operational strategy, business process optimization, and more.