0% found this document useful (0 votes)
140 views38 pages

S5 RK512 Protocol

The document provides instructions for installing and using a special driver S5R006 for data transmission. It allows parameter assignment and describes creating a CP user program, transferring the interpreter and procedure to the program, and initializing the driver after startup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views38 pages

S5 RK512 Protocol

The document provides instructions for installing and using a special driver S5R006 for data transmission. It allows parameter assignment and describes creating a CP user program, transferring the interpreter and procedure to the program, and initializing the driver after startup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

S I M A T I C S5

OPERATING I N S T R U C T I O N S

f o r Special D r i v e r S 5 R 0 0 6

D a t a L i n k (RK512)
-----------------
w i t h P a r a m e t e r Assignment Facility

w i t h 3964 / 3 9 6 4 R Protocol

without Reaction Message

O p e r a t i n g System: SS-DOS B a s i s
- -

Ordsr No: 6 E S 5 897-2AB21-02

.................................................................
D,ca Link without Reaction Message TA-Nr: G330-833152
Introduction

The special driver S5R006 is a data link with


parameter assignment facility for communications
processors in SIMATIC S5 U-Series controllers. It
is based on standard data link RK512 without
reaction message and the S5 Procedure 3964/3964~.
CP525-2 and CP524 can be used as communication
processors.

