Phase hold and restart - doubts on P_FIRST_PASS

Hi, 

For DeltaV Phase using PCSD template, in the start of RUN_LOGIC, it will check for the P_FIRST_PASS and P_TASK_PTR. In my testing, the logic was hold at P_TASK_PTR =3 and P_FIRST_PASS = TRUE.

If The logic was restarted, logic will go through the START step and bypass previous steps and back to steps related to P_TASK_PTR=3. This is absolutely correct.

We are testing what happens if we hold and restart the phase by changing P_FIRST_PASS = FALSE and keeping P_TASK_PTR=3, we discovered that the logic does not go back to the START step and the logic just get re-activated at the step where it stops. Why is this the case?

Shouldn't the logic start from the top of RUN_LOGIC and check the P_FIRST_PASS and P_TASK_PTR?

Thanks,

  • There is logic in Restart that sets the RESTART_TYPE phase parameter based on P_FIRST_PASS (False=Continue, True=From Start).

    The reason this is done this way is because if you were in First Pass and had reset a totalizer but the phase goes to HOLD before setting P_FIRST_PASS to True, you probably do not want to reset this totalizer again in case it has recorded some value when returning from HOLD and continue what you were doing in First Pass. The same exists if your phase was completing and did some things in Task99 and just before the phase termination is evaluated to go to Complete, the phase goes to HOLD. You may not want to re-execute Task99 entirely so if the First Pass Flag is cleared after these things have been completed, the logic will just return to the end of Task99 without re-executing all of it.

    The run logic is written so if someone changed/removed the logic in Restart to always have the RESTART_TYPE as From Start, it would work as you currently expected it to work.

    I would recommend leaving this default configuration as it is as it was configured this way because of issues that people had experienced in the past with things getting re-executed that they didn't want in First Pass and/or Task99 (Complete charges again as an example!) but if you are trying to do something then maybe you can post what issue you are trying to solve and we can suggestion methods to get that accomplished.