![[MAT logo]](../../../images/MAT-linux-h100.gif)
[PLC] section of the config is used to configure
parameters related to the core which have to be the same in all the
modules. Some other core-related parameters are module specific, and must
be specified under those modules' sections - see the Common configuration chapter.
module
and point tables. They are central to the functioning of the
MatPLC.
module
module table defines which modules should be
started by the matplc program
when it's told to start up the MatPLC. See the modules chapter for explanation of
modules.
syntax: module <name> <file> [<options>
...]
where:
name file options point
point table defines the named points in the plc.
See the points chapter for
explanation of points.
syntax:point <name> <full name> <owner> [at
<offset>[.<bit>]] [[i|u|f]<length>] [init
<init_val>]
where:
name full name owner at <offset> or
<offset>.<bit> specification follows.
Usually, this will be omitted and the MatPLC will allocate a slot for
the point automatically.
offset bit offset is specified, but not
bit, bit defaults to 0. Note that a point
must not overflow onto the next offset position (i.e.
bit + length) <= 32).
i | u | f i | Signed integer, that is, whole numbers both negative and positive. |
u | Unsigned integer, that is, whole numbers from zero up (no negative numbers). |
f | Floating point; this really only makes
sense with 32-bit points, otherwise known as f32.
Floating point numbers use the standard IEEE representation.
|
The type specification is optional. There is no default; if the type is not specified, it is treated as unknown.
At the moment this is only used by the MatPLC code to figure out
how to interpret the initial value of the point when parsing the
init parameter. If the type is unknown, autodetection is
attempted (as described below).
length at <offset> is used, and at
<offset>.<bit> is used.init init_val i | u | f specification;
if the i | u | f is omitted, the initial value will be
interpreted as follows: 1.1) or an
exponent (e.g. 1e9), it will be taken as a a 32 bit
float (f32);
length-bit signed integer
(i);
length-bit unsigned integer (u).
point_alias table defines aliases to the named
points. It is optional - in many applications, there will be no need
for aliases.
As far as the rest of the MatPLC is concerned, a point alias is exactly the same as a point. Aliases can be used for two purposes:
syntax:
point_alias <name> <full name> <orig_pt>
[<bit> [<length>]]
where:
name full name orig_pt bit length bit + length <= (length of
orig_pt point). The length is optional; if
bit is specified but length is not, the
alias will refer to that single bit (that is, length=1).
If neither is specified, the alias refers to the whole original
point.
magic_bit_aliases
foo, it will create aliases foo.0,
foo.1 and so on up to the length of the point.
This setting can also appear in the section of a particular module, creating the bit aliases only for that module.
max_modules
If this parameter is not specified, a default value (currently 20) is used. Valid values are non-negative
integers. The allowable maximum depends on
the operating system currently being used and the number of places in
the synchronisation Petri Net (see the synch
chapter). For example, on a typical linux the total of
max_modules plus number of places may be 250 maximum.
confmap_key
If this parameter is not specified either way, the default value (currenty = 23) is used. Valid values are positive integers or 0. If 0 is specified, then a random key is chosen.
confsem_key
If no value is specified, then the default is used (currently 0). Valid values are positive integers or 0. If 0 is specified, then a random key is chosen.
confmap_size
If this value is left unspecified, the default value (currently 8*1024) is used.
globalmap_key
If no value is specified, then the default is used (currently 0). Valid values are positive integers or 0. If 0 is specified, then a random key is chosen.
globalsem_key
If no value is specified, then the default is used (currently 0). Valid values are positive integers or 0. If 0 is specified, then a random key is chosen.
globalmap_size
If this value is left unspecified, the default value (currently 8*1024) is used.
synchsem_key
If no value is specified, then the default is used (currently 0). Valid values are positive integers or 0. If 0 is specified, then a random key is chosen.
[PLC] # we need some points: point P1 "full name 1" module1 # 1-bit point point P2 "full name 2" module1 5 # 5-bit point point P3 "full name 3" module2 32 # 32-bit point [PLC] # We also need some module to execute: module module1 /matplc/logic/... module module2 /matplc/logic/... [module1] # Here go the module-specific configurations for module1 [module2] # Here go the module-specific configurations for module2
$Date: 2006/05/23 09:47:13 $