$g~]@jk./..[.
I suI ,U il-

-
I EPFiOM
Memory Module

Device Interface Devic e Interface I

Floppy 0isk
Special .
Driver
2. I n s t a l l a t i o n of S p e c i a l Driver on PG685
.......................................
The l i b r a r y "C0M~1~R6.525" i s l o c a t e d on t h e
s u p p l i e d 5.25" mini floppy d i s k which c o n t a i n s
the special d r i v e r " ~ 5 ~ 0 0 6 "c o n s i s t i n g of
i n t e r p r e t e r and procedure.
I-S5ROOS ----- > i n t e r p r e t e r
P-S5R006 ----- > procedure

The i n s t a l l a t i o n of t h e d r i v e r i s c a r r i e d o u t on
a programming u n i t PG685, preceded by the
i n s t a l l a t i o n of t h e STEP5 base package a s w e l l a s
COM525 programming s o f t w a r e .

S t a r t i n g from Drive B: user level 0 t h e l i b r a r y


"C0M~1B~6.525" i s copied on t o t h e winchester
d r i v e u s e r l e v e l 0 a s follows: -
PIP B:=A:COMLIBR6.525[Rl

Option R = copy check

To e n s u r e t h e u s e of t h e s p e c i a l d r i v e r on a l l
user levels, it i s recommended t o c o n v e r t t h e
l i b r a r y i n t o a w r i t e p r o t e c t e d system f i l e by
e n t e r i n g t h e f o l l o w i n g command:

SET COMLIBR6.525[SYS R O ] .

CP User Programs

Programs f o r CP525-2 and CP524 can only be


created and processed u s i n g COM525 (S5-DOS
Version).

The CP525 module w i t h p a r t number 6ES5 525 3UAll


( C P / M V e r s i o n ) cannot be programmed u s i n g t h e S5-
DOS-COM525; programs which were c r e a t e d u s i n g
COM525 ( ~ ~ 1 ~v e8r s6i o n ) cannot be processed by
S5-DOS-COM525.

A conversion of t h e p r e v i o u s programs is not


possible.
3. C r e a t i o n of CP U s e r Program

Af t e r the copying procedure the Simatic


programming p a c k a g e s must be c a l l e d by e n t e r i n g

followed by placing the cursor into the


"CO~525..." l i n e and s e l e c t i o n of t h e COM525
programming s o f t w a r e by u s i n g f u n c t i o n key F1
PACKAGE^^.
The COM525 b a s i c mask a p p e a r s on t h e s c r e e n . By
u s i n g F1 "SELECT PROGRAM" t h e next s t e p i s
t o b r a n c h i n t o t h e "PROGRAM SELECTION" mask.
A f t e r s p e c i f y i n g h a r d d i s k "B" as t h e d r i v e and
i n p u t t i n g t h e program name e n t e r component "RK"
which s t a n d s f o r Data Link.

3.1 Copy P r o c e d u r e from L i b r a r y t o U s e r Program

I n o r d e r t o copy from t h e l i b r a r y t o t h e u s e r
program, c a l l t h e "TRANSFER"f u n c t i o n by u s i n g
F1 -F2-F5.

The "TRANSFER" mask must be f i l l e d i n a s f o l l o w s :


S o u r c e i s d r i v e "B" as w e l l a s t h e l i b r a r y name
"COMLIBRG"
The user
. program chosen i n the "PROGRAM
SELECTION" mask i s a u t o m a t i c a l l y e n t e r e d a s t h e
destination.

3.1 .l T r a n s f e r of I n t e r p r e t e r

U s e f u n c t i o n key F3 i n o r d e r t o o b t a i n t h e
INTERPRETER t r a n s f e r mask f o l l o w e d by F7 which
superimposes t h e i n t e r p r e t e r t o be t r a n s f e r r e d
" I - S 5 ~ 0 0 6 " (component "RK" ) i n t o t h i s mask.

F u n c t i o n key F1 s t a r t s t h e t r a n s f e r ; t h e t r a n s f e r
end i s i n d i c a t e d by t h e f o l l o w i n g message:
"MELD.002t1: Completed!.

F8 "EXIT" l e a d s t o t h e r e t u r n i n t o t h e "TRANSFER"
mask.
3.1.2 Transfer of Procedure

Use function key F4 to obtain the PROCEDURE


transfer mask.
HELP function F7 superimposes the procedure "P-
S5~006" to be transferred, F1 initiates the
transfer.
After successful completion of the transfer,
return to the "SELECTION" mask by pressing F8
"EXIT" twice,

3.2 Parameter Assignment of Procedure

Starting from the "SELECTION" mask, branch into


the "PARAMETER ASSIGNMENT OF PROCEDURE" mask by
pressing F6-F2.
The "PARAMETER ASS1GNMENT OF PROCEDURE" mask
displays the procedure name "P-S5R006" relating
to the chosen program as well as the version
number.
The input fields "character length", 11parity"
etc. can be freely assigned corresponding to the
relevant system configuration.
The input field "PRIORITY" can be specified as
"HIGHER" or "LOWER" and determines the priority
in the event of an initialization conflict.
Use function key F6 to store the information.
L'.
3.3 P a r a m e t e r Assignment of J o b Block
.................................
The c r e a t i o n of j o b b l o c k s i s r e q u i r e d o n l y i n
t h e e v e n t of p a r a m e t e r a s s i g n m e n t of t h e d a t a
l i n k "with header" (see P a r a g r a p h 7.1 - 5 ) .
T h i s d a t a l i n k w i t h o u t r e a c t i o n message a l l o w s
o n l y "SEND" as t h e j o b t y p e . "FETCH" j o b s are
completed w i t h e r r o r .

A d e t a i l e d d e s c r i p t i o n on p a r a m e t e r assignment of
t h e j o b b l o c k can be found i n

COM Manual Volume 1


Register 7
P a r a g r a p h 2.2.
Loading of S p e c i a l Driver i n t o CP
-- . - - - -

The l o a d i n g procedure of t h e s p e c i a l d r i v e r
S5R006 i s i d e n t i c a l t o t h e procedure used f o r
Data Link RK512.

The t r a n s f e r of t h e u s e r program i n t o t h e CP
and/or t h e programming of an EPROM module i s
described i n d e t a i l i n

COM525 Manual Volume 2


Register 2
Paragraph 3.2.2.
Transmission Procedure
- -

Fransnission is asynchronous, half duplex


and i s c a r r i e d o u t e i t h e r v i a an RS232 ( = V 2 4 ) o r
TTY i n t e r f a c e .
C o n t r o l s i g n a l s of the V24 interface a r e not
evaluated.

The l e n g t h of t h e d a t a r e c o r d s which are


t r a n s m i t t e d and r e c e i v e d , must not exceed 51 2
Byte. Data exchange from and t o t h e C e n t r a l
C o n t r o l l e r i s word by word providing t h e t r a n s f e r
i s c a r r i e d o u t v i a a d a t a block. I f t h e end of
t h e r e c e p t i o n does n o t correspond with t h e end of
a word, t h e l e f t o v e r b y t e i s f i l l e d w i t h OOH.

The procedure i s based on t h e 3964(R) p r o t o c o l .


The code of t h e i n d i v i d u a l c o n t r o l c h a r a c t e r s can
be parameterized.

A d e t a i l e d d e s c r i p t i o n on t h e transmission
p r o c o t o l 3964R can be found i n

COM525 Manual Volume 1


Register 7
Paragraph 5.
Initial Start of Special Driver

After power failure, warm or cold re-start of the


central controller, the CP waits for the
"SYNCHRON" handling function which initializes
the interface between CPU and CP. This means
that the "SYNCHRON" handling function must be
called in the relevant organization block.
During the waiting time the interface specific
LED blinks three times in 500 ms intervals.
After initializing the CPU-CP interface, the
interface specific LED blinks twice; the next
step is initializing the special driver before it
returns to normal operation. This is carried out
by triggering the special job "INIT" (see
application example).
The special driver must also be initialized again
using the "INIT" special job after a cold re-
start of the CP is carried out with a PG685 (see
application example: FB12).
Parameter Assignment of the Data Link
. - -- -
with Special Job "IWIT"

--TA"SSND-DIREKT" job with h-Nr - 189 is


interpreted by the CP as the special job "INIT".
With this "SEND" job it is possible to
parameterize the type of data link, the times,
the acknowledgement characters as well as the
type of BCC creation.
The "QTYP" parameter ( = type of data source) must
be defaulted with "DB".
Defaulting the "QLAE" ( = length) parameter is
irrelevant, because the special driver reads out
always a quantity of ten data words from the
specified source data area.
As mentioned before, it is essential to activate
the special job "INIT" after power failure, warm
or cold re-start of the CP.
It is also possible to trigger "INIT" during a
running operation. In such an event the
initialization of the procedure is not carried
out until reception is completed. It is important
to note that messages may not be recognized or
acknowledged incorrectly if the control
characters are being changed.
After recognizing the special job "INIT" the
special driver switches on the interface specific
LED. If no errors are recognized during
evaluation of the transferred Init Data Block,
the CP switches off the LED and returns to normal
operation.
If the special driver recognizes an error during
evaluation of the transferred parameters, the
Init job is completed with error, and the driver
waits for a new "INIT" job; also, the interface
specific LED blinks four times.
The job number 1 8 9 is reserved for initialization
and cannot be used for anything else. It is not
required to program a job block for it.
Structure of Initialization Data Block
---- .- -- -- -

char. delay time in msec


ack. delay time in msec
ack. char. for establishing the connection
I QVAPOS 1 QVANEG I ack. char. for connection clearance
+
] STARTZ I ENDKEN I start char./~o. of end char.
end character
+--------+-------- +
I BCC 1 QUIT I type of BCC / ack, Int, Procedure
+-------m+-------- +
I KOPF I CPU-NR I withlwithout message header / CPU Addr. *)
+--------+----W--- +
1 DB-NR I DW-LOW 1 receive data block * )
.-----W--
+-----.---I +
I BYTE I BIT I co-ordination flag * )
I--------+-------- +
*l only relevant when parameterizing "without
message header"

