
Configuration Examples
6-24
SIMATIC 505 PROFIBUS-FMS CP User Manual
Example of a Send-Receive Job (continued)
The
Relay Ladder Logic example in Figure 6-17 demonstrates a typical
scenario for enabling a Receive acknowledgement. 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.
The logic shown in Figure 6-17 performs as described in T
able 6-2:
T
able 6-2
Description of Receive Logic
C49 Enables condition logic, defined by the application (Xn), which
must remain active until job completion.
MOVW1 Sets status word V302 to a positive value (1) prior to each
transaction. This positive value is used for job completion check in
CMP1.
BITP1/BITP2 Ensures that no pending jobs exist prior to starting a Receive job
defined for Bit 3 of FMS CP module, located at I/O address WY7.
BITC1 Clears the job defined for Bit 3 of the FMS CP module located at
WY7 after the Job Active bit WX3 is set.
BITS1 Sets the Job Start Bit defined for Bit 3 of the FMS CP module
located at WY7 to invoke a data transfer function.
CMP1 Tests the completion status of the data transfer by the same FMS
CP module, placed in V302, against a zero constant stored at
location V25. When the Peer job has completed, the value of
status word V302 is zero—good transaction—or a non-zero
value—the corresponding SEND job has not executed or some
other error has occurred (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 take must take action to disable Xn after the Status word
changes value from its preset condition.
C31/C33 The parallel net of C31 and C33 act together to start and hold
TMR1 on until either the FMS CP recognizes that the Job Start
bit WY7.3 has been set and responds by setting the Job Active bit
WX3.3 or else TMR1 time expires.
TMR1
BITC2
TMR1 and BITC2 are used to clear an unrecognized Job Start bit
WY7.3. Either a reset of the 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 the note
on page 4-5).
Example
RLL Code
for Receive Job at
Station 5
Komentarze do niniejszej Instrukcji