Consists of 3 parts Find Child EMs, Map Coordinator CP to Child CP and Sequencing.
Find Child EMs
Coordinator child EMs may not be specified in the configuration so depending on various parameters this logic will search for the most applicable child EMs. Child EMs are found based on EM Class, Type, Source and Destination. An EM that matches all of these will be chosen.
Map Control Parameters
Coordinator parameters may be mapped to its child parameters. Mapping attributes determine if the mapping is one-way, bi-directional or others. On startup all parameters must be mapped before the coordinator will start the child EM. There are 2 sets of tags to record when parameters have been successfully mapped.
em.Run.ChildEM.ParamVer.Bit[n] where n is the child EM ordinal.
em.Run.p.VerifyFail – indicates the verify failed for 1 or more child EMs
The coordinator firmware uses the em.Run.Seq.Step and .Stage tags to manage the sequencing logic. Custom Coordinator logic should examine the .Stage tag to interact with this firmware.
Use the em.Run.Seq.StepCplt to advance to the next stage. This tag must be continuously reset to prevent the firmware from automatically advancing when it meets the requirements.
Custom logic is scanned just before the sequencing logic so the custom logic can affect the sequencing logic behavior.
|Step 0-2||Initializes tags for sequence|
|Step 3||Acquire EMs (I think)|
|Step 4||Stage 1||Determine which Child EMs Apply now (Return next list of parallel EMs)
em.Run.ChildEM.CoordStart & .CoordEnd point to this set of child EMs.
|Step 5||StepCplt1||Stage 2||Command Child EMs to Acquire if configured for Auto Start|
|Stage 3||Start Child EMs if configured for Auto Start.
|Stage 4||All Child EMs Started|
|Find Next Batch of Child EMs (Return to Step 5 or advance to Step 10 if done)|
1Coordinator will set the step complete when it has no more work to do on that step/stage. Custom logic should continuously reset this tag until it also has completed all the work for that stage.
2Coordinator will set em.Run.ChildEM.Acquired & .Started when all applicable child EMs configured to auto start are acquired or started. Custom logic must set these tags if not configured to auto start.
3Prestate logic will set em.Run.ChildEM.Ended when all child EMs are Idle or Ended.
4Custom logic can set the em.Run.Complete at any time to complete the Coordinator.
Hold coordinator if em.C.Cfg.CoordHold is true or em.Run.ChildEM.AnyHeld
Stage 1 – Find Child EMs that apply now
Step 2 – Clear CoordStart, CoordEnd
Stage 1 – Determine list of Parallel Child EMs
X Check if CoordStart >= Child Count – If so then set it to 1 less
ptrStart = EM.Ptr + CoordStart(0) = EM.Ptr
I = CoordStart + 1 (1)
If CoordStart child is Parallel then
Ptr = Ptr + 1
If Next Child is Parallel then
I = I + 1 (2)
CoordEnd = I – 1 (CoordStart)
Should Parameters begin mapping now and only for the CoordStart/End children?
Currently, it maps to all acquired by coordinator even if they aren’t yet being used.
This could be a problem if all children aren’t marked as required. (which technically the 1st EM isn’t in case of Estron)
Stage 2 – Acquire applicable list
If Child is configured to Auto Start and CP have been verified then…
Stage 3 – Start applicable list
Stage 4 – All Started
Stage 5 – All Ended – Reset EMs
Should test for Child EMs Ended be limited to the applicable children?
What if an EM was marked as not required and was ran the entire time the others sequenced. That would mess this up.
I don’t think they apply so answer is yes.
Stage 1 = Find
Stage 2 = Acquire
Stage 3 = Start
Stage 4 = Wait for End
Stage 5 = Reset
Stage 6 = Restart
Should EM Sequence Steps be cleared between running/held states?