Parameter Assignment of Times


- - - -- - -------------
The character delay time "ZVZ" monitors the
arrival of characters on reception. It can be
parameterized in intervals of milliseconds. The
smallest value it can be set to, is 4 msec.
The acknowledgement delay time "QvZ" specifies
the time which elapses whilst waiting for an
acknowledgement character, It can also be
parameterized in intervals of milliseconds. If a
smaller value than 256 msec is entered in the
initialization DB, the job is rejected with
error,
8. . ,
': .
7.1 , 3 Parameter Assignment of Acknowledgement C h a r a c t e r s
----------------------------------------------.---..-.-

The Hex-code f o r t h e p o s i t i v e acknowledgzaent FE


entered i n t o t h e "QUIPOS" field, It is
t r a n s m i t t e d a s t h e reponse t o a s t a r t c h a r a c t e r
p r o v i d i n g t h e r e was no e r r o r .

The "QUINEG" f i e l d c o n t a i n s t h e code f o r t h e


n e g a t i v e acknowledgement which i s t r a n s m i t t e d a s
t h e reponse t o a s t a r t c h a r a c t e r i n t h e event of
an e r r o r ,

The Hex-code f o r t h e p o s i t i v e acknowledgement i s


entered into t h e "QVAPOS" f i e l d . It is
transmitted a s t h e reponse t o a message,
p r o v i d i n g t h e r e was no e r r o r .

The "QVANEG" f i e l d c o n t a i n s t h e code f o r t h e


n e g a t i v e acknowledgement which i s t r a n s m i t t e d a s
t h e reponse t o a message i n t h e e v e n t of an
error.

The code of t h e s t a r t c h a r a c t e r i s l o c a t e d i n t h e
"STARTZ" f i e l d . It i s t r a n s m i t t e d i n order t o
e s t a b l i s h t h e connection.

The number of end c h a r a c t e r s i s parameterized i n


t h e "ENDKEN" f i e l d , I f "1 " i s e n t e r e d , only one
end c h a r a c t e r i s used. In t h i s instance, only
"ENDZ~" i s evaluated, The v a l u e "2" results in
two end c h a r a c t e r s being used,
I f t h e t r a n s m i s s i o n i s c a r r i e d o u t w i t h only one
end character, t h e procedure i s n o t code
t r a n s p a r e n t !!

The f i r s t end c h a r a c t e r "ENDZI " i s used f o r code


conversion, I f it a p p e a r s i n a d a t a r e c o r d , it
i s d u p l i c a t e d by t h e procedure, I f t h e f i r s t end
character i s received twice, it r e s u l t s i n t h e
c h a r a c t e r b e i n g e n t e r e d only once i n t h e r e c e i v e
d a t a block.

The "ENDZ2" f i e l d c o n t a i n s t h e second end


character. The end c h a r a c t e r ( s ) a r e o u t p u t a f t e r
the useful data.
Parameter Assignment of BCC-Creation
The "BCC" field indicates whether transmission
should be carried out with (type of creation) or
without Block Check Character. If a "0" is
entered into this field, operation is without
BCC. Selecting from values 1 to 4 determines the
modus of BCC creation, the modus corresponding to
the selected number.
Modus 1 :
--------
Addition of all characters (without considering
the overflow) inclusive of end sequence.
Example: 30H, 31H, 32H, 33H, 34H, IOH, 03H, ODH
I
+- BCC Check
Modus 2:
Tvo' complement of the sum of all characters
(without considering the overflow) inclusive of
end sequence. Segmenting of the calculated
checksum into HIGH - Nibble ( = Bit 4...7) and LOW
- Nibble ( = Bit 0...3) and conversion into ASCII
characters (ORing with 30H). When transferring
the BCC check it is important to note that the
HIGH - Nibble is transferred first followed by
the LOW - Nibble.
Example: 30H, 31H, 32H, 33H, IOH, 03H, 3FH, 33H
1 I
I
+------
+- BCC-LOW
BCC-HIGH
Modus 3:
--------
ex-or logic operation of all characters inclusive
of end sequence on even parity ( = presetting the
BCC character with OOH).
Example: 30H, 31H, 32H, 33H, 34H, IOH, 03H, 27H
l
+- BCC Check
Modus 4:
--------
ex-or logic operation of all characters inclusive
of end sequence on uneven parity ( = presetting
the BCC character with FFH).
Example: 30H, 31H, 32H, 33H, 34H, IOH, 03H, D8H
I
+- BCC Check
7.1.5 Parameter Assignment of Type of Data Link
It is possible to determine in the "QUIT" field
whether the acknowledgement on reception is to be
on the procedure or on the interpreter level. If
"0" is entered, the received message is not
acknowledged until it has been entered into the
receive data block without error. If the message
cannot be completely transferred to the central
controller within the acknowledgement delay time,
a negative acknowledgement is sent and
transmission to the central controller is aborted
( = interpreter level).
If "1" is entered into this field, the
acknowledgement is issued on the procedure level,
This means that a positive acknowledgement is
sent immediately upon reception of the end
character (and possibly BCC), providing no error
has occurred during character reception.
If a co-ordination flag is used, the
acknowledgement is always issued after entry of
the data in the central controller.
The Standard Procedure operates with
acknowledgement on procedure level,
If "0" has been entered into the "KOPF" field ( =
header field), operation is without message
header. The destination of the receive messages
and a possible co-ordination flag is determined
in the subsequent 5 bytes of the initialization
data block,
The value "1 " in the "KOPF" field means that
operatiron is with S5 message header. In output
direction the message header is generated by
means of the job block relating to the Send
Direkt, and it is output prior to the useful
data, In receive direction it specifies the data
destination.
If the data link has been parameterized to
operate with header, the next 5 byte of the
initialization DB are irrelevant.
7.1.6 Parameter Assignment of the Receive Data Block
The address of the processor (in the event of
multi processor operation) into which the receive
messages are to be entered, is defined in the
"CPU-No." field (area 1 - 4). If "00" is enterd,
"to all CPU's" is assumed.
The "DB-NR" field contains the number of the
receive data block for messages from the link
partner. This value must be greater than 2.
The field "Dw-LOW" specifies from which data word
in the parameterized receive data block the
received messages are to be entered. The address
for the DW HIGH is always set to zero.
The last two fields "BYTE" and "BIT" specify the
co-ordination flag, which can be used to disable
the input into the parameterized receive data
block.
If operation is to be without co-ordination flag,
the value "0" must be entered into the "BYTE" and
"BIT" fields.
! ! Attention ! !
The flag 0.0 cannot be used as the co-ordination
flas, because this is the identifier for "without
co-ordination flag" .
7.2 Example of a Message

