Table 12. Rules for code block read and write operation to a control module
Keyword
Rules for read/write operations to Control Module parameters from
a
external code block
IN The parameter is written to and read from.
OUT The parameter is only read.
IN(OUT) The parameter is both read and written, but mostly written.
OUT(IN) The parameter is both read and written, but mostly read.
NODE Only connected. Read and write operation are done by other control
m
odule.
EDIT Only written to, and only first scan
value will affect the control module.
Control Module Types Section 6 Program Code Issues
92 3BSE042835-600
The code in the control module type should not be divided in code blocks for any
other reasons than taking advantage of the code sorting. Unnecessary code blocks
will cost extra execution time, especially in SIL-applications, and might danger the
code sorting.
A compiler switch exists to rule the code sorting loop detection. Code sorting loops
may hazard the object functionality at code modification elsewhere. It is
recommended to avoid and remove all kind of sorting loops before any download to
a controller takes place. It is also recommended to keep the compiler switch as
'Error' to avoid unforeseen errors.
The operation allowed on a parameter is governed by the type description keyword
(see also Type Description Keyword on page 32). All parameters can be connected
to the code block in question, but the rules for reading and writing is given in
Table 12.
Some special purpose parameters do not obey the above rules.
• InteractionPar is used for operator interaction, and is allo
wed to be both read
and write.
• I/O parameters of data types BoolIO, RealIO, DIntIO or DwordIO should only
be connected.
• Connection parameters for co
mmunication between control modules, should
only be connected.