Phase parameter. Difference in behavior between normal phase end and if phase is unload

Hi Guys,

How do behave phase parameter if a phase normal end. I guess the values and even the memory get destroyed because a non running phase show all phase parameter as undefined/unresolved.

Is this so correct or will the phase parameter hold the last value after normal phase end somewhere and destroy the variables only if the phase is unloaded?

Discussion comes up if phase parameter should reset to a default at phase end.

Thank You and Best Regards,

Michael

  • Tricky discussion....but "typically" you don't have to reset the parameters. If the phase unloads then the parameters will be as the initial phase configuration when it loads again but if the phase doesn't unload then your parameters will remain as they currently were left at. This situation occurs if you run a phase back to back in an operation so if you never have recipes do this...then you don't have to worry about resetting parameters. If you do run phases back to back from an operation then you may have to do "something". If a transition below a phase becomes true in an operation and the next phase is exactly the same phase, the phase doesn't run stop, reset and reload, it actually just sets a parameter DOWNLOAD_REQ and continues doing what it was doing. It is up to the phase configuration to watch this parameter, get the new parameters by setting REQUEST code 1000 and starting the Run logic over. This IS NOT automatic and has to be programmed! This was done for recipe execution speed to not have to unload and reload the phase but does put some design and configuration on the engineer.

    If you are running Unit Procedures back to back that ultimately have the same phase in it...the phase will unload, this DOWNLOAD_REQ is only when the same phase is back to back within an operation. If you do reset parameters you have to be careful because we have seen people do this in the phase and if the phase goes to hold just before being complete...the phase logic was actually re-executed because of the parameter and the logic within the phase on restart. So long story short, I suggest you don't reset the parameters unless the DOWNLOAD_REQ is true and then get the new recipe parameters, reset any default phase parameters, start the run logic all over again and clear the DOWNLOAD_REQ parameter is the only time you should reset the phase parameters.
  • In reply to Matt Stoner:

    Thank You Matt,
    one time more an excellent detailed explanation
  • It is important to distinguish between PHASE who runs into controller, and PHASE STEP who it is executed into Batch Executive.
    When a PHASE it is unloaded it is deallocated from memory so all its parameters disappear.
    PHASE STEP does not disappear and all it's parameters stay until the BATCH it is removed from batch executive.

    As far as BATCH configuration/design relies on deltav BATCH layer rather than controller layer (Phases, Equipment modules, Control Modules) for BATCH execution related data, what happens with PHASE parameters should not be an issue. Using DEFER/REFER to exchange parameter values between RECIPE steps becomes very useful in this context.
    Continuance feature, explained by Matt into his response, does also facilitate BATCH data exchange management in some scenarios.

    When some data needs to be sent out of the BATCH, in example BATCH ID from one BATCH needs to be propagated into other BATCH, I believe that UNIT parameters it is the best option because:
    - No code it is configured into UNIT so download for a modification it is easier.
    - UNIT does support restoring parameter values after restart or download.