STARTZ -------- > start character


< - - - - - - - - QUIPOS pos. acknowledgement
* KOPF ========> * header
1. ZEICSE3T -------- > I st character

>
n. ZEICHEN - - - - - - - - ? nth character
* ENDZI > * end character 1
E N D Z ~------v-> end character 2
*
* BCC < - - - - - - - - GVAPOS / QVANEG
>

ack. char. for connection clearance


Parameters marked with * are output depending on
parameter assignment.
Assignment of Condition Code Word of
Handling Block "SEND-DIREKT"
--F -

Each job number of a "SEND" job defined in t h e


CPU processor is allocated an individual
condition code word (parameter ANZW).
Using this condition code word it is possible to
monitor processing of a job by the CPU
processor and the CP.
Structure of the Condition Code Word

Reserved Error Data Job


Number Management Status
of Job Display
on CP

For the handling of bits 0-3, 4-7 and 12-1 5


please refer to the general description of the
condition code word.
If an S5 output message could not be processed
correctly, the reason for the error is displayed
in bits 8-11 of ANZW by means of an error
number.
The possible error messages are described on the
following pages.
E r r o r Numbers i n ANZW of "SEND-DIREKT"
......................................
Error
Number
B i t 8-11 Reason f o r E r r o r
--------- ........................................
--W------

1...5 parameter assignment e r r o r s recognized


by t h e CPU of t h e c e n t r a l c o n t r o l l e r
which a r e r e p o r t e d t o t h e CP

6 e r r o r s recognized by CP i n d a t a t r a f f i c
between CPU and CP

7 job cannot be processed, e r r o r i n job


parameters

E
F
II e r r o r i n d a t a t r a f f i c CP c - - >
BREAK
partner

For a d e t a i l e d d e s c r i p t i o n of t h e e r r o r numbers
please r e f e r t o

COM525 Manual Volume 1


Register 7
Paragraph 8.
E r r o r Numbers i n SYSTAT Area

The e r r o r message a r e a SYSTAT i s a d a t a a r e a i n


t h e d u a l p o r t RAM which may be read by t h e CPU by
means of t h e s p e c i a l j o b RECEIVE D I R E K T 200.

The e r r o r message a r e a of SYSTAT comprises t h r e e


e r r o r message b y t e s and one a d d i t i o n a l s t a t u s
b y t e f o r each i n t e r f a c e .

For a d e t a i l e d d e s c r i p t i o n p l e a s e r e f e r t o

COM525 Manual Volume 1


Register 7
Paragraph 7.

A l l e r r o r s recognized by t h e CP a r e e n t e r e d into
t h e e r r o r message a r e a of SYSTAT.
I f t h e e r r o r i n q u e s t i o n i s r e l a t e d t o a "SEND
DIREKT" job, an a d d i t i o n a l e r r o r number i s
e n t e r e d i n t o t h e c o n d i t i o n code word.

The f o l l o w i n g c h a p t e r s d e a l with s p e c i a l d r i v e r
s p e c i f i c SYSTAT e r r o r messages only.
The remaining e r r o r numbers a r e d e s c r i b e d i n t h e

COM525 Manual Volume 1


Register 7
Paragraph 8.
E r r o r Code i n ANZW and SYSTAT f o r Send E r r o r s
- -

ANZW I SYSTAT I Reason f o r Z r r o r


----- - - .. . - .. ..
6H l
f

60H I Fetch jobs a r e i l l s g a l


.-

7H I 25H I A send job with more t h a n 5 1 2 b y t e


h a s been t r i g g e r e d

