Sample Program 6 "Multichannels - Siemens SIMATIC FM 351 Manual

Positioning module
Hide thumbs Also See for SIMATIC FM 351:
Table of Contents

Advertisement

Samples
12.12

Sample Program 6 "MultiChannels"

Aim:
This example contains the same user program as sample program 4
"OneChannel", however, it controls 2 channels of the module. The same copy of
the user program is used for both channels. Naturally, each channel has its own
set of data blocks.
Requirements:
You have set parameters for channel 1 as described in "Getting Started". Copy
channel 1 to channel 2 with Edit > Copy Channel.
Where necessary, adapt the parameters for channel 2. Save the hardware
configuration and download it to the CPU.
The address of your module is entered correctly in the channel DB in the
parameter MOD_ADDR and the channel number in the parameter CH_NO.
The address of your module is correctly entered in the diagnostic DB in the
MOD_ADDR parameter.
The supplied channel DBs already contain the DB number (30 or 31) of the
corresponding parameter DB for the machine data in the PARADBNO parameter.
The data blocks PARADB_1 and PARADB_2 each containing machine data for 1
channel of your system.
In the hardware configuration, enable the diagnostic interrupt for this module with
Edit > Object Properties > Basic Parameters > Select Interrupt > Diagnostics.
Compile the hardware configuration and download it to the CPU.
A variable table is prepared for each channel.
Startup:
In the startup OB (OB100), you set the startup ID (step 0) for the user program in
both instance DBs (USER_DB_1, USER_DB_2).
Operation:
The CPU is in the STOP mode. Open USER_VAT_1 and USER_VAT_2 and
transfer their control values.
Start the CPU (STOP > RUN-P). You can see how the actual positions of both
channels change.
Error Evaluation:
As in Sample Program 5 "DiagnosticAndInterrupt", but separately for each channel.
12-16
FM 351 Positioning Module
C79000-G7076-C351-02

Advertisement

Table of Contents
loading

Table of Contents