
Configuration Examples
6-22
SIMATIC 505 PROFIBUS-FMS CP User Manual
Example of a Send-Receive Job (continued)
After
you successfully load the configuration files to both programmable
logic controller stations, you must add RLL coding to the RLL programs of
both programmable logic controllers to activate the transfer of data. Refer to
Figure 6-16 for an example of RLL code to activate the Send request and to
Figure 6-17 for an example of RLL code to activate the Receive request.
The Relay Ladder Logic example in Figure 6-16 demonstrates a typical
scenario for enabling a Send request. This section assumes that you are
familiar with Series 505 programmable logic controller language. The WX
and WY locations used in this RLL example correspond to module I/O
addresses that have been configured in programmable logic controller
memory using the Configure I/O function in TISOFT
.
The logic shown in Figure 6-16 performs as described in T
able 6-1:
T
able 6-1
Description of Send Logic
C98 Enables condition logic, defined by the application (Xn), which
must remain active until job completion.
MOVW1 Sets status word V300 to a positive value (1) prior to each
transaction. This positive value is used for job completion check in
CMP1.
BITP3/BITP4 Ensures that no pending jobs exist prior to starting a Send job.
(defined for Bit 1 of FMS CP module, located at I/O address WY5).
BITC3 Clears the FMS CP job defined for Bit 3 of the FMS CP module
located at WY5 after the Job Active bit WX1 is set.
BITS2 Sets the Start Bit defined for Bit 3 of the FMS CP module located
at WY5 to invoke a data transfer function.
CMP1 Tests the completion status of the data transfer by the same FMS
CP, placed in V300, against a zero constant stored at location V15.
When the Send job has completed, the value of status word V300
is zero—good transaction—or a non-zero value—bad transaction
(see T
able B-1 and T
able B-4). You must take appropriate action
in the USER ERROR CONTROL LOGIC ladder rung at this time.
If the job is to be executed only one time, you must take action to
disable Xn after the Status word changes value from its preset
condition.
C41/C43 The parallel net of C41 and C43 act together to start and hold
TMR2 on until either the FMS CP recognizes that the Job Start
bit WY5.3 has been set and responds by setting the Job Active bit
WX1.3 or else TMR2 time expires.
TMR2
BITC4
TMR2 and BITC4 are used to clear an unrecognized Job Start bit
WY5.3. Either a reset of the FMS CP or a power cycle of the
entire base may cause the programmable logic controller ladder to
set a WY Job Start bit prior to FMS CP recovery. When this
condition occurs, the FMS CP module does not execute the job
(see note on page 4-5).
Example
RLL Code
for Send Job at
Station 1
Komentarze do niniejszej Instrukcji