9.2 E r r o r Code i n SYSTAT f o r Receive E r r o r s


.......................................
SYSTAT I Reason f o r E r r o r
. +- - - - - - L - - W " ---- --------

4BH l A message w i t h more than 5 1 2 b y t e


has been r e c e i v e d

60H
61 H
I A F e t c h job h a s been t r i g g e r e d by
the partner

A p p l i e s t o acknowledgement on
i n t e r p r e t e r level: a received
message could n o t be t r a n s f e r r e d
t o the central controller within
t h e acknowledgement d e l a y time
9.3 E r r o r Code i n ANZW and SYSTAT when P r o c e s s i n g t h e
-- - - - - - - - - P - - - - - - - - - - - - - - - -

S 2 s s i a l J o b "INIT"

ANZW 1 SYSTAT Reason f o r E r r o r


-- - -+-- - -- -- -
-*

1 80H
INIT-Send e x p e c t e d , b u t Send-
D i r e k t w i t h J o b No < > 189
recognized

J o b Type < > "SEND"

S o u r c e Data Type < > "DB"

Area d i s a b l e d by STEP5 program

Monitoring t i m e elapsed f o r
handshake on CP, o r
i l l e g a l r e p l y message from CPU
d u r i n g handshake

E r r o r d i s p l a y of CPU t o CP
which c a n n o t be i n t e r p r e t e d by CP

Source d a t a block does not e x i s t

Source d a t a block t o o s h o r t

Access t o s o u r c e d a t a a r e a n o t
possible

I n c o r r e c t c o n d i t i o n code word

SYNCHRON d u r i n g j o b p r o c e s s i n g
9.4 E r r o r C o d e i n ANZW and S Y S T A T w h e n E v a l u a t i n g t h e
- - -- .
S2scial Job "INIT"

ANZW I SYSTAT I R e a s o n for E r r o r


----..+--------+---------------------------------
7 8BH V a l u e f o r "BCC" > 4
7 8CH A m o u n t of end i d e n t i f i e r n o t 1 o r 2

7 8DH Acknowledgement D e l a y Time < 256ms

7 8EH C h a r a c t e r D e l a y T i m e < 4ms

7 8FH P a r a m e t e r "DB-NR" smaller 3

7 90H P a r a m e t e r "CPU-NR" greater 4

7 1 91H I P a r a m e t e r "KOPF" o r "QUIT" not 0

7 1 92H I P a r a m e t e r "BIT" > 7


10 Handling F u n c t i o n s i n C e n t r a l C o n t r o l l e r
-- - -

10.1 Hand1 i n g F u n c t i o n "SYNCSXQ??~

The "SYNCHRON" h a n d l i n g block s y n c h r o n i z e s t h e


i n t e r f a c e between CPU and CP f o r a cold s t a r t
(OB20), a manual r e - s t a r t (OB21) o r an a u t o m a t i c
r e - s t a r t a f t e r power f a i l u r e ( O B 2 2 ) .

"SYNCHRON"must be c a l l e d f o r each i n t e r f a c e of
t h e CP i n t h e i n i t i a l s t a r t o r g a n i z a t i o n b l o c k s
of t h e CPU,

During s y n c h r o n i z a t i o n t h e maximum block s i z e f o r


d a t a t r a n s f e r between CPU abd CP i s s e l e c t e d .

Parameter BLGR: KYx,y

Range of Values: X = 0
y = l : block size 16 byte
y = 2 : block size 32 byte
y = 3 : block size 64 byte
y = 4 : block size 128 byte
y = 5 : block size 256 byte
y = 6 : block size 256 byte
y = 7 t o 254 :
block s i z e 256 b y t e
y = 255 : b l o c k s i z e 256 b y t e

10.2 Handling F u n c t i o n "SEND DIREKT"

"SEND DIREKT" with a Job Number 1.. - 2 2 3


(exception: s p e c i a l jobs) i n i t i a t e s data output
t o t h e l i n k partner,

A f t e r c a l l i n g a "SEND DIREKT" j o b , it i s entered


i n t o t h e CP i n t e r n a l queue which may r e c e i v e up
t o t e n "SEND DIREKT" j o b s .
T h i s means t h a t up t o t e n d i f f e r e n t send j o b s
may r u n "simultaneously".

If t h e r e a r e a l r e a d y t e n j o b s queueing, each
f u r t h e r j o b i s r e j e c t e d w i t h "completed with
error".
10.3 Handling Function "SEND - ALL"
--
When a "SEND DIREKT" job i s t r i g g e r e d , t h e "S3!?D
ALL" j o b ( = parameter job number = 0 ) c a r r i e s o u t
d a t a exchange between CPU and CP.

A f t e r r e c o g n i z i g a "SEND-DIREKT" job, t h e CP
temporarily stores the source parameters
s p e c i f i e d on t h e h a n d l i n g block, and sends a
"SEND ALL" r e q u e s t t o t h e CPU.

"SEND ALL" t h e n t r a n s f e r s t h e r e q u e s t e d d a t a from


t h e CPU s o u r c e d a t a a r e a i n t o t h e d u a l p o r t RAM
of t h e CP; t h e s p e c i a l d r i v e r t h e n t a k e s o v e r
data output t o t h e partner.

For l a r g e r amounts of d a t a , s e v e r a l "SEND ALL"


c a l l s may be n e c e s s a r y , depending on t h e block
s i z e , t o t r a n s f e r t h e d a t a from t h e S5 s o u r c e
d a t a a r e a i n t o t h e d u a l p o r t RAM.

