Download Software Environment Programmer`s Manual

Transcript
Section 4 Configuration and Operation
4.3
Creating the Protocol Configuration File (config.txt)
The s7_mgt protocol configuration utility performs initialization of the protocol
software modules. It reads the protocol configuration data from a text file, called
config.txt, and provides a quick and flexible method of configuring the protocol
modules without the need to write software for that purpose.
Alternatively, the protocol stack may be configured by sending the individual
configuration messages documented in the per-module Programmer’s Manuals for each
protocol module. This approach can be of particular use when the application needs to
make dynamic changes to protocol configuration without stopping the application
program.
The command line syntax for s7_mgt is detailed in section 7.5. By default s7_mgt runs
with module_id=0xcf and uses the filename “config.txt” for the Protocol Configuration
File. Typically s7_mgt is started up from within system.txt using a FORK_PROCESS
command. On completion of the single shot configuration sequence, s7_mgt will issue
a notification message which can be used by an application as the indication that
configuration is complete. The following example extract from system.txt starts
s7_mgt so that it uses the default configuration file, and module_id and sends a
notification to module_id 0xef:
FORK_PROCESS s7_mgt –i0xef
To assist diagnosis of issues, s7_mgt can be run using the -d option that generates
additional diagnostic output.
The user should generate the config.txt file by reference to section 8 of this manual
which details the syntax of all protocol configuration commands. In some cases it will
also be necessary to refer to the Programmer’s Manual for the specific protocols.
An example config.txt file is supplied as part of the DSI Development Package and this
is repeated in section 9.2 of this manual. The example file shows typical usage of most
commands although many of the commands are commented out by the use of ‘*’ as
the first character on the line.
50