Adjusting MAST Task Properties
Original instructions
Introduction
After reviewing the MAST task execution modes, this topic describes adjusting the MAST task period and execution time measurement procedures.
WARNING
UNEXPECTED EQUIPMENT BEHAVIOR
Design your application in such a way that your process is not impacted by a cycle time variation that might appear after a firmware upgrade.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
Review of MAST Task Execution Modes
The MAST task can be configured to use one of two execution modes:
Execution Time Measurement
The execution time of the MAST task can be measured by reading system words:
In both cyclic and periodic mode, the MAST execution time is the sum of T1 + T2 + T3 + T4.
T5 of the periodic mode is not taken into account.
First Step of Execution Time Measurement
To measure the execution time of the MAST task in a Quantum Hot Standby configuration, it is advised to measure first the execution time in standalone mode (or with one of the two PLC in STOP) with the MAST task configured in cyclic mode. In this case, there is no data exchange between the two PLCs, and the execution time of the Hot Standby Copro part (T2) is reduced to its minimum.
The execution time of the last MAST cycle = %SW30 = T1 + T2 + T3 + T4.
Second Step of Execution Time Measurement
In a second step, the execution time has to be measured with a Primary and Standby PLC.
Two cases have to be taken into account:
  1. The data transfer has no impact on the Primary MAST task duration:
    In this case, the execution time of the Hot Standby part (T2’) is increased with the time required to copy the data base from the CPU memory to the Hot Standby Copro shared memory.
    The execution time of the last MAST cycle = %SW30 = T1 + T2’ + T3 + T4 with T2’ = T2 + time to copy the data base from the CPU memory to the Copro shared memory.
    There is no need for a Wait state to be added to the Primary MAST task because the User Logic “covers” the Copro data transfers.
  2. The data transfer has an impact on the Primary MAST task duration:
    In this case, the time to copy to the Copro shared memory, increases T2" compared to T2.
    Also, because of the increased data, the data transfer between the Primary and Standby Copros requires a Wait state in the Primary MAST task.
    The execution time of the last MAST cycle = %SW30 = T1 + T2’’ + T3 + T4 + Wait state where T2’’ = T2 + time to copy the data base from the CPU memory to the Copro + time to transmit all the data on the network and free the Copro shared memory.
Third Step of Execution Time Measurement
In the periodic mode, it appears that the execution time that is measured is lower than in the cyclic mode. In certain cases, the difference between the two execution modes can be large.
Procedure to Adjust MAST Task in Periodic Mode
If the MAST task has to be configured in the periodic mode, it is recommended to:
Step
Action
1
Measure the maximum value (%SW31) of the MAST task in cyclic mode with the Quantum Hot Standby Primary and Standby PLCs) running normally.
This measure has to be done in the Primary PLC with all the configured tasks active (only the MAST task is recommended in a Quantum Hot Standby application).
2
Configure the periodic mode with a period at least equal to %SW31 plus a margin of around 20%, that is, Period = %SW31 + (%SW31 * 20%).