Showing is type of defect as a percentage of the total quantity of defects - as opposed to the total production - dramatizes the impact of the largest causes of defects.
The RC01 array are the reject or defect counts by cause, the description of each cause is in the message area.
TOTAL_REJ is the sum of all the rejects
I1-I6 are copied to PI1-PI6 and AR1-AR6 are copied to PAR1-PAR6 so that LINE can run independently from PARETO
AR1 and MPAR1 are 6-register arrays calcualted as follows
This TASK sorts the array starting at RC01 of length NC
RC01, RC02, etc. contain the number of rejects in categories 1,2, etc.
The order is recorded in the array starting at I1
After the task is run, I1 contains the index of the largest element,
I2 the second largest, etc.