10.4 Hand1 i n g Function "RECEIVE-ALL"

I n o r d e r t o e n s u r e t h a t t h e r e c e i v e d messages a r e
e n t e r e d i n t o t h e d a t a block i n t h e c e n t r a l
controller, t h e h a n d l i n g block "RECEIVE" must be
c y c l i c a l l y c a l l e d i n t h e u s e r program.

I n t h i s i n s t a n c e t h e "job number" parameter must


be d e f a u l t e d w i t h "0" ( = RECEIVE ALL).

The parameters "ZTYP" , "DBNR" , "ZANF", "ZLAE" on


t h e h a n d l i n g block RECEIVE w i t h job number "0"
are irrelevant, because the destination
i n f o r m a t i o n i s p r e s e t by t h e s p e c i a l d r i v e r
and/or t h e message header of t h e received
message.

The e n t r y i n t o t h e d a t a block i s d i s p l a y e d t o t h e
S5 u s e r program by means of t h e c o n d i t i o n code
word of h a n d l i n g block "RECEIVE ALL".
When the handling block is running idle (no data
exists on CP) the higher ranking byte of the used
ANZW is "OOH", after entering the complete data
block an identifier is entered into the higher
ranking byte of the condition code word.
Providing operation is with co-ordination flag,
this identifier is the byte number of the co-
ordination flag. If operation is without header
and no co-ordination flag is used, this
identifier is "01 H".
For larger amounts of data several "RECEIVE ALL"
functions may be necessary, depending on the
block size, to transfer the data from the CP into
the S5 destination data area.
10-5 Special Functions

The description for the special jobs for


- reading of error message area SYSTAT
- deleting of error message area SYSTAT
- reading of entire SYSTAT
- reading of SYSID
- reading/writing of date and time
may be found in
COM525 Manual Volume 1
Register 7
Para. 7.
The pseudo READ/WRITE function (job numbers
190...199) has not been realized for the link
"without header", because dynamic presetting of
CPU source parameters can be realized by means of
indirect parameter assignment of "QTYP", "DBNR",
"QANF 'l and "QLAE",
10.6 Numbers o f H a n d l i n g B l o c k s
..........................
C e n t r a l P r o c e s s i n g U n i t

Function
I----- - ...---
SEND + FB244 FBI 20 F51 8Q
RECEIVE + FB245 FBI 21 FBI 81

FETCH FB246 FBI 22 FBI 82


RESET FB248 FBI 24 FBI 8 3

CONTROL
SYNCHRON 1:I FB247
FB249
FBI 23
FBI 25
FBI 84
FBI 85

SEN-A
REC-A 1: / FBI 26
FBI 27

1, When u s e d w i t h s p e c i a l d r i v e r " ~ 5 ~ 0 0 6 "t h e


h a n d l i n g b l o c k s marked w i t h l'+" must b e u s e d i n
the S5 program in the form previously
described!!!
CP Information
--------------
Additional information regarding CP525-2 / CP524
and COM525 (connector pin assignment, COM525
handling etc. ) may be found in the following
manuals: -
COM5 2 5
Programming Package for Communications Processors
CP524 and CP525 (S5-DOS)
Volumes 1 and 2.
User Program

The following pages illustrate an S5 user program


for the 135U controller with R-processor.

The S5 program is an example only, it is not to


be understood as a solution for customer specific
system configurations !!!
OB20 LENGTH = 1 6 ABS
PAGE l
SEGMENT 1
0000 :SPA FBI 2 5 SYNCHRONIZE INTERFACE
0 0 0 1 NAME :SYNCHRON
0 0 0 2 SSNR : KY 0,O
0 0 0 3 BLGR : KY 0 , 6 BLOCKING SIZE: 2 5 6 BYTE
0 0 0 4 PAFE : MB 1
0005 :UN M 1-0 ,
I F NO PAFE TRIGGER
0006 :S M 99.0 SPECIAL JOB "INIT"
0007 :BE

OB2 1 LENGTH = 1 1 ABS


PAGE 1
SEGMENT 1
0000 :SPA F B I 2 5 SYNCHRONIZE INTERFACE
0 0 0 1 NAME :SYNCHRON
0 0 0 2 SSNR : KY 0,O
0 0 0 3 BLGR : KY 0 , 6 BLOCKING S I Z E : 2 5 6 BYTE
0 0 0 4 PAFE : MB 2
0005 :UN M 2.0 I F NO PAFE, TRIGGER
0006 :S M 99.0 SPECIAL JOB 1 1 ~ ~ ~ ~ ' 1

0007 :BE

OB22 LENGTH = 1 1 ABS


