14

Sorting with Loops

In automation, it is often necessary to have to figure out the range of certain characteristics of the part your machine produces. For example, it is quite common to need to know how heavy the heaviest part was or how short the shortest part was. Sorting characteristics of parts is often required in many manufacturing environments to ensure proper quality. Typically, to effectively perform the necessary statistics calculations, it is helpful to have all the data sorted.

Sorting is a vital concept in computer science. Sorting can be a very costly operation in terms of memory, CPU power, and most importantly, time. As logic dictates, the more data you have to sort through, the more time and resources you will need at your ...

Get PLCs for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.