Specifications
© Systeme Lauer GmbH & Co KG • Kelterstr.59 • 72669 Unterensingen • Tel. (07022) 96 60-0 • Fax (07022) 96 60-103
D-7
D Buep 19e-Direct driver
D1.2 Synchronous communication
The access to the data in the PLC must be synchronized if you want to
make use of the entire functional extent of the PCS. I.e. the PLC and the
PCS access data alternately. Therefore, a synchronization word is
transmitted to the PLC. OB1 examines this word and releases the access
of the PLC application program in the „test“ program. The synchronization
word in PCS_KOMM is changed and the PCS accesses the data area if
the application program has terminated the processing of the data words.
While the PCS processes the data, the application program may not
access to the data. This Ping-Pong game implements the possibility to
perform a timeout monitoring both in PCS_KOMM as well as in the PCS.
The timer is newly started whenever the PCS reads the inverted
synchronization word. A timeout is present if the time of the timer expires.
Implementing the alternating access allows for mixing of actual and preset
values, using of bit variables, and realizing delete behavior 2 etc. Therefore,
the entire intelligence of the PCS is at your disposal. The disadvantage is
the decreasing reaction speed between PCS and programmable controller.
Furthermore, access admission must be determined everywhere in the
PLC program before accessing data.
The timeout time, i.e. the time which passes from the last writing to DW3
up to the timeout message in the PLC should be set to a minimum of 4
seconds. The timeout time in the PCS is set via the „AA“ or
COM_TIMEOUT driver variable.
GENERAL PROCEDURE
To implement a synchronous communication between the PCS and the
programmable controller:
• select the“SYNCHRONIZATION“ setting on the PCS
• load the PCS_SYNCS handling software in the PLC
This handling software is described in the following. Of course you can
also implement these tasks differently in your software. It is only important
to adhere to the following procedure:
1. The data area used by the PCS and the programmable controller
must be defined in the programmable controller. The parameters are
to be passed on to the PCS via the AL and AM driver variables. The
programmable controller word words have initialization values and
should be correctly pre-assigned.
2. The PCS sends the order number (byte-by-byte incremented by 1
every time) in word 3, e.g: „01“. Thus, word 2 is different from word 3.
This signals the programmable controller that the data area can be
processed.
3. After terminating the processing of the data area, the inverted sync
word is copied from word 3 to word 2 and word 3, e.g. using the „FE“
data. This is the signal for the PCS to access to the data area. From
now on, the programmable controller program is not allowed to per-
form any changes in the data area anymore! Furthermore, a timeout
timer can be newly started (if one is used).
From now on, steps 2 and 3 are cyclically performed. On a timeout,
the communication loss sequence (in the example COFF) is executed
once. The procedure is resumed at step 2 with order number“ 01".