SAIA PCD Manual SAIA S-Bus

SAIA PCD Manual SAIA S-Bus
SAIA PCD
Process Control Devices
English edition 26/739 E4
Manual
SAIA S-Bus
SAIA-Burgess Electronics Ltd.
Bahnhofstrasse 18
CH-3280 Murten (Switzerland)
http;//www.saia-burgess.com
BA: Electronic Controllers
Telephone
Telefax
026 / 672 71 11
026 / 670 44 43
___________________________________________________________________________________________________________________________
SAIA-Burgess Companies
Switzerland
SAIA-Burgess Electronics AG
Freiburgstrasse 33
CH-3280 Murten
026 672 77 77, Fax 026 670 19 83
France
SAIA-Burgess Electronics Sàrl.
10, Bld. Louise Michel
F-92230 Gennevilliers
01 46 88 07 70, Fax 01 46 88 07 99
Germany
SAIA-Burgess Electronics GmbH
Daimlerstrasse 1k
D-63303 Dreieich
06103 89 060, Fax 06103 89 06 66
Nederlands
SAIA-Burgess Electronics B.V.
Hanzeweg 12c
NL-2803 MC Gouda
0182 54 31 54, Fax 0182 54 31 51
Austria
SAIA-Burgess Electronics Ges.m.b.H.
Schallmooser Hauptstrasse 38
A-5020 Salzburg
0662 88 49 10, Fax 0662 88 49 10 11
Belgium
SAIA-Burgess Electronics Belgium
Avenue Roi Albert 1er, 50
B-1780 Wemmel
02 456 06 20, Fax 02 460 50 44
Italy
SAIA-Burgess Electronics S.r.l.
Via Cadamosto 3
I-20094 Corsico MI
02 48 69 21, Fax 02 48 60 06 92
Hungary
SAIA-Burgess Electronics Automation Kft.
Liget utca 1.
H-2040 Budaörs
23 501 170, Fax 23 501 180
Representatives
Great Britain
Canham Controls Ltd.
25 Fenlake Business Centre, Fengate
Peterborough PE1 5BQ UK
01733 89 44 89, Fax 01733 89 44 88
Portugal
INFOCONTROL Electronica e Automatismo LDA.
Praceta Cesário Verde, No 10 s/cv, Massamá
P-2745 Queluz
21 430 08 24, Fax 21 430 08 04
Denmark
Malthe Winje Automation AS
Håndværkerbyen 57 B
DK-2670 Greve
70 20 52 01, Fax 70 20 52 02
Spain
Tecnosistemas Medioambientales, S.L.
Poligono Industrial El Cabril, 9
E-28864 Ajalvir, Madrid
91 884 47 93, Fax 91 884 40 72
Norway
Malthe Winje Automasjon AS
Haukelivn 48
N-1415 Oppegård
66 99 61 00, Fax 66 99 61 01
Czech
Republic
ICS Industrie Control Service, s.r.o.
Modranská 43
CZ-14700 Praha 4
2 44 06 22 79, Fax 2 44 46 08 57
Sweden
Malthe Winje Automation AB
Truckvägen 14A
S-194 52 Upplands Våsby
08 795 59 10, Fax 08 795 59 20
Poland
SABUR Ltd.
ul. Druzynowa 3A
PL-02-590 Warszawa
22 844 63 70, Fax 22 844 75 20
Suomi/
Finland
ENERGEL OY
Atomitie 1
FIN-00370 Helsinki
09 586 2066, Fax 09 586 2046
Australia
Siemens Building Technologies Pty. Ltd.
Landis & Staefa Division
411 Ferntree Gully Road
AUS-Mount Waverley, 3149 Victoria
3 9544 2322, Fax 3 9543 8106
Argentina
MURTEN S.r.l.
Av. del Libertador 184, 4° “A”
RA-1001 Buenos Aires
054 11 4312 0172, Fax 054 11 4312 0172
After sales service
USA
SAIA-Burgess Electronics Inc.
1335 Barclay Boulevard
Buffalo Grove, IL 60089, USA
847 215 96 00, Fax 847 215 96 06
___________________________________________________________________________________________________________________________
Issue : 22.11.2000
Subjet to change without notice
SAIA® Process Control Devices
Manual
SAIA S-BUS
for the PCD family
SAIA-Burgess Electronics Ltd. 1996 - 2000. All rights reserved
Edition 26/739 E4 - 04.2000
Subject to technical changes
 SAIA-Burgess Electronics Ltd.
Updates
Manual :
Date
SAIA S-Bus for the PCD family - Edition E4
Chapter
Page
11.05.2000
6.6
6-8 / 6-9
06.10.2000
3.12
3-53
Description
Gateway master, enlarged table
SYSWR :
Code 6000 (write EEPROM)
 SAIA-Burgess Electronics Ltd.
Manual S-Bus
Contents
Contents
Page
1.
Introduction
1.1
1.2
1.3
1.4
What is the SAIA S-Bus ?
Typical Applications
Characteristics
The S-Bus protocol
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
Application Layer
Presentation Layer
Network Layer
Data Link Layer
Physical Layer
2.
Installation
2.1
2.2
Point to point connection
S-Bus network
3.
Data Transfer Service
3.1
3.2
3.3
3.4
Operating principle and application
PCD instructions for S-Bus
SASI
Assign serial interface
SRXM
Receive data from a slave station
3.4.1
3.4.2
3.4.3
3.5
STXM
3.5.1
3.5.2
3.5.3
26/739 E4 (SB-00-E.DOC)
Special functions
Transfer of Data Blocks (Read)
Practical application
Transmit data to a slave station
Special functions
Transfer of Data Blocks (Write)
Practical application
 SAIA-Burgess Electronics Ltd.
1-1
1-3
1-5
1-7
1-7
1-7
1-8
1-10
1-12
2-1
2-2
3-1
3-7
3-8
3-25
3-27
3-28
3-31
3-33
3-35
3-36
3-38
Page 1
Contents
Manual S-Bus
Page
3.6
3.7
3.8
3.9
3.10
3.11
3.12
3.13
SASII
Assign serial interface indirect
SRXMI
Read data in indirect mode
STXMI
Transmit data in indirect mode
SICL
Input Control Line
SOCL
Output Control Line
SYSRD
System Read
SYSWR System Write
Communication via modem
3.13.1
3.13.2
3.14
Multipoint modems and converters
Modems for the Public Telephone Network
Examples of user programs in IL
3.14.1
3.14.2
3-56
3-60
3-61
Example 1
Example 2
3-61
3-64
3.15
Example of user programs in FUPLA
4.
Commissioning service
4.1
4.2
4.3
Essential characteristics and applications
4-1
Local programming and commissioning
4-3
Configuration and assignment of an S-Bus PGU interface 4-5
4.3.1
4.3.2
4.4
Page 2
3-40
3-41
3-44
3-46
3-47
3-49
3-52
3-55
3-67
Memory modules with RAM components
Memory modules with EPROM components
Connection of the PG Unit via S-Bus
 SAIA-Burgess Electronics Ltd.
4-5
4-9
4-11
(SB-00-E.DOC)
26/739 E4
Manual S-Bus
Contents
Page
5.
Modems
5.1
5.2
Transmission speeds
Operating your modem
5.2.1
5.2.2
5.2.3
5.2.4
5.2.5
5.3
Connection via the Public Telephone Network
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
5.3.6
5.4
The AT command set
Important configuration parameters for the PG4
and PCD modem
Configuring the PCD Utilities for your modem
PCD and modem
Run sequence of modem in the PCD
Application diagram
Configuring the PCD
Configuring the PC (PG4)
Making the connection
Trouble shooting
Ending the connection
Modem +
5.4.1
5.4.2
5.4.3
Diagnostics (SASI DIAG)
SICL instruction
UNDO/REDO a S-Bus PGU port (SASI OFF)
5.5
Example of PCD program
6.
S-Bus Gateway
6.1
6.2
6.3
6.4
Introduction
Features of the Gateway
Configuration of a Gateway Master Port (GMP)
Configuration of the Gateway Slave Port
6.4.1
6.4.2
6.5
6.6
6.7
26/739 E4 (SB-00-E.DOC)
S-Bus-PGU
User SASI instruction
Using STXM / SRXM in the Gateway station
Setting Timeout in an S-Bus network
Possible sources of errors
 SAIA-Burgess Electronics Ltd.
5-2
5-4
5-5
5-7
5-9
5-14
5-16
5-19
5-19
5-21
5-23
5-27
5-30
5-31
5-32
5-33
5-33
5-34
5-39
6-1
6-2
6-3
6-6
6-6
6-6
6-7
6-8
6-10
Page 3
Contents
Manual S-Bus
Page
7.
Using S-Bus with the PG3
7.1
7.2
Station number definition
7-2
Configuration and assignment of an S-Bus PGU interface 7-4
7.2.1
7.2.2
7.3
7.4
7.5
Connection of the PG Unit via S-Bus
Configuring the PCD Utilities for your modem
Connection via the Public Telephone Network
7.5.1
7.5.2
7.5.3
7.5.4
7.5.5
7.5.6
Page 4
Memory modules with RAM components
Memory modules with EPROM components
Application diagram
Configuring the PCD
Configuring the PC (PG3)
Making the connection
Trouble shooting
Ending the connection
7-4
7-7
7-8
7-9
7-14
7-14
7-15
7-17
7-19
7-20
7-21
7.6
7.7
Example of PCD program (with modem)
Configuration of a Gateway Master Port (GMP)
8.
Appendixes
A
Compatibility for using S-Bus at 38.4 Kbps
8-1
B
S-Bus PGU interfaces and cables
8-2
C
Firmware and software compatibility
8-7
 SAIA-Burgess Electronics Ltd.