PAGE 1
SEGMENT 1
0000 :SPA F B I 2 5 SYNCHRONIZE INTERFACE
0 0 0 1 NAME :SYNCHRON
0 0 0 2 SSNR : KY 0,O
0 0 0 3 BLGR : KY 0 , 6 BLOCKING S I Z E : 2 5 6 BYTE
0 0 0 4 PAFE : MB 3
0005 :UN M 3.0 I F NO PAFE, TRIGGER
0006 :S M 99.0 SPECIAL JOB " I N I T "
0007 :BE
LENGTH= 3 9 ABS
PAGE 1
SEGMENT 1 0000
0000 :U M 99.0 CALL SPECIAL JOB I'INIT~!
0001 :SPB FBI 8 9 CONDITIONALLY
0 0 0 2 NAME :INIT
0003
0004 :U M 21.2 I F SPECIAL JOB " I N I T "
0005 :U M 99.7 WAS COMPLETED WITHOUT ERROR
0006 :SPA FB 120 START DATA OUTPUT
0 0 0 7 NAME :SEND
0 0 0 8 SSNR : KY 0,O
0 0 0 9 A-NR : KY 0,1
OOOA ABZW : MW 40
OOOB QTYP : KC DB
OOOC DBNR : KY 0,30 SOURCE-DB = DB30
OOOD QANF : KF +O SOURCE-DW = DWO
OOOE QLAE : KF +255 LENGTH = 2 5 5 WORDS
OOOF PAFE : MB 39
001 0 :U M 41 .l WHEN JOB RUNNING
001 1 :R M 99.7 RE-SET TRIGGER FLAG
001 2 :U M 41.2 WHEN JOB COMPLETED WITHOUT ERROR
001 3 :S M 99.7 SET TRIGGER FLAG AGAIN
001 4 :U M 41.3 WHEN JOB COMPLETED WITH ERROR
001 5 :SPB FB 12 EVALUATE ERROR ( FBI 2 )
0 0 1 6 NAME :ANZW07
001 7 :***
SEGMENT 2 001 8
001 8 :SPA F B I 2 6
0 0 1 9 NAME :SEND-A
OOlA SSNR : KY0,O
OOlB A-NR : KYO, 0
OOlC ANZW : MW 6 0
OOlD PAFE : MB 5 9
001E
OOlF :SPA FB 1 0 RECEPTION OCCURRED?
0 0 2 0 NAME :RECCP
0021 :BE
FBI 0 LENGTH=24 ABS
PAGE 1
SEGMENT 1 0000
NAME :RECCP
0005 :SPA FBI27
0006 NAME :REC-A
0007 SSNR : KY0,O
0008 A-NR : KYO,O
0009 ANZW : MW 80
OOOA PAFE : MB 79
OOOB :L MB 81 COMPARISON OF "HIGHUBYTE OF
OOOC :L KBI CONDITION CODE WORD WITH "I" OR CO-ORD-FLAG
OOOD :><F IF NO RECEPTION OCCURRED
OOOE :BEB BLOCK END, OTHERWISE
OOOF .............................
001 0 EVALUATE RECEPTION
001 1 ............................
001 2 :BE
FBI 2 ABS
PAGE 1
SEGMENT 1 0000
NAME :ANZW0 7
0005 :L MB 40
0006 :L KB7 WAS SEND JOB COMPLETED
0007 :><F WITH ERROR NUMBER "07Ht'?
0008 :SPB =M001 SPW NO -> NO ERROR EVALUATION
0009
OOOA
.:O M 0.0 ERROR NUMBER= "07~"-->
OOOB :ON M 0.0
OOOC :SPA FB 121 READ SYSTAT-AREA
OOOD NAME :RECEIVE
OOOE SSNR : KY 0,O
OOOF A-NR : KY 0,200
0010 ANZW : MW 100
0011 ZTYP : KC DB
0012 DBNR : KY O,8
0013 ZANF : KF +O
0014 ZLAE : KF +2
0015 PAFE : MB 97
001 6 :L DR 0
001 7 :L KB 128
001 8 :!=F SYSTAT ERROR = " 8 0 ~ "? ?
001 9 :SPB =M002 SPW YES --> CP-COLD RE-START SUBMITTED
001A :L DR 0
001B :L KB 22
001 C :!=F SYSTAT ERROR = "1 6H" ? ?
001D :SPB =M002 SPW YES --> CP-COLD RE-START SUBMITTED
OOlE MOO1 :
001F :0 M 0.0
0020 :ON M 0.0
0021 :SPA FB 124 DELETE SYSTAT-AREA
0022 NAME :RESET
0023 SSNR : KY 0,O
0024 A-NR : KY 0,200
0025 PAFE : MB 98
0026 :A DB 8
0027 :L KH 0000
0029 :T DW 0
002A :T DW 1
002B :BEA
002C M002 :
002D :O M 0.0
002E :ON M 0.0
002F :S M 99.0 TRIGGER SPECIAL JOB "INIT"
0030 :SPA =M001
0031 :BE
FBI 8 9 ABS
PAGE 1
SEGMENT 1 0000
NAME :I N I T

0005 :U M 21 , l DO NOT TRIGGER I F


0006 :SPB =M001 JOB ALREADY RUNNING
0007
0008 :O M 0.0
0009 :ON M 0.0
OOOA :SPA FB 1 2 0 TRIGGER SPECIAL JOB "INIT"
OOOB NAME :SEND
OOOC SSNR : KY 0,O
OOOD A-NR : KY 0 , 1 8 9
OOOE ANZW : MW 2 0
OOOF QTYP : KC DB
0010 DBNR : KY 0 , 1 8 9 INIT-DB = DBI 8 9
0011 QANF : KF +O
0012 QLAE : KF + l 0
0013 PAFE : MB 1 9
001 4 :U M 19.0 WHEN PAFE
001 5 :BEB ---> BLOCK END
0016 MOO1 :
001 7 :SPA FB 1 2 3 UP-DATE CONDITION CODE WORD
0 018 NAME :CONTROL
0019 SSNR : KY 0,O
OOIA A-NR : KY 0 , 1 8 9
OOlB ANZW : MW 2 0
OOlC PAFE : MB 1 9
001 D :U M 21.1 I F JOB S T I L L RUNNING
001E :BEB ---> BLOCK END
001F
0020 :U M 21.3 ERROR OCCURRED ??
0021 :SPB =M002 I F YES, CARRY OUT ERROR '

0022 HANDLING
0023 :O M 0024 :ON M 0.0
0025 :R M 99.0 RE-SET TRIGGER FLAG
0026 :BEA
0027 M002 :
0028 **** ERROR HANDLING ****
0029 :O M 0.0 AND TRIGGER SPECIAL JOB "INIT"
002A :ON M 0.0 AGAIN, I F REQUIRED
002B :S M 99.0
002C :BE
*** Initialization Block DB189 ***
The special driver was parameterized as follows: -
(Standard values)
ZVZ = 200 ms character delay time
QVZ = 550 ms acknowledgement delay time
QUIPOS = <DLE> 10H pos. ack. establishment of connection
QUINEG = <NAK> 15H neg. ack. establishment of connection
QVAPOS = <DLE> 1 OH pos. ack. connection clearance
QVANEG = <NAK> 15H neg. ack. connection clearance
STARTZ = <STX> 02H start character
with 2 end characters
ENDZI = <DLE> 10H end character 1
ENDZ2 = <ETX> 03H end character 2
with BCC generation XOR logic operation on even parity
acknowledgement on procedure level
without message header
to all CPU's
receive data block DB255 from DWO
without co-ordination flag

PAGE l
zvz
QVZ
QUIPOS / QUINEG
QVAPOS / QVANEG
STARTZ / ENDKEN
ENDZl / ENDZ2
BCC / QUIT
KOPF / CPU-NR
DB-NR / DW-LOW
BYTE / BIT
Index of Versions

Version I Change I Date


--------+-------------------------------A-------

n. ?
I first release i July 88
-1NIT-Send 189 mandatory Oct 88
requirement for start-up
-method of BCC generation can
be parameterized
-differentation between
acknowledgement characters
establishment or clearance of
connection
-BREAK handling correct
Notes
-----
Index
-----
1 Introduction
-m----------
..................... . , . > , 1

2 I n s t a l l a t i o n of S p e c i a l Driver on PG685
- -- - - ---- --------S---
..... 1
3 C r s a t i o n of CP U s e r Program ................ 1
3 . 1 Copy Procedure from L i b r a r y t o
..............................
............1 U s e r Program
- - - - - - - - - v - -

3 . 1 . 1 T r a n s f e r of I n t e r p r e t e r .................1
-------------m---------

3 . 1 . 2 T r a n s f e r of Procedure ....,............. 2
------m--------------

3 . 2 Parameter Assignment of Procedure ....,.... 2


.................................
3 . 3 Parameter Assignment of Job Block ......... 3
- - - - - - - - - - - W - - - - - - - - - - - - - - - - - - - - -

4 Loading of S p e c i a l D r i v e r i n t o CP
-- - U
........... 1
- - - - - -.---------

5 Transmission Procedure ...................... l


- - -v.---..-.-.--------

6 I n i t i a l S t a r t of S p e c i a l Driver ............. 1
- ---
? Parameter Assignment of t h e Data Link
- --
............. 1
-------m---------------

vF+h S p e c i a l Job "INIT"

7.1 . l S t r u c t u r e of I n i t i a l i z a t i o n Block
----------------m----------------
....... 2
7 . 1 . 2 Parameter Assignment of T i m e s
.............................
...,.,,,,, 2

7 . 1 . 3 Parameter Assignment of
--
........ 3
- - - - - U - - - -A-------

Zicknowledgement C h a r a c t e r s
- .-- v----------
7.1.4 Parameter Assignment of BCC Creation
-m----------------------------------
.... 4
7.1.5 Parameter Assignment
..................5
-----m--------------

of Type of Data Link

7.1.6 Parameter Assignment


................. 5
---m----------------

of Receive Data Block


- - - W - ----W-----

7.2 3xample of a Message ...................... 6


8 Assignment of Condition Code Word of
.... 1
---------m--------------------------

Handling Block "SEND DIREKT"

8.1 Error Numbers in Condition Code Word


....................................
of "SEND-DIREKTII
--------m-------
................2
9 Error Numbers in SYSTAT Area ...,......... 1
9.1 Error Code in ANZW and SYSTAT for
- -

.................... 2
W

Send Jobs

9.2 Error Code in SYSTAT for Receive Errors .. - 7


.......................................
9.3 Error Code in ANZW and SYSTAT
for Processing Special Job "INIT"
----------W 4 . -
..... 3
9.4 Error Code in ANZW and SYSTAT
- - - -- -

..... 4
for Evaluating Special Job "INIT"
-- -

1 0 Handling Functions in Central Controller ... ?


W - - -- -- --

1 0.1 Handling Function "SYNCHRON" ............ ?


- . - -.

10.2 Handling Function "SEND-DIREKT" ......... ?


10.3 ............ 2
Handling Function "SEND-ALL"
.
. ---....-----------

? Q. 4 Hand1 ing Function "RECEIVE-ALL" ......... 2

10.5 Special Functions ....................... 3


--.-M------

20.5 Xumbers of Handling Blocks .............. 4


- - - - - - - - - - - - - - - - W - - - - - - - - -

1 1 CP Information ............................. 1
.S,.-.-"-.-..---------

22 Vser Program ............................... 1


. ,"---M------

23 Notes
-----
..................... , , 9

14 Index ...................................... I

You might also like