[foxboro] IND block execution was: Setting Application Objects f rom IND blocks
- From: "Johnson, Alex (Foxboro)" <ajohnson@xxxxxxxxxxx>
- To: foxboro@xxxxxxxxxxxxx
- Date: Thu, 18 Nov 2004 11:59:41 -0500
Update to what I wrote before. More stuff for my book!!! :)
Regards,
Alex Johnson
Invensys Process Systems
Invensys Systems, Inc.
10707 Haddington
Houston, TX 77043
713.722.2859 (voice)
713.722.2700 (switchboard)
713.932.0222 (fax)
ajohnson@xxxxxxxxxxx
While on the topic of IND block execution:
1) It runs all code to completion when the block is Auto and Active.
2) The BPCSTM parameter will limit the number of statements per block
period.
3) A WAIT or WAITUNTIL will suspend the block's execution. It will check
the wait every BPC until it is time to move on. So a WAIT is not
completely free.
4) External references like yours (:A:O.A := 2) will suspend the block's
execution.
5) Internal references won't suspend the block's execution, but they are
slow compared to other lines of code.
6) If the code terminates its execution, the block will go INACTIVE.
7) If the code loops without wait statements, the block will execute until
the BPCSTM is reached and consume large percentages of the CP's CPU time.
On point 2, it is common to run sequence blocks at the BPC to simplify
scheduling and I suspect the writers of the code assumed that type of
scheduling when the created the name BPCSTM.
On point 4, there are several important things to understand:
a) Ten external references in a block with a 0.5 block period will
require 5 seconds to complete.
b) Only one outstanding external reference is processed at a time.
Additional references are queued. Thus, a bad reference can slow
external references in other blocks. Consider the following example
of a CP with two blocks in it each running at the BPC. In this
case, the block processing would be something line:
1) BPC1
a) IND1
i) Makes an external reference to a missing point
ii) The request is queued for processing
iii) The block suspends.
b) IND2
i) Make an external reference
ii) The request is queued
iii) The block suspends
2) BPC2
a) IND1
i) Wakes up
ii) Checks for value
iii) Value not available
iv) Suspends
b) IND2
i) Wakes up
ii) Checks for value
iii) Value not available
iv) Suspends
and so on and so on until the first request clears.
On points 6 and 7, the gist of the matter is that one should have all paths
lead to a WAIT and follow the wait with a GOTO <<START>> or something
similar if you want the block to stay active and not run amok while doing
so.
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
Other related posts:
- » [foxboro] IND block execution was: Setting Application Objects f rom IND blocks