(SB-00-E.DOC)
7-22
7-28
26/739 E4
Manual S-Bus
Contents
!
Please note :
A number of detailed manuals are available to aid installation and operation of the SAIA PCD. These are for use by technically qualified staff,
who may also have successfully completed one of our "workshops".
To obtain the best performance from your SAIA PCD, closely follow the
guidelines for assembly, wiring, programming and commissioning given in
these manuals. In this way, you will also become one of the many enthusiastic SAIA PCD users.
If you have any technical suggestions or recommendations for improvements to the manuals, please let us know. A form is provided on the last
page of this manual for your comments.
Summary
PCD1/2 series
H a rdw are
PCD1
PCD2
S e rie xx 7
PCD4 series
PCD6 series
Ha rd wa re
PC D 4
H ar dwa r e
P CD6
PCD4.H1.. *)
PCD2.M250
PCD2.H110
PCD2.H150
PCD2.H210
PCD2.H31x
General
Manuals
PCD4 .H2..
*)
PCD4 .H3.. *)
PCD4.H4..
*) Adap ter m odu le 4 '7 17'482 8'0
allo ws H mo dule s to b e used
with the PCD6.
U s e r's
G u id e
R eferen ce
G uide
(PG 3 )
P C D 8 .P 1 ..
PCD 7.D 1..
PCD 7.D 2..
PCD 7.D 7..
- S-Bus
- LON
- PROFIBUS
In sta llatio n
C o m p on e n ts
fo r R S 48 5 N e tw o rks
- PG4
- Modem
FUPLA/
KOPLA
fu nction
fa milies
26/739 E4 (SB-00-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5
Contents
Manual S-Bus
Reliability and safety of electronic controllers
SAIA-Burgess Electronics Ltd. is a company which devotes the greatest
care to the design, development and manufacture of its products:
•
•
•
•
state-of-the-art technology
•
•
•
•
choice of high-quality componentry
compliance with standards
ISO 9001 certification
international approvals: e.g. Germanischer Lloyd,
United Laboratories (UL), Det Norske Veritas, CE mark ...
quality control checks at various stages of production
in-circuit tests
run-in (burn-in at 85°C for 48h)
Despite every care, the excellent quality which results from this does
have its limits. It is therefore necessary, for example, to reckon with the
natural failure of components. For this reason SAIA-Burgess Electronics
Ltd. provides a guarantee according to the "General terms and conditions
of supply".
The plant engineer must in turn also contribute his share to the reliable
operation of an installation. He is therefore responsible for ensuring that
controller use conforms to the technical data and that no excessive
stresses are placed on it, e.g. with regard to temperature ranges, overvoltages and noise fields or mechanical stresses.
In addition, the plant engineer is also responsible for ensuring that a
faulty product in no case leads to personal injury or even death, nor to
the damage or destruction of property. The relevant safety regulations
should always be observed. Dangerous faults must be recognized by additional measures and any consequences prevented. For example, outputs
which are important for safety should lead back to inputs and be monitored from software. Consistent use should be made of the diagnostic
elements of the PCD, such as the watchdog, exception organization
blocks (XOB) and test or diagnostic instructions.
If all these points are taken into consideration, the SAIA PCD will provide you with a modern, safe programmable controller to control, regulate and monitor your installation with reliability for many years.
Page 6
 SAIA-Burgess Electronics Ltd.
(SB-00-E.DOC)
26/739 E4
Manual S-Bus
Introduction
1. Introduction
1.1 What is the SAIA S-Bus ?
S-Bus is the name of an efficient communication protocol for the SAIA®
PCD generation of controllers. It can be used for both point-to-point
communications and within a local master/slave network.
For point-to-point communications, any of the PCD's serial interfaces can
be used.
At the physical level, an S-Bus network uses the RS 485 standard, via
two-core twisted and shielded cable. S-Bus can be used as a simple, economic means of networking up to 255 PCD systems, connected to up to 8
segments, each containing up to 32 stations.
S-Bus has the following major characteristics :
•
Ease of handling (installation, commissioning and user programming)
•
Cost effective, since the S-Bus protocol is already built into every
PCD processor. This means that no additional dedicated communications processor is required.
•
Fail-safe data transfer, using CRC-16 error detection.
•
High data transfer rate, due to the efficient binary protocol with
transmission speed up to 38.4 kbps.
•
Support for remote data access and diagnostics via a modem on
leased or dial-up lines.
•
Drivers are available for supervisory control systems such as Wizcon,
InTouch, FactoryLink, Fix D-Macs and Genesis.
•
With application level 2 (commissioning service) the programming
unit has access to all slave stations on the network. This means that
any slave station connected to the network can be controlled by the
programming unit from a central point (e.g. by the debugger).
•
Multi-master possibility by using the S-Bus Gateway
•
Access possible to all media in slave.
26/739 E4 (SB-10-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 1-1
Introduction
Manual S-Bus
Glossary
Page 1-2
P8 or P800
also called D mode :
original protocol used for the programming unit.
PGU
ProGramming Unit.
This term designates the programming console, but also
by extension the port where the console must be connected. The PGU designates also the protocol used by the
programming console.
PLM
Public Line Modem.
PSTN
Public Switched Telephone Network.
SCADA
Supervisory Control and Data Acquisition
SCS
Supervisory Control Systems
GSM
Global System for Mobile communication
ISDN
Integrated Services Digital Network
 SAIA-Burgess Electronics Ltd.
(SB-10-E.DOC)
26/739 E4
Manual S-Bus
Introduction
1.2 Typical Applications
The S-Bus protocol was developed specifically for the RS 485 S-Bus
network. However, it can also be used with the other serial interfaces for
point-to-point connections.
S-Bus Protocol
Applications
Point to Point
Connection
Master
RS232, RS422
S-Bus Network
Master
Slave
PCD 1/2/4/6
Programming Unit or
Control System
or 20 mA CL
PCD 1/2/4/6
PCD 1/2/4/6
Programming Unit or
Control System
Slave
Slave
Slave
PCD 1/2/4/6
The master station can be a PCD2, PCD4, PCD6 (also PCD1 from FW
version V005), the programming unit or any non-SAIA system. Several
supervisory control systems (e.g. Wizcon, FactoryLink, In Touch, Fix
DMACS, …) provide driver for the S-Bus protocol.
Without repeaters it is possible to connect up to 32 stations over a maximum distance of 1200m in this way.
Network with "Multipoint" modem to bridge large distances using leased
or private telephone lines. The RS 232 interface is used in S-Bus mode to
connect between the modem and the PCD.
Master
PCD 1/2/4/6
Programming Unit or
Control System
Modem
Leased line
Modem
Modem
Modem
Slave
Slave
Slave
PCD 1/2/4/6
26/739 E4 (SB-10-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 1-3
Introduction
Manual S-Bus
The S-Bus protocol can also be used with modems; allowing the SAIA
PCDs to communicate through the Public Telephone Network.
This type of connection can be used for remote supervision and/or remote programming and commissioning. Possible telephone networks are:
analogue, digital (ISDN), radio (GSM), etc.
PCD 1/2/4/6
Programming Unit or
Control System
Master
Modem
Public Phone
Network
Modem
Modem
Slave
Slave
Modem
PCD 1/2/4/6
Slave
Even if the S-Bus network is a single master / multiple slaves; a feature
called the “Gateway” allows other masters connected to the first one to
communicate with all the slaves present on the network.
Master
Master
Gateway
Slave
Master
PCD 1/2/4/6
Programming Unit or
Control System
PCD 2 / 4 / 6
Slave
Slave
PCD 1/2/4/6
Page 1-4
 SAIA-Burgess Electronics Ltd.
(SB-10-E.DOC)
26/739 E4
Manual S-Bus
Introduction
1.3 Characteristics
Network
Master/slave
bus with single master and several slaves
(Single Client / Multiple Servers)
Physical interface
RS 485
Bus line
twisted two-core, shielded,
line section min. 2 ∗ 0.5 mm2
length max. 1200 m per segment
Number of stations
max. 32 per segment, total max. 255
Number of segments
max. 8, connected together via
repeater PCD7.T100
Point-to-point connection
Interfaces
RS 232, RS 422, 20mA CL
Electrical characteristics of interfaces
See hardware manuals
PCD1 - PCD2, PCD4 and PCD6.
S-Bus protocol
Baud rate
from 110 to 38'400 bit/s
Start bit
1
Character length
8 bits
Parity bit
mode SM2/SS2 :
mode SM1/SS1 :
mode SM0/SS0 :
Stop bit
1
Data transfer rate
standard :
maximum :
Reaction times for
transmission at
9600 bps of
1 to 8 in-/outputs or flags :
128 in-/outputs or flags :
1 register :
32 registers
Error detection
CRC-16
26/739 E4 (SB-10-E.DOC)
no parity
parity 1 / 0
no parity
167 registers/s (at 9600 bps)
265 registers/s (at 19200 bps)
 SAIA-Burgess Electronics Ltd.
18 ms
35 ms
20 ms
125 ms
Page 1-5
Introduction
Manual S-Bus
Programming
The following PCD instructions are provided :
•
•
•
•
Initialise serial interfaces instructions
Instructions for data exchange
Control line handling instructions
System parameters read & write instructions
Supervisory control systems
S-Bus drivers are available for the following systems :
•
•
•
•
•
•
Wizcon
Genesis
FactoryLink
InTouch
Fix D-Macs
Windows DDE
For implementation of the S-Bus protocol in a non-SAIA system, SAIABurgess Electronics Ltd. provides software libraries for Windows DLL as
well as in the C programming language.
Page 1-6
 SAIA-Burgess Electronics Ltd.
(SB-10-E.DOC)
26/739 E4
Manual S-Bus
Introduction
1.4 The S-Bus protocol
OSI model applied to SAIA S-Bus:
The following diagram shows the implementation of the layers in the
SAIA-Bus protocol
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
1.4.1
SAIA S-Bus Reduced & Full Protocol
Telegrams 0 .. 255
not used
not used
Forced parity mechanism
ACK/NAK mechanism
Byte synchronisation + CRC 16 Error check
RS485, RS 232, 20mA CL, etc.
Application Layer
Data transfer service (level 1)
A subset of the S-Bus protocol (also called Reduced protocol). The master station can only read and write PCD data in a slave station, and the
slave station's status can be read.
PCD data :
Inputs, Outputs, Flags, Registers, Timers, Counters, Data
Blocks and the hardware clock.
Commissioning service (level 2)
This level supports the entire S-Bus protocol (Full S-Bus), the programming unit (PGU) can be used to control each slave station on the network. The commissioning service is also called S-Bus PGU. Access via
the public telephone system is also supported: slave station programming
and commissioning can therefore be done from a central point.
1.4.2
Presentation Layer
Most of the telegram are of a fixed length and so there is no requirement
for a special end of telegram character. Those telegrams that are not of
fixed length have a count byte immediately following the command code
to indicate the length of the telegram. There is no need of a count byte in
the response telegram as the Client will already know the length of the
telegram that he is expecting.
A telegram can have an absolute maximum length of 32 registers/ timers/counters or 128 flags/inputs/outputs when in run. Some special telegrams can have more bytes than this but these telegrams cannot be used
when the CPU is in run. For instance, to optimise the downloading of a
program up to 64 program lines can be transferred at a time which gives a
maximum telegram length of 263 bytes.
26/739 E4 (SB-10-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 1-7
Introduction
Manual S-Bus
Example of an S-Bus telegram
Write Register 100 with the value 12345 (Dec) to station 10 in the SAIABus network. The telegram will look like so :
<0A><0E><05><00><64><00><00><30><39><CRC-16msbte><CRC-16lsbyte>
Two byte of CRC-16 code
Value 12345 (Dec) in hexadecimal (4 bytes)
Absolute address of register (2 bytes)
Count of number of bytes (without the CRC)
Command code
Address of station
1.4.3
Network Layer
The network layer service is very simple and takes advantage of the multidrop feature of the DUART used in the PCD family. This multidrop
mode eliminates the need for special start characters in each telegram.
This mode supports two different types of character, an address character
and a data character. The difference between the two is that for an address character the parity bit is forced to 1 and for a data character the
parity bit is forced to 0.
A telegram consists of an address character followed by a number of data
characters targeted for a particular slave station. When any address character is detected in the data stream the slave station compares its address
to the address character received before deciding whether to receive the
data characters in the telegram. Slave stations which are not addressed
continue monitoring the data stream for the next address character.
The address 255 (dec) is to be reserved for broadcast messages. No response is expected after transmission of a broadcast message. This mode
of operation is called the parity mechanism.
Because that most of the public line modems do not support 9 bit characters as used for the parity mechanism and also the Break character
used to indicate the beginning of every telegram; another mode called
“Data Mode” is then used.
Page 1-8
 SAIA-Burgess Electronics Ltd.
(SB-10-E.DOC)
26/739 E4
Manual S-Bus
Introduction
1.4.3.1 Data Mode
(SM2/SS2)
In data mode each telegram begins with a special FS character. (FS =
frame synchronisation). This FS character always has the value B5 and
does not appear in the telegram, except in the telegram header. The second character transmitted in data mode is telegram information. This
telegram information is called the AT character and may contain, for example, the following information: The current telegram is a request telegram, a reply telegram, etc.
S-Bus Telegram (principle) :
0 10110101 1 0 XXXXXXXX 1 0 XXXXXXXX 1 0 XXXXXXXX 1
FS char
AT char
Slave addr
Data char
1.4.3.2 Parity Mode (SM1/SS1)
The parity bit used in so called multidrop mode to indicate the type of
current character as follows : 1
Address character
0
Data character
S-Bus Telegram (principle) :
0 XXXXXXXX 1 1 0 XXXXXXXX 0 1 0 XXXXXXXX 0 1 0 XXXXXXXX 0 1
Slave Address
Data characters
1.4.3.3 Break Mode (SM0/SS0)
The BREAK character is a special character: the serial data is low for the
entire character including the stop bit.
S-Bus Telegram (principle) :
0 00000000 0 0 XXXXXXXX 1 0 XXXXXXXX 1 0 XXXXXXXX 1
Break char
Slave Address
Data characters
The Break character can be detected by the remote PCD; it indicates the
start of an S-Bus telegram. The S-Bus driver on the remote PCD will always read the character following the Break character as the address
character and the appended character as data characters of current telegram.
26/739 E4 (SB-10-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 1-9
Introduction
Manual S-Bus
1.4.4
Data Link Layer
The Upper Sub-layer manages the point to point communication between
stations on the network. If a telegram is lost or corrupted then this layer
will manage the retransmission of this telegram. The functionality of this
level can be seen in the following diagrams.
If a corrupted telegram is detected then there is no response and the client will time-out up to three times before informing the upper layers that
there has been a transmission failure. The time-out will be a function of
the Baud rate.
Transmission of a command telegram
This shows the successful transmission of a telegram.
Server
Client
requ est
action
ACK
ne xt re quest
If a corrupted telegram is received at the server and the client receives no
response. The telegram will then be retransmitted after the client has
timed out.
A message is transmitted a total of three times, i.e. there will be two retries.
Client
request
error detected by
the CRC-16
request
Uncorrupted but
Illegal telegram
time-out
NAK
request
ACK
Page 1-10
 SAIA-Burgess Electronics Ltd.
Valid telegram
positive response
(SB-10-E.DOC)
26/739 E4
Manual S-Bus
Introduction
Invocation of response messages
Upon reception of the read telegram the server will transmit the response directly. Any response which appears on the network must be for the client, so
there is no need for a special start of telegram character or address character
for the response.
This example shows the successful execution of a read response telegram.
Client
Server
request
reception
response
next request
Half-Duplex Protocol
Only one station can be master in a network and so only a half duplex
protocol is supported. This means that there is never any danger of
deadlock of contending clients.
Lower Sub-layer
The main task of this layer is to manage the CRC-16 error checking code.
This type of error checking is used since this protocol uses no form of
parity checking on individual bytes.
The CRC-16 error checking algorithm uses the polynomial:
X^16 + X^12 + X^5 + 1 = 1021 Hex
This is the standard CCITT CRC (Reference CCITT V-41).
26/739 E4 (SB-10-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 1-11
Introduction
Manual S-Bus
1.4.5
Physical Layer
SAIA-Bus will run on all the types of communications ports of the PCD
family.
The SAIA S-Bus is designed principally to run over an RS485 Multidrop
network of one client and a maximum of 255 servers using an S-Bus repeater.
The SAIA S-Bus can also run over an RS-232 serial interface and via
modems.
Page 1-12
 SAIA-Burgess Electronics Ltd.
(SB-10-E.DOC)
26/739 E4
Manual S-Bus
Installation
2. Installation
2.1 Point to point connection
In principle, any type of interface can be assigned in S-Bus mode. Since,
as a rule, the creation of a point-point connection causes no installation
problems, further details are not given here.
A comprehensive description of pin allocation and data on the various
interface types can be found in the PCD1 - PCD2, PCD4 and PCD6
hardware manuals.
For using S-Bus in RS232 on port 0 on a PCD2, a special handling must
be done after the serial line has been assigned (see the SOCL instruction
on chapter 3.10).
26/739 E4 (SB-20-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 2-1
Installation
Manual S-Bus
2.2 S-Bus network
For installation of the S-Bus network, modules are required with the
RS485 interface.
Modules with RS485 interface :
•
PCD1.M110
with interface n° 1 (RS485)
•
PCD1.M120/M130
with PCD7.F110/F150 interface n° 1
(RS422/485)
•
PCD2.M110/M120
or M150
with interface n° 0 (RS485) or
with F-modules PCD7.F110/F150
interface n° 1 (RS422/485) or
with PCD2.F5xx interface n° 3 (RS422/485)
•
PCD2.M250
(resp. M220)
with interface n° 0 (RS485) or
with F-modules PCD7.F110/F150
interface n° 1 (RS422/485) or
with PCD2.F5xx interface n° 3 (RS422/485)
•
PCD4.C130
bus module (interface n° 1)
with processor modules PCD4.M12x, M14x,
M240, M340 or M44x
•
PCD4.C340
bus module with PCD7.F110/F150
with processor modules PCD4.M12x, M14x,
M240, M340 or M44x
•
PCD6.M540
single processor module (interface n° 1)
•
PCD6.M220
communications processor module
(interface n° 0)
•
PCD6.M260
communications processor module
(interfaces n° 0, 1, 2, 3)
•
PCD6.M300
communications processor module with
F-modules PCD7.F110/F150
(interfaces n° 0, 1, 2, 3)
Consult the appropriate PCD hardware manual to obtain all information
about these modules and how to connect them.
Page 2-2
 SAIA-Burgess Electronics Ltd.
(SB-20-E.DOC)
26/739 E4
Manual S-Bus
Installation
To guarantee in a rough and noisy industrial environment an error free
operation of the RS485 network it is recommended to use the special installation components for RS485 networks.
The following components are available :
Termination box PCD7.T160
This very simple module is used to terminate the network correctly and to
apply bias voltage to the signal lines with an electrically isolated supply
and the correct off-load potential.
Converter PCD7.T120 (RS232/485) and PCD7.T140 (RS422/485)
The converters enable electrically isolated conversion from the RS232 or
RS422 of a remote station to the RS485 2-wire bus and vice versa.
Repeater PCD7.T100
The repeater is used not only for the electrical isolation of individual line
sections from each other, but also to reprocess signals travelling longer
distances.
A detailed description of these components and general information for
the installation and commissioning of an RS485 network can be found in
the manual "Installation components for RS 485 networks".
In this manual the installation of an S-Bus network is described without
the use of the special installation components.
PCD7.T100
PCD7.T160
Segment 1
RS 485
+
+
PCD7.T120
PCD7.T120
RS 232
1
PCD7.T160
Segment 2
RS 485
PCD7.T100
RS 232
2
31
1
PCD7.T160
30
PCD7.T160
Segment 3
RS 485
+
2
+
PCD7.T140
RS 422
1
PCD7.T100
2
PCD7.T160
+
PCD7.T160
Segment 4
RS 485
30
+
PCD7.T120
RS 232
1
26/739 E4 (SB-20-E.DOC)
2
31
 SAIA-Burgess Electronics Ltd.
Page 2-3
Installation
Manual S-Bus
Connection and placement of RS485 bus line
To suppress interference and avoid reflections, pull-up/down line termination resistors must be provided both at the start and end of the bus
line. These resistors are incorporated in all processor and bus modules
and they can be switched on or connected according to choice.
First Station
+5V
Middle Stations
/RX RX
/TX TX
/RX RX
/TX TX
End station
/RX RX
/TX TX
/RX RX
/TX TX
+5V
Pull up
330 Ohm
Pull up
330 Ohm
Termination
resistor
Termination
resistor
RS 485
(S-Bus)
Segment: 1200m max
max. 32 Stations
Pull down
330 Ohm
Pull down
330 Ohm
When using the internal resistors of the processor or bus modules to terminate the lines, these stations can not be powered down otherwise the
communication over the network is no more possible.
If the network must still continue to work when the first and end stations
are not powered, you must use PCD7.T160 termination boxes.
The following points demand special attention :
•
When making the bus cable, strict attention is necessary not to mix up
the data lines - "RX-TX" must therefore always run to "RX-TX" and
"/RX-/TX" to "/RX-/TX".
The denominations “RX-TX” and “/RX-/TX”are not always used :
RX
/RX
TX
/TX
Page 2-4
D
/D
D
/D
 SAIA-Burgess Electronics Ltd.
–RX
+RX
–TX
+TX
(SB-20-E.DOC)
26/739 E4
Manual S-Bus
Installation
•
Care should also be taken that the bus line remains continuously connected, even when one or more plugs are pulled out.
•
Spur cables (stubs) should not exceed 0.5 m.
•
Use stranded cable of at least 0.5 mm2, with 2 cores, twisted and
shielded.
Signal levels of the RS485 interface
Signal type
Logical state
Polarity
Data signal
0 (space)
1 (mark)
RX-TX positive to /RX-/TX
/RX-/TX positive to RX-TX
no driver active
Mark
= Mark
3V /TX
2V
TX
VOH
2.5V
VOL
4V
e.g. start bit
VOZ
5V
Space
1V
0V
VOZ
VOH
VOZ
=
=
=
0.9V min... 1.7V max (no driver active) *)
2V min (with load) ... 5V max (without load)
-2V ... -5V
*) dependent of the Pull up, Termination and Pull down resistors.
26/739 E4 (SB-20-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 2-5
Installation
Manual S-Bus
Grounding of an RS485 bus line
The cable's screening must always be connected at both ends, to produce
a continuous, solid earth line, and so reduces potential differences to a
minimum.
First station
Middle stations
End station
+5V
+5V
It is recommended that the RS485 cable is not laid in direct proximity to
motor cables which may be produce interference, unless these cables are
also well screened.
Page 2-6
 SAIA-Burgess Electronics Ltd.
(SB-20-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3. Data Transfer Service
3.1 Operating principle and application
Application level 1 (Reduced Protocol) enables PCD data to be exchanged via the S-Bus network or a point to point connection.
The master station can be a PCD2, PCD4, PCD6 or any other non-SAIA
system (e.g. a supervisory control system such as Wizcon, Factory Link,
etc.) which has a driver for the S-Bus protocol.
All communication is controlled from the master station. The user program in the master station defines which data from a connected slave
station are to be read or written. From the user's point of view, the behaviour of the slave station in this is passive. Communication is run
automatically in the background by the CPU firmware. For the slave station, the user program only initialises the interface.
PCD interfaces are assigned for the master station in SM2, SM1 or SM0
mode (S-Bus master) and for the slave station in SS2, SS1 or SS0 mode
(S-Bus slave).
Station number definition
Each slave station is allocated a number, so that it can be addressed from
the master station. This number is stored in the user program's "header" in
the memory module of a slave station
The station number is stored differently, depending on the memory modules used.
The main difference is that, when RAM memory modules are used, the
number of the slave station is stored online in the PCD.
However, if an EPROM memory module is used, slave number definition
occurs offline, i.e. an EPROM is programmed with the slave number and
the user program and is put in the PCD later.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-1
Data Transfer Service
Manual S-Bus
Station number definition when using memory modules with RAM
1.
Connect the programming unit to the "PGU" programming interface
on the PCD.
2.
Start PG4 Project Manager.
3.
Press the "Online Configurator" button on the toolbar.
The online configurator can then be seen:
Page 3-2
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
4.
Press the 'S-Bus' button:
5.
Select S-Bus Support and press the 'S-Bus' button:
6.
Enter the required station number
All other parameters are not relevant at S-Bus Level 1, when neither a
modem nor a repeater is being used.
Exit the entry window by pressing the OK button.
The following window must also be exited by pressing the OK button.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-3
Data Transfer Service
Manual S-Bus
The following warning can be confirmed with the YES button
This will download the configuration that has been set to the
controller.
The number assigned can be viewed in the "Online Configurator"
window.
Page 3-4
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Station number definition when EPROM memory modules are used
1.
Start the PG4 Project Manager.
2.
Press the "Offline Configurator" button on the toolbar
The offline configurator can then be seen:
3.
26/739 E4 (SB-31-E.DOC)
Select S-Bus Support and press the 'S-Bus' button:
 SAIA-Burgess Electronics Ltd.
Page 3-5
Data Transfer Service
4.
Manual S-Bus
Enter the S-Bus station number:
Exit the entry window by pressing the OK button.
The entry window of the "SAIA PCD Configurator File Editor" can
then also be exited.
This saves the previously entered parameters to a specific file.
The information stored in this file is saved onto the EPROM when
it is programmed.
The station number always applies for the whole PCD station, even if
several ports have been assigned to the same station in S-Bus mode.
Page 3-6
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.2 PCD instructions for S-Bus
The following instructions are supported in S-bus mode :
SASI
SASII
Assign serial interface
Master and
Slave
SRXM
SRXMI
Serial receive media
Master only
Receive data or status from a slave station
STXM
STXMI
Serial transmit media
Transmit data to a slave station
Master only
SICL
Serial input control line
Read status of a control line
Master and
Slave
SOCL
Serial output control line
Set control line signal
Master and
Slave
SYSRD
System Read
Master and
Slave
SYSWR
System Write
Master and
Slave
Before communication can take place via the serial interface in S-Bus
protocol, application level 1, master and slave PCD interfaces must be
assigned using the SASI instruction to SM2, SM1 or SM0 mode and SS2,
SS1 or SS0 mode respectively.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-7
Data Transfer Service
3.3 SASI
Manual S-Bus
Assign serial interface
Description :
Initialisation of a serial interface.
The instruction consists of two lines :
The first line indicates the channel number.
The second line indicates the number of a text, in which the interface parameters are defined.
Every interface used must be initialised once (mostly in XOB 16).
Format :
SASI
Channel
; Serial channel number 0..3
Text_number ; Definition text-number 0..3999, 4000..7999
Text_number :
0..3999
4000..7999
in standard memory
in extension memory
1
999
; Initialise channel 1
; Interface definitions in text 999
Example :
SASI
Flags :
The error (E) flag is set if the definition text is missing or invalid, or if the
station number has not been defined or the interface is configured as SBus PGU port.
Page 3-8
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
SASI Definition text
The SASI instruction uses a special definition text to initialise the serial
interface.
Format :
TEXT xxxx
"<UART_DEF>;"
"<MODE_DEF>;"
"<DIAG_DEF>;"
where xxxx valid text number 0000..3999 in the standard memory
4000..7999 in the extension memory.
The entire text can also be written on one line.
Significance of the different text parameters :
<UART_DEF> Defines Baud rate, Timeout, TS-Delay, TN-Delay and
Break-Length.
<MODE_DEF> Defines communications mode (SM2/SS2, SM1/SS1
resp. SM0/SS0) and the register containing the number
of the slave station to be accessed.
<DIAG_DEF>
Addresses of the diagnostic flag and the diagnostic register.
Example :
Definition text to initialise the interface of a slave station with :
9600 Baud
diagnostic flags at address 2000 to 2007
diagnostic register at address 1500.
$SASI
TEXT
100
"UART:9600;"
"MODE:SS1;"
"DIAG:F2000,R1500;"
$ENDSASI
Important :
If the SASI texts are not located between the assembler directives $SASI
and $ENDSASI, capital letters only should be used.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-9
Data Transfer Service
Manual S-Bus
<UART_DEF>
Defines Baud rate, Timeout, TS-Delay and TN-Delay.
The definitions of character length, parity and stop bits are not required,
as the S-Bus protocol includes the following definitions as fixed settings :
Character length 8 bits
Stop bit
1 bit
Parity bit
mode SM2/SS2
mode SM1/SS1
mode SM0/SS0
data mode
parity bit "1" for address character
"0" for data character
with Break character
Format :
"UART:<Baudrate>[,<Timeout>][,TS-Delay>][,TN-Delay][,Break-Length];"
Baud rate
adjustable
110
150
300
600
1200
2400
4800
9600
19200
38400
1...15000
ms
[Timeout]
[TS-Delay]
or
default value
Parity+Break Data-Mode
15000 ms
15000 ms
9000 ms
15000 ms
5000 ms
7500 ms
3000 ms
4500 ms
2000 ms
3000 ms 1...15000
1000 ms
1500 ms
ms
500 ms
750 ms
250 ms
375 ms
200 ms
300 ms
200 ms
300 ms
[TN-Delay]
adjustable
default
or
value
27 ms
20 ms
20 ms
5 ms
1...15000
3 ms
ms
2 ms
2 ms
1 ms
1 ms
1 ms
[BreakLength]
adjustable
4…25
characters
TimeOut, TS-Delay and TN-Delay are optional and normally only needed
to be defined when a modem is used.
Definitions must then be made both in the master station as well as in the
slave stations.
If no parameter is specified the default values on the above table are
used.
Default value for TS-Delay
=
Default value for Break Length =
0ms.
4 characters (only in mode SM0).
For the precise meaning and purpose of Ts-Delay and TN-Delay values,
see "Multipoint modems and converters" on chapter 3.13.1.
Page 3-10
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Baud rate :
Baud rates up to 19.2 Kbps are supported by all PCD modules, regardless
of hardware version, firmware version, or interface type.
(exception : 20mA current loop - only up to 9600 bps).
The baud rate 38.4 Kbps is not supported on the old PCD hardware (see
Appendix A).
When assigning an interface as 38.4 Kbps it should also be noted that, for
physical reasons, some baud rates are no longer possible for assigning the
second DUART interface.
For interfaces 0 + 1 (DUART 1) and 2 + 3 (DUART 2) respectively, the
following combinations of baud rates are not possible :
or
or
or
38.4 Kbps
38.4 Kbps
38.4 Kbps
38.4 Kbps
+
+
+
+
38.4 Kbps
19.2 Kbps
150 bps
110 bps
If an attempt is still made to assign a prohibited combination, the error
flag is set and XOB 13 is called.
CPU load for communications at 38.4 Kbps :
Since S-Bus communication does not use a separate communications
processor, data transmission at 38.4 Kbps makes corresponding demands
on CPU capacity.
If the communications throughput is large, it can demand up to 40 % of
CPU capacity. This in turn means that processing of the user program is
slowed down by the same factor.
Timeout :
This value defines the maximum time after sending a read telegram (instruction SRXM), during which the reply telegram must be received from
the station addressed.
If no valid reply is received within this time, the last telegram transmitted
is repeated and the corresponding diagnostic elements are set. Two repeat
transmissions are the maximum for any telegram.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-11
Data Transfer Service
Manual S-Bus
Break-Length :
This parameter allows the length of the break signal to be adjusted in
SM0 mode. This is used to differentiate between data and address characters. An address character is identified by a preceding break signal. A
break signal is only sent by the master station in SM0 mode and can
therefore also only be adjusted from that station. It is not normally necessary to change the break length.
Break signal : Data line =
low for duration of n characters including
stop bit.
Structure of an S-Bus telegram with break signal :
Data bits
TXD, RXD
0 00000000 0
Break char 1
0 xxxxxxxx
Break char n
1 0 xxxxxxxx
Address char
1
Data char
If the break length is defined in SM2/SS2, SM1/SS1 or SS0 mode, the error flag is set and XOB 13 is called when the interface is assigned.
Example :
for a UART definition text :
"UART:4800;"
The interface is initialised with 4800 bps.
For a standard application, no Timeout, TS-Delay, TN-Delay or BreakLength is defined.
Page 3-12
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
<MODE_DEF>
Defines communications mode and a register for the station number.
Format :
"MODE: <sbus_mode>[,<dest_reg>];"
<sbus_mode>
SM2
SM1
SM0
Description
S-Bus master, Data Mode
S-Bus master, with parity bit control
S-Bus master, with break character
SS2
SS1
SS0
S-Bus slave, Data Mode
S-Bus slave, with parity bit control
S-Bus slave, with break character
GS2
GS1
GS0
S-Bus Gateway slave, Data Mode
S-Bus Gateway slave, with parity bit control
S-Bus Gateway slave, with break character
GM
S-Bus Gateway master
OFF
De-initialize the serial line
SM2/SS2 mode :
A telegram always begins with a definite character (FS character).
Advantage :
Easy recognition of the start of a telegram. Does not
need a break or parity character. It means that any modem can be used for modem communication.
Disadvantage :
Since the FS character cannot occur in the middle of a
telegram, if it is present it must be replaced. This can
make the telegram longer.
SM1/SS1 mode :
The parity bit is used to distinguish between address and data character.
Advantage :
very quick and efficient addressing of the slave stations
thanks to the parity bit.
Disadvantage :
for modem communications the modem must support 9
data bits (8 data and 1 parity bit).
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-13
Data Transfer Service
Manual S-Bus
SM0/SS0 mode :
An address character is indicated with a preceding "break" character
(data line = low for the duration of one character including start and stop
bit).
Advantage :
for modem communications any standard modem can
be used which supports only 8 data bits and transmits
the break character.
Disadvantage :
time intensive addressing of the slave stations because
of the preceding break signal.
GS2/GS1/GS0/GM mode :
See Chapter 6 : S-Bus Gateway.
Mode OFF :
The mode OFF is used when you want to re-initialise an interface which
has already be initialised (to change from mode as example).
Example :
“MODE:OFF”
For more informations when using S-Bus level 2, see UNDO/REDO a
S-Bus PGU port (SASI OFF), chapter 5.4.3.
<dest_reg>
Description
R xxxx
Register containing the partner station number
Station number :
0..254
255 reserved for broadcast
A register is defined for partner station number only in the case of the
master station.
Examples :
Definition text for master station.
"MODE:SM1,R350;"
Register 350 is used for the station number :
Definition text for a slave station :
"MODE:SS1;"
Page 3-14
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Broadcast telegrams :
Broadcast telegrams can be sent using station address 255. Broadcast
telegrams are received and processed by all slave stations on the bus.
The slave station does not reply to or acknowledge a broadcast telegram.
This in turn means that, in broadcast mode, it is only possible to sent
write telegrams (STXM instructions).
The error flag is set when processing an SRXM instruction with broadcast
address.
Example :
All slave station clocks are synchronised by the master
station via the S-Bus.
LD
R
STXM
R
K
26/739 E4 (SB-31-E.DOC)
350
255
1
0
150
1000
; Register with station address
; for broadcast
; interface 1
; Special code to write the clock
; of a slave station with the contents
; of registers 150 and 151.
 SAIA-Burgess Electronics Ltd.
Page 3-15
Data Transfer Service
Manual S-Bus
<DIAG_DEF>
Defines diagnostic elements for S-Bus communication.
Format :
"DIAG: <diag_elem>,<diag_reg>;"
Type
Description
<diag_elem>
F xxxx
O xxxx
Base address of 8 consecutive
flags or outputs
<diag_reg>
R xxxx
Address of diagnostic register
Example :
"DIAG:F3900,R120;"
Diagnostic flags
Address
Name
Description
xxxx
RBSY
Receiver busy
xxxx + 1
RFUL
Receive buffer full
xxxx + 2
RDIA
Receiver diagnostic
xxxx + 3
TBSY
Transmitter busy
xxxx + 4
Not used
xxxx + 5
TDIA
Transmitter diagnostic
xxxx + 6
XBSY
SASI permission
xxxx + 7
NEXE
Not executed
Receiver Busy (RBSY) is set high when a slave station receives a telegram. The flag is reset as soon as the reply telegram has been sent. This
flag has no significance in the case of the master station.
Receive Buffer Full (RFUL) is set high when elements in the slave station have been changed by the master station.
Receiver Diagnostic (RDIA) is set high when an error is noticed during
receipt of a telegram. A detailed description of the error can be obtained
from the diagnostic register (bits 0..15). The flag is reset as soon as all receiver diagnostic bits (0..15) have been reset in the diagnostic register.
Page 3-16
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Transmitter Busy (TBSY) is set high while transmission is taking place.
Significance for
Master station :
It is set high during execution of an STXM or
SRXM instruction.
The flag is reset as soon as a valid reply is received.
Slave station :
It is set high while the reply is transmitted.
Transmitter Diagnostic (TDIA) is set high if an error is noticed during
transmission of a telegram. A detailed description of the error can be obtained from the diagnostic register (bits 16..31). The flag is reset as soon
as all transmitter diagnostic bits (16..31) have been reset in the diagnostic
register.
Interface busy (XBSY) is low when the user has the permission to perform a SASI OFF to undo the S-Bus PGU for Public Line modem. For a
complete explanation see UNDO/REDO a S-Bus PGU port (SASI
OFF), chapter 5.4.3.
Not Executed (NEXE) is set high if an instruction (STXM or SRXM) has
not been completed after three attempts. The flag is reset by the next SBus instruction.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-17
Data Transfer Service
Manual S-Bus
DIAGNOSTIC REGISTER
R
E
C
E
I
V
E
R
T
R
A
N
S
M
I
T
T
E
R
Bit
Designation
Description
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Overrun error
Overrun of the internal receiver buffer
Framing error
Break error
BCC error
S-Bus PGU status
SASI OFF permission
Usually caused by an incorrect baud rate
Break in data line *)
Bad Block Check Code or CRC-16
S-Bus PGU with Public Line modems
SASI OFF permission
Length error
The telegram length is invalid
Address error
Status error
Range error
Value error
Missing media error
Program error
Retry count
Address of ACK is invalid
PCD in false status, cannot execute command
Invalid element address
Error in the received value
Address of media not defined or invalid
Station number not allocated (or invalid)
Indicates the number of retries (in binary)
(telegram repeats in binary representation)
NAK response
Missing response
Multiple NAK
CTS-Timeout
Negative response (NAK) was received
No response was received after timeout
NAK received after retries
No CTS set after TS delay
Range error
Invalid element address
Program error
Attempt to transmit when unauthorised
Any bit which has been set high in the diagnostic register remains so, until manually reset by the user program or the debugger.
*) No signification in mode SM0/SS0
Page 3-18
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Overrun Error (Bit 0) is set high when there is an overrun of the internal buffer of the DUART.
Cause :
Baud rate assigned is too high
→
the CPU can no longer process all characters received.
This can happen if one CPU is involved in communications requiring a
high rate of data transmission via several interfaces simultaneously. It is
theoretically possible for all interfaces of a CPU (excluding the 20mA
current loop) to be assigned the maximum Baud rate of 19.200 bps at the
same time. In practice, however, this error can arise when there is a very
high level of communication over several interfaces. The system program
handles the interfaces with differing priorities. The highest priority is allocated to interface 0, declining to interface 3.
Remedy :
- Reduce Baud rate.
- For fast communication, use an interface with high priority, if possible.
Framing Error (Bit 2) is set high when a character is received with a
framing error (missing stopbit). This is usually caused by setting the Baud
rate wrongly.
Break Error (Bit 3) is set high when an interruption is noticed during
receipt of a character.
Cause :
Data line broken or wrongly set Baud rate.
BCC or CRC-16 Error (Bit 4) is set high if a CRC-16 error is identified
on the incoming telegram. The incoming telegram is rejected.
Reaction of Slave :
The received telegram will be ignored
Master : The received telegram will be ignored and the last
telegram will be retransmitted.
Cause :
Interference on the data line.
Remedy :
Check electrical installation.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-19
Data Transfer Service
Manual S-Bus
S-Bus PGU Status (Bit 5) shows the current S-Bus PGU with Public
Line Modem (PLM)
"1"
S-Bus port is in STANDBY status , waiting for modem connection.
"0"
No S-Bus PGU PLM port configured or in FINAL status
(PCD ready in mode S-Bus level 2 for modem or S-Bus
PGU PLM undone yet.
SASI OFF Permission (Bit 6) indicates that somebody has disabled an
UNDO/REDO process of the S-Bus PGU PLM in performing a RUN or
STOP via S-Bus or PG4/PG3 Utilities during the SASI OFF execution
delay period.
Length Error (Bit 8) is set high when a telegram is received with invalid
length. This error cannot arise in a network made up exclusively of PCD
stations. The error indicates that an invalid telegram has been received
from an external system. This results in a NAK response.
Address Error (Bit 10) is set high if an invalid telegram is received (incorrect command code).
Cause :
Same as for Length Error (there is no NAK response).
Status Error (Bit 11) is set high when the PCD can not execute a command request because the slave PCD is not in the correct status (Run/
Halt/Stop/Diconnected/…). Only used for S-Bus level 2
Range Error (Bit 12) is set high if an incoming telegram contains an invalid PCD element address. This error cannot arise in a network made up
exclusively of PCD stations, as the master PCD monitors the element address range of telegrams as they are transmitted. The slave station responds to this error with NAK.
Page 3-20
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Value Error (Bit 13) is set high when an invalid data value is received.
Example :
The STXM instruction is used in an attempt to load the
clock. The value received for the hour is 30. However, the
maximum range for the hour is only 0..23.
The slave station responds to this error with NAK.
Missing Media Error (Bit 14) is set high when the addressed media is
not defined or invalid media code for current request. Only used for SBus level 2
Program Error (Bit 15) is set high during execution of a SASI instruction with the definition SS1 mode, if the user program header has not
been configured for the S-Bus slave station, or if the configuration is invalid.
See also "Station number definition" on chapter 3.1.1.
Retry Count (Bits 16 and 17) shows the number of repeat telegrams
sent during execution of a SRXM or STXM instruction, represented in
binary. Bit 16 is the LS bit. The quality of an S-Bus network can be
judged by monitoring these two bits.
Negative Response (Bit 20) is set high if a NAK response is received
from a slave. This means that the master has previously sent an invalid
telegram. Check for the following errors: Value Error, Range Error and
Length Error.
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-21
Data Transfer Service
Manual S-Bus
Missing Response (Bit 21) is set high if no response has been received
from the slave station after the time-out has elapsed.
In this case, the telegram is retransmitted (maximum two times).
Possible causes :
•
•
•
The slave station addressed does not exist.
Installation error in network (wiring).
The slave station has received a confused telegram with a CRC16 error.
Remedies :
•
•
Check slave station (connections, station number)
Have the correct line termination and pull-up/down resistors
been connected on the bus line at the first and last stations ?
Multiple NAK (Bit 22) is set high if, instead of the expected ACK or
NAK, a different response is received from a slave station.
Possible causes :
•
•
•
More than one slave with the same station number.
More than one master in the network.
Interference on the bus line.
Remedies :
•
As for Missing Response error
CTS Timeout (Bit 23) is set high if the time between setting the control
line RTS (by the PCD) and receiving the CTS (from the modem) exceeds
the "TS Delay". See also "Communication via modem" on chapter 3.13.
Page 3-22
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Range Error (Bit 28) is set high if the SRXM or STXM instructions indicate an element address (source or destination address) lying outside
the permitted range.
Cause :
Error in user program
Ranges monitored :
Inputs/outputs
Flags
Timers/counters
Registers
Example :
0..8191
0..8191
0..1599
0..4095
During execution of the following STXM instruction, the
Range Error bit is set high.
STXM
R
R
1
25
1000
4072
; channel 1
; 25 registers
; base address source
; base address destination
An attempt is made to transmit the contents of registers 1000 to 1024 in
the master station to registers 4072 to 4096 in the slave station.
Program Error (Bit 31) is set high during execution of an STXM or
SRXM instruction if the interface has been assigned in SS1 mode, or if a
similar instruction is already executing (TBSY flag was not polled before
executing the instruction).
26/739 E4 (SB-31-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-23
Data Transfer Service
Manual S-Bus
Notes :
Page 3-24
 SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus
3.4 SRXM
Data Transfer Service
Receive data from a slave station
Description :
This instruction reads data or the status of a slave station. The slave's station number must be loaded into the register defined by the SASI instruction before execution of this instruction.
This instruction can only be used in the master PCD.
While it is being processed, the TBSY flag is set high. The flag is reset
once transfer of data is complete. Before executing any SRXM instruction, therefore, the TBSY flag must be polled to ensure that its state is
"low".
The instruction consists of four lines :
•
•
•
•
The first operand is the channel number.
The second operand defines the number of incoming elements.
The third operand defines the base address (lowest) of the
source elements in the slave PCD.
The fourth operand defines the base address (lowest) of the
destination elements in the master PCD.
Format :
SRXM[X] Channel
Number
Source (i)
Dest (i)
Channel :
Number :
Source :
Destination :
*)
26/739 E4 (SB-32-E.DOC)
0..3
1..32
1..128
0
R nnnn
I/O/F
R
T/C
DB
K
I/O/F
R
T/C
DB
; channel number
; number of elements to receive
; base address of source elements (slave)
; base addr. of destination elements (master)
number of the interface used
number of R/T/C to read *)
number of I/O/F to read
Special function code
Used for Data Block transfer
0..8191
0..4095
Base address of elements
0..1599
in the slave PCD
0..7999
0..6000
Special function code
0..8191
0..4095
Base address of elements
0..1599
in the master PCD
0..7999
for old PCD firmware the number of R/T/C can be limited to 31
 SAIA-Burgess Electronics Ltd.
Page 3-25
Data Transfer Service
Manual S-Bus
The following table shows which elements can be copied from the source
station to the appropriate elements in the destination station.
Master PCD (destination)
I
O
F
R
C
T
K
DB
Slave PCD
(source)
O
•
•
•
F
•
•
•
R
C
T
DB
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Flags :
The Error (E) flag is set when :
The interface has not been assigned or has been assigned incorrectly an SRXM instruction is already being executed (TBSY high).
Examples :
SRXM
R
R
1
14
1500
100
; Registers 1500-1513 are read from
; a slave station and copied
; into registers 100-113
; of the master station.
K
R
1
0
1000
20
; The clock is read from a
; slave station and copied
; into registers 20 and 21
; of the master station.
SRXM
Page 3-26
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.4.1
Special functions
Code
K 0 ..7
Function description
Read CPU status
0..6 :
CPU number of slave PCD
7:
own CPU status
K 1000
Read Clock
K 2000
K 5000
K 5010
Read Display Register
Read Device type
in ASCII
in decimal
K 5100
K 5110
K 5200
K 5210
K 5300
K 5310
K 6000
Result
R
Run
C
Conditional Run
H
Halt
S
Stop
D
Disconnected
The content of the clock is written
in two Registers
(same format as RTIME inst.)
ASCII
Dec
Type
" D1"
1
PCD1
" D2"
2
PCD2
" D4"
4
PCD4
" D6"
6
PCD6
Read Module type in ASCII
ASCII
Dec
Type
in decimal
" M1_"
10
PCD1.M1
" M1_"
10
PCD2.M12
" M15"
15
PCD2.M15
" M11"
11
PCD4.M11
" M12"
12
PCD4.M12
" M14"
14
PCD4.M14
" M24"
24
PCD4.M24
" M34"
34
PCD4.M34
" M44"
44
PCD4.M44
" M1_"
10
PCD6.M1
" M2_"
20
PCD6.M2
" M3_"
30
PCD6.M3
" M54"
54
PCD6.M5
Read Firmware version in ASCII
Examples of valid responses :
" $4C", " 004", " X41"
in decimal Ex : 5 dec for Version 005
-1 dec for any ‘$’, ‘X’, ‘β’
Read CPU number in ASCII
ASCII
dec
Type
in decimal
" 0"
0
PCD1
" 0"
0
PCD2
" 0" or " 1" 0 or 1 PCD4
" 0" to " 6" 0 to 6 PCD6
Read S-Bus station number in BROADCAST
This telegram is always transmitted in broadcast mode (address = 255).
This will only work in point-to-point communication.
26/739 E4 (SB-32-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-27
Data Transfer Service
3.4.2
Manual S-Bus
Transfer of Data Blocks (Read)
The format of the SRXM instruction, when working with Data-Block, differs slightly from the conventional format. To address an element of a
Data-Block, it is always necessary to specify the number of the DataBlock and then the position of the element in the Data-Block.
Format : SRXM
Channel
Count + Position
Source
Destination
Channel : This parameter is used to specify the channel number
(range : 0...3).
Count + Position :
This parameter is a register number. This register contains the
"Count" or number of elements to transfer (range 1...32) and
the "Position" in the Data-Block where to put or get the data.
"Count" is given in the MS Word of the register and "Position"
in the LS Word of the register. The initialisation of this register
can be done easily with the LDL and LDH instructions. The
initialisation of "Position" with the LDL instructions must be
done before the initialisation of "Count" with the LDH, because the LDL instruction over-write the MS Word with zero.
Source / Destination :
These parameters specify the Source and Destination of the
transfer. The source and the destination must respect the
source-destination validity described previously.
SRXM in indexed mode :
The instruction can work in indexed mode (SRXMX).
When working in indexed mode, source and destination are both indexed
with standard media (I/O/F/R/T/C), but Data-Blocks are never indexed.
SRXM in parametrised mode :
When working with Data-Block, it is always possible to use a Function
Block and SRXM in parametrised mode.
Page 3-28
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Example :
Registers 2000...2031 (32 elements) of the slave station will be transferred in Data-Block #7999 from position 10000 of the master station via
channel #3.
LDL
R
100
10000
100
32
LDH
R
SRXM
3
R 100
R 2000
DB 7999
; Initialisation of Position in the DB
; Initialisation of Count
; Transfer
;
;
;
Error report :
List of errors which can occurs and how they are signalled in the diagnostic register of SBus.
SRXM DB → R or T/C.
"range error" of diagnostic register is set when :
•
•
Count = 0 or ≥33
try to access beyond the limit of a type of media
(i.e. Reg. 4096 and above)
"no response" of diagnostic register is set when :
•
•
•
•
Data-Block in the slave station doesn’t exist
Data-Block in the slave station is defined as text
Tried to get element beyond the end of the Data-Block
Tried to get a Data-Block in the memory extension (DB
4000....7999) when there is no memory extension in the
slave station
SRXM R or T/C → DB.
"range error" of diagnostic register is set when :
•
•
•
•
•
•
26/739 E4 (SB-32-E.DOC)
Count = 0 or ≥33
try to access beyond the limit of a type of media
(i.e. Reg. 4096 and above)
Data-Block in the master station doesn’t exist
Data-Block in the master station is defined as text
Tried to get element beyond the end of the Data-Block
Tried to access a Data-Block in the memory extension
(DB 4000....7999) when there is no memory extension in
the master station
 SAIA-Burgess Electronics Ltd.
Page 3-29
Data Transfer Service
Manual S-Bus
Size of a Data-Block :
Format : SRXM
Channel
K
3000
DB x
R
y
; 1st parameter
; 2nd parameter
; 3rd parameter
; 4th parameter
'Channel'
This parameter is used to specify the channel number (range: 0...3).
'2nd parameter'
K 3000 indicates that a "Read Size of Data-Block" is performed.
'3rd parameter'
This parameters specifies the Data-Block number.
'4th parameter'
This parameter specifies the register number where the return value
(size of Data-Block) will be written.
Error report.
A "range error" occurs when the 3rd parameter is not a Data-Block and
or the 4th operand is not a Register.
Return value of the "Read Data-Block Size".
If the return value which is in the register specified by the 4th parameter is :
0
: The Data-Block of the slave station doesn’t exist
1...n : Size of a Data-Block in the slave station (n max. = 16384)
65535 : (or FFFF hex) means that the Data-Block specified is
defined as a Text in the slave
Example :
The size of the Data-Block #3999 of the slave station will be reported in
the register #100 of the master station.
SRXM
2
K
3000
DB 3999
R
100
Size of a Data-Block in indexed mode.
Reading the size of a Data-Block can be done in indexed mode.
Format :
SRXMX <channel>
K
3000
DB x
R
y
; 1st parameter
; 2nd parameter
; 3rd parameter
; 4th parameter (indexed)
The first until the third parameters remain the same as in normal mode.
Only the destination Register is indexed.
Page 3-30
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.4.3
Practical application
Inputs 0..31 are to be copied from slave station number 5 into flags
500..531 of the master station.
Master station program :
TEXT
XOB
16
SASI
1
100
100
"UART:9600;"
"MODE:SM1,R500;"
"DIAG:F1000,R1000"
; Interface no. 1
; Definition text 100
.
EXOB
COB
STH
ORH
CPB
STH
CPB
0
0
F
F
H
F
L
1002
1005
ERROR
1003
RECEIVE
; If RDIA
; or TDIA flag = high
; Then handle error
; If TBSY flag = low
; Then read data
RECEIVE
500
5
1
32
0
500
; Load station number
; (no. 5)
; Interface no. 1
; Read 32 elements
; inputs 0..31 and copy
; them to flags 500..531
ERROR
; Error handler
ECOB
PB
LD
R
SRXM
I
F
EPB
PB
…
…
EPB
26/739 E4 (SB-32-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-31
Data Transfer Service
Manual S-Bus
Error handling :
Polling the RDIA and TDIA diagnostic flags is optional and does not
have to be programmed. However, it is recommended that these flags are
be monitored during commissioning in particular, and also during operation, so that problems can be identified early and the appropriate remedial action taken.
Depending on the type of error, there may be a serious problem demanding a direct remedy, or it may only be a temporary malfunction,
without any threat to the operation of the machine or the installation.
Examples :
•
•
Programming errors (Range Error, Program Error etc.) are usually recognised at the commissioning stage and can be removed immediately.
If the NEXE flag is set, this means that the last instruction was not
executed (SRXM or STXM).
Slave station program :
XOB
…
SASI
TEXT
100
16
1
100
"UART:9600;
"MODE:SS1;"
"DIAG:F1000,R1000"
…
EXOB
In the case of the slave station, it is only necessary to assign the interface
with the user program. All communication in S-Bus mode is then processed as a background operation by the CPU working autonomously. It is
not necessary to monitor diagnostic flags, as practically all communications errors are recognised by the master station and therefore do not
need to be monitored here.
Page 3-32
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
3.5 STXM
Data Transfer Service
Transmit data to a slave station
Description :
This instruction copies data from the master station to a slave station. Before the instruction can be executed, the slave station number must have
been loaded into the register defined by the SASI instruction.
This instruction can only be used by the master PCD.
While the instruction is executing, the TBSY flag is set high. It is reset
when the transfer of data is complete. The TBSY flag must therefore be
polled as low before execution of another STXM instruction.
The instruction has four lines :
•
•
•
The first operand is the channel number.
The second operand defines the number of elements to be sent.
The third operand defines the base address (lowest) of the
source elements in the master PCD.
The fourth operand defines the base address (lowest) of the
destination elements in the slave PCD.
•
Format :
STXM[X]Channel
Number
Source (i)
Dest (i)
Channel :
Number :
Source :
Destination :
*)
26/739 E4 (SB-32-E.DOC)
0..3
1..32
1..128
0
I/O/F
R
T/C
DB
K
I/O/F
R
T/C
DB
K
K
; Channel number
; Number of elements to be transmit
; Base address of source elements (Master)
; Base addr. of destination elements (Slave)
Interface to be used
number of R/T/C to read *)
number of I/O/F to read
Special function code
0..8191
0..4095
Base address of elements
0..1599
in the master PCD
0..7999
4000
Special function
0..8191
0..4095
Base address of elements
0..1599
in the slave PCD
0..7999
1000
Write clock in the slave PCD
17, 18, 19 Special function
for old PCD firmware the number of R/T/C can be limited to 31
 SAIA-Burgess Electronics Ltd.
Page 3-33
Data Transfer Service
Manual S-Bus
The following table shows which elements can be copied from the source
station to the appropriate elements in the destination station.
Slave PCD (destination)
Master PCD
(source)
I
O
F
R
C
T
DB
O
•
•
•
F
•
•
•
R
C
T
DB
Clock
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
When writing to the clock, two registers are sent. For the data format of
registers, see the WTIME instruction.
Page 3-34
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.5.1
Special functions
It is possible to provoke the execution of an XOB in a slave station using
the STXM instruction with the following arguments :
STXM
K
K
0..3
0
4000
171819
; Serial channel number
; (must be 0)
; Used to indicate XOB interrupt
; number of the XOB to execute
It is also possible to use this instruction in broadcast mode; this allows the
synchronisation of events.
Flags :
The Error (E) flag is set when the interface has not been assigned, has
been assigned incorrectly, or when an STXM instruction is already executing (in spite of a high TBSY flag).
Examples :
STXM
R
R
1
25
300
2400
; Registers 300-324 are copied
; from the master station to
; a slave station into
; registers 2400-2424.
R
K
1
0
20
1000
; The clock of a slave station
; is loaded with the contents
; of registers 20 and 21
STXM
26/739 E4 (SB-32-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-35
Data Transfer Service
3.5.2
Manual S-Bus
Transfer of Data Blocks (Write)
The format of the STXM instruction, when working with Data-Block, differs slightly from the conventional format. To address an element of a
Data-Block, it is always necessary to specify the number of the DataBlock and then the position of the element in the Data-Block.
Format : STXM
Channel
Count + Position
Source
Destination
Channel : This parameter is used to specify the channel number
(range : 0...3).
Count + Position :
This parameter is a register number. This register contains the
"Count" or number of elements to transfer (range 1...32) and
the "Position" in the Data-Block where to put or get the data.
"Count" is given in the MS Word of the register and "Position"
in the LS Word of the register. The initialisation of this register
can be done easily with the LDL and LDH instructions. The
initialisation of "Position" with the LDL instructions must be
done before the initialisation of "Count" with the LDH, because the LDL instruction over-write the MS Word with zero.
Source / Destination :
These parameters specify the Source and Destination of the
transfer. The source and the destination must respect the
source-destination validity described previously.
STXM in indexed mode :
The instruction can work in indexed mode (STXMX).
When working in indexed mode, source and destination are both indexed
with standard media (I/O/F/R/T/C), but Data-Blocks are never indexed.
STXM in parametrised mode :
When working with Data-Block, it is always possible to use a Function
Block and STXM in parametrised mode.
Page 3-36
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Example :
20 elements of Data-Block #4000 from position 50 of the master station
will be transferred to Register 1000...1019 of the slave station via the
channel #1.
LDL
R
100
50
100
20
LDH
R
STXM
1
R 100
DB 4000
R 1000
; Initialisation of Position in the DB
; Initialisation of Count
; Transfer
;
;
;
Error report :
STXM DB → R or T/C.
"range error" of diagnostic register is set when :
•
•
•
•
•
•
Count = 0 or ≥33
tried to access beyond the limit of a type of media
(i.e. Reg. 4096 and above)
Data-Block in the master station doesn’t exist
Data-Block in the master station is defined as text
Tried to get element beyond the end of the Data-Block
Tried to access a Data-Block in the memory extension
(DB 4000...7999) when there is no memory extension in
the master station
STXM R or T/C → DB.
"range error" of diagnostic register is set when :
•
•
Count = 0 or ≥33
tried to access beyond the limit of a type of media
(i.e. Reg. 4096 and above)
"nak response" of diagnostic register is set when :
•
•
•
•
26/739 E4 (SB-32-E.DOC)
Data-Block in the slave station doesn’t exist
Data-Block in the slave station is defined as text
Tried to access element beyond the end of the Data-Block
Tried to get a Data-Block in the memory extension
(DB 4000...7999) when there is no memory extension in
the slave station
 SAIA-Burgess Electronics Ltd.
Page 3-37
Data Transfer Service
3.5.3
Manual S-Bus
Practical application
Registers 150..165 are to be copied from the master station to counters
500..515 of slave station 12.
Master station program :
XOB
…
SASI
TEXT
16
1
900
900
; Interface no. 1
; Definition text 900
"UART:9600;"
"MODE:SM1,R500;"
"DIAG:F2500,R4095"
EXOB
COB
…
STH
ORH
CPB
STH
CPB
…
ECOB
PB
LD
0
0
F
F
H
F
L
R
STXM
R
C
2502
2505
ERROR
2503
TRANSMIT
; If RDIA
; or TDIA flag = high
; Then handle error
; If TBSY flag = low
; Then transmit data
TRANSMIT
500
12
1
16
150
500
; load
; Station number 12
; Interface no. 1
; Transmit 16 elements
; Register 150..165
; to counters 500..515
ERROR
; Error handler
EPB
PB
…
EPB
Page 3-38
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Error handling :
Polling the RDIA and TDIA diagnostic flags is optional and does not have
to be programmed. However, it is recommended that these flags are monitored during commissioning in particular, and also during operation, so that
problems can be identified early and the appropriate remedial action taken.
Depending on the type of error, there may be a serious problem demanding
a direct remedy, or it may only be a temporary malfunction, without any
threat to the operation of the machine or the installation.
Examples :
•
Programming errors (Range Error, Program Error etc.) are usually recognised at the commissioning stage and can be removed immediately.
• If the NEXE flag is set, this means that the last instruction was not
executed (SRXM or STXM).
Slave station program :
XOB
…
SASI
TEXT
100
16
1
100
"UART:9600;
"MODE:SS1;"
"DIAG:F1000,R1000"
…
EXOB
In the case of the slave station, it is only necessary to assign the interface
with the user program. All communication in S-Bus mode is then processed as a background operation by the CPU working autonomously. It is
not necessary to monitor diagnostic flags, as practically all communications errors are recognised by the master station and therefore do not
need to be monitored here.
26/739 E4 (SB-32-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-39
Data Transfer Service
3.6 SASII
Manual S-Bus
Assign serial interface indirect
Description :
This instruction works in the same way as the SASI instruction.
The difference is that it works in indirect mode. Indirect mode means that
the number of the channel and the definition text number can be given by
the content of registers.
Format :
SASII
Channel
Text_definition
Channel : Channel number to be initialised
This parameter can be given directly or indirectly :
0..3
Serial channel number
R 0..4095
Register containing the channel number (0..3)
Text_definition :
This parameter is a register number (R 0..4095)
This register contents the address of a text containing where
the interface parameters are defined
Valid addresses for text :
0..3999
in standard memory
4000..7999 in extension memory
Examples :
SASII
SASII
R
1
1
; Initialise channel 1
; Interface parameters text address
; is in R 1
R
0
R
1
; Initialise channel number
; contained in R 0
; Interface parameters text address
; is in R 1
Flags :
The error (E) flag is set if the definition text is missing or invalid, or if the
station number has not been defined or the interface is configured as SBus PGU port.
The definition text are the same as for the SASI instruction
SASII does not work in indexed and parametrised mode.
Page 3-40
 SAIA-Burgess Electronics Ltd.
(SB-32-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.7 SRXMI Read data in indirect mode
Description :
This instruction works in the same way as the existing SRXM instructions. The difference is that it works in indirect mode. Indirect mode
means that the number of the media for source and destination is given
by the content of a register. SRXMI are only available for transfer of media. Transfer options like the Real Time clock, Display-Register,... are not
allowed.
Format :
SRXMI Channel
Count or Count + Position
Source-type and Reg-number
Destination-type and Reg-number
Channel : This parameter is used to specify the channel number
(range : 0...3).
Count or Count + Position :
This parameter is a register number. This register contains the
"Count" for standard medias or "Count" and "Position" for
Data-Block. For Data-Block, "Count" is given in the MS Word
of the register and "Position" in the LS Word of the register
and in that case, the initialisation of this register can be easily
done with LDL and LDH instructions.
Source-type and Register number :
Destination-type and Register number :
These parameters specify the "Source" and "Destination" of
the transfer. Each of these parameter is composed of a character giving the type of media (I/O/F/R/T/C/DB) and a register
number (0...4095). The source and the destination must respect
the source-destination validity described in the table for the
SRXM/STXM instructions.
SRXMI does not work in indexed and parametrised mode.
26/739 E4 (SB-33-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-41
Data Transfer Service
Manual S-Bus
SRXMI syntax flowchart
1st parameter
2nd parameter
3rd parameter
4th parameter
I/O/F + R#
O/F + R#
R/T/C + R#
R/T/C + R#
R/T/C + R#
DB + R#
DB + R#
R/T/C + R#
R
IN
0...3
OUT
Size of Data-Block
DB + R#
R
K 3000
Example :
Output #200...231 (32 elements) of the slave station will be transferred
on Flags #1000...1031 of the master station via channel #3.
LD
R
LD
R
LD
R
SRXMI
R
O
F
100
32
101
200
102
1000
; Initialisation of Count
3
100
101
102
; channel #3
; R 100 = 32
; R 101 = 200
; R 102 = 1000
; Output 200
; Flag 1000
Error report :
For standard media, the error reports are the same as the existing SRXM
instruction. A "range error" occurs now when Count = 0. When DataBlock are engaged, the same error report as SRXM can be used.
Page 3-42
 SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Size of Data-Block indirect.
Asking the size of a Data-Block of a slave station indirectly is possible
with the SRXMI instruction. The format is approximately the same as the
direct format, but the Data-Block number is supplied in a register.
Format :
SRXMI
Channel
K
3000
DB x
R
y
; 1st parameter
; 2nd parameter
; 3rd parameter (indirect mode)
; 4th parameter
'Channel'
This parameter is used to specify the channel number (range: 0...3).
'2nd parameter'
K 3000 indicates that a "Read Size of Data-Block" is required.
'3rd parameter'
This parameter specifies the Data-Block and the register number
which contains the number of the Data-Block to read the size
(only this parameter is in indirect mode).
'4th parameter'
This parameter specifies the register number where the return value
(size of Data-Block) will be written.
Return value of the "Read Data-Block Size" indirect.
If the return value which is in the register specified by the 4th parameter is :
0
: The Data-Block of the slave station doesn’t exist
1...n : Size of a Data-Block in the slave station (n max. = 16384)
65535 : (or FFFF hex) means that the Data-Block specified is defined
as a Text in the slave
Example :
LD
R
99
3999
SRXMI
2
K
3000
DB 99
R
100
; Init. Data-Block number
In this example, the size of the Data-Block #3999 of the slave station will
be reported in the register #100 of the master station via channel #2
26/739 E4 (SB-33-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-43
Data Transfer Service
Manual S-Bus
3.8 STXMI Transmit data in indirect mode
Description :
This instruction works in the same way as the existing STXM instructions. The difference is that it works in indirect mode. Indirect mode
means that the number of the media for source and destination is given
by the content of a register. STXMI are only available for transfer of media. Transfer options like the Real Time clock, Display-Register,... are not
allowed.
Format :
STXMI Channel
Count or Count + Position
Source-type and Reg-number
Destination-type and Reg-number
Channel : This parameter is used to specify the channel number
(range : 0...3).
Count or Count + Position :
This parameter is a register number. This register contents the
"Count" for standard medias or "Count" and "Position" for
Data-Block. For Data-Block, "Count" is given in the MS Word
of the register and "Position" in the LS Word of the register
and in that case, the initialisation of this register can be easily
done with LDL and LDH instructions.
Source-type and Reg-number :
Destination-type and Reg-number :
These parameters specify the "Source" and "Destination" of
the transfer. Each of these parameter is composed of a character giving the type of media (I/O/F/R/T/C/DB) and a register
number (0...4095). The source and the destination must respect
the source-destination validity described in the table for the
STXM instruction.
STXMI does not work in indexed and parametrised mode.
Page 3-44
 SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
STXMI syntax flowchart
1st parameter
IN
2nd parameter
3rd parameter
4th parameter
I/O/F + R#
O/F + R#
R/T/C + R#
R/T/C + R#
OUT
R
0...3
R/T/C + R#
DB +R#
DB + R#
R/T/C + R#
Example :
20 elements of Data-Block #4000 from position 50 to 69 of the master
station will be transferred to Register #1000...1019 of the slave station
via the channel #1.
LDL
R
100
50
100
20
101
4000
102
1000
LDH
R
LD
R
LD
R
STXMI
1
R 100
DB 101
R 102
; Initialisation of Position in the Data-Block
;
; Initialisation of Count
;
; Initialisation of the DB number (source)
;
; Initialisation of Register nb. (destination)
;
; channel #1
; MSW of R 100 = 20; LSW of R 100 = 50
; R 101 = 4000
; R 102 = 1000
Error report :
For standard media, the error reports are the same as the existing STXM
instruction. A “range error” occurs now when Count = 0. When DataBlock are engaged, the same error report as STXM can be used.
26/739 E4 (SB-33-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-45
Data Transfer Service
3.9 SICL
Manual S-Bus
Input Control Line
Description :
The SICL instruction reads a control signal from the serial channel given
in the 1st operand, and stores its state in the ACCU. The 2nd operand is the
signal to be read :
0
1
2
=
=
=
CTS
DSR
DCD
Clear To Send
Data Set Ready
Data Carrier Detect
For the Port 0 (PGU) of the PCD1, PCD2, PCD4 and PCD6.M540 as
well as for the port 4 (PGU) of the PCD6.M300, the instruction SICL is
always allowed (independently, whether the port is assigned or configured). For any other port of PCD1, PCD2, PCD4, PCD6.M540 or
PCD6.M300, the instruction SICL is only allowed on a port configured
for S-Bus PGU. Otherwise, the instruction SICL is only allowed after
execution of a SASI.
Format :
SICL
Channel
Signal
; Serial channel number 0-3
; Signal number 0-2
Channel : This parameter is used to specify the channel number
(range : 0...3).
Signal number :
0
1
2
CTS
DSR
DCD
Clear To Send
Data Set Ready
Data Carrier Detect
Flags :
The ACCU is set to the state of the addressed control line. The Error flag
is set if the channel does not exist or has not been correctly initialised.
Tips :
•
•
•
Page 3-46
For a port configured for S-Bus Level 2 for public line modem, the
user can for example read the DCD signal to detect whether the PCD
is on-line with a remote modem or not. According to current DCD
status he can then execute different code in the user program.
The programming unit can be detected by reading the DSR signal
(DSR = 1).
It is not possible to detect whether the PCD is on-line with S-Bus
Level 2 or not since the DSR signal on the PGU port (PCD1/PCD2/
PCD4/PCD6M5/M3) is LOW for S-Bus Level 2 as well as if the port
is free for any user assignation (SASI).
 SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.10 SOCL Output Control Line
Description :
The SOCL instruction sets a selected control signal of the serial channel
given in the first operand to the state of the ACCU (H or L)
The second operand is the signal to be set:
0
1
2
=
=
=
RTS
DTR
Request To Send
Data Terminal Ready
Special Functions
For the Port 0 (PGU) of the PCD1, PCD2, PCD4 and PCD6.M540 as
well as for the Port 4 (PGU) of the PCD6.M300, the instruction SOCL is
always allowed (independently, whether the port is assigned or configured). For any other port of PCD1, PCD2, PCD4, PCD6.M540 or
PCD6.M300, the instruction SOCL is only allowed on a port configured
for S-Bus PGU. Otherwise, the instruction SOCL is only allowed after
execution of a SASI.
Format :
SOCL
Channel
Signal
; Serial channel number 0-3
; Signal number 0-2
Channel : This parameter is used to specify the channel number
(range : 0...3).
Signal number :
0
1
2
RTS
DTR
Request To Send
Data Terminal Ready
Special Functions
Flags :
The Error flag is set if the channel does not exist or has not been correctly initialised.
Special functions :
Port 0 on PCD2
A SASI for SM1/SS1 in the user program will configure the port 0 to
RS-485. If the user wishes to use RS-232 on the port 0 then he must
perform the following instructions after the SASI instruction:
ACC
SOCL
26/739 E4 (SB-33-E.DOC)
L
0
2
 SAIA-Burgess Electronics Ltd.
Page 3-47
Data Transfer Service
Manual S-Bus
Switch from RS 485 to RS 422
The serial interface RS 422/RS 485 on the interface modules (F-Modules)
PCD7.F110/F150 and PCD2.F520/F30 as well as on the bus modules
PCD4.C130 switches automatically to RS 485 when certain modes are
assigned.
Mode
Type
MC0 .. MC3, MD0 / SD0
MC4, S-Bus
RS 422
RS 485
It is sometimes needed to force the PCD to use S-Bus with RS 422; in
this case, the following instructions must be performed after the SASI instruction :
ACC
SOCL
L
Port_nb
2
It is also possible to force the RS 485 mode with MC0..MC3 or
MD0/SD0 with :
ACC
SOCL
H
Port_nb
2
Switch from receive to transmit mode in RS 485
The following instructions must be executed after the SASI :
•
Switch RS 485 in transmit mode
ACC
SOCL
•
Port_nb
0
Switch RS 485 in receive mode
ACC
SOCL
Page 3-48
H
L
Port_nb
0
 SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.11 SYSRD
System Read
Description :
This instruction read the PCD system parameters like :
PCD Device type, CPU type, Firmware version, User program name,
S-Bus parameters, …
Format :
SYSRD
Function
Result
; Function code
; Result of the read
Function :
K x or R x : constant or register containing a function code
This instruction can either be direct, by using a
constant for the function code or indirect by using
a register. It permits the user to have access to
useful system information via the user program.
Result :
R 0 ..4095
Register containing the result
Example :
SYSRD
K
R
5000
20
; Read the PCD type in ASCII
; and put the result in R 20
Flags :
If the function code does not exist, the Error flag is set.
26/739 E4 (SB-33-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-49
Data Transfer Service
Manual S-Bus
Function codes
Code
2000
2001
2002
2003
2004
2005
¦
2049
5000
5010
Function description
Read User EEPROM Register 0
Register 1
Register 2
Register 3
Register 4
Register 5
Register nn
register 49
Read Device type
in ASCII
in decimal
5100
5110
Read own CPU type
5200
5210
5400
in ASCII
in decimal
Read own Firmware version
in ASCII
in decimal
6000
Read User program name
in ASCII
The user program name always
contains 8 ASCII characters
Read S-Bus station number
6010
6020
Read S-Bus PGU TN delay
Read S-Bus PGU TS delay
6030
Read S-Bus PGU timeout
Page 3-50
Result
Value contained in the EEPROM
Remark :
PCD1:
max. 5 registers (0 .. 5)
Other PCD:max. 49 registers (0 .. 49)
ASCII
Dec
Type
" D1"
1
PCD1
" D2"
2
PCD2
" D4"
4
PCD4
" D6"
6
PCD6
ASCII
Dec
Type
" M1_"
10
PCD1.M1
" M1_"
10
PCD2.M12
" M15"
15
PCD2.M15
" M11"
11
PCD4.M11
" M12"
12
PCD4.M12
" M14"
14
PCD4.M14
" M24"
24
PCD4.M24
" M34"
34
PCD4.M34
" M44"
44
PCD4.M44
" M1_"
10
PCD6.M1
" M2_"
20
PCD6.M2
" M3_"
30
PCD6.M3
" M54"
54
PCD6.M5
Examples of valid responses :
" $4C", " 004", " X41"
Ex : 5 dec for Version 005
-1 dec for any '$', 'X', 'β'
Rx
contains the upper 4 bytes of
the program name in ASCII
R x+1 contains the lower 4 bytes of
the program name in ASCII
Example of result :
2 station number = 2
-1 station number not configured
Example of result :
10 delay in ms
-1 S-Bus not configured
 SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Code
6040
Function description
Read S-Bus PGU baudrate
6050
Read S-Bus PGU mode
6060
Read S-Bus PGU port number
6070
Read S-Bus level
6080
Read current PGU owner
(S-Bus or P8 protocol)
Read modem status byte
Reads the current status of the modem connection. This information tells
the user at what stage the modem is at in the initialisation procedure.
Example of result :
2
PCD waiting for modem connection.
6 .. 39 PCD initialising the modem.
40
Reassign serial port for mode SS2/SS1/SS0.
45..49 Connection to modem has been lost. This is an intermediate
status before the modem in reinitialised.
50
Everything is OK and PCD is online in mode SS2/SS1/SS0
Read modem type string
Read the specified modem string
Read modem reset string
from the user program extended
Read modem initialisation string
header into the block of registers
starting with base address R x.
Read system counter
0.. 2.147.483.647
An internal System Counter is incremented every millisecond.
This system Counter is reset to 0 at power up, so a "Restart Cold" , for
instance, doesn't affect it.
The period of the System counter is exactly :
24 days 20 hours 31 minutes 23 seconds 647 ms
For an example see the SYSCMP instruction in the reference guide manual
6100
6500
6510
6520
7000
26/739 E4 (SB-33-E.DOC)
Result
Example of result :
9600 bps
-1 S-Bus not configured
Status
Dec
BREAK without modem
0
PARITY without modem
1
DATA without modem
2
BREAK with modems
10
PARITY with modems
11
DATA with modems
12
S-Bus not configured
-1
Example of result :
1 S-Bus PGU port configured on
port 1
-1 S-Bus not configured
Status
Dec
S-Bus Level 1 (reduced)
1
S-Bus Level 2 (full)
2
S-Bus not configured
-1
CPU 0
0
CPU 1
1
 SAIA-Burgess Electronics Ltd.
Page 3-51
Data Transfer Service
Manual S-Bus
3.12 SYSWR System Write
Description :
This is the complement to SYSRD and it allows modification of system
information or initialisation of system functions via the user program.
Only the usage of the SYSWR with S-bus is explained here.
For more explanations about the other possibilities of this instruction,
consult the PCD Reference Guide.
Format :
SYSWR
Function
Value
; Function code
; Value to be written
Function :
K x or R x : constant or register containing a function code
This instruction can either be direct, by using a
constant for the function code or indirect by using
a register. It permits the user to have access to
useful system information via the user program.
Value :
Ky
R 0 ..4095
Value to be written
Register containing the value to be written
Flags :
If the function code does not exist, the Error flag is set.
Page 3-52
 SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Function codes
Code
4017
4018
4019
Function description
Execute XOB 17 / 18 / 19
Execute the XOB specified in R x or K x on the CPU specified
in K y or R y.
The XOBs 17/18/19 are user XOBs which can be provoked via S-Bus
or the user program. The XOBs are only executed if the CPU is in RUN
or in CONDITIONAL RUN.
Function code :
6000
4017 Execute XOB 17
4018 Execute XOB 18
4019 Execute XOB 19
Permitted values of R y or K y :
0 .. 6
CPU on which XOB will be provoked
7
Provoke XOB on own CPU
8
Provoke XOB on all CPUs
Write S-Bus station number
Change the S-Bus station number to the value held in K y or R y (in the
system RAM and in the EEPROM).
This instruction will work for user program in RAM (write protected), in
EPROM and in Flash EPROM.
Permitted values of K y or R y: 0 .. 254
Write EEPROM (not on all PCD, depending of the hardware)
Warning: A maximum of 100,000 user writes is permitted on the
EEPROM so do not execute this instruction frequently in your
user program. The SYSWR instruction takes 20mS to execute
so it is should not be used in XOB 0.
26/739 E4 (SB-33-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-53
Data Transfer Service
Manual S-Bus
Notes :
Page 3-54
 SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.13 Communication via modem
The use of a modem is necessary when communication has to cover large
distances.
Distances for S-Bus with the RS 485 interface :
•
without repeater, max. 1.2 km
•
with three repeaters connected in series, max. 4.8 km
The use of a modem therefore makes sense for distances above 1.2 km.
The maximum distance depends on modem type, Baud rate and line
quality.
Basically, there are two different types of modem :
•
Modems for private lines or leased telephone line
This type of modem is fully supported by S-Bus mode, application
level 1. Using these modems, all PCD data can be exchanged not
only via a simple point to point connection, but also within a network.
•
Modems for the public telephone network *)
These modems can be used to exchange all PCD data via a dial up
point to point connection. Although dialling a telephone number is
not supported by S-Bus mode application level 1, modem communication via the public telephone network (automatic) is still possible.
The user has to switch from S-Bus mode to C mode (character) to
dial the phone number and then switch back to S-Bus mode when the
connection is established.
The connection can be analogue, digital (ISDN) or radio (GSM).
*)
26/739 E4 (SB-34-E.DOC)
Telecom, Cablecom etc…
 SAIA-Burgess Electronics Ltd.
Page 3-55
Data Transfer Service
Manual S-Bus
3.13.1
Multipoint modems and converters
Modems for private lines or leased telephone lines as well the converters
PCD7.T120 and ..T140 are fully supported by the S-Bus protocol. Both
the modems and the converters are working according the same operation
principle.
"Multipoint" modems can be used to construct a master/slave network
over large distances.
S-Bus Network with "Multipoint" modem :
Master
PCD 1/2/4/6
Programming Unit or
Control System
Modem
Leased line
Modem
Modem
Modem
Slave
Slave
Slave
PCD 1/2/4/6
The RS 232 interface forms the connection between PCD and modem.
Communication between modems is via a 2-wire line in half-duplex
operation.
Requirements for the modems :
For SM2/SS2 mode :
Any standard modem which supports 8 data bits, 1 start bit and
1 stop bit can be used.
For SM1/SS1 mode :
The parity bit has a special use, therefore the modem must
support 9 data bits (8 data + 1 parity), 1 start bit and 1 stop bit.
For SM0/SS0 mode :
The parity bit is not used, therefore any standard modem which
supports 8 data bits, 1 start bit and 1 stop bit and transmits the
break character can be used.
S-Bus Network with converters PCD7.T120 and ..T140 :
PCD or
supervision system
Master
RS232
Termination-Box
PCD7.T160
Termination-Box
PCD7.T160
Converter
PCD7.T120
S-Bus RS485
Converter
PCD7.T120
RS232
PCD2
Page 3-56
Slaves
PCD4
 SAIA-Burgess Electronics Ltd.
RS422
Converter
PCD7.T140
PCD6
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Operating principle :
At the interface to the PCD, the previously mentioned modems and converters function similarly:
On any RS 485 bus, only one station’s transmitter can be switched on at
any one time. In order to produce half-duplex communication on a twowire line, the transmitter and receiver must therefore be controlled by
each station on the bus.
In its idle state, a modem or converter is always set to receive. Before a
telegram can be sent, the transmitter of the participating station must be
switched on and, at the end of transmission, switched off again. In order
to switch the transmitter of a connected modem or converter on or off via
the RS 232 or RS 422 interface, S-Bus mode provides automatic control
of the interface’s RTS (Request To Send) control line whenever an
STXM or SRXM instruction is being executed. The RTS signal is
switched on for as long as a telegram is being transmitted. After transmission the signal is reset within 1 ms.
The following diagram shows the functioning principle for an SRXM or
STXM instruction :
*)
The TFUL flag is only controlled for baud rates up to 4800 bps.
TN-Delay (Delay time on turnaround)
This parameter defines the delay time before the RTS signal is switched
on at the RS 232 and RS 422 interfaces, or before the transmitter is
switched on at the RS 485 interface. A telegram is sent at the earliest after this delay time has elapsed.
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-57
Data Transfer Service
Manual S-Bus
TS-Delay (Training Sequence Delay time)
This parameter defines a monitoring time for the CTS (Clear To Send) signal of a connected device. The PCD sends a telegram as soon as the connected device (modem) has shown its readiness to receive by setting the
CTS signal, or at the end of the TS-Delay time. If the CTS signal has not
been set by the end of the TS-Delay time, bit 23 (CTS-Timeout) is set in
the diagnostic register. Monitoring and handling of the CTS signal is only
active if the parameter has been defined in the SASI text. Otherwise the
CTS signal is ignored. The standard value for the TS-Delay time is 0 ms.
If, within the timeout defined by the SASI instruction, the master station
receives an incomplete or invalid reply telegram, the telegram sent before
is transmitted again.
Radio data modem
These types of modem allow radio data transmission in S-Bus mode. The
following diagram shows the operating principle for SRXM or STXM instructions using a radio data modem :
*)
The TFUL Flag is controlled up to 4800 Baud only.
To run a radio data modem, the DTR (data terminal ready) control line is
also used, so that the UHF carrier frequency can be stabilized by the modem before transmission of data. In contrast to the RTS and CTS signals,
the DTR signal is not controlled automatically by the PCD and must
therefore be set or reset by the user program with the SOCL instruction.
Page 3-58
 SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
SASI Definition text
For modem or repeater operation, the UART definition can be expanded to
include the Timeout, TS-Delay, TN-Delay and Break-Length parameters.
Format:
"UART:<Baudrate>[,<Timeout>][,TS-Delay>][,TN-Delay]
[,Break Length];"
For more details on the different parameters, see page 3-7.
Indicating Timeout, TS-Delay, TN-Delay and Break Length is optional.
If nothing is specified, default values are used :
TimeOut :
TS-Delay :
Break-Length :
calculated in function of the Baudrate
0ms.
4 characters (valid for mode SM0 only)
The parameters can be defined or leave out individually.
TimeOut, TS-Delay and TN-Delay can be set individually from 1 to
15.000 ms
Examples :
"UART:9600,500,50,30,7;"
→
Timeout = 500ms,
TS-Delay = 50ms,
TN-Delay = 30ms,
Break-Length = 7 characters.
"UART:9600,500,50;"
→
Timeout = 500ms,
TS-Delay = 50ms,
TN-Delay = TS-Del/2 + defaultTN-Del = 25ms + 1ms = 26ms,
Default Break-Length = 4 char.
"UART:9600, ,100,50;"
→
default Timeout and Break-Length,
TS-Delay = 100ms,
TN-Delay = 50ms
Default Break-Length = 4 char.
"UART:9600, , ,30;"
→
default Timeout,
TS-Delay and Break-Length,
TN-Delay = 30ms
Default Break-Length = 4 char.
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-59
Data Transfer Service
Manual S-Bus
Determining values for TS-Delay, TN-Delay and Timeout :
The duration of the TS-Delay and TN-Delay should be taken from the description for the modem used. When using the repeater PCD7.T100, the
turnaround time TN-Delay must be adapted. The suitable values can be
found in the manual "Installation components for RS 485 networks" (ref
26/740).
The following rule applies for the Timeout :
Timeout = 3 ∗ (TS-Delay+TN-Delay+Break-Length) + default Timeout
3.13.2
Modems for the Public Telephone Network
A connection is made via the public telephone network by the modem dialling the telephone number of the desired partner station. As soon as the
point to point connection has been established between the two stations,
both modems are transparent and PCD data can be exchanged in
SM2/SS2 mode.
Before a modem can dial a telephone number it must first be told its operating mode and the number of the partner station by the PCD. This
function is not supported by S-Bus mode. However, transmission of initialization parameters and the telephone number can also take place in
C mode.
As soon as a connection is made, the interface is reassigned to S-Bus
mode for the exchange of data.
Procedure for addressing a partner station and exchanging data via the
public telephone network :
1.
2.
3.
4.
5.
6.
Assign interface in C mode.
Initialize modem.
Dial partner station telephone number.
When the connection is made (DCD = high), reassign the interface in
S-Bus mode.
Exchange data.
Break connection and reassign interface in C mode.
Procedure for receiving a call :
1.
2.
3.
4.
Page 3-60
Assign interface in C mode.
Initialize modem.
In case of a call (DCD = high), reassign interface in S-Bus mode.
As soon as the connection is broken off, reassign the interface again
in C mode.
 SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.14 Examples of user programs in IL
3.14.1
Example 1
This example concerns a very simple test program for commissioning an
S-Bus network.
The following hardware installation is used :
Master
PCD2.
M120
S-Bus
Port 1
RS 485
Port 1
Port 1
PCD1.
M120
PCD6.
M300
Slave 0
Slave 1
The master station is to read the status of slave stations 0 and 1 and copy
them into registers 1000 and 1001.
Commissioning :
1.
2.
3.
4.
5.
6.
First check hardware installation according to the installation requirements(consult the appropriate hardware manual)
The slave stations are then allocated their station numbers by the
programming unit, as described in "Station number definition" on
page 3-1.
Load user programs into the slave stations with the programming unit
and switch the CPUs to RUN.
Load user program into the master station (do not switch CPU to
RUN).
Use the debugger to display serial interface diagnostic flags and registers, and registers 1000+1, in the refresh window.
Run program in single step mode (TRACE) and observe diagnostic
elements and the two registers 1000+1.
If the installation is correct, the diagnostic elements show no errors and,
after processing the SRXM instruction, registers 1000+1 contain the
ASCII character "R" (Run) in memory, which corresponds to the status
of the two slave stations.
The following pages reproduce test programs for master station
(TEST_M.SRC) and slave stations (TEST_S0.SRC and TEST_S1.SRC).
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-61
Data Transfer Service
Manual S-Bus
; Test program for the S-Bus master station (PCD1.M120)
; -------------------------------------------------------------------------; This program reads the status of slaves 0 and 1 and stores it into
; the registers 1000 and 1001
; File:
TEST_M.SRC
; Création:
22.06.99
C. Alfonsi
$sasi
TEXT
100
“UART:9600;”
“MODE:SM2,R4;”
“DIAG:F100,R998;”
XOB
16
SASI
1
100
R 1000
0
R 1001
0
; Cold start routine
; Assignation S-Bus
; Assignation RS 485 interface
; with parameters in Text 100
; Reset status register of server 0
$endsasi
LD
LD
; Reset status register of server 1
EXOB
; --------------------------------------------------------------------------COB
0
; Main Program
0
CSB
0
ECOB
SB 0
0
(0)
(TBSY = 0)
1
stl
F 103
ld
R4
0
1
0
k0
R 1000
Read status slave 0
srxm
(1)
2
(2)
Page 3-62
stl
(TBSY = 0)
Read status slave 1
(TBSY = 0)
; slave n° 0
; channel 1
; read status
; cpu 0
; copy to R 1000
F 103
ld
R4
1
srxm 1
0
k0
R 1001
stl
 SAIA-Burgess Electronics Ltd.
; slave n° 1
; channel 1
; read status
; cpu 0
; copy to R 1001
F 103
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
; Test program for the S-Bus slave station 0
; -------------------------------------------------------; Only the RS 485 interface must be initialised
; File: TEST_S0.SRC
; Création:
22.06.99
C. Alfonsi
$sasi
TEXT
100
“UART:9600;”
“MODE:SS2”
“DIAG:F100,R998;”
XOB
16
SASI
1
100
; Cold start routine
; Assignation S-Bus
; Assignation RS 485 interface
; with parameters in Text 100
$endsasi
EXOB
COB
0
0
; Main Program
ECOB
; Test program for the S-Bus slave station 1
; -------------------------------------------------------; Only the RS 485 interface must be initialised
; File:
TEST_S1.SRC
; Création:
22.06.99
C. Alfonsi
$sasi
TEXT
100
“UART:9600;”
“MODE:SS2”
“DIAG:F100,R998;”
XOB
16
SASI
1
100
;
;
;
;
$endsasi
Cold start routine
Assignation S-Bus
Assignation RS 485 interface
with parameters in Text 100
EXOB
COB
0
0
; Main Program
ECOB
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-63
Data Transfer Service
Manual S-Bus
3.14.2
Example 2
This example can be used when commissioning an S-Bus installation with
modem for private lines or leased public telephone lines.
Hardware installation :
Master
PCD4.
M125
Port 1
RS 232
Modem
pivate line
Modem
Port 1
Modem
RS 232
Port 1
RS 232
PCD1.
M120
PCD2.
M120
Slave n
Slave 0
Modem type :
ALCATEL LBM 19200
DIL switch setting in modem
1 2 3 4 5 6 7 8 9 10 1112
CLOSED
OPEN
Program function :
The master station copies 8 source elements (I8..15) to destination elements (O40..47) of a slave station. The slave station address can be preselected by a BCD switch (connected to inputs 16..31) on the PCD6.
Diagnostic flags are allocated to outputs 32..39.
The debugger can be used to display diagnostic registers in the refresh
window.
The following pages reproduce the test program for master station
(TEST_M1.SRC) and slave stations (TEST_SN.SRC).
The test program is identical for all slave stations.
Page 3-64
 SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
; Test program for the S-Bus master station (PCD4.M125)
; ------------------------------------------------------------------------; This program copies the inputs 0..15 of the master station to the
; outputs 40..47 of a selected slave station
; File:
TEST_M1.SRC
; Création:
22.06.99
C. Alfonsi
$sasi
TEXT
100
“UART:9600,100,30;”
“MODE:SM1,R4;”
“DIAG:O32,R0;”
XOB
16
SASI
1
100
; Cold start routine
; Assignation S-Bus
; Assignation RS 232 interface
; with parameters in Text 100
$endsasi
EXOB
; ----------------------------------------------------COB
STH
DYN
ANL
CPB
0
0
I 0
F 0
O 35
H 1
; Main Program
; If Input 0 goes High
; and TBSY = 0
; Then Write elements
ECOB
; ----------------------------------------------------PB
LD
DIGI
STXM
1
R 0
0
2
I 16
R 10
1
8
I 8
O 40
; Write elements
; Clear diag register
; Read destination station number
; on BCD switches on I 16
; Transmit
; Number of elements
; Source address
; Destination address
EPB
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-65
Data Transfer Service
Manual S-Bus
; Test program for the S-Bus slave station (PCD1)
; -------------------------------------------------------------; Only the RS 232 interface must be initialised
; For all slaves the same program is used
; File:
TEST_SN.SRC
; Création:
22.06.99
C. Alfonsi
$sasi
TEXT
100
“UART:9600,100,30;”
“MODE:SS1;”
“DIAG:O32,R0;”
XOB
16
SASI
1
100
; Cold start routine
; Assignation S-Bus
; Assignation RS 232 interface
; with parameters in Text 100
$endsasi
EXOB
; -------------------------------------------------------------------COB
0
0
; Main Program
ECOB
Page 3-66
 SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
3.15 Example of user programs in FUPLA
Example
The example concerns an application in which a master reads and writes
the following data from two slaves:
•
slave 20:
- slave registers 100..107 are copied to master registers 200..207.
- Master inputs 16..23 are copied to slave outputs 32..39.
•
slave 22:
- slave inputs 0..7 are copied to master flags 1000..1007.
- Master flags 2000..2007 are copied to slave outputs 16..23.
The following hardware installation is used:
Master
PCD2.
M120
S-Bus
Port 1
RS 485
Port 1
Port 1
PCD2.
M120
PCD1.
M120
Slave 20
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Slave 22
Page 3-67
Data Transfer Service
Manual S-Bus
Program for the master controller
Initialization of interface:
Page 3-68
 SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Communication with slave 20:
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-69
Data Transfer Service
Manual S-Bus
Communication with slave 22:
Page 3-70
 SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Data Transfer Service
Program for the slave controller 20
26/739 E4 (SB-34-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 3-71
Data Transfer Service
Manual S-Bus
Program for the slave controller 22
Page 3-72
 SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Commissioning service
4. Commissioning service
4.1 Essential characteristics and applications
With Level 2, the entire S-Bus protocol is supported.
Level 2's additional telegrams support the programming, commissioning
and diagnosis of any PCD by the programming unit (PG). Level 2 can
only be used with the programming unit.
The PG is always master in any S-Bus network. Access to a slave station
may be in point-to-point connection, via the RS485 network, or via modem, including the telephone dialling network.
Essential characteristics of level 2 :
•
The simple efficiency of the S-Bus protocol results in fast downloading (up to 38.4 Kbps) of user programs.
•
Programming and commissioning of all slave stations connected to
the network from a central point.
•
Remote diagnosis and programming by modem via the public telephone dialling network.
26/739 E4 (SB-40-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 4-1
Commissioning service
Manual S-Bus
Applications
Programming, commissioning and diagnosis
Local point-to-point
Master
PG
RS232, RS422, RS485
Slave
S-Bus protocol
PCD 1/2/4/6
In an RS 485 network
Master
PG
S-Bus
RS485
PCD 2
PCD 1
PCD 4
PCD 6
Slaves
By modem via the telephone dialling network
Slaves
Master
Modem
RS232
PCD 1
PG
RS232
Page 4-2
Modem
Public Phone
Network
 SAIA-Burgess Electronics Ltd.
Modem
PCD 2
Modem
PCD 4
Modem
PCD 6
(SB-40-E.DOC)
26/739 E4
Manual S-Bus
Commissioning service
4.2 Local programming and commissioning
The programming interface (PGU) is defined as whichever interface provides the programming unit with access to a CPU.
Standard PGU interface :
PCD type
PCD1
PCD2.M110/M120
PCD2.M150
PCD4
PCD6.M540
PCD6.M1/M2..
PCD6.M300
Port number
Standard Protocol
Port 0
Port 0
Port 0
Port 0
Port 0
with PCD8.P800
Port 4
S-Bus
P8
S-Bus
P8
P8
P8
S-Bus
The P8 protocol is only supported from this original PGU interface.
With S-Bus protocol level 2, the programming unit can access a CPU
via another interface. (see Appendix B).
In the case of PCD2.M110/M120, PCD4 and PCD6.M540 CPUs, interface no. 0 supports the P8 and S-Bus protocols simultaneously, if previously configured to do so by the utilities. However, the P8 protocol always has priority.
This means :
•
On delivery from the factory, the PGU interface is set for the P8
protocol. The PGU interface of the PCD1, PCD2.M150 and
PCD6.M300 is set for the S-Bus protocol only (see table above).
•
If it is necessary to configure a PGU interface for the S-Bus protocol,
this configuration can only be carried out while using the P8 protocol.
•
It is always possible to produce an "online" connection to a PCD
CPU using the programming unit and corresponding programming cable via the PGU interface. This applies even when the PGU interface
has already been assigned for another purpose (e.g. communication
with a terminal in C mode) or has been configured for the S-Bus protocol.
In their original state (ex factory) all CPUs have their PGU interface configured for the P8 protocol. From this starting point it is possible, with the
aid of the programming unit, to configure the PGU interfaces of the
PCD2.M110/M120, PCD4 and PCD6.M540 for the S-Bus protocol in
addition to the P8 protocol. In this way, the CPU at the PGU interface
supports both protocols. The PCD8.K111 programming cable enables the
CPU to recognize which protocol has been set and assign the interface
accordingly.
26/739 E4 (SB-40-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 4-3
Commissioning service
Manual S-Bus
The PCD1, PCD2.M150 and the PCD6.M300 support ex factory only the
S-Bus PGU protocol on the PGU interface.
In the case of the PCD6.M1/2.. the PCD8.P800 interface processor is
connected to the PGU interface. This processor only supports the P8
protocol and cannot be configured as an S-Bus PGU. A standard interface can also be configured as an S-Bus PGU (see Appendix D).
The following rules apply :
•
A maximum of two PGU interfaces per CPU is possible. However,
only one of these can be configured for S-Bus.
Examples for the PCD4 :
Port 0
Port 1
or
Port 0
P8-PGU
S-Bus-PGU
P8 and S-Bus-PGU
•
If an interface is configured as S-Bus-PGU, it can only be employed
by the user program for general communications after doing a SASI
MODE OFF. If a SASI instruction is executed by the user program
without a de-assignation, the error flag is set.
•
If two programming units are connected simultaneously to one CPU,
the programming unit at the standard PGU interface (in P8 protocol)
has priority. This means that the second programming unit has reduced CPU access, only being able to execute the read commands
from level 2. From level 1 (data transfer service) all write and read
commands are allowed.
Important :
The assignation of an S-Bus PGU interface can not be done with a
SASI instruction, but must be configured with the PCD Utilities.
Page 4-4
 SAIA-Burgess Electronics Ltd.
(SB-40-E.DOC)
26/739 E4
Manual S-Bus
Commissioning service
4.3 Configuration and assignment of an S-Bus PGU interface
The procedure which applies here is different depending on whether
memory modules are used with RAM or EPROM components.
If RAM memory modules are used on the PCD, configuration of the SBus PGU interface takes place directly online on the PCD.
If EPROM memory modules are used on the PCD, configuration of the
S-Bus PGU interface is defined in the offline configurator. This definition
is then saved to the EPROM during EPROM programming.
4.3.1
Memory modules with RAM components
The following generally applies :
An S-Bus PGU interface can only be configured via the original interface
using the P8 protocol.
1.
26/739 E4 (SB-40-E.DOC)
Adjust interfaces, baud rates and transmission mode at the PC.
Call "Connection Options" from the "Online" menu in the
"Project Manager".
 SAIA-Burgess Electronics Ltd.
Page 4-5
Commissioning service
Manual S-Bus
Select "PGU direct connection" and the correct CPU number:
Confirm with OK.
2.
Join PCD8.K111 connecting cable between PC and PCD.
3.
In the Project Manager, press the "Online Configurator" button:
The online connection with the PCD has thereby been produced.
Page 4-6
 SAIA-Burgess Electronics Ltd.
(SB-40-E.DOC)
26/739 E4
Manual S-Bus
Commissioning service
4.
Press the 'S-Bus' button
5.
Select of "S-Bus Support" and press the 'S-Bus' button
6.
Definition of S-Bus parameters:
This menu defines the S-Bus station number, the interface number
for the S-Bus PGU, the baud rate and the S-Bus mode (normally
"Data", if no modems are being used).
Normally "S-Bus timing" must be left at 0 (= standard value).
After pressing the OK button, this window is exited and one then
returns to the "S-Bus Configuration" window.
Exit this window also with the 'OK' button.
26/739 E4 (SB-40-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 4-7
Commissioning service
Manual S-Bus
With this, the following warning appears on the screen:
After this warning has been confirmed with the YES button, the current
S-Bus configuration is transferred to the PCD and activated in it.
7.
Check configured S-Bus parameters.
When the "S-Bus Configuration" window is called from the
"Online Configurator" the configured S-Bus parameters are read
from the PCD and displayed on the screen.
The S-Bus PGU interface has now been configured with the S-Bus protocol and is ready to use. This configuration can only be changed with the
"Online Configurator", by means of the "S-Bus Configuration" submenu.
Page 4-8
 SAIA-Burgess Electronics Ltd.
(SB-40-E.DOC)
26/739 E4
Manual S-Bus
Commissioning service
4.3.2
Memory modules with EPROM components
1.
Run the "Offline Configurator" from "Project Manager".
2.
In the "Configuration File Editor" select the "S-Bus Support" field
and press the "S-Bus" button.
3.
Definition of S-Bus parameters: This menu defines the S-Bus station number, the number of the interface to be used for the S-Bus
PGU, the baud rate and the S-Bus mode (normally "Data", if no
modems are being used). Normally the "S-Bus timing" must be left
at 0 (= standard value)
Exit this menu item.
26/739 E4 (SB-40-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 4-9
Commissioning service
Page 4-10
Manual S-Bus
4.
With the "Eprom Programmer" menu in the "Project Manager“ an
EPROM can then be programmed or a HEX file can be created.
The S-Bus configuration is written automatically to the EPROM.
5.
Insert the EPROM in the PCD and establish a connection with the
programming unit. Select the PGU (P8) protocol with the "Connection Options" submenu from the "Online" menu.
6.
Check the settings using the "Online Configurator".
7.
The configured S-Bus PGU interface has now been assigned with
the S-Bus protocol and is ready to use. Since the configuration is
stored in the EPROM, data can only be changed by reprogramming
the EPROM.
 SAIA-Burgess Electronics Ltd.
(SB-40-E.DOC)
26/739 E4
Manual S-Bus
Commissioning service
4.4 Connection of the PG Unit via S-Bus
The programming unit should be connected to the S-Bus PGU interface (as
a point-to-point connection or via RS485 network) and the S-Bus protocol,
CPU and station numbers must be selected from the "Online" menu, submenu "Connection Options".
An 'S-Bus connection' must be selected:
The connection test is done using the "Online Configurator".
The station number and S-Bus protocol are displayed throughout at the
foot of the window.
After a successful connection with the station defined in the "Connection
Options" menu, all functions of the PG4 Utilities can be used via the SBus PGU interface.
26/739 E4 (SB-40-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 4-11
Commissioning service
Manual S-Bus
If the S-Bus protocol has been selected, the PCD Debugger displays the
station number of each connected slave station on the top line (status
line) of the screen.
Debug "cOnnect"
This submenu enables a CPU of the connected slave to be selected
(PCD4.M445).
In an S-Bus network it is possible to switch between the individual stations (but only if an S-Bus gateway has previously been defined on the
master).
Page 4-12
 SAIA-Burgess Electronics Ltd.
(SB-40-E.DOC)
26/739 E4
Manual S-Bus
Modems
5. Modems
This part concerns modems used on the Public Telephone Network
(PSTN), these modems are called Public Line Modems (PLM)
DTE
DCE
DCE
DTE
Master
PG4
RS232
Modem
Public Phone
Network
or GSM
DTE :
Data Terminal Equipment
DCE :
Data Communication Equipment
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Slave
Modem
RS232
PCD
Page 5-1
Modems
Manual S-Bus
5.1 Transmission speeds
Data speeds are defined in ITU-T standards (International Telecommunication Union - Telecommunication Standardization Sector).
Former the ITU-T was called CCITT standards (Comité Consultatif International Téléphonique et Télégraphique)
Main defined modem communications standards :
ITU-T
ITU-T
ITU-T
ITU-T
ITU-T
ITU-T
ITU-T
ITU-T
V.21
V.22
V.23
V.22bis
V.32
V.32bis
V.34
V.42
ITU-T V.42bis
ITU-T V.90
ITU-T V.110
ITU-T V.120
V.32terbo
V.Fast
MNP 5
300 bps
1 200 bps
1 200/75 bps
2 400 bps
4 800 and 9 600 bps
4 800, 7 200, 9 600, 12 000 and 14 400 bps
33 600 bps
Error control MNP (Microcom Networking Protocol)
MNP 2-4 for V.22, V.22bis, V.32 and V32bis modems
Data compression for V.42 modems
56 000 bps
Synchronous bit rate adaptation for ISDN without error
correction.
600, 1 200, 2 400, 4 800, 7 200, 9 600, 12 000, 14 400,
19 200, 48 000 and 56 000 bps
Synchronous and asynchronous bit rate adaptation for
ISDN with error correction.
Baud rates same as V.110
19 200 bps, only supported by few modem manufacturers
28 800 bps
Data compression not compatible with V.42bis
There also exist manufacturer specific communications protocol like for
example CODEX V.Fast for 24 000 bps of Motorola which are not standardised.
Fax Standards :
ITU-T V.27ter
ITU-T V.29
ITU-T V.17
Page 5-2
4 800 bps
9 600 bps (also supported by many fax-modems)
14 400 bps
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
The usable speed in practice is dependent on :
•
•
the used modem types
the telephone line quality
In principle any combination of modem types is possible for the communication between PG3 and PCD. This means a fast V.32bis modem can
also communicate with slow V.22bis modem. The fast modem will automatically adapt the speed to the slower modem.
To allow this, the following parameter must be set in the fast modem :
•
speed buffering and normal mode must be enabled.
PG4 - Modem or PCD - Modem (DTE - DCE) data speed
The PG4 and PCD support DTE baud rates up to 38 400 bps.
The baud rates between PG4 - modem and between PCD - modem can
be different.
To allow this, the following parameters must be set in the modems :
•
•
Automatic speed adaptation for the DTE interface must be
disabled.
Speed buffering must be enabled.
Notes :
•
When the PG4 uses a higher baudrate than the PCD then the S-Bus
time-out in the PG4 must be adapted for the slower baudrate.
•
Fast modems require buffered UARTs in the computer. An old AT
(286) or XT may not work at 38 400 bps.
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-3
Modems
Manual S-Bus
5.2 Operating your modem
Your modem has two operating modes : the Command mode and the
Data mode.
•
The Command mode lets you send instructions (in the form of commands) to your modem to perform a variety of functions.
•
The Data mode lets you exchange data across the telephone line with
a remote device. In this mode, your modem assumes everything it receives from your computer is data and sends it across the telephone
line. Therefore, you can not issue a modem command while your modem is in the Data mode.
Power Up
ATZ
AT&F
DTR loss (&D3)
Command
State
ATO
ATD
ATA
ATH
Connecting
Hang Up
Fail to connect
Connection established
Escape
DTR Loss
(&D1)
On-Line
State
Carrier Loss
DTR Loss (&D2)
DTR Loss (&D3)
Page 5-4
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.2.1
The AT command set
AT commands are used to set or modify the modem parameters.
Original AT command set
This standard has been implemented for the Hayes-Smart modem 1200
and describes the so called "one character commands" like for example
ATD for dialling or ATH for hang up. This standard is used by all Hayes
compatible modems.
Extended AT command set
This is a command standard for V22bis modems. The reference is again
the Hayes-Smart modem 2400. The original commands have been extended by so called "& commands".
Superset AT command set
This command set is based on the extended command set and supports
new functions for high speed modems (V.32 and V.32bis). For example
data compression (AT%C) or error control (AT\N).
Unfortunately for this superset there is no common standard.
The meaning for the commands can be different depending on the modem supplier.
Hayes compatibility is only valid for commands used in the
V.22bis standard.
Configuration parameter profiles
•
User specific profiles
The modems are equipped with a non volatile memory to store one or
several user specific configuration profiles and telephone numbers.
The active profile can be stored using the command AT&W.
The stored user profile can be activated with the command ATZ.
•
Factory default profiles
Each modem has one or several factory default profiles which are
permanently stored in the ROM. This profiles can not be modified by
the user.
The factory profiles can be activated with the command AT&F.
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-5
Modems
Manual S-Bus
Viewing and modifying modem parameters
Modem parameters can be modified only when the modem is in the
command state. By means of a terminal emulation program the modem
parameters can be displayed or modified.
Command input format :
AT command1 [command2] [...commandn] <CR>
(max. 40 characters)
The modem echoes all received characters unless the echo is disabled by
issuing :
ATE0 <CR>
This command is executed when the PCD initialises the modem.
The modem sends a response code (if defined so) after an executed
command line :
OK
ERROR
when the command was processed
in case of invalid command
The active and the user profiles can be displayed with the command :
AT&V
(For the Us-Robotics modem use the ATI4 command)
Page 5-6
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.2.2
Important configuration parameters for the PG4 and
PCD modem
The following list is an example of a working modem set-up. The list is
the result of executed tests with a V.32bis modem type 'US Robotics
Courier'. The same modem type was used for both the PG4 and the PCD.
If you use another type of modem, it can be that the extended HAYES
command set is not 100 % the same as this one below. So before you try
these commands, consult your modem’s manual to be sure that they have
the same effect on your modem.
If you can not find the same commands, try to find an equivalent by
comparing the description.
AT commands for the US Robotics Courier V.32bis modem :
The following applies :
• Commands written in bold are important for a correct function.
• Commands between ( ) have no influence on the functionality.
• Commands in normal writing were not especially analysed and should
be set as indicated in the list.
PG4
modem
B0
PCD
modem
B0
Description
E1
E0
Local Echo : PG4 --> enabled, PCD --> disabled
F1
F1
Local Echo OFF once a connection has been made
(L2)
(L2)
No function for this modem,
for other modems : speaker volume setting
(M1)
(M0)
M0 : speaker off
M1 : speaker on until carrier detected
Q0
Q0
Return result codes
V1
V1
Display result codes as words (e.g. "OK", "CONNECT", ....)
X4
X4
Provides basic call progress result codes, connection speed,
Busy signal detection and dial tone detection
&A3
&A3
Display protocol result codes
&B1
&B1
DTE - DCE speed independent of DCE - DCE speed
(fixed DTE speed)
&C1
&C1
Track status of carrier detect signal (DCD)
26/739 E4 (SB-51-E.DOC)
Handshake options ITU-T standard V.32
 SAIA-Burgess Electronics Ltd.
Page 5-7
Modems
Manual S-Bus
PG4
modem
PCD
modem
Description
&D0
or D2
&D0
or D2
&G0
&G0
&D0 : ignore DTR signal (requires proper hang up string in
the file 'modem.dat')
&D2 : Monitor DTR signal. For an On-to-off transition of
DTR the modem hangs up and enters the command
state.
Use no guard tone
&H0
&H0
Disable transmit data flow control (CTS)
&I0
&I0
Disable receive data software flow control
&K0
&K0
Data compression disabled
&L0
&L0
Normal phone line operation
&M0
&M0
Normal mode, no error control
&N0
&N0
Auto mode for DCE - DCE speed (normal link operation)
When originating, permit negotiation of a common communication standard at highest line speed supported by both modems.
&P0
&P0
Pulse dial make/break ratio : North America
&R1
&R1
Ignore RTS
&S0
&S0
DSR always on
&T5
&T5
Modem testing : deny remote digital loop back
&X0
&X0
Synchronous timing source
&Y3
&Y3
Transmit BREAK sequentially with received data stream
(non-destructive, unexpected)
&N6
&N6
Synchronous clock speed : 9 600 bps
Summary of main important modem functions which must be set
for S-Bus PGU :
Page 5-8
•
Data compression must be disabled (for Break and parity modes)
•
Error control must be disabled
•
RTS/CTS flow control must be disabled
•
DSR must always be on
•
BREAK characters must be transmitted in sequence with received data
(only for Break mode)
(for Break and Parity modes)
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.2.3
Configuring the PCD Utilities for your modem
The PCD Utilities contains some standard modems configuration :
•
•
•
•
•
•
Hayes compatible
Hayes compatible High Speed
US Robotics Courier
Zyxel U-1496 Series
Miracom WS 3000
User-defined modems
The different modems and commands they use can be seen with the "Define Modems" submenu from the "Online" main menu of the "Project
Manager". Modem parameter entries under this menu item always relate
to the modem that is connected to the PC. All entries are stored in the
"Windows" directory, file "spgmodm.ini".
In 'Modem List' all known modems are listed. Existing modems are indicated with the "Edit" button. New modems are added with the "Add"
button. Existing modems are deleted with the "Remove" button.
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-9
Modems
Manual S-Bus
After pressing the 'Edit' button, the following window can be seen:
Page 5-10
Reset Modem
Resets the modem to its factory default state
Initialize
Modem
Initialises the modem : Set time-outs, disable error
control data compression, enable call progress detection
etc…
Dial command
Prefix
Sent before the telephone number when dialling
Dial command
Suffix
Sent after the number when dialling, this is usually "\r"
(CR).
Hangup
command
The command to disconnect and hang up the line. If
empty, it is assumed that dropping DTR (Data Terminal
Ready) for seconds will hang up the line, as for Hayes
compatible modems.
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
Auto-answer on This string must put the modem into auto-answer mode
so that it will automatically answer an incoming call and
connect to the remote modem. This is used to enable
"auto-answer mode". This string usually loads a register
in the modem (S0) with a ring count. When the ring
count is non-zero, the modem answers an incoming call
on the defined number of rings.
Auto-answer off This must disable auto-answer mode, so that the modem
will not automatically answer an incoming call. This
string usually sets the modem's ring count register (S0)
to 0.
Select command The sequence which switches the modem from data
Mode
transfer to command mode. The "+++" string is preceded and followed by a 1.5 second delay, defined by
three 0.5 second Delay characters : "~~~".
500ms delay
character
A special dummy character. Whenever this character
appears a modem command string the system waits for
500ms instead of transmitting the character to the modem. Traditionally this is the tilde character (~), which
can be seen in the example "Command" string.
Ok response
The string returned by the modem when a command is
accepted. This is the string returned when the "Reset",
"Init" or "Hangup" commands are sent.
Connected
response
The string returned by the modem after the dial
command, when the remote modem has answered, connection has been established, and the carrier detect signal (DCD) is being returned.
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-11
Modems
Manual S-Bus
S-BUS
Signalling
Modes
- Break mode
- Data mode
- Parity mode
The S-Bus protocols that the modem supports can be
defined with these parameters. More than one S-Bus
protocol can be selected. When there is an S-Bus connection via modem, the PG4 will try to make a connection with the PCD using all the selected S-Bus
protocols. As soon as the right S-Bus protocol has
been found, the S-Bus connection will be made. In
order to accelerate S-Bus connection, or to avoid undesirable side effects in the modem, only the required
S-Bus protocol should be switched on. The last S-Bus
protocol to have been selected will be used first when
a new S-Bus connection is made.
Modem strings can contain escape sequences for common ASCII control
characters or hex values in strings. These are preceded by a backslash '\' :
\r
\n
\a
\b
\f
\t
\v
\xhh
\\
\"
Page 5-12
0x0D
0x0A
0x07
0x08
0x0C
0x09
0x0B
0xhh
0x5C
0x22
CR
LF
BEL
BS
FF
HT
VT
\
"
carriage return
line feed
bell
backspace
form feed
tab
vertical tab
hex value \x00..\xFF
backslash
quotation mark
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
Modem response strings (Ok response and Connected response)
The "Ok response" and "Connected response" strings are delimited by
CR/LF characters. CR and LF must NOT be entered in the string definitions, do not enter '\n' or '\r'. Only the characters entered in the "Ok response" or "Connected response" string, excluding the delimiting CR/LF,
are compared. If the response is longer, the additional characters are ignored.
For example, "CONNECT" matches "<CR><LF>CONNECT 2400
<CR><LF>", the "<CR><LF>" and " 2400" are ignored.
Do not initialise the modem to return single digit result codes (e.g. "0"),
these will not work. String values, enclosed by CR/LF characters must be
returned (see Hayes command "V1"). Do not initialise the modem so
that it does not return response strings, these are required by the dialler to
monitor connection progress (see Hayes command "Q0").
High speed modems with data compression and error correction
Data compression and error correction protocols are not compatible with
S-Bus break and parity modes, and must be disabled.
Usually the Hayes command "&Q0" will do this, use Init="AT&Q0\r" (or
use pre-defined modem type [Hayes Compatible High-Speed]).
Call progress detection
Some modems have the ability to detect if the line is busy (engaged) or
there is no dial tone. If the modem has this capability, it is useful to enable it with the "Init" string. This speeds up the dial retries, because the
dialler will be able to detect these conditions instead of waiting for the
dial time-out period to elapse.
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-13
Modems
Manual S-Bus
5.2.4
PCD and modem
Initialization settings for the modem connected to the PCD are defined in
the Project Manager’s "Tools/Configuration File Editor" menu item.
To do this, the "S-Bus Support" and "Public Line Modem" options must
have been selected.
After pressing the "Modem" button, the following selection window appears:
Page 5-14
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
An existing modem can be selected with the "down arrow" key:
Window that appears after the "Modem Setup" button has been pressed:
Modem name
Indicates the name of the selected modem.
Reset modem
Reset String for the Modem.
Initialize
modem
Places the modem into "auto-answer" mode, so that it
automatically answers an incoming call. This string
should also set the "DTR detect time" to greater than
250 mS, to stop the modem hanging up the line when a
"restart" is done.
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-15
Modems
Manual S-Bus
5.2.5
Run sequence of modem in the PCD
The following steps are executed by the PCD when the modem is connected to the RS 232 interface (using the utilities the interface was previously configured for S-Bus PGU with public line modem) :
Automatic assignation of S-Bus PGU port
for communication in mode MC0
Start Up Phase
S e t D TR an d R TS
no
STANDBY:
DSR or CTS
High
Waiting for the connection of the modem
Wait 1,5 sec
Put Modem in Command mode
Wait 1,5 sec
RESET modem
Wait 3 sec
Send RESET string
Initialize Modem
in Auto-answer mode
Wait 1,5 sec
no
Send INIT string
Check the connection with the modem
DSR or CTS
High
Assign port to work in
S-BUS PGU with modems
Set DTR - Reset RTS
yes
Connection with modem OK
(DSR)
Wait incomming call
Answer to S-Bus resquest of the remote console
no
Assign port for communication
in mode MC0
Set DTR and RTS
1. The modem is set into command state by sending the escape sequence "+++"
2. The modem is reset and the stored user profile 0 is recalled by sending the reset command string (usually "ATZ").
Page 5-16
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
3. The "initialise modem" string is sent.
Usually :
E0 :
Local echo disabled.
M0 :
Speaker is turned off.
S0=002 :
Put modem into auto answer mode. After 2 rings
the modem goes off-hook and automatically answers the call.
S25=250 :
DTR change detect time.
Make sure that your modem accepts register S25 and the meaning is
the same as described above. If this is not the case, you can try to
work with your modem by disabling the DTR signal (ignore DTR signal "&D0").
26/739 E4 (SB-51-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-17
Modems
Manual S-Bus
Notes :
Page 5-18
 SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.3 Connection via the Public Telephone Network
5.3.1
Application diagram
DTE
DCE
DCE
DTE
Master
PG4
RS232
Modem
Public Phone
Network
or GSM
DTE :
Data Terminal Equipment
DCE :
Data Communication Equipment
Slave
Modem
RS232
PCD
Cable
DTE
(PG4, PCD)
TXD
RXD
RTS
CTS
PGND
DTR
DSR
DCD
DCE
(Modem)
TXD
RXD
RTS
CTS
PGND
DTR
DSR
DCD
PCD ports supporting S-Bus PGU with modems
The PGU port on the PCD lacks some important signals which make it
impossible to use Public Line Modems on this port. The PCD requires
5 control signals (RTS, CTS, DTR, DSR, DCD) to manage the modem.
26/739 E4 (SB-52-E.DOC)
RTS
REQUEST TO SEND
CTS
CLEAR TO SEND
DTR
DATA TERMINAL READY
DSR
DATA SET READY
DCD
DATA CARRIER DETECT
 SAIA-Burgess Electronics Ltd.
Page 5-19
Modems
Manual S-Bus
The following ports support S-Bus PGU with modems :
Page 5-20
PCD1.M120/M130 :
port 1 (RS 232)
PCD2 :
port 1 (RS 232)
PCD4:
port 1 (RS 232)
PCD6.M540 :
port 2 (RS 232)
PCD6.M1/2 :
all RS 232 ports (0..3)
PCD6.M300 :
all RS 232 ports (0..3)
 SAIA-Burgess Electronics Ltd.
with bus module PCD4.C120
or C340
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.3.2
Configuring the PCD
1.
Connect the PC’s RS232 port with the PCD’s PGU interface.
2.
From "Project Manager", start the "Online Configurator".
3.
Press "S-Bus".
•
26/739 E4 (SB-52-E.DOC)
Give to the PCD a Station number (from 0 to 254)
 SAIA-Burgess Electronics Ltd.
Page 5-21
Modems
Manual S-Bus
•
Select the PGU port you want to use with the modem
Remember : that port 0 cannot be used with a modem
•
Select the Baud rate for your modem
•
Select the S-Bus mode : BREAK or DATA
•
Confirm with the OK button.
4.
Select which modem is to be connected to the PCD.
•
•
5.
Page 5-22
With the "Modem" button it is possible to verify the reset and
initialization strings of the selected modem.
Confirm with the OK button.
Download the configuration to the PCD by pressing the 'OK'
button.
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.3.3
Configuring the PC (PG4)
1.
From "Project Manager", select the "Online/Connection Options"
menu:
2.
Select "S-Bus dial-up modem connection" for the "Channel name":
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-23
Modems
Page 5-24
Manual S-Bus
3.
The port, baud rate, modem and timing parameters can be modified
with the "Setup" button:
4.
When necessary, adjustment of timing parameters is possible with
the "Timing" button:
As long as no connection problems arise, it is not advisable to
change the standard parameters of S-Bus time settings.
Training
Sequence
delay (TS)
Training sequence delay, in milliseconds. This is the
delay between setting RTS (Request To Send) and the
transmission of the message.
Turnaround
delay (TN)
Turnaround time in milliseconds. The minimum time
between the end of a response and transmission of the
next telegram. It gives the remote station time to switch
back to receive mode. The TN delay is particularly important if using the PCD7.T100 repeater or private line
modems.
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
Response
timeout
Response time-out in milliseconds. This is the time-out
until the end of the response message is received.
Break length
The "Break length" is the duration of the break signal,
in character times. The break signal tells the remote
station that a new telegram is about to be transmitted.
The default is 4 character times, but some modems may
need longer to register the break signal. Normally this
should never be greater than 10, otherwise communications throughput will be affected.
Remarks :
The TS delay, time-out and TN delay should be set to
the minimum possible values required by the hardware.
If (TS delay + TN delay) is greater than about 500 mS
the "Debug" program will not work. It polls the PCD
every 500 mS, and all the processing time would be
taken up by these delays. The Timeout should also be
set as low as possible because this affects the processing of key depressions if the PCD is off line.
The TN delay is the most critical, Timeout and TS delay
are both usually 0 so that default values are used. The
response time-out is the time the PC will wait until the
start of the response message. It is rounded up to the
nearest 55 mS, since the PC's internal clock ticks at 55
mS intervals. After the 1st character of a response has
been received, the PC uses and inter-character time-out
of 55 mS.
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-25
Modems
Manual S-Bus
Dial timeout
The time to wait after dialling for the detection of the
carrier signal (DCD) from the remote modem.
Note : The modem itself often has an internal time-out
value (usually 30-45 seconds). "Timeout" is never used
if the modem's internal value is less.
To use a longer time-out, change the modem's internal
time-out value by adding the command to the "Init" sequence. For Hayes compatible modems this is "S7=n",
where "n" is the time-out in seconds, e.g. for a 45 second time-out on a Hayes compatible modem, use :
Init="ATS7=45\r"
Timeout=45
Hangup
timeout
; set 45 seconds time-out
Waiting time in minutes. If no telegrams are transmit
ted, after this time the modem connection will be broken off.
This avoids high telephone charges if the user forgets to
discontinue modem connection.
Monitoring time is not active if a 0 value is entered.
Number of
dial Retries
Page 5-26
The number of additional dialling attempts made on
failure to connect to the remote modem. Max. is 3.
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.3.4
Making the connection
1.
Connect the PCD and the modem together. It is not necessary that
the PCD contains a program.
2.
Connect the modem to the public telephone line
3.
Issue a power down/power up sequence to be sure that the PCD
initialises your modem correctly.
4.
From the Online Configurator's, "Online" menu, "Connection Options", select: "S-Bus dial-up modem connection":
26/739 E4 (SB-52-E.DOC)
•
Put the CPU and station number
•
Type the telephone number to dial
The telephone number can contain digits and any characters
supported by the modem. On HAYES modems ',' generates a 1
second delay for pausing when dialling.
The telephone number can be chosen from a user-editable
Phonebook file by selecting the key "Phonebook". You can edit
this phonebook with a text editor.
•
Select "Don’t hang up".
This stops the connection from being discontinued when there is
a change of editor.
•
Press the "Dial" button to make a connection.
 SAIA-Burgess Electronics Ltd.
Page 5-27
Modems
Manual S-Bus
The PC begins to initialise the modem and after a few seconds, you must
hear the telephone tone and the dialling progress.
Dialling can be aborted by pressing "Cancel". On the last line, messages
are displayed showing the progress of the connection.
If the connection is successful, the Utilities returns to the main menu.
The character " * " in front of the "Channel name" shows you that you
are connected.
Page 5-28
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
Any editor can now be switched online.
At the same time it is apparent in any editor that this is an S-Bus modem
connection:
•
"Online Configurator"
•
"Debugger"
•
"Fupla"
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-29
Modems
Manual S-Bus
5.3.5
Trouble shooting
Problem 1 :
The PCD modem does not answer to an incoming call.
Verify that the modem is in auto answer mode :
• LED on the modem front panel on ?
• Is the cable correct wired ?
• Make a power down/power up and observe the receive LED of
the PCD modem to see if it receives the initialisation sequence
from the PCD.
Problem 2 :
After dialling the phone number the message "connected
to remote modem" is displayed but immediately a dial
retry is made.
Verify the response string of the modem :
• Check specified response strings in modem.dat file
• Check modem parameters V1, W0, X4
Problem 3 :
•
•
•
After an established connection to the remote modem it
is not possible to come online with the S-Bus protocol.
Error message in connect menu: "No response from
PCD"
Check the S-Bus station number
If DTE speed of the PCD modem is lower than DTE speed of
PG4 modem then PG4 time-out value must be adapted for the
lower speed.
Check modem parameters set-up according to the parameter
list in this document.
Problem 4 :
By means of the utilities downloader the configuration of
an S-Bus PGU port on the PCD has been changed (for
instance the baud rate has been modified) while the modem was connected to this port but this new baud rate
has not been taken in account.
To activate a modified configuration the modem must be disconnect and
reconnect again. This means while the modem is connected to an S-Bus
PGU port the new configuration will not be taken in account.
However sometimes it is not possible to get a modem working because of
any reason. In this situation it is recommended to connect a serial interface communications analyser (for example SANALYS or RSO) between
PG4 and modem or between PCD and modem to analyse the transmitted
and received telegrams.
Page 5-30
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.3.6
Ending the connection
Either select "Hangup" from the "Online" menu:
or press the "Hangup" button in the "Online/Connection Options" menu:
Both will result in the following message being displayed on the screen:
Failure to discontinue the connection before exiting the PCD Utilities will
produce the following notice:
The "Yes" button breaks off the modem connection.
The "No" button closes the PG4 without breaking off the modem connection.
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-31
Modems
Manual S-Bus
5.4 Modem +
With S-Bus level 2 (S-Bus PGU), no SASI instruction has to be performed; all the handling is made by the firmware of the PCD without intervention of the user program.
However, in certain circumstances, it is necessary that the user program
interacts with the firmware :
Page 5-32
•
the user wants to detect when the PCD is online with a remote
modem or console
•
the slave PCD wants to contact the master (in an alarm situation for example)
•
the user wants to re-assign the serial line.
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.4.1
Diagnostics (SASI DIAG)
The DIAG SASI allows to link the S-Bus-Level 2 background job to the
user program.
With this feature, the user has the possibility to indicate the S-Bus Level
2 activities in his user program.
Format :
TEXT xxxx
"DIAG:<diag_elem>,<diag_reg>"
where :
diag_elem = F xxxx or O xxxx (base address of 8 flags or outputs)
diag_reg = R xxxx
(address of diagnostic register)
Example :
SASI
TEXT 100
1
100
; SASI text 100 for channel number 1
; configure for S-Bus Level 2.
"DIAG:F0,R0;" ; F0 to F7 and R0 contain the normal
; standard S-Bus diagnostic
; informations.
The DIAG SASI is cleared when :
5.4.2
•
a RESTART COLD/WARM is performed
•
a File Load command
SICL instruction
For a port configured for S-Bus Level 2 for public line modem, the user
can read the DCD signal to detect whether the PCD is on-line with a remote modem or not. According to current DCD status he can then execute different code in the user program. See the SICL instruction on
chapter 3.9.
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-33
Modems
Manual S-Bus
5.4.3
UNDO/REDO a S-Bus PGU port (SASI OFF)
The S-Bus PGU port can be deassigned (UNDO), new assigned for any
other standard communication mode and afterwards reassigned (REDO)
to S-Bus Level 2 mode with or without modem initialisation.
With the UNDO/REDO procedures as mentioned above, it is possible for
the slave stations to call the master station via modem and to go back to
S-Bus Level 2 mode afterwards.
To avoid a SASI error and to be able to work properly on an S-Bus PGUPLM port, the user first has to perform a DIAG SASI to link S-Bus PGU
activity to his user program. Now he is able to work with the user Diagnostic Flag 'XBSY'.
To undo an assignation of a port configured as S-Bus PGU PLM, the user
has simply to execute a SASI OFF instruction if permitted.
Format :
TEXT xxxx
"MODE:OFF,x,y,z;”
where :
x
execution delay of an UNDO/REDO of S-Bus-PGU via PLM.
Unit :
Range :
Default :
[Seconds]
0...300 s
0s
During this time the UNDO/REDO request is not yet executed
and can be cancelled by stopping the CPU or a “Restart
Cold/Warm” of the CPU
y
time out to perform another assignation for any standard communication mode following the SASI OFF.
Unit :
Range :
Default :
[Milliseconds]
0...5000 ms, rounded up modulo 250 ms
1000 ms
If this timeout is elapsed, the port is automatically re-assigned
for S-Bus PGU PLM. It means that, for the UNDO procedure,
the user has to perform an assignation before this time elapses.
z
option to perform a REDO to S-Bus-Level 2 mode with or
without modem re-initialisation.
Value :
Default :
Page 5-34
0 (with modem re-initialisation)
1 (without modem re-initialisation)
0 (with modem re-initialisation).
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.4.3.1 Overview of all possible SASI OFF options for 'MODEMS+' :
The character ';' at the end of the text is always optional and does not
need to be defined.
"MODE:OFF;"
"MODE:OFF,xxx;"
"MODE:OFF,xxx,yyyy;"
"MODE:OFF,xxx,yyyy,z;"
"MODE:OFF,,yyyy,z;"
"MODE:OFF,,,z;"
"MODE:OFF,,yyyy;"
"MODE:OFF,xxx,,z;"
all default
yyyy and z = default
z = default
no default
xxx = default
xxx and yyyy = default
xxx and z = default
yyyy = default
Examples :
"MODE:OFF;"
No option (x,y,z) is used.
Use this format to immediately perform an UNDO of S-Bus PGU for
public line modems.
The XBSY-Flag goes immediately to LOW to indicate 'Permission for
any standard assignation (except for another SASI OFF)'. The user has
then to perform an assignation within one second. If that time-out
elapses, the XBSY-Flag is set HIGH immediately and the port will automatically be re-assigned for S-Bus-PGU-PLM. This possibility can be
used to restart the init/reset procedure of the connected modem. The
main reason why it works like so is to come on-line again.
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-35
Modems
Manual S-Bus
"MODE:OFF,xxx;" Option 'xxx' : 0..300 seconds
(default : 0 sec, no delay).
Use this format to perform an UNDO of S-Bus PGU-PLM after a certain
delay of xxx seconds.
While such a delay is active, the XBSY-Flag stays HIGH to indicate 'NO
SASI' permission for the moment to the user. During this period the S-Bus
PGU-PLM mechanism is working as usual. That means that it stays in
current status. But the response upon a 'Read Own PCD Status'-request is
toggling as shown below during the delay time : (S-Bus and P8 )
e.g. PG4 (PG3) polling 'Read Status'-request (each second) :
PCD S-Bus Slave response :
Real Status ('R/C/S/H') or 'X'
('X' means Exceptional Intermediate Status)
This feature can especially be interesting for a PCD which is on-line with
a remote modem and our PG4 (PG3)-Utilities :
The user can detect visually that the PCD is in an exceptional intermediate status: as long as the described SASI OFF delay is active the user has
the possibility to cancel current UNDO request which is still in process
but not yet executed. That he can do in simply putting the PCD into
'STOP (own)' or 'RUN (own)' using the PG4 (PG3) Utilities with the
SBus- or the P8-protocol.
A 'RESTART COLD/WARM' causes the same. The advantage of this
feature is, that the user can actively and immediately take action on the
exceptional situation. He can also avoid that the PCD performs a HANG
UP after the delay period. In other words, it is possible to stay on-line
with S-Bus Level 2 for modems. The S-Bus debugger of the Utilities displays during described 'X'-Status the HANG UP time-out as well as the
actual real PCD status (Toggling).
The display in the right corner of the top bar will then look as follows:
'HANG UP xxx SECS'. The P8 debugger of the Utilities displays during
described 'X'-Status a special message as well as the actual real PCD
status (Toggling). The display in the right corner of the top bar will then
look as follows: 'HANGING UP MODEM'. After the delay has elapsed,
the SASI OFF works in exactly the same way as described above.
Page 5-36
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
"MODE:OFF,[xxx],[yyyy],[z];"
Additional and optional parameters 'yyyy' and 'z'.
The main functionality of the SASI OFF to UNDO respectively REDO SBus with PLM is already described detailed enough in the formats (1)
and (2) above. At this place there is only an additional description for the
options 'yyyy' and 'z' :
Option 'yyyy' :
Unit :
Range :
Default :
[Milliseconds]
0..5000 milliseconds
1000 milliseconds
The XBSY-Flag goes immediately to LOW to indicate 'Permission for
any standard assignation (except for another SASI OFF)'. The user has
then to perform an assignation within yyyy milliseconds (rounded up
modulo 250 ms). During the time-out the DTR control signal stays high to
not force a connected modem to hang up. If that time-out elapses, the
XBSY-Flag is set HIGH immediately and the port will automatically be
re-assigned for S-Bus PGU-PLM in function of the next option :
Option 'z' :
Unit :
Range :
Default :
(REDO mode)
0 or 1
0 (Redo mode with modem
initialisation)
This option can be used to define the REDO mode as follows :
'z' : = 0 : REDO mode with modem initialisation.
The firmware restarts the init/reset procedure of the connected modem
and then assigns the corresponding port for S-Bus Level 2 for modems.
That means that the modem hangs up -if online- because of reprogramming for 'autoanswer'-mode.
That could be a big disadvantage for a PC supervision system who has to
stay online with the modem and later on with S-Bus Level 2.
Therefore the parameter 'z' can be defined to 1:
'z' : = 1 : Assign S-Bus-PGU-PLM directly for S-Bus Level 2
without re-initialisation of the connected modem.
Remember that the PCD stays only in S-Bus Level 2 mode as long as the
DSR signal (PCD side) stays HIGH. If this signal goes low, the PCD
automatically re-initialises the modem and assigns the S-Bus PGU-PLM
port for S-Bus Level 2 afterwards.
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-37
Modems
Manual S-Bus
5.4.3.2 'REDO' assignation of a serial port defined for
S-Bus-PGU PLM
The firmware will automatically reassign the S-Bus-PGU port for S-BusPGU with PLM :
•
•
•
•
after a restart request.
on a power ON.
after the user has performed a “SASI OFF” on the S-Bus-PGU
port.
immediately after the cpu goes in HALT.
Remarks :
•
It is the user's responsibility to perform a 'MODE:OFF,xxx,yyyy,z;' to
come back on-line with S-Bus.
•
This can only ever work on a FULL RS 232 port.
•
Special care has to be taken in using the UNDO/REDO mechanism
for S-Bus PGU-PLM for a PCD4.M240 and PCD4.M44x. :
Do not mix the different assignations such as SASI OFF, DIAG SASI and
DIAG OFF in the user programs of the CPU 0 and/or the CPU 1.
The permissions are a function of the current PG-owner-CPU.
Do not forget that the PG-owner-CPU can be changed in performing a
'Connect CPU0/1' via PG4 (PG3)-Utilities. This can cause problems with
the co-ordination of a user program e.g. for CPU 1 and the actual PG
owner which could be either CPU 0 or CPU1.
If the PG owner changes and an UNDO request is currently in process,
the PCD immediately clears this job and remains in the actual S-Bus
PGU- PLM status. Afterwards the user has again the permission for a
SASI OFF (only).
Assume that the user program of the CPU 0 has executed a SASI OFF to
undo the S-Bus PGU-PLM assignation. Just afterwards the user may
change the PG owner to CPU 1 via the PG4 (PG3)-Utilities. As long as
the CPU 1 is the PG owner, a second SASI OFF to redo the S-Bus PGUPLM assignation, programmed in the user program of the CPU 0, gives
an instruction error and will n o t be executed since CPU 0 is not the
owner of the PGU and therefore CPU 0 has not the permission to work
on this port. In other words, the PCD does not automatically initialise and
reprogram the modem for auto-answer mode.
Page 5-38
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
5.5 Example of PCD program
This is an example of program which handles S-Bus communications to
or from a supervision system and from the Programming console.
The communication can be initiated by :
• the PCD
(Outgoing call)
• Supervision system
(Incomming Call)
• PG4
The program is written in Fupla.
Outgoing call :
To initiate an outgoing call, the flag "CALL" must be set to 1. The PCD
will then try to make a connection with a remote central computer; if this
connection succeed, the PCD is switched to S-Bus slave mode and it can
then be interrogated by a Supervision system.
After successfully establishing a connection, the central computer must
set the flag high that was defined under FBox "Call PGU", "Cnf".
This enables communication without a time limit.
If this flag is not set high, the modem connection will be broken off at the
end of the time defined with “Confirm Timeout” in the "Call PGU"
FBox.
Shutting down the modem connection always takes place from the side of
the central computer.
If the connection fails or is interrupted, after a certain "recall time" the
central computer is called again in the "Call PGU" FBox. This is repeated
until the number defined under "recall count" in the "Call PGU” FBox is
reached.
If there is an error, the "Err" output of the "Call PGU" FBox is set high.
If there is a valid connection, the "Con" output of the "Call PGU" FBox
is set high.
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-39
Modems
Manual S-Bus
Incomming call :
The PCD answer any incomming call comming from a central computer
or the SAIA Programming Tools. When a connection is made, the flags
"Inc_Call" is set to 1 until disconnection.
If communication has ceased, the modem connection is discontinued by
the PC at the end of the waiting time defined under "Hangup timeout" in
the "Online/Connection Options" menu, "Setup", "Timing".
S-Bus PGU definition of PCD:
Page 5-40
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
Modems
Fupla program of PCD:
26/739 E4 (SB-52-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 5-41
Modems
Page 5-42
Manual S-Bus
 SAIA-Burgess Electronics Ltd.
(SB-52-E.DOC)
26/739 E4
Manual S-Bus
S-Bus Gateway
6. S-Bus Gateway
6.1 Introduction
The main limitation of S-Bus was that it is not possible to put more than
one master on a network. This had drawbacks for networks which required, for instance, a supervision system and a PCD as masters. This
limitation also made commissioning of S-Bus networks more difficult.
With the S-Bus GATEWAY, it is possible to have up to 3 external masters which are all capable of communicating with any slave on an S-Bus
network as well as the normal PCD master.
The following diagram shows a typical network configuration which is
now possible with S-Bus. It can be seen that there is one Full protocol
connection for the PG4 and two reduced protocol connections for supervisory control systems (SCS). The Gateway station itself can also act as a
master giving four S-Bus masters.
SCS 1
PG 4
SCS 2
GSP
GSP
GSP
GATEWAY
station
GMP
Slave #1
Slave #2
Slave #3
Slave #n
Gateway Station
The Gateway Station is a dedicated PCD station which manages the
transparent connection of up to 3 external masters to the S-Bus
network. It can also act as a normal S-Bus master.
Gateway Slave Port (GSP)
The Gateway Slave port is used to connect the gateway station to
the external master. This can either be the S-Bus-PGU port or a
port defined using a SASI instruction.
Gateway Master Port (GMP)
The Gateway Master Port connects the Gateway station to the
network of S-Bus slaves
26/739 E4 (SB-60-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 6-1
S-Bus Gateway
Manual S-Bus
6.2 Features of the Gateway
The Gateway Station can have up to 3 Gateway Slave Ports connected to
external masters. The Gateway Station itself can also serve as an S-Bus
master making a total of 4 S-Bus masters per network. All 4 masters can
work in parallel, with the Gateway Station monitoring reception of telegrams from the external masters and the communications instructions in
the user program, and re-transmitting them onto the S-Bus network.
The baud rates and the S-Bus mode (break/parity) can be independently
selected on all 3 Gateway Slave Ports and the Gateway Master Port.
Only one of the Gateway Slave Ports can be assigned for FULL S-BusPGU, the others are defined by a SASI instruction and are therefore reduced protocol.
The Gateway can be a single CPU system , for example PCD2, or a multiple CPU system such as the PCD6. In a PCD6 the gateway task can be
distributed over multiple processors, for instance, the Gateway Slave
Ports could be defined on CPU1, CPU2 and CPU3 and the Gateway
Master Port on CPU 0.
Only one Gateway Station per network is allowed, do not cascade or put
in parallel Gateway Stations as this will give undefined results.
Page 6-2
 SAIA-Burgess Electronics Ltd.
(SB-60-E.DOC)
26/739 E4
Manual S-Bus
S-Bus Gateway
6.3 Configuration of a Gateway Master Port (GMP)
The master gateway port is configured using the "Online Configurator" or
with the "Offline Configurator" under S-Bus in the "Project Manager" of
the PG4 utilities.
When "Has Gateway Port" is selected and the "Gateway" button has
been pressed, the following window appears:
26/739 E4 (SB-60-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 6-3
S-Bus Gateway
Manual S-Bus
It is necessary to define the following eight essential parameters necessary for the initialisation of the Gateway.
Master Gateway Port (GMP)
This field specifies the port to be used for the Gateway Master Port.
At the same time, all possible ports on the PCD concerned are displayed.
Port on CPU (PCD6 only)
This field specifies the port to be used for the Gateway Master Port.
At the same time, all possible ports on the PCD concerned are displayed.
Baud Rate
The transmission speed of the Gateway Master Port, this is selectable between 110 - 38400 bps as with any standard S-Bus communications protocol.
S-BUS Mode
This defines whether the Gateway Master Port will use the break
mode (mode 0), the parity mode (mode 1) or the data mode (mode 2).
Training Sequence Delay (TS)
Training sequence delay in milliseconds. This is the delay between
setting RTS (Request To Send) and the transmission of the message
and is principally for modems. If zero is entered for the TS delay
then the default value will be used which can be found in the configure help index (key Help) and in the table next page.
Turnaround Delay (TN)
Turnaround time in milliseconds. This is the minimum time between
the end of a response and transmission of the next telegram. It gives
the remote station time to switch back to receive mode. The TN
delay is particularly important if using the PCD7.T100 repeater or
private line modems. If a zero is entered for the TN delay then the
default value will be used. which can be found in the configure help
index (key Help) and in the table next page.
Page 6-4
 SAIA-Burgess Electronics Ltd.
(SB-60-E.DOC)
26/739 E4
Manual S-Bus
S-Bus Gateway
Response Timeout
This time-out delay in milliseconds concerns the transmission between the Master Gateway Port and its connected slave(s). This defines the maximum time that the master will wait before transmitting a retry in the case of error. The table below lists the default
time-out values in milliseconds to set in function of the baud-rate of
the Master Gateway port. It may be necessary to adjust these values if the TS and TN delays differ from their default values. If zero
is entered here then the default value will be used.
Baud rate
110
150
300
600
1200
2400
4800
9600
19200 38400
TS delay [ms]
0
0
0
0
0
0
0
0
0
0
TN delay [ms]
27
20
20
5
3
2
2
1
1
1
Timeout [ms] Br/Par
15000 9000
5000
3000
2000
1000
500
250
200
200
Timeout [ms] Data
15000 15000
7500
4500
3000
1500
750
375
300
300
Break Length
This parameter specifies the number of break characters in break
mode (mode 0). The default is 4.
The S-Bus number and and the S-Bus PGU port can be set in the menu
"S-Bus" from the "S-Bus Configuration".
26/739 E4 (SB-60-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 6-5
S-Bus Gateway
Manual S-Bus
6.4 Configuration of the Gateway Slave Port
A Gateway Slave Port can be defined for reduced protocol using a SASI
instruction or for full protocol as the S-Bus PGU port.
6.4.1
S-Bus-PGU
By definition, the S-Bus-PGU port will always be linked to the Gateway
Master Port. This means that if the S-Bus-PGU port receives an S-Bus
telegram which is not for the Gateway Station itself (address does not
match), it will be automatically re-transmitted on the Gateway Master
Port. This applies to the full S-Bus protocol.
6.4.2
User SASI instruction
A Gateway Slave Port can be defined via the user-program using the
standard SASI assignation instruction. The SASI text must contain a new
mode definition for GS-mode (for Gateway Slave). When the instruction
is executed an automatic link between the Gateway Slave Port and the
Gateway Master Port is established for all telegrams which are not for the
Gateway Station itself.
A port configured in GS-mode can be considered as working in the same
way as a port defined in SS-mode (i.e. reduced S-Bus protocol), but with
the link to the Gateway Master Port. The diagnostic flags and register
work in the same way for both modes.
Format of the SASI text
"UART: <uart_def>, <timeout>, <TS-delay>, <TN-delay> ;"
"MODE:GS <mode_option>;"
"DIAG:<diag_def>"
where :
<uart_def>
Specifies the baud rate for the GSP for communication
with the external master.
<timeout>
This has no significance for the Gateway Slave Port.
<TS-delay>
The training sequence delay to be initialised for communication with the external master.
<TN-delay>
The turnaround time to be initialised for communication
with the external master.
<mode_option> Break (0), parity (1) or data (2).
<diag_def>“
Specifies the diagnostics flags and register , it works in
the same way as the SS mode .
Example :
TEXT 1000
Page 6-6
"UART: 9600,,0,1;MODE:GS1;DIAG:F500,R500"
 SAIA-Burgess Electronics Ltd.
(SB-60-E.DOC)
26/739 E4
Manual S-Bus
S-Bus Gateway
6.5 Using STXM / SRXM in the Gateway station
For the Gateway Station to be able to execute STXM/SRXM instructions
as a normal master station, it is necessary to execute a user SASI instruction on the GMP. The user program will then be linked to the Gateway
Master Port using a new GM mode definition (for Gateway Master). The
STXM/SRXM instructions can then be used in exactly the same way as
with SM mode, the diagnostic flags and register will have the same functionality.
Format of the SASI text
"MODE:GM,<dest_reg>;DIAG:<diag_def>"
where :
<dest_reg>
Register number to specify the S-Bus destination address.
<diag_def>
Specify the diag Flag and Diag register of the transmission. It works in the same way as the SMx mode (compatibility).
All the values for the S-Bus mode, TN-delay, TS-delay, time-out are
taken directly from the Gateway Master Port configuration menu..
Example :
TEXT 1000
"MODE:GM,R300;DIAG:F500,R500"
The SASI GM can only be performed on the CPU
of the Master Gateway port.
If a SASI GM is performed, this must be taken in account when setting
the access time-out.
26/739 E4 (SB-60-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 6-7
S-Bus Gateway
Manual S-Bus
6.6 Setting Timeout in an S-Bus network
Consider the following diagram for a simple Master-Slave network :
Timeout minimum value
Master Slave
TN TS
Telegram
TN TS
Response
The diagram shows that the minimum time-out of the master must be
greater than the combined time for the transmission of the telegrams
plus the TN/TS delays. The default values which are initialised when
using S-Bus respect this rule. If the TN/TS delays are increased then the
time-out must be increased proportionally.
By adding an extra layer of external masters then the calculation for the
time-out becomes more complex.
External Master Timeout
Master GSP Network
TN TS
TN TS
Telegram
Response
GMP Timeout value
GMP Slave Network
TN TS
Telegram
TN TS
Response
It can be seen from this diagram that the external master time-out must
be increased to at least twice the GMP time-out. Any retry from the external master during the retransmission operation of the Gateway Station
will be ignored.
The calculation for the external master time-out value is further complicated when adding more masters because the Gateway Station may already be retransmitting another telegram from another external master.
To simplify the calculation of the external master time-out value the following general rule should be respected.
External Master Timeout = (1,5 GMP Timeout) x Number of Masters
Where "Number of Masters" refers to the number of external masters and
the Gateway as a master itself.
The gateway is only taken as master, when STXM/SRXM commands
from the gateway PCD are executed to the master port. In this case, the
gateway PCD will be worth 3 masters. (Due to the condition that a gateway telegram gets repeated 3 times if an error occurs).
Page 6-8
 SAIA-Burgess Electronics Ltd.
(SB-60-E.DOC)
26/739 E4
Manual S-Bus
S-Bus Gateway
Example for the amount of masters:
2 external masters + gateway, which executes STXM/SRXM commands
to the GWA master port.
Amount of masters = 2 + 3 = 5
The following table shows the external master time-out (in ms) in function of the number of masters and the baud rate of the Gateway Master
Port. All external masters, i.e. PG4 and supervision systems should be
initialised with these values.
For break and parity modes :
Number of masters
GMP
baud drate
1
2
3
4
5
6
110
22'500
-
-
-
-
-
150
13'500
27'000
-
-
-
-
300
7'500
15'000
22'500
-
-
-
600
4'500
9'000
13'500
18'000
22'500
27'000
1'200
3'000
6'000
9'000
12'000
15'000
18'000
2'400
1'500
3'000
4'500
6'000
7'500
9'000
4'800
750
1'500
2'250
3'000
3'750
4'500
9'600
375
750
1'125
1'500
1'875
2'250
19'200
300
600
900
1'200
1'500
1'800
38'400
300
600
900
1'200
1'500
1'800
For data mode:
Number of masters
GMP
baud rate
26/739 E4 (SB-60-E.DOC)
1
2
3
4
5
6
110
33'750
-
-
-
-
-
150
20'250
40'500
-
-
-
-
300
11'250
22'500
33'750
-
-
-
600
6'750
13'500
20'250
27'000
33'750
40'500
1'200
4'500
9'000
13'500
18'000
22'500
27'000
2'400
2'250
4'500
6'750
9'000
11'250
13'500
4'800
1'125
2'250
3'375
4'500
5'625
6'750
9'600
563
1'125
1'688
2'250
2'812
3'375
19'200
450
900
1'350
1'800
2'250
2'700
38'400
450
900
1'350
1'800
2'250
2'700
 SAIA-Burgess Electronics Ltd.
Page 6-9
S-Bus Gateway
Manual S-Bus
6.7 Possible sources of errors
If an error occurs during configuration of the Master Gateway Port during start-up, then the PCD goes directly in “HALT” and the following
message is displayed in the debugger :
"MGWY INIT FAIL"
Possible reasons :
•
An assignation of a Master Gateway port on a non existent
CPU, this message will be only be displayed on CPU0.
•
An assignation of a Master Gateway port on a CPU which has
no communication ports (wrong type of CPU) will also display
this message.
If the communication is non-existent or perturbed between an external
master and the Gateway station or a slave station, it could come from a
bad setting of the different timing values in the Gateway station and in the
external master. The time-out in all the external masters must be adapted
in function of the number of masters and the selected baud rates.
Page 6-10
 SAIA-Burgess Electronics Ltd.
(SB-60-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
7. Using S-Bus with the PG3
The method for configuring and using S-Bus with the PG3 Programming
Utilities is the same as with the PG4 under Windows. The main difference is that the PG3 uses DOS and that the configuration of the PCD is
not done online.
To get an extensive description consult the following :
•
Station number definition on chapter 3.1
•
Configuration and assignment of an S-Bus PGU interface on
chapter 4.3
•
Connection of the PG Unit via S-Bus on chapter 4.4
•
Configuring the PCD Utilities for your modem on chapter 5.2.3
•
Connection via the Public Telephone Network on chapter 5.3
•
Example of PCD program (with modem) on chapter 5.5
•
Configuration of a Gateway Master Port (GMP) on chapter 6.3
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-1
Using S-Bus with the PG3
Manual S-Bus
7.1 Station number definition
Each slave station is allocated a number, so that it can be addressed from
the master station. This number is stored in the user program's "header" in
the memory module of a slave station
Station number definition when using memory modules with RAM
(PCD7.R2.. , PCD7.R3.., PCD6.R51. or PCD6.R610.) :
1.
Connect the programming unit to the "PGU" programming interface
on the PCD.
2.
From the main menu, select first the "Configure" option.
3.
Select the "S-Bus Communication" submenu (SAIA PCD Configuration) and enter the desired station number.
The other parameters are not relevant for S-Bus level 1 without
modems or repeaters.
Page 7-2
4.
Save your changes and go back to the main menu
5.
From the "coNnect" menu, on the "Comms mode" line select PGU
MODE.
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
6.
From the "Up/Download" menu, transfer defined configuration to
PCD with "Configure S-Bus" option. This writes the S-Bus station
number into the header of the memory module.
The number allocated can be checked using the debugger's "Display
S-Bus" command.
Station number definition when using EPROMs
1.
Run the PCD Programming Utilities and enter the station number
on the "Configure S-Bus communications" menu.
2.
From the "Program Eproms" menu, program the User-Eprom.
The defined number is automatically stored in the user program's
header.
The station number is always valid for the entire PCD station, even
if several interfaces are assigned to the same station in S-Bus mode.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-3
Using S-Bus with the PG3
Manual S-Bus
7.2 Configuration and assignment of an S-Bus PGU interface
The procedure which applies here is different depending on whether
memory modules are used with RAM or EPROM components.
7.2.1
Memory modules with RAM components
The following generally applies :
An S-Bus PGU interface can only be configured via the original interface
using the P8 protocol.
1.
Definitions in the "Configure" menu :
SAIA PCD Configuration "Hardware and memory": PCD type
This menu defines PCD type, memory size and memory allocation. Once
defined, the memory allocation must be transferred to the PCD using the
"Reallocate memory" command on the "Up/downloader" menu. Depending on the type of PCD defined here, other menus and programs offer a selection of different settings.
Page 7-4
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
"S-Bus communications" : Station number, PGU port, baud rate, modem
You must define the S-Bus station number, the number of the interface
you want to use for S-Bus PGU, the baud rate and the S-Bus mode (usually Parity when you do not use modems).
In normal cases, the S-Bus timing must be left at 0 ( = default values).
Personal Computer Configuration :
"Serial ports for PC": Interfaces and baud rates of programming unit.
The programming unit's serial interfaces are defined in this menu.
Baud rate settings must agree with those in the PCD ("S-Bus communications" menu).
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-5
Using S-Bus with the PG3
2.
Manual S-Bus
From "coNnect" menu: for the COMMS mode select PGU.
This menu is used to set the communications protocol (S-Bus or P8
PGU) for the programming unit, and any connected PCD's station and
CPU numbers. Before connection to a PCD via an online program
(e.g. the debugger), it is necessary to define the communications protocol in this menu.
3.
From "Up/download" menu, transfer the defined configuration to
PCD with "Configure S-Bus".
The "Configure S-Bus" function transfers to the PCD definitions made in
the "Configure / S-Bus communications" menu and activates them. This
function is only applicable if a memory module with RAM components is
used. For memory modules with EPROM components, the S-Bus configuration must be written into the EPROM using the program "Program
eproms" utility. You can also access the S-Bus parameters without going
in the "Configure" menu by using the function keys : F2 (PCD type +
memory), F3 (S-Bus), F4 (PCD modem) and F6 (Gateway)
Page 7-6
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
4.
From "Debug", check correctness of definitions with "Display
s-bUs". This command lists the current S-Bus configuration of any
connected CPU.
The configured S-Bus PGU interface has now been assigned with the
S-Bus protocol and is ready for use. This configuration will remain in
force until it is changed from the "Up/downloader" by "Configure SBus".
7.2.2
Memory modules with EPROM components
1.
As for RAM components.
2.
Program the EPROMs or Create HEX files from the "Program
eproms" menu. The S-Bus configuration is written automatically
into the EPROMs.
3.
Insert EPROM into PCD and connect the PG3. Set PGU (P8) protocol from the "coNnect" menu.
4.
In the "Debugger", use "Display s-bUs" to check that settings are
correct.
5.
The configured S-Bus PGU interface is now assigned with the SBus protocol and ready to use. Since this configuration is stored in
EPROMs, it can only be changed by programming new EPROMs.
6.
As for RAM components.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-7
Using S-Bus with the PG3
Manual S-Bus
7.3 Connection of the PG Unit via S-Bus
Connect the programming unit to the S-Bus PGU interface (in point-topoint or via the RS 485 network) and select S-Bus protocol, CPU and
station numbers from the "coNnect" menu.
If there has been a successful connection with the station defined in the
"Connect" menu, it is now possible to use all functions of the PG3 utilities via the S-Bus PGU interface.
If the S-Bus protocol is set, all PCD Programming Utilities online programs will display the station number of any slave station connected on
the screen's status line (top line).
Debug cOnnect
With this command it is possible to select a CPU of the connected station. In an S-Bus network switching between stations is possible. The
command "Analyse-sbus-network" can be used to check the whole network during operation for baud rate and station numbers of all stations
present. In this way it is possible to display the network on the programming unit.
Page 7-8
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
7.4 Configuring the PCD Utilities for your modem
The PCD Utilities contains some standard modems configuration :
•
•
•
•
•
•
Hayes compatible
Hayes compatible High Speed
US Robotics Courier
Zyxel U-1496 Series
Miracom WS 3000
User-defined modems
You can see the different modems and the commands they used from the
"Configure" menu and the following sub-menus :
•
•
Modem for SAIA PCD menu
Modem for PC
If you can not find your modem or a modem with the same command
strings : you can add your modem in the list by editing the file "modem.dat" (located in the directory where you have installed the PCD
Utilities, generally \PCD)
The file "modem.dat" must be edited with a text editor (such as EDIT
from Dos), at the end of this file you will find a "User-defined modem"
that you can adapt for your modem. If you use more than one modem,
you can add these at the end of the file.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-9
Using S-Bus with the PG3
Manual S-Bus
;SAIA MODEM CONFIGURATION FILE - MODEM.DAT
;SEE CONFIGURATOR'S HELP TEXTS FOR DETAILS
;DO NOT EDIT THESE
[Hayes Compatible]
……………………………………………………
;CAN BE EDITED FOR CUSTOM MODEM CONFIGURATION
[User-defined modem]
BreakMode=Yes
ParityMode=No
;Modem type
;No=Break mode not supported, default=Yes
;Yes=parity mode supported, default=No
;*** PC Modem
Reset="ATZ\r"
Init="AT&Q0\r"
DialPrefix="ATDT"
DialSuffix="\r"
Hangup="ATH0\r"
Command="~~~+++~~~"
Delay="~"
AnswerOn="ATS0=1\r"
;Reset modem
;Initialise modem ("AT&Q0\r" for high-speed modem)
;Sent before number ("ATDP"=pulse dialling)
;Sent after number
;If blank, dropping DTR for 2 sec is used
;Switch modem to command mode
;Character to provide 0.5 second delay
;Turn on auto-answer mode (S0=1 answer on 1st
ring)
AnswerOff="ATS0=0\r"
Timeout=45
Retries=2
CmdOk="OK"
Connect="CONNECT"
;Turn off auto-answer mode
;Connect time-out in seconds
;Number of dialler retries if Timeout occurs
;Response string, command executed OK
;Response string, connected OK after dial
;*** PCD Modem
PCDReset="ATZ\r"
PCDInit="ATM0E0S0=2S25=250\r"
;Reset PCD modem
;Init PCD modem, must include 'S0=x'
; (with x ;not 0) to put the modem into
;
auto answer mode
;OTHER MODEM CONFIGURATIONS CAN BE ADDED HERE
Page 7-10
Break mode
Parity mode
These parameters can be used to define which S-Bus
protocols the modem supports. More than one S-Bus
protocol can be selected. When there is an S-Bus connection via modem, the PG3 will try to make a connection with the PCD using all the selected S-Bus protocols. As soon as the right S-Bus protocol has been
found, the S-Bus connection will be made. In order to
accelerate S-Bus connection, or to avoid undesirable
side effects in the modem, only the required S-Bus
protocol should be switched on. The last S-Bus protocol
to have been selected will be used first when a new SBus connection is made. S-Bus data mode is always
switched on.
Reset
Resets the modem to its factory default state
Init
Initialises the modem: Set time-outs, disable error control data compression, enable call progress detection etc.
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
DialPrefix
Sent before the telephone number when dialling
DialSuffix
Sent after the number when dialling, this is usually "\r"
(CR).
Hangup
The command to disconnect and hang up the line. If
empty, it is assumed that dropping DTR (Data Terminal Ready) for seconds will hang up the line, as for
Hayes compatible modems.
Command
The sequence which switches the modem from data
transfer to command mode. The "+++" string is preceded and followed by a 1.5 second delay, defined by
three 0.5 second Delay characters: "~~~".
Delay
A special dummy character. Whenever this character
appears a modem command string the system waits for
500 mS instead of transmitting the character to the modem. Traditionally this is the tilde character (~), which
can be seen in the example "Command" string.
Auto-answer on This string must put the modem into auto-answer mode
so that it will automatically answer an incoming call and
connect to the remote modem. This is used to enable
"auto-answer mode". This string usually loads a register
in the modem (S0) with a ring count. When the ring
count is non-zero, the modem answers an incoming call
on the defined number of rings.
Auto-answer off This must disable auto-answer mode, so that the modem will not automatically answer an incoming call.
This string usually sets the modem's ring count register
(S0) to 0.
Timeout
26/739 E4 (SB-70-E.DOC)
The time to wait after dialling for the detection of the
carrier signal (DCD) from the remote modem.
NOTE :
The modem itself often has an internal time-out value
(usually 30-45 seconds). "Timeout" is never used if the
modem's internal value is less. To use a longer time-out,
change the modem's internal time-out value by adding
the command to the "Init" sequence. For Hayes compatible modems this is "S7=n", where "n" is the timeout in seconds, e.g. for a 45 second time-out on a Hayes
compatible modem, use :
Init="ATS7=45\r" ; set 45 seconds time-out
Timeout=45
 SAIA-Burgess Electronics Ltd.
Page 7-11
Using S-Bus with the PG3
Manual S-Bus
Retries
The number of additional dialling attempts made on
failure to connect to the remote modem. Max. is 3.
CmdOk
The string returned by the modem when a command is
accepted. This is the string returned when the "Reset",
"Init" or "Hangup" commands are sent.
Connect
The string returned by the modem after the dial command, when the remote modem has answered, connection has been established, and the carrier detect signal
(DCD) is being returned.
PCD MODEM :
PCDReset
For the modem connected to a PCD only. Resets the
modem.
PCDInit
For the modem connected to a PCD only. Places the
modem into "auto-answer" mode, so that it automatically answers an incoming call. This string should also
set the "DTR detect time" to greater than 250 mS, to
stop the modem hanging up the line when a "restart" is
done.
Modem strings can contain escape sequences for common ASCII control
characters or hex values in strings. These are preceded by a backslash '\' :
\r
\n
\a
\b
\f
\t
\v
\xhh
\\
\"
Page 7-12
0x0D
0x0A
0x07
0x08
0x0C
0x09
0x0B
0xhh
0x5C
0x22
CR
LF
BEL
BS
FF
HT
VT
\
"
 SAIA-Burgess Electronics Ltd.
carriage return
line feed
bell
backspace
form feed
tab
vertical tab
hex value \x00..\xFF
backslash
quotation mark
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
Modem response strings (CmdOk and Connect)
The "CmdOk" and "Connect" response strings are delimited by CR/LF
characters. CR and LF must NOT be entered in the string definitions, do
not enter '\n' or '\r'. Only the characters entered in the "CmdOk" or "Connect" string, excluding the delimiting CR/LF, are compared. If the response is longer, the additional characters are ignored.
For example, "CONNECT" matches "<CR><LF>CONNECT 2400
<CR><LF>", the "<CR><LF>" and " 2400" are ignored.
Do not initialise the modem to return single digit result codes (e.g. "0"),
these will not work. String values, enclosed by CR/LF characters must be
returned (see Hayes command "V1"). Do not initialise the modem so that
it does not return response strings, these are required by the dialler to
monitor connection progress (see Hayes command "Q0").
High speed modems with data compression and error correction
Data compression and error correction protocols are not compatible with
S-Bus break and parity modes, and must be disabled.
Usually the Hayes command "&Q0" will do this, use Init="AT&Q0\r" (or
use pre-defined modem type [Hayes Compatible High-Speed]).
Call progress detection
Some modems have the ability to detect if the line is busy (engaged) or
there is no dial tone. If the modem has this capability, it is useful to enable it with the "Init" string. This speeds up the dial retries, because the
dialler will be able to detect these conditions instead of waiting for the
dial time-out period to elapse.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-13
Using S-Bus with the PG3
Manual S-Bus
7.5 Connection via the Public Telephone Network
7.5.1
Application diagram
DTE
DCE
DCE
DTE
Master
PG3
RS232
Modem
Slave
Public Phone
Network
or GSM
Modem
DTE :
Data Terminal Equipment
DCE :
Data Communication Equipment
RS232
PCD
Cable
DTE
(PG3, PCD)
DCE
(Modem)
TXD
RXD
RTS
CTS
PGND
DTR
DSR
DCD
TXD
RXD
RTS
CTS
PGND
DTR
DSR
DCD
PCD ports supporting S-Bus PGU with modems
The PGU port on the PCD lacks some important signals which make it
impossible to use Public Line Modems on this port. The PCD requires
5 control signals (RTS, CTS, DTR, DSR, DCD) to manage the modem.
The following ports support S-Bus PGU with modems :
Page 7-14
PCD1.M120/M130 :
PCD2 :
PCD4:
port 1 (RS 232)
port 1 (RS 232)
port 1 (RS 232)
PCD6.M540 :
PCD6.M1/2 :
PCD6.M300 :
port 2 (RS 232)
all RS 232 ports (0..3)
all RS 232 ports (0..3)
 SAIA-Burgess Electronics Ltd.
with bus module PCD4.C120
or C340
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
7.5.2
Configuring the PCD
1.
Select the appropriate hardware in the menu "Hardware and
memory"
2.
Enter the sub-menu "S-Bus communication"
26/739 E4 (SB-70-E.DOC)
•
Give to the PCD a Station number (from 0 to 254)
•
Select the PGU port you want to use with the modem
Remember : that port 0 cannot be used with a modem
•
Select the Baud rate for your modem
•
Select the S-Bus mode : BREAK
•
Select YES for PGU via Public Line Modem
 SAIA-Burgess Electronics Ltd.
Page 7-15
Using S-Bus with the PG3
3.
Manual S-Bus
In the menu "Modem for SAIA PCD", select the modem you are
using :
If you can not find your modem or one with the same command strings as
yours : you can add your own modem by editing the file "modem.dat"
(see Configuring the PCD Utilities for your modem on chapter 7.4)
4.
Page 7-16
The changes and selection you have made must now be downloaded in the PCD; select first the PGU protocol in the "Connect"
menu and then with the "Up/Download" program do a "Configure
S-Bus".
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
7.5.3
1.
Configuring the PC (PG3)
In the menu "Modem for PC" choose your modem :
If you can not find your modem or a modem with the same command
strings. (see Configuring the PCD Utilities for your modem on chapter 7.4)
2.
In the "Serial Port for PC", checks that the S-Bus speed and timings
are compatible with your modem:
Unless you have connection problems, you must not change the 'defaults'
parameters for the S-Bus timings.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-17
Using S-Bus with the PG3
Manual S-Bus
TS delay :
Training sequence delay, in milliseconds. This is the delay
between setting RTS (Request To Send) and the transmission of the message.
Timeout :
Response time-out in milliseconds. This is the time-out until the end of the response message is received.
TN delay :
Turnaround time in milliseconds. The minimum time between the end of a response and transmission of the next
telegram. It gives the remote station time to switch back to
receive mode. The TN delay is particularly important if
using the PCD7.T100 repeater or private line modems.
The TS delay, time-out and TN delay should be set to the
minimum possible values required by the hardware.
If (TS delay + TN delay) is greater than about 500 mS the
"Debug" program will not work. It polls the PCD every
500 mS, and all the processing time would be taken up by
these delays. The Timeout should also be set as low as
possible because this affects the processing of key depressions if the PCD is off line.
The TN delay is the most critical, Timeout and TS delay
are both usually 0 so that default values are used. The response time-out is the time the PC will wait until the start
of the response message. It is rounded up to the nearest
55 mS, since the PC's internal clock ticks at 55 mS intervals. After the 1st character of a response has been received, the PC uses and inter-character time-out of 55 mS.
The "Break length" is the duration of the break signal, in
character times. The break signal tells the remote station
that a new telegram is about to be transmitted. The default
is 4 character times, but some modems may need longer to
register the break signal. Normally this should never be
greater than 10, otherwise communications throughput will
be affected.
Page 7-18
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
7.5.4
Making the connection
1.
Connect the PCD and the modem together. It is not necessary that
the PCD contains a program.
2.
Connect the modem to the public telephone line
3.
Issue a power down/power up sequence to be sure that the PCD
initialises your modem correctly.
4.
From the "Connect" menu :
•
•
•
•
•
Select for COMMS mode the S-Bus Mode 0 (BREAK) protocol
Select CONNECT VIA MODEM
Put the station number you have given to your PCD
Type the telephone number to dial
The telephone number can contain digits and any characters
supported by the modem. On HAYES modems ',' generates a 1
second delay for pausing when dialling.
The telephone number can be chosen from a user-editable
Phonebook file by pressing function key F2 when the cursor is
in the "Number to dial" field. You can edit this phonebook with
a text editor; it is named "phones.dat".
Press <return> to make the connection
The PC begins to initialise the modem and after a few seconds, you must
hear the telephone tone and the dialling progress. Dialling can be aborted
by pressing ESCape. On the last line, messages are displayed showing the
progress of the connection.
If the connection is successful, the Utilities returns to the main menu; the
first line shows you that you are connected.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-19
Using S-Bus with the PG3
Manual S-Bus
7.5.5
Trouble shooting
Problem 1 :
The PCD modem does not answer to an incoming call.
Verify that the modem is in auto answer mode :
• LED on the modem front panel on ?
• Is the cable correct wired ?
• Make a power down/power up and observe the receive LED of
the PCD modem to see if it receives the initialisation sequence
from the PCD.
Problem 2 :
After dialling the phone number the message "connected
to remote modem" is displayed but immediately a dial
retry is made.
Verify the response string of the modem :
• Check specified response strings in modem.dat file
• Check modem parameters V1, W0, X4
Problem 3 :
•
•
•
After an established connection to the remote modem it
is not possible to come online with the S-Bus protocol.
Error message in connect menu: "No response from
PCD"
Check the S-Bus station number
If DTE speed of the PCD modem is lower than DTE speed of
PG3 modem then PG3 time-out value must be adapted for the
lower speed.
Check modem parameters set-up according to the parameter
list in this document.
Problem 4 :
By means of the utilities downloader the configuration of
an S-Bus PGU port on the PCD has been changed (for
instance the baud rate has been modified) while the modem was connected to this port but this new baud rate
has not been taken in account.
To activate a modified configuration the modem must be disconnect and
reconnect again. This means while the modem is connected to an S-Bus
PGU port the new configuration will not be taken in account.
However sometimes it is not possible to get a modem working because of
any reason. In this situation it is recommended to connect a serial interface communications analyser (for example SANALYS or RSO) between
PG3 and modem or between PCD and modem to analyse the transmitted
and received telegrams.
Page 7-20
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
7.5.6
Ending the connection
From the "Connect" menu, select the HANG UP modem option :
If you forget to disconnect before exiting the PCD Utilities, an automatic
hang up will be done.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-21
Using S-Bus with the PG3
Manual S-Bus
7.6 Example of PCD program (with modem)
This is an example of program which handles S-Bus communications to
or from a supervision system and from the Programming console.
The communication can be initiated by :
• the PCD
• Supervision system
• PG3
(Outgoing call)
(Incomming Call)
The program is made in the form of a sequential block.
Usage :
COB
x
0
...
CSB
...
ECOB
MODEM
Outgoing call :
To initiate an outgoing call, the flag "CALL" must be set to 1. The PCD
will then try to make a connection with a remote central computer; if this
connection succeed, the PCD is switched to S-Bus slave mode and it can
then be interrogated by a Supervision system. When all the datas have
been read, the central computer must reset the CALL flag. If the connection does not succeed (or is interrupted), the central computer is called
again after a delay ("redial_tim"); this will happen until the flag "CALL"
is reset (by the PCD application program or the remote computer). The
flag "CONNECT" is set to 1 when there is a valid connection. If the connection is longer than "commtime" the PCD will hang up automatically.
Incomming call :
The PCD answer any incomming call comming from a central computer
or the SAIA Programming Tools. When a connection is made, the flags
"CONNECT" and "INC_CALL" are set to 1 until disconnection. If the
connection is longer than "commtime" the PCD will hang up automatically. When using the remote Programming Tools, the user can stop this
automatic hang up procedure.
Page 7-22
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
0
(0)
(11)
(Call or Redial)
20
(1)
11
Init modem
(12)
(Time 1 sec)
1
(2)
(3)
(5)
Load Redial Timer
(xbsy)
30
(6)
S-Bus mode
(1)
(7)
ACTIVE CONNECTION
(Connection loosed)
(8)
(xbsy)
9
(10)
Hang up with delay
(xbsy)
Full S-Bus
(time 3s)
Init modem
21
(21)
(22)
Slave S-Bus
De Assign serial line
(xbsy)
22
Reset modem
31
(31)
De Assign serial line
(xbsy)
33
Slave S-Bus
(time 1s)
23
26/739 E4 (SB-70-E.DOC)
(Time elapsed)
(9)
Hang up
7
(4)
(1)
(Connection OK)
6
3
Incomming call
Dial phone number
(Dial timeout)
2
(Carrier detect)
Init modem
 SAIA-Burgess Electronics Ltd.
Page 7-23
Using S-Bus with the PG3
Manual S-Bus
; Definitions of the symbols
Modem
CALL
CONNECT
INC_CALL
dcd_f
diag_f
xbsy
diag_f0
xbsy_sb
diag_r
diag_r0
pcd_ident
timer
rd_timer
dialnb
resmod
initmod
sasioff
sasioffd
sasidiag
sasisb
sasimc
pcd_number
smod
dcd
sec1
off_delay
sec3
CD_time
redial_tim
commtime
baud
Main
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
SB 0
F 8100
F 8101
F 8102
F 8103
F 8150
F 8156
F 8160
F 8166
R 4090
R 4091
R 4095
T0
T1
TEXT 0
TEXT 1
TEXT 2
TEXT 3
TEXT 4
TEXT 5
TEXT 6
TEXT 7
1
1
2
10
15
30
450
600
1800
2400
COB 0
; Modem send/receive
; CALL flag
; Indicate a valid connection
; Indicate an incomming call
; Carrier detect flag
; First of 8 diagnostic flags
; Xbsy flag (must be diag_F + 6)
; Full S-Bus Diagnostic (8 flags)
; Full S-Bus Xbsy (=diag_f0+6)
; Diagnostic register
; Full S-Bus Diagnostic
; PCD Identification register
; Timer used by SB modem
; Timer for redial
; Dial number string
; Reset modem string
; Init modem string
; SASI OFF
; SASI OFF with delay
; SASI diagnostic
; SASI Slave S-Bus via modem
; SASI Mode C
; PCD number
; Serial channel for modem
; Carrier detect signal
; 1 sec delay
; Delay before SASI OFF (in sec)
; 3 sec delay
; Maximum Carrer Detect wait time
; Redial time out
; Maximum communication time
; Speed in bps for modem connection
; Main program
; Definitions of the Texts
; The following texts can be adapted for your modem.
; Number to dial
TEXT dialnb "ATDT004137727111<CR>"
;-- Modem reset string-TEXT resmod "ATZ<CR>"
;-- Modem init string -TEXT initmod ""
; ---------------------The following texts do not need to be changed
;-- SASI OFF -TEXT sasioff "MODE:OFF;"
;-- SASI OFF delay -TEXT sasioffd "MODE:OFF,",off_delay,";"
;-- SASI DIAG -TEXT sasidiag "DIAG:",diag_f0.T,",",diag_r0.T,";"
;-- SASI S-Bus -TEXT sasisb "UART:",baud,";MODE:SS0;DIAG:",diag_f.T,",",diag_r.T,";"
;-- SASI Mode C -TEXT sasimc "UART:",baud,",8,N,1;MODE:MC0;DIAG:",diag_f.T,",",diag_r.T,";"
Page 7-24
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
; Initial Step 0 -------------------------------------------; The code starting here will be copied in XOB16
$init
SASI
smod
; Declare diagnostic flags
sasidiag
$endinit
; TR 0 -----------------------------------------------------Call or Redial
SICL
smod
; Read and store the CD signal
dcd
OUT
dcd_f
;
STH
CALL
; If request to initiate a call
ANL
rd_timer
; and time to redial
ANL
dcd_f
; and modem off hook
ANL
xbsy_sb
; and OK to perform a sasi OFF
; Macro Step Init Modem ------------------------------; ST 21 ---------------------------------------------------SASI
smod
; De-assign serial channel
sasioff
; TR 21----------------------------------------------------Xbsy
STL
xbsy_sb
; Wait until end of SASI OFF
; ST 22 ---------------------------------------------------Reset modem
SASI
smod
; Enter MC mode
sasimc
ACC
H
SOCL
smod
; Set RTS
0
SOCL
smod
; Set DTR
1
STXT
smod
; Send reset modem string
resmod
LD
timer
; 1 sec delay
sec1
; TR 22 ---------------------------------------------------Time 1 sec
STL
timer
; Wait until text transmitted
ANL
xbsy
; and timer finished
; ST 23 ---------------------------------------------------Init modem
STXT
smod
; Send modem init string
initmod
LD
timer
; 1 sec delay
sec1
;-----------------------------------------------------------; TR 1 -----------------------------------------------------Time (1s)
STL
xbsy
; Text send completely
ANL
timer
; and timer elapsed
; ST 1 -----------------------------------------------------Dial Phone Number
STXT
smod
; Send dialing command
dialnb
LD
timer
; Load maximum time for CD detection
CD_time
; TR 2 -----------------------------------------------------Dial Timeout
SICL
smod
; Read DCD signal
dcd
OUT
dcd_f
; and store it
STL
timer
; Time elapsed ?
ANL
dcd_f
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-25
Using S-Bus with the PG3
Manual S-Bus
; ST 2------------------------------------------------------Load redial timer
LD
rd_timer
; Load redial timer
redial_tim
SASI
smod
; return to full S-Bus
sasioff
; TR 3 -----------------------------------------------------XBSY
STL
xbsy_sb
; ST 3 -----------------------------------------------------Full S-Bus
; To be sure that the SASI-OFF has been completly performed, we need to wait 3 sec
LD
timer
; Load 3 sec
sec3
RES
CONNECT
; Reset the connect flag
RES
INC_CALL
; Reset the incomming call flag
; TR 4 -----------------------------------------------------Time 3 sec
STL
timer
ANL
xbsy_sb
-------------------------------------------------------------------------------------------------------; TR 5 -----------------------------------------------------Connection OK ?
STH
dcd_f
; Connected ? (CD high)
;Macro Step Slave S-Bus ------------------------------; ST 31 ---------------------------------------------------De-assign serial line
SASI
smod
; De-assign serial channel
sasioff
; TR 31 ---------------------------------------------------Xbsy
STL
xbsy_sb
; Wait until end of SASI OFF
; ST 32 --------------------------------------------------SASI
smod
; Re-assign serial channel
sasisb
;
in mode SD0
SOCL
smod
; Set DTR
0
SOCL
smod
; Set RTS
1
; ----------------------------------------------------------; TR 6 -----------------------------------------------------Empty
; ST 6 -----------------------------------------------------Connection active
LD
timer
; load maximum communication time
commtime
SET
CONNECT
; indicate the connection
; TR 7 -----------------------------------------------------Connection Loosed
SICL
smod
; Wait until no DCD
dcd
ACC
C
Page 7-26
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
; ST 7 -----------------------------------------------------Hang Up
; Hang up is not necessary, because we have already lost the line. But if it was not
; an incomming call it is necessary to return ; to Full S-Bus
STH
INC_CALL
; If not an incomming call
JR
H end
SASI
smod
; Then return to FULL S-Bus
sasioff
end:
; TR 8 -----------------------------------------------------Xbsy
STL
xbsy_sb
; Wait until end of SASI OFF
-------------------------------------------------------------------------------------------------------; TR 9 -----------------------------------------------------Time elapsed
STL
timer
; ST 9 ----------------------------------------------; Perform a SASI OFF with delay to leave a chance to the PG3 console; to gain the control
; over the program. Doing a SASI OFF will hang up.
SASI
smod
; SASI OFF with delay
sasioffd
; TR 10----------------------------------------------------Xbsy
STL
xbsy_sb
; Wait until end of SASI OFF
-------------------------------------------------------------------------------------------------------; TR 11 ---------------------------------------------------Carrier detected ?
STH
dcd_f
; DCD High ?
; ST 11 ---------------------------------------------------Incomming Call
SET
INC_CALL
; indicate an incomming call
; TR 12 ---------------------------------------------------Empty
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-27
Using S-Bus with the PG3
Manual S-Bus
7.7 Configuration of a Gateway Master Port (GMP)
The master gateway port is configured using the "Gateway Master Port"
menu in the configure menu of the PG3 utilities
The menu shows three predefined values :
• The CPU type, as defined in the "Hardware and memory" menu.
• The S-Bus station number as defined in the "S-Bus communications" menu.
• The S-Bus PGU port also defined in the "S-Bus communications" menu.
In the rest of the menu it is necessary to define eight essential parameters
necessary for the initialisation of the Gateway.
Gateway master port (GMP)
This field specifies the port to be used for the Gateway Master Port.
If "None" is chosen, no Gateway Master Port will be configured.
Port on CPU (PCD6 only)
This field is only for PCD6, it defines on which CPU the Gateway
Master Port will be configured.
Baud rate
The transmission speed of the Gateway Master Port, this is selectable between 110 - 38400 bps as with any standard S-Bus communications protocol.
Mode
This defines whether the Gateway Master Port will use the break
mode (mode 0), the parity mode (mode 1) or the data mode (mode 2).
Page 7-28
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
Using S-Bus with the PG3
TN delay
Turnaround time in milliseconds. This is the minimum time between
the end of a response and transmission of the next telegram. It gives
the remote station time to switch back to receive mode. The TN
delay is particularly important if using the PCD7.T100 repeater or
private line modems. If a zero is entered for the TN delay then the
default value will be used. which can be found in the configure help
index (Function key F1), in the S-Bus timing field and in the table
below.
TS delay
Training sequence delay in milliseconds. This is the delay between
setting RTS (Request To Send) and the transmission of the message
and is principally for modems. If zero is entered for the TS delay
then the default value will be used which can be found in the configure help index (Function key F1) , in the S-Bus timing field and
in the table below.
Timeout
This time-out delay in milliseconds concerns the transmission between the Master Gateway Port and its connected slave(s). This defines the maximum time that the master will wait before transmitting a retry in the case of error. The table below lists the default
time-out values in milliseconds to set in function of the baud-rate of
the Master Gateway port. It may be necessary to adjust these values if the TN and TS delays differ from their default values. If zero
is entered here then the default value will be used.
Baud rate
110
150
300
600
1200
2400
4800
9600
19200 38400
TN delay [ms]
27
20
20
5
3
2
2
1
1
1
TS delay [ms]
0
0
0
0
0
0
0
0
0
0
Timeout [ms] Br/Par
15000 9000
5000
3000
2000
1000
500
250
200
200
Timeout [ms] Data
15000 15000
7500
4500
3000
1500
750
375
300
300
Break length
This parameter specifies the number of break characters in break
mode (mode 0). The default is 4.
26/739 E4 (SB-70-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 7-29
Using S-Bus with the PG3
Manual S-Bus
Notes :
Page 7-30
 SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus
8.
Appendixes
Appendixes
Appendix A Compatibility for using S-Bus at 38.4 Kbps
The baud rate 38.4 Kbps is supported as follows :
Firmware : PCD1.M1x0
PCD2.M110/M120
PCD2.M150
PCD4.Mxx0
PCD4.Mxx5
PCD4.M445
PCD6.M540
PCD6.M2x0
PCD6.M300
from version V001
from version V001
from version V0A0
from version V003
from version V00B
from version V00C (possibly V001)
from version V002
from version V007
from version V001
Hardware : PCD1.M1x0
PCD2.M110/M120
PCD2.M150
PCD4.Mxx0
PCD4.Mxx5
PCD4.M445
PCD6.M540
PCD6.M2x0
PCD6.M300
all versions
from version A
all versions
from version G
all versions
all versions
from version C
all versions
all versions
Interface types which can run at 38.4 Kbps :
RS 422 and RS 485
20mA current loop
RS 232
all
none
some, see list below
For the following RS 232 interfaces it is not possible to guarantee perfect
operation at 38.4 Kbps because of the driver module used. However, it has
been shown that in most cases these interfaces can also run at 38.4 Kbps.
PCD1.M1x0
PCD2.M1x0
PCD2.F520/F530
PCD4.C120
PCD4.C130
PCD4.C340
PCD6.M540
PCD6.M210
PCD6.M220/M230
PCD6.M300
*)
26/739 E4 (SB-81-E.DOC)
interface 0 (PGU) or 1
interface 0 (PGU) or 1
interface 2
interface 1
interface 3
all interfaces *)
interface 2
interfaces 0..3
interfaces 2 and 3
all interfaces *)
*)
*)
with the interface module PCD7.F120
 SAIA-Burgess Electronics Ltd.
Page 8-1
Appendixes
Manual S-Bus
Appendix B S-Bus PGU interfaces and cables
The table below shows which of the PCD1, PCD2, PCD4 and PCD6 interfaces can be defined as S-Bus/PGU interfaces.
PCD type
Interface
PCD1.M1x0
0: RS 232 (PGU)
Optional:
1: RS 232 or
RS 422 / RS 485
P8-PGU
Cable type PCD8. / baud rate
S-Bus-PGU
Converter
Cable type / max. baud rate (optional)
---
..K111 / 38.4 Kbps
..T120
-----
..K111 / 38.4 Kbps
Standard / 38.4 Kbps
..T120
---
PCD2.M110 0: RS 232 (PGU)
..K100, K110 or K111 / 9.6 Kbps
/M120
or RS 485
--or
Optional:
PCD2.M220 1: RS 232 or
--RS 422 / RS 485
--2: RS 232
--3: RS 422 / RS 485
---
..K111 / 19.2 Kbps
Standard / 38.4 Kbps
..T120
---
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
Standard / 38.4 Kbps
..T120
--..T120
---
PCD2.M150 0: RS 232 (PGU)
or
or RS 485
PCD2.M250 Optional:
1: RS 232 or
RS 422 / RS 485
2: RS 232
3: RS 422 / RS 485
-----
..K111 / 19.2 Kbps
Standard / 38.4 Kbps
..T120
---
---------
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
Standard / 38.4 Kbps
..T120
--..T120
---
PCD4.Mxxx
with ..C100
0: RS 232 (PGU)
..K100, K110 or K111 / 9.6 Kbps
..K111 / 38.4 Kbps
..T120
PCD4.Mxxx
with ..C110
0: RS 232 (PGU)
1: 20mA CL
..K100, K110 or K111 / 9.6 Kbps
---
..K111 / 38.4K bps
---
..T120
---
PCD4.Mxxx
with ..C120
0: RS 232 (PGU)
1: RS 232
2: 20mA CL
3: 20mA CL
..K100, K110 or K111 / 9.6 Kbps
-------
..K111 / 38.4 Kbps
Standard / 19.2 Kbps
-----
PCD4.Mxxx
with ..C130
0: RS 232 (PGU)
..K100, K110 or K111 / 9.6 Kbps
1: RS 422 / RS 485
--2: RS 422
--3: RS 232
---
PCD4.Mxxx
with ..C340
0: RS232 (PGU)
1/2/3: RS 232
1/2/3: RS 422/485
1/2/3: 20mA CL
..K100, K110 or K111 / 9.6 Kbps
-------
..K111 / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
..K111 / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
---
..T120
..T120
----..T120
--..T140
..T120
PCD6.M100 P8
..P800 / 9.6 Kbps
---
---
PCD6.M210 P8
0: RS 232
1: RS 232
2: RS 232
3: RS 232
..P800 / 9.6 Kbps
---------
--Standard / 19.2 Kbps
Standard / 19.2 Kbps
Standard / 19.2 Kbps
Standard / 19.2 Kbps
--..T120
..T120
..T120
..T120
Remark :
..T120
..T120
-----
The programming cable PCD8.K101 replaces the old ..K100 which cannot
be used for the PCD1 (see description on page 8-5)
Continuation on the next page
Page 8-2
 SAIA-Burgess Electronics Ltd.
(SB-81-E.DOC)
26/739 E4
Manual S-Bus
Appendixes
Continuation
PCD type
Interface
P8-PGU
Cable type PCD8. / baud rate
S-Bus-PGU
Converter
Cable type / max. baud rate (optional)
PCD6.M220 P8
0: RS 422 / RS 485
1: RS 422
2: RS 232
3: RS 232
..P800 / 9.6 Kbps
---------
--Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
Standard / 19.2 Kbps
----..T140
..T120
..T120
PCD6.M230 P8
0: 20mA CL
1: 20mA CL
2: RS 232
3: RS 232
..P800 / 9.6 Kbps
---------
------Standard / 19.2 Kbps
Standard / 19.2 Kbps
------..T120
..T120
PCD6.M250 P8
0: 20mA CL
1: 20mA CL
2: 20mA CL
3: 20mA CL
..P800 / 9.6 Kbps
---------
-----------
-----------
PCD6.M260 P8
0: RS 422 / RS 485
1: RS 422 / RS 485
2: RS 422 / RS 485
3: RS 422 / RS 485
..P800 / 9.6 Kbps
---------
--Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
-----------
PCD6.M300 4: RS 232 (PGU)
Optional:
0: RS 232 or
20mA CL or
RS 422 / RS 485
1: RS 232 or
20mA CL or
RS 422 / RS 485
2: RS 232 or
20mA CL or
RS 422 / RS 485
3: RS 232 or
20mA CL or
RS 422 / RS 485
---
..K111 / 38.4 Kbps
..T120
-------------------------
..K111 / 38.4 Kbps
--Standard / 38.4 Kbps
..K111 / 38.4 Kbps
--Standard / 38.4 Kbps
..K111 / 38.4 Kbps
--Standard / 38.4 Kbps
..K111 / 38.4 Kbps
--Standard / 38.4 Kbps
..T120
----..T120
----..T120
----..T120
-----
..K111 / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
---
..T120
--..T120
---
PCD6.M540 0: RS 232 (PGU)
..K100, K110 or K111 / 9.6 Kbps
1: RS 422 / RS 485
--2: RS 232
--3: 20mA CL
---
P8-PGU :
Programming interface with P8 protocol
S-Bus-PGU :
Programming interface with S-Bus Protocol
Converter :
Optional connection of a converter at the S-Bus interface is also possible, so that it matches the programming
unit or network interface type.
Max. baud rate : Max. transmission speed for the programming interface.
For the S-Bus protocol, the baud rate can be set between 110...38400 bps. For the P8 protocol, the baud
rate is fixed at 9600 baud.
26/739 E4 (SB-81-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 8-3
Appendixes
Manual S-Bus
Cables for the programming interface
PCD8.P800
Interface processor for the programming unit with cable and 25-pole Dtype connector. This device is used to connect the PG (via PGU interface) for PCD6.M1.. and ..M2.. processor modules. The processor supports the P8 protocol only. More information can be found in the PCD6
hardware manual.
PCD8.K110
(no longer available, replaced with PCD8.K111)
Programming cable with 9-pole D-type connector for connection of the
programming unit (PC or PCD8.P100) with P8 protocol.
Use of cable as for PCD8.K111
This cable can only be used for the P8-PGU interface. When an "online"
program is called (e.g. the debugger), the interface's RTS signal is set high
by the programming unit. The PCD CPU recognises the programming unit
by the wiring of pins 6 and 8 in the PGU connector and therefore automatically assigns the interface with the P8 protocol.
Page 8-4
DSR = 1
PG connected, assignment with P8 protocol
DSR = 0
no PG connected, so no assignment either
 SAIA-Burgess Electronics Ltd.
(SB-81-E.DOC)
26/739 E4
Manual S-Bus
Appendixes
PCD8.K101 connecting cable (for P8 and S-bus protocol)
(as replacement for ..K100 which cannot be used for PCD1)
D-type, 25 pole
(female)
PGD
1
2
3
PC
or
D-type, 9 pole
(male)
PGD
TX
RX
RX
TX
2
3
SGN
7
1
4
SGN
5
DSR
PCD8.P100
4
5
16
RTS
RTS
CTS
CTS
(P100)
6
7
8
+5V
Switch
PGU
PCD
(P8 and S-bus
protocol)
9
PCD8.K111
Programming cable with 9-pole D-type connector for connection of the
programming unit with P8 or S-Bus protocol.
1
2
3
4
PC
5
7
8
RX
RX
TX
TX
DTR
SGN
SGN
DSR
RTS
RTS
CTS
CTS
1
2
3
4
5
6
7
8
PGU
PCD
(P8 and S-Bus
protocol)
9
This cable can be used both for P8 and S-Bus PGU interfaces. When an
online program is called, the Utilities (from version 1.7 for the PG3) enable the programming unit to control not only the RTS but also the DTR
interface signals.
By evaluating the DSR signal, the PGU is automatically assigned with the
appropriate protocol.
26/739 E4 (SB-81-E.DOC)
DSR = 1
P8 protocol
DSR = 0
S-Bus protocol, if interface has been configured for
S-Bus, otherwise no assignment.
 SAIA-Burgess Electronics Ltd.
Page 8-5
Appendixes
Manual S-Bus
Compatibility and use of programming cable for PCD2, PCD4 and PCD6.M540
Cable
PCD8..
Utility
Firmware
P8-PGU
(port 0)
K111
new
new
yes
yes
Ideal case
K111
new
old
yes
no
S-Bus not supported by firmware.
K111
old
new
no
no
K111
old
old
no
no
K100, K110
new
new
yes
no
K100, K110
new
old
yes
no
K100, K110
old
new
yes
no
K100, K110
old
old
yes
no
Cable not supported by utilities,
no online connection possible.
Cable not supported by utilities,
no online connection possible.
S-Bus not supported by cable,
may not be set on PG.
S-Bus not supported by firmware
and cable.
S-Bus not supported by utility
and cable.
P8 protocol only supported.
Utility version :
Firmware version :
S-Bus PGU Notes
(port 0)
new = from V1.7 (for the PG3)
new = from PCD2.M1x0
-V001
PCD4.Mxx0
-V003
PCD6.M540
-V002
PCD6.M1/M2 -V007
Standard cable (connection)
No special cable is required for connection of the programming unit.
Terminal allocations and interface connection examples can be found in
the PCD hardware manuals or in the manual “Installation components for
RS 485 networks”.
Caution
When connecting non-SAIA devices to PCD interfaces RS422/485, special attention should be paid to signal polarity. SAIA identifies the signal
lines with RX, /RX and TX, /TX. Non-SAIA devices often identify them
differently, e.g. +RX, -RX and +TX, -TX, which can lead to confusion.
The following normally applies :
SAIA
RX
/RX
TX
/TX
Non-SAIA device
D
/D
D
/D
-RX
+RX
-TX
+TX
Practical tip :
If connection is unsuccessful, even when the installation is supposedly
correct, it is worth trying with transposed data lines.
Page 8-6
 SAIA-Burgess Electronics Ltd.
(SB-81-E.DOC)
26/739 E4
Manual S-Bus
Appendixes
Appendix C Firmware and software compatibility
Application level 2
Firmware version from which the support application level 2 is provided :
PCD1.M1x0
PCD2.M110/M120
PCD2.M150
PCD4.Mxx0
PCD4.Mxx5
PCD6.M540
PCD6.M1/M2
PCD6.M300
-
V001
V001
V0A0
V003
V00B
V002
V007
V001
RS232 and RTS signal
Firmware before :
PCD2.M1x0
PCD4.Mxx0
PCD6.M540
PCD6.M2x0
-
V002
V004
V003
V008
When the RS 232 PCD interface is assigned with the SASI instruction
to SM2, SM1, SM0 or SS2, SS1, SS0 mode, the RTS control line status
is set high. This would block communications, because the transmitters
of all modems or converters (RS 232/485, RS 422/485) on the network would be switched on after initialisation.
In the user program, reset the RTS signal immediately after the SASI
instruction by using SOCL.
Example :
XOB
SASI
ACC
SOCL
16
3
10
; Assign channel 3
; Definition text 10
3
0
; Channel 3
; Reset RTS
L
EXOB
26/739 E4 (SB-81-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 8-7
Appendixes
Manual S-Bus
S-Bus data mode
Firmware version from which the S-Bus data mode (SM2, SS2, GS2) is
provided :
PCD1 firmware
from V002
(possibly Vß1C)
PCD2.M110/M120 firmware
from V005
(possibly V$45)
PCD2.M150
from V0A0
(since 1st version)
PCD4.xx5 firmware
from V00D
(possibly V$CA)
PCD6.M300 firmware
from V001
(possibly Vß09)
Software version from which the S-Bus data mode is provided :
Page 8-8
PG3
from V 2.1
PG4
from V 1.4
SCOMM-DLL 32 bit
from V $114
SCOMM-DLL 16 bit
from V $14
C-Library 16 bit
from V $121
S-Bus Analyser
from V $007
 SAIA-Burgess Electronics Ltd.
(SB-81-E.DOC)
26/739 E4
Manual S-Bus
Appendixes
S-BUS FIRMWARE COMPATIBILITY
PCD1.
PCD2.
M1x0
M110/M120
M150
FW HW FW HW FW HW
PCD4.
Mxx0
Mxx5
FW HW FW HW
M540
FW HW
PCD6.
M1../M2..
FW HW
M300
FW HW
Level 1 (reduced protocol)
Level 2 up to 9’600 Bd
Level 1 up to 38.4 KBd
Level 2 up to 38.4 KBd
up to 38.4 KBd optimised
Broadcasting PCD as master
Broadcasting PC as master
Data Mode
Download Configuration
Gateway
Gateway improved
Modem :
Private line
Public line
Reset/Init string
Modem +
Radio modem up to 4’800 Bd
RIO functionality
SRXM extension
STXMI and SRXMI
Write station number (Debug.)
XOB 17,18,19
005
005
005
005
005
005
001
005
001
005
070
001
001
001
001
001
005
005
005
001
001
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
001
001
001
001
004
001
003
005
004
003
080
001
001
003
003
003
005
003
003
004
003
x
A
A
A
A
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
0A0
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
002
003
003
003
--004
004
--$52
----002
003
005
005
005
--005
005
005
005
x
x
G
G
--x
x
--x
----x
x
x
x
x
--x
x
x
x
00B
00B
00B
00B
00C
00B
00B
00D
00C
00C
0E0
00B
00B
00B
00B
00B
00D
00B
00B
00B
00B
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
001
002
002
002
--003
003
--$41
----001
002
004
004
004
--004
004
004
004
x
x
C
C
--x
x
--x
----x
x
x
x
x
--x
x
x
x
007
007
007
007
--008
008
----009
--007
007
009
009
009
--009
009
009
009
x
x
x
x
--x
x
----x
--x
x
x
x
x
--x
x
x
x
001
001
001
001
001
001
001
001
001
001
030
001
001
001
001
001
001
001
001
001
001
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
S-Bus Master
005
x
001
x
0A0
x
003
x
00B
x
002
x
007
x
001
x
Features
--X
1)
2)
FW ≥ V.
Remarks
PCD8.K111 required
PCD8.K111 required
major modif. to kernel
with the Debugger
also with Gateway
new switches
transparent for telegr.
TFUL mechanism
activated with SASI
read system info slave
to transfer DB’s
not implemented in this PCD
not depending of the hardware version.
PCD1 has been implemented with the slave protocol, from firmware V005 all S-Bus Master and Gateway functionalities are allowed.
PCD2 version D, modification 1, produced in July and August 1995 need a special firmware ($ version) to be able to use all the
functionality of the S-BUS.
26/739E4
(SB-82-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 8-9
Manual S-Bus
Appendixes
Notes :
26/739E4
(SB-82-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 8-10
Manual S-Bus
Appendixes
S-BUS SOFTWARE COMPATIBILITY
PCD1.
Mx0
PG3
PG4
PCD2.
M110/M120
M150
PG3
PG4
PG3 PG4
PCD4.
Mxx0
Mxx5
PG3
PG4
PG3
PG4
M540
PG3
PG4
PCD6.
M1../M2..
PG3
PG4
M300
PG3 PG4
Level 1 (reduced protocol)
Level 2 up to 9’600 Bd
Level 1 up to 38.4 KBd
Level 2 up to 38.4 KBd
up to 38.4 KBd optimised
Broadcasting PCD as master
Broadcasting PC as master
Data Mode
Download Configuration
Gateway
Gateway improved
Modem :
Private line
Public line
Reset/Init string
Modem +
Radio modem up to 4’800 Bd
RIO functionality
SRXM extension
STXMI and SRXMI
Write station number (Debug.)
XOB 17,18,19
2.0
2.0
2.0
2.0
2.0
2.1
2.0
2.1
2.0
2.1
2.1
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
1.3
1.3
1.3
1.3
1.3
1.4
1.3
1.4
1.4
1.4
1.4
1.3
1.3
1.3
1.3
1.3
1.3
1.4
1.4
1.3
1.4
1.7
1.7
1.7
1.7
1.7
1.7
1.9
2.1
2.0
1.9
1.9
1.7
1.7
1.9
1.9
1.9
2.0
1.9
1.9
1.9
1.9
1.21
1.21
1.21
1.21
1.21
1.21
1.21
1.4
1.4
1.3
1.3
1.21
1.3
1.3
1.3
1.21
1.3
1.4
1.4
1.21
1.4
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
$219
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
2.0.80
1.6
1.7
1.7
1.7
--1.6
1.9
--2.0
----1.7
1.7
1.9
1.9
1.9
--1.9
1.9
1.9
1.9
1.21
1.21
1.21
1.21
--1.21
1.21
--1.4
----1.21
1.3
1.3
1.3
1.21
--1.4
1.4
1.21
1.4
1.6
1.7
1.7
1.7
1.7
1.6
1.9
2.1
2.0
1.9
1.9
1.7
1.7
1.9
1.9
1.9
2.0
1.9
1.9
1.9
1.9
1.21
1.21
1.21
1.21
1.21
1.21
1.21
1.4
1.4
1.3
1.3
1.21
1.3
1.3
1.3
1.21
1.3
1.4
1.4
1.21
1.4
1.6
1.7
1.7
1.7
--1.6
1.9
--2.0
----1.7
1.7
1.9
1.9
1.9
--1.9
1.9
1.9
1.9
1.21
1.21
1.21
1.21
--1.21
1.21
--1.4
----1.21
1.3
1.3
1.3
1.21
--1.4
1.4
1.21
1.4
1.6
1.7
1.7
1.7
--1.6
1.9
----1.9
--1.7
1.7
1.9
1.9
1.9
--1.9
1.9
1.9
1.9
1.21
1.21
1.21
1.21
--1.21
1.21
----1.3
--1.21
1.3
1.3
1.3
1.21
--1.4
1.4
1.21
1.4
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
2.1
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
S-Bus Master
2.1
1.4
1.7
1.21
$219 2.0.80
1.7
1.21
1.7
1.21
1.7
1.21
1.7
1.21
2.1
1.4
Features
--1)
2)
3)
SW ≥ V.
not implemented in this PCD
PCD1 has been implemented with the slave protocol, from firmware V005 all S-Bus Master and Gateway functionalities are allowed.
PCD2 version D, modification 1, produced in July and August 1995 need a special firmware ($ version) to be able to use all the
functionality of the S-BUS.
used always the latest firmware version of the PCD8.P100 (V003 - June 1996)
26/739E4
(SB-82-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 8-11
Manual S-Bus
Appendixes
Notes :
26/739E4
(SB-82-E.DOC)
 SAIA-Burgess Electronics Ltd.
Page 8-12
From :
Send back to :
Company :
Department :
Name :
Address :
SAIA-Burgess Electronics Ltd.
Bahnhofstrasse 18
CH-3280 Murten (Switzerland)
http://www.saia-burgess.com
Tel. :
BA : Electronic Controllers
Date :
SAIA S-Bus for the PCD family
If you have any suggestions concerning the SAIA PCD, or have found any errors in
this manual, brief details would be appreciated.
 SAIA-Burgess Electronics Ltd.
Your suggestions :
 SAIA-Burgess Electronics Ltd.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising