SBC SBC-SBus Owner's Manual
Advertisement
Advertisement
SAIA PCD
Process Control Devices
Manual
SAIA
S-Bus
English edition 26/739 E4
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
Germany SAIA-Burgess Electronics GmbH
Daimlerstrasse 1k
D-63303 Dreieich
06103 89 060, Fax 06103 89 06 66
Austria
Italy
SAIA-Burgess Electronics Ges.m.b.H.
Schallmooser Hauptstrasse 38
A-5020 Salzburg
0662 88 49 10, Fax 0662 88 49 10 11
SAIA-Burgess Electronics S.r.l.
Via Cadamosto 3
I-20094 Corsico MI
02 48 69 21, Fax 02 48 60 06 92
France
Nederlands SAIA-Burgess Electronics B.V.
Hanzeweg 12c
NL-2803 MC Gouda
0182 54 31 54, Fax 0182 54 31 51
Belgium
SAIA-Burgess Electronics Sàrl.
10, Bld. Louise Michel
F-92230 Gennevilliers
01 46 88 07 70, Fax 01 46 88 07 99
SAIA-Burgess Electronics Belgium
Avenue Roi Albert 1er, 50
B-1780 Wemmel
02 456 06 20, Fax 02 460 50 44
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
Denmark
Norway
Sweden
Suomi/
Finland
Malthe Winje Automation AS
Håndværkerbyen 57 B
DK-2670 Greve
70 20 52 01, Fax 70 20 52 02
Malthe Winje Automasjon AS
Haukelivn 48
N-1415 Oppegård
66 99 61 00, Fax 66 99 61 01
Malthe Winje Automation AB
Truckvägen 14A
S-194 52 Upplands Våsby
08 795 59 10, Fax 08 795 59 20
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
Portugal
Spain
Czech
Republic
Poland
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
Tecnosistemas Medioambientales, S.L.
Poligono Industrial El Cabril, 9
E-28864 Ajalvir, Madrid
91 884 47 93, Fax 91 884 40 72
ICS Industrie Control Service, s.r.o.
Modranská 43
CZ-14700 Praha 4
2 44 06 22 79, Fax 2 44 46 08 57
SABUR Ltd.
ul. Druzynowa 3A
PL-02-590 Warszawa
22 844 63 70, Fax 22 844 75 20
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 : SAIA S-Bus for the PCD family - Edition E4
Date
11.05.2000
06.10.2000
Chapter
6.6
3.12
Page
6-8 / 6-9
3-53
Description
Gateway master, enlarged table
SYSWR : Code 6000 (write EEPROM)
SAIA-Burgess Electronics Ltd.
Manual S-Bus
Contents
1.
1.1
1.2
1.3
1.4
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
Introduction
What is the SAIA S-Bus ?
Typical Applications
Characteristics
The S-Bus protocol
Application Layer
Presentation Layer
Network Layer
Data Link Layer
Physical Layer
2.
2.1
2.2
Installation
Point to point connection
S-Bus network
3.
3.1
3.2
3.3
3.4
Data Transfer Service
Operating principle and application
PCD instructions for S-Bus
SASI Assign serial interface
SRXM Receive data from a slave station
3.5
3.4.1
3.4.2
3.4.3
Special functions
Transfer of Data Blocks (Read)
Practical application
STXM Transmit data to a slave station
3.5.1
3.5.2
3.5.3
Special functions
Transfer of Data Blocks (Write)
Practical application
Contents
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-1
1-3
1-5
1-7
1-7
1-7
1-8
1-10
1-12
26/739 E4
(SB-00-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 1
Contents
3.6
3.7
3.8
3.9
SASII Assign serial interface indirect
SRXMI Read data in indirect mode
STXMI Transmit data in indirect mode
SICL Input Control Line
3.10
SOCL Output Control Line
3.11
SYSRD System
3.12
SYSWR System
3.13
Communication via modem
3.13.1
3.13.2
Multipoint modems and converters
Modems for the Public Telephone Network
3.14
Examples of user programs in IL
3.14.1
3.14.2
Example 1
Example 2
3.15
Example of user programs in FUPLA
Manual S-Bus
3-56
3-60
3-61
3-61
3-64
3-67
Page
3-40
3-41
3-44
3-46
3-47
3-49
3-52
3-55
4.
4.1
4.2
4.3
Commissioning service
Essential characteristics and applications
Local programming and commissioning
4-1
4-3
Configuration and assignment of an S-Bus PGU interface 4-5
4.4
4.3.1
4.3.2
Memory modules with RAM components
Memory modules with EPROM components
Connection of the PG Unit via S-Bus
4-5
4-9
4-11
Page 2
SAIA-Burgess Electronics Ltd.
(SB-00-E.DOC)
26/739 E4
Manual S-Bus Contents
Page
5.
5.1
5.2
Modems
Transmission speeds
Operating your modem
5.3
5.2.1
5.2.2
5.2.3
5.2.4
5.2.5
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
Connection via the Public Telephone Network
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
5.3.6
Application diagram
Configuring the PCD
Configuring the PC (PG4)
Making the connection
Trouble shooting
Ending the connection
5.4
5.5
5.4.1
5.4.2
5.4.3
Modem +
Diagnostics (SASI DIAG)
SICL instruction
UNDO/REDO a S-Bus PGU port (SASI OFF)
Example of PCD program
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.
6.1
6.2
6.3
6.4
S-Bus Gateway
Introduction
Features of the Gateway
Configuration of a Gateway Master Port (GMP)
Configuration of the Gateway Slave Port
6.5
6.6
6.7
6.4.1
6.4.2
S-Bus-PGU
User SASI instruction
Using STXM / SRXM in the Gateway station
Setting Timeout in an S-Bus network
Possible sources of errors
6-1
6-2
6-3
6-6
6-6
6-6
6-7
6-8
6-10
26/739 E4
(SB-00-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3
Contents Manual S-Bus
7.
7.1
7.2
7.3
7.4
7.5
7.2.1
7.2.2
Memory modules with RAM components
Memory modules with EPROM components
Connection of the PG Unit via S-Bus
Configuring the PCD Utilities for your modem
Connection via the Public Telephone Network
Page
Using S-Bus with the PG3
Station number definition 7-2
Configuration and assignment of an S-Bus PGU interface 7-4
7-4
7-7
7-8
7-9
7-14
7.6
7.7
7.5.1
7.5.2
7.5.3
7.5.4
7.5.5
7.5.6
Application diagram
Configuring the PCD
Configuring the PC (PG3)
Making the connection
Trouble shooting
Ending the connection
Example of PCD program (with modem)
Configuration of a Gateway Master Port (GMP)
7-14
7-15
7-17
7-19
7-20
7-21
7-22
7-28
B
C
8.
A
Appendixes
Compatibility for using S-Bus at 38.4 Kbps
S-Bus PGU interfaces and cables
Firmware and software compatibility
8-1
8-2
8-7
Page 4
SAIA-Burgess Electronics Ltd.
(SB-00-E.DOC)
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
General
Manuals
U s e r's
G u id e
R ef eren ce
G uide
(PG 3 )
PCD1/2 series
H a rdw are
P C D 1
P C D 2
S e rie xx 7
PCD2.M250
PCD2.H110
PCD2.H150
PCD2.H210
PCD2.H31x
P C D 8 .P 1 ..
PCD 7.D 1..
PCD 7.D 2..
PCD 7.D 7..
PCD4 series
H a rd w a re
PC D 4
PC D 4. H1. .
*)
PC D4 .H 2..
*)
PC D4 .H 3.. *)
PCD 4.H 4..
PCD6 series
H ar dw a r e
P C D 6
*) Adap ter m odu le 4 '7 17'482 8'0
allo w s H mo dule s to b e us ed
wit h the PC D 6.
26/739 E4
- S-Bus
- LON
- PROFIBUS
I n st a llat io n
C o m p on e n ts f o r R S 48 5 -
N e tw o rk s
- PG4
- Modem
FU PLA/
KOPLA fu nction fa milies
(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
• compliance with standards
•
ISO 9001 certification
• international approvals: e.g. Germanischer Lloyd,
United Laboratories (UL), Det Norske Veritas, CE mark ...
• choice of high-quality componentry
• 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
1.
Introduction
1.1 What is the SAIA S-Bus ?
Introduction
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
PLM
PSTN
SCADA
SCS
GSM
ISDN
Glossary
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.
Public Line Modem.
Public Switched Telephone Network.
Supervisory Control and Data Acquisition
Supervisory Control Systems
Global System for Mobile communication
Integrated Services Digital Network
Page 1-2
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
S-Bus Network
Master
RS232, RS422 or 20 mA CL
PCD 1/2/4/6
Programming Unit or
Control System
Slave
PCD 1/2/4/6
Master
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
PCD 1/2/4/6
Slave Slave
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.
Master
PCD 1/2/4/6
Programming Unit or
Control System
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
PCD 1/2/4/6
Programming Unit or
Control System
Gateway
Master
PCD 2 / 4 / 6
Slave Slave
PCD 1/2/4/6
Slave
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
Bus line
RS 485 twisted two-core, shielded, line section min. 2
∗
0.5 mm2 length max. 1200 m per segment max. 32 per segment, total max. 255 Number of stations
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
Character length
Parity bit
Stop bit
Data transfer rate
Reaction times for transmission at
9600 bps of
1
8 bits mode SM2/SS2 : no parity mode SM1/SS1 : parity 1 / 0 mode SM0/SS0 : no parity
1 standard : 167 registers/s (at 9600 bps) maximum : 265 registers/s (at 19200 bps)
1 to 8 in-/outputs or flags : 18 ms
128 in-/outputs or flags : 35 ms
1 register :
32 registers
20 ms
125 ms
Error detection CRC-16
26/739 E4
(SB-10-E.DOC)
SAIA-Burgess Electronics Ltd.
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, SAIA-
Burgess 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 SAIA S-Bus Reduced & Full Protocol
Presentation Layer Telegrams 0 .. 255
Session Layer not used
Transport Layer
Network Layer
Data Link Layer
Physical Layer not used
Forced parity mechanism
ACK/NAK mechanism
Byte synchronisation + CRC 16 Error check
RS485, RS 232, 20mA CL, etc.
1.4.1
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 SAIA-
Bus 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) :
26/739 E4
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.
(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.
Client Server action requ est
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 time-out request error detected by the CRC-16
Uncorrupted but
Illegal telegram request
NAK request
ACK
Valid telegram positive response
Page 1-10
SAIA-Burgess Electronics Ltd.
(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 reception request 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
2.
Installation
2.1 Point to point connection
Installation
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
2.2 S-Bus network
Manual S-Bus
For installation of the S-Bus network, modules are required with the
RS485 interface.
Modules with RS485 interface :
•
PCD1.M110 with
•
PCD1.M120/M130 with PCD7.F110/F150 interface n° 1
(RS422/485)
•
PCD2.M110/M120 with or M150 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
•
PCD6.M220
•
PCD6.M260 single processor module (interface n° 1) communications processor module
(interface n° 0) 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.T160
+
1
RS 485
Segment 1
RS 232
2
PCD7.T120
PCD7.T160
+
PCD7.T100
31
PCD7.T100
RS 485
1
PCD7.T120
RS 232
2
Segment 2
PCD7.T100
PCD7.T160
+
RS 485
Segment 3
1
RS 422
2
PCD7.T140
30
30
PCD7.T160
+
PCD7.T160
+ RS 485
1
RS 232
2
Segment 4
PCD7.T120
31
PCD7.T160
+
26/739 E4
(SB-20-E.DOC)
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 Middle Stations End station
Pull up
330 Ohm
Termination resistor
Pull down
330 Ohm
+5V /RX RX
/TX TX
/RX RX
/TX TX
Segment: 1200m max max. 32 Stations
/RX RX
/TX TX
RS 485
(S-Bus)
/RX RX
/TX TX
+5V
Pull up
330 Ohm
Termination resistor
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
D
/D
D
/D
–RX
+RX
–TX
+TX
Page 2-4
SAIA-Burgess Electronics Ltd.
(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 mm
2
, with 2 cores, twisted and shielded.
Signal levels of the RS485 interface
Signal type
Data signal
Logical state
0 (space)
1 (mark)
Polarity
RX-TX positive to /RX-/TX
/RX-/TX positive to RX-TX no driver active
= Mark
5V
2.5V
4V
3V /TX
2V TX
1V
0V
Mark Space e.g. start bit
VOZ = 0.9V min... 1.7V max (no driver active)
*)
VOH = 2V min (with load) ... 5V max (without load)
VOZ = -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
+5V
First station
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.
Middle stations End station
+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
3.
Data Transfer Service
3.1 Operating principle and application
Data Transfer Service
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
4.
Press the 'S-Bus' button:
Data Transfer Service
5.
Select S-Bus Support and press the 'S-Bus' button:
6.
Enter the required station number
26/739 E4
(SB-31-E.DOC)
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.
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.
Select S-Bus Support and press the 'S-Bus' button:
26/739 E4
(SB-31-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-5
Data Transfer Service
4.
Enter the S-Bus station number:
Manual S-Bus
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
3.2 PCD instructions for S-Bus
Data Transfer Service
The following instructions are supported in S-bus mode :
SASI
SASII
SRXM
SRXMI
STXM
STXMI
SICL
SOCL
Serial output control line
Set control line signal
SYSRD
System Read
SYSWR
Assign serial interface
Serial receive media
Receive data or status from a slave station
Serial transmit media
Transmit data to a slave station
Serial input control line
Read status of a control line
Master and
Slave
Master only
Master only
Master and
Slave
System Write
Master and
Slave
Master and
Slave
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 Assign serial interface
Manual S-Bus
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
in standard memory
4000..7999
in extension memory
Example :
SASI 1
999
; Initialise channel 1
; Interface definitions in text 999
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 S-
Bus 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 data mode mode SM1/SS1 parity bit "1" for address character
"0" for data character mode SM0/SS0 with Break character
Format :
"UART:<Baudrate>[,<Timeout>][,TS-Delay>][,TN-Delay][,Break-Length];"
Baud rate
110
150
300
9600
19200
38400 adjustable or
[Timeout] default value
600
1200 1...15000
2400
4800 ms
[TS-Delay] [TN-Delay] value adjustable
27 ms
20 ms
20 ms
5 ms
3 ms 4…25
2 ms characters
2 ms
1 ms
1 ms
1 ms
[Breakadjustable default Length]
Parity+Break Data-Mode
15000 ms 15000 ms
9000 ms
5000 ms
15000 ms
7500 ms
3000 ms
2000 ms
1000 ms
500 ms
4500 ms
3000 ms
1500 ms
750 ms
1...15000
ms or
1...15000
ms
250 ms
200 ms
200 ms
375 ms
300 ms
300 ms
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 = 0ms.
Default value for Break Length = 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 :
TXD, RXD 0 00000000 0
Break char 1
Data bits
0 xxxxxxxx 1 0 xxxxxxxx 1
Address char Data char Break char n
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 Break-
Length 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>];"
GS2
GS1
GS0
GM
OFF
<sbus_mode> Description
SM2 S-Bus master, Data Mode
SM1
SM0
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
S-Bus Gateway slave, Data Mode
S-Bus Gateway slave, with parity bit control
S-Bus Gateway slave, with break character
S-Bus Gateway master
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
STXM
R 350
255
1
0
R 150
K 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.
26/739 E4
(SB-31-E.DOC)
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>;"
<diag_elem>
<diag_reg>
Type
F xxxx
O xxxx
R xxxx
Description
Base address of 8 consecutive flags or outputs
Address of diagnostic register
Example :
"DIAG:F3900,R120;"
Diagnostic flags
Address xxxx xxxx + 1 xxxx + 2 xxxx + 3 xxxx + 4 xxxx + 5 xxxx + 6 xxxx + 7
Name
RBSY
RFUL
RDIA
TBSY
TDIA
XBSY
NEXE
Description
Receiver busy
Receive buffer full
Receiver diagnostic
Transmitter busy
Not used
Transmitter diagnostic
SASI permission
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 :
Slave 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.
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 S-
Bus instruction.
26/739 E4
(SB-31-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-17
Data Transfer Service
DIAGNOSTIC REGISTER
Manual S-Bus
Bit Designation Description
R
E
C
E
0 Overrun error
1
2 Framing error
3
4
Break error
BCC error
5 S-Bus PGU status S-Bus PGU with Public Line modems
6 SASI OFF permission SASI OFF permission
7
I
V
8 Length error
9
E
10 Address error
R
11 Status error
Overrun of the internal receiver buffer
Usually caused by an incorrect baud rate
Break in data line * )
Bad Block Check Code or CRC-16
The telegram length is invalid
Address of ACK is invalid
PCD in false status, cannot execute command
12
13
14
15
16
Range error
Value error
Missing media error
Program error
Retry count
17
T
18
R
19
A
20 NAK response
N 21 Missing response
S
22 Multiple NAK
M 23 CTS-Timeout
I
24
T
25
T
26
E
27
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)
Negative response (NAK) was received
No response was received after timeout
NAK received after retries
No CTS set after TS delay
R 28 Range error
29
30
31 Program error
Invalid element address
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 S-
Bus 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 CRC-
16 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 0..8191
Flags 0..8191
Timers/counters
Registers
0..1599
0..4095
Example : During execution of the following STXM instruction, the
Range Error bit is set high.
STXM 1
25
R 1000
R 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
Notes :
Manual S-Bus
Page 3-24
SAIA-Burgess Electronics Ltd.
(SB-31-E.DOC)
26/739 E4
Manual S-Bus Data Transfer Service
3.4 SRXM 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
; channel number
; number of elements to receive
Source (i) ; base address of source elements (slave)
Dest (i) ; base addr. of destination elements (master)
Channel :
Number :
Source :
0..3
1..32
1..128
0
R nnnn
I/O/F
R
T/C
DB
K
Destination : I/O/F
R
T/C
DB 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
26/739 E4
(SB-32-E.DOC)
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.
Slave PCD
(source)
I
O
F
R
C
T
K
DB
O
•
•
•
Master PCD (destination )
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 1
14
R 1500
R 100
; Registers 1500-1513 are read from
; a slave station and copied
; into registers 100-113
; of the master station.
SRXM 1
0
K 1000
R 20
; The clock is read from a
; slave station and copied
; into registers 20 and 21
; of the master station.
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 Function description Result
K 0 ..7
K 1000
Read CPU status
0..6 :
7 :
CPU number of slave PCD own CPU status
Read Clock
R
C
H
S
D
Run
Conditional Run
Halt
Stop
Disconnected
The content of the clock is written in two Registers
(same format as RTIME inst.)
K 2000 Read Display Register
K 5000
K 5010
K 5100
K 5110
Read Device type
Read Module type in ASCII in decimal in ASCII in decimal
ASCII
" D1"
" D2"
" D4"
" D6"
ASCII
" M1_"
" M1_"
" M15"
" M11"
" M12"
" M14"
" M24"
" M34"
" M44"
" M1_"
" M2_"
" M3_"
" M54"
Dec
4
6
1
2
Dec
12
14
24
34
10
10
15
11
44
10
20
30
54
K 5200 Read Firmware version in ASCII Examples of valid responses :
" $4C", " 004", " X41"
K 5210 in decimal Ex : 5 dec for Version 005
-1 dec for any ‘$’, ‘X’, ‘
β
’
K 5300 Read CPU number in ASCII ASCII dec Type
K 5310 in decimal " 0"
" 0"
0
0
" 0" or " 1" 0 or 1
" 0" to " 6" 0 to 6
PCD1
PCD2
PCD4
PCD6
K 6000 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.
Type
PCD1
PCD2
PCD4
PCD6
Type
PCD1.M1
PCD2.M12
PCD2.M15
PCD4.M11
PCD4.M12
PCD4.M14
PCD4.M24
PCD4.M34
PCD4.M44
PCD6.M1
PCD6.M2
PCD6.M3
PCD6.M5
26/739 E4
(SB-32-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-27
Data Transfer Service Manual S-Bus
3.4.2
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 Data-
Block 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
LDH
SRXM
R 100
10000
R 100
32
R
R
3
100
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 :
•
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
26/739 E4
(SB-32-E.DOC)
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) 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 :
XOB 16
TEXT
SASI
100
1
100
; Interface no. 1
; Definition text 100
"UART:9600;"
"MODE:SM1,R500;"
"DIAG:F1000,R1000"
.
EXOB
COB
STH
ORH
CPB
STH
CPB
ECOB
0
0
F 1002
F 1005
; If RDIA
; or TDIA flag = high
H ERROR ; Then handle error
F 1003 ; If TBSY flag = low
L RECEIVE ; Then read data
PB
LD
SRXM
RECEIVE
R 500
5
1
32
I 0
F 500
; Load station number
; (no. 5)
; Interface no. 1
; Read 32 elements
; inputs 0..31 and copy
; them to flags 500..531
EPB
PB
…
…
EPB
ERROR ; Error handler
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 Data Transfer Service
3.5 STXM 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
; Number of elements to be transmit
; Base address of source elements (Master)
; Base addr. of destination elements (Slave)
Channel :
Number :
0..3
1..32
1..128
0
Source : I/O/F
R
T/C
DB
K
Destination : I/O/F
R
T/C
DB
K
K
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
26/739 E4
(SB-32-E.DOC)
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.
Master PCD
(source)
C
T
DB
I
O
F
R
O
•
•
•
F
•
•
•
Slave PCD (destination )
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 0..3
0
; Serial channel number
; (must be 0)
K 4000 ; Used to indicate XOB interrupt
K 17
18
19 ; 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 1
25
R 300
R 2400
STXM 1
0
R 20
K 1000
; Registers 300-324 are copied
; from the master station to
; a slave station into
; registers 2400-2424.
; The clock of a slave station
; is loaded with the contents
; of registers 20 and 21
26/739 E4
(SB-32-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-35
Data Transfer Service Manual S-Bus
3.5.2
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 Data-
Block 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
LDH
R 100
50
R 100
20
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 :
•
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
26/739 E4
(SB-32-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-37
Data Transfer Service Manual S-Bus
3.5.3
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
16
1
900
TEXT 900
; Interface no. 1
; Definition text 900
"UART:9600;"
"MODE:SM1,R500;"
"DIAG:F2500,R4095"
…
STH
ORH
CPB
STH
CPB
…
ECOB
EXOB
COB 0
0
F 2502
F 2505
H ERROR
F 2503
; If RDIA
; or TDIA flag = high
; Then handle error
; If TBSY flag = low
L TRANSMIT ; Then transmit data
PB
LD
STXM
TRANSMIT
R 500
12
1
16
R 150
C 500
; load
; Station number 12
; Interface no. 1
; Transmit 16 elements
; Register 150..165
; to counters 500..515
EPB
PB
…
EPB
ERROR ; Error handler
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 Manual S-Bus
3.6 SASII 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 1
R 1
SASII R 0
R 1
; Initialise channel 1
; Interface parameters text address
; is in 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 S-
Bus 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
I/O/F + R#
4th parameter
O/F + R#
IN
0...3
R
K 3000
R/T/C + R#
R/T/C + R#
R/T/C + R#
DB + R#
DB + R# R/T/C + R#
Size of Data-Block
DB + R# R
OUT
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
LD
LD
R 100
32
R 101
200
R 102
1000
SRXMI 3
R 100
O 101
F 102
; Initialisation of Count
; Output 200
; Flag 1000
; channel #3
; R 100 = 32
; R 101 = 200
; R 102 = 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 Data-
Block 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
STXMI syntax flowchart
1st parameter 2nd parameter 3rd parameter
I/O/F + R#
R/T/C + R#
IN
0...3
R
R/T/C + R#
DB + R#
Data Transfer Service
4th parameter
O/F + R#
R/T/C + R#
DB +R#
R/T/C + R#
OUT
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
LDH
LD
LD
R 100
50
R 100
20
R 101
4000
R 102
1000
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 Data-
Block 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 Manual S-Bus
3.9 SICL Input Control Line
Description :
The SICL instruction reads a control signal from the serial channel given in the 1 st
operand, and stores its state in the ACCU. The 2 nd
operand is the signal to be read :
0 = CTS
1 = DSR
2 = 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 :
•
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).
Page 3-46
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:
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 :
0 = RTS
1 = DTR
2 =
Request To Send
Data Terminal Ready
Special Functions
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
L
0
2
26/739 E4
(SB-33-E.DOC)
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
MC0 .. MC3, MD0 / SD0
MC4, S-Bus
Type
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
H
Port_nb
0
•
Switch RS 485 in receive mode
ACC
SOCL
L
Port_nb
0
Page 3-48
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 5000
R 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
Code
2000
2001
2002
2003
2004
2005
¦
2049
5000
5010
5100
5110
5200
5210
5400
6000
6010
6020
6030
Function codes
Function description Result
Read User EEPROM Register 0
Register 1
Register 2
Register 3
Register 4
Register 5
Register nn register 49
Read Device type in ASCII
Value contained in the EEPROM
Remark :
PCD1:
ASCII in decimal " D1"
" D2"
" D4"
" D6"
Read own CPU type in ASCII ASCII max. 5 registers
Other PCD: max. 49 registers (0 .. 49)
Dec
1
2
4
6
Dec
(0 .. 5)
Type
PCD1
PCD2
PCD4
PCD6
Type in decimal " M1_"
" M1_"
" M15"
" M11"
" M12"
" M14"
" M24"
" M34"
" M44"
" M1_"
" M2_"
" M3_"
" M54"
Read own Firmware version in ASCII
10
10
15
11
12
14
24
34
44
10
20
30
54
Examples of valid responses :
" $4C", " 004", " X41"
PCD1.M1
PCD2.M12
PCD2.M15
PCD4.M11
PCD4.M12
PCD4.M14
PCD4.M24
PCD4.M34
PCD4.M44
PCD6.M1
PCD6.M2
PCD6.M3
PCD6.M5
in decimal Ex : 5 dec for Version 005
-1 dec for any '$', 'X', '
β
'
Read User program name in ASCII
The user program name always contains 8 ASCII characters
R x
R x+1 contains the upper 4 bytes of the program name in ASCII contains the lower 4 bytes of the program name in ASCII
Read S-Bus station number Example of result :
2 station number = 2
-1 station number not configured
Read S-Bus PGU TN delay
Read S-Bus PGU TS delay Example of result :
10 delay in ms
-1 S-Bus not configured
Read S-Bus PGU timeout
Page 3-50
SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus Data Transfer Service
Code
6040
6050
6060
6070
6080
6100
6500
6510
6520
7000
Function description Result
Read S-Bus PGU baudrate
Read S-Bus PGU mode
Read S-Bus PGU port number
Read S-Bus level
Example of result :
9600 bps
-1 S-Bus not configured
Status Dec
BREAK without modem 0
PARITY without modem 1
DATA without modem
BREAK with modems
2
10
PARITY with modems
DATA with modems
S-Bus not configured
11
12
-1
Example of result :
1 S-Bus PGU port configured on port 1
-1 S-Bus not configured
Status
S-Bus Level 1 (reduced)
S-Bus Level 2 (full)
S-Bus not configured
Dec
1
2
-1
Read current PGU owner CPU 0
(S-Bus or P8 protocol) CPU 1
0
1
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
50 status before the modem in reinitialised.
Everything is OK and PCD is online in mode SS2/SS1/SS0
Read modem type string
Read modem reset string
Read modem initialisation string
Read the specified modem string from the user program extended header into the block of registers starting with base address R x .
0.. 2.147.483.647
Read system counter
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
26/739 E4
(SB-33-E.DOC)
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 : K y Value to be written
R 0 ..4095
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
Code
4017
4018
4019
6000
Function codes
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 : 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
8
Provoke XOB on own CPU
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
Notes :
Manual S-Bus
Page 3-54
SAIA-Burgess Electronics Ltd.
(SB-33-E.DOC)
26/739 E4
Manual S-Bus
3.13 Communication via modem
Data Transfer Service
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).
*
)
Telecom, Cablecom etc…
26/739 E4
(SB-34-E.DOC)
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
Termination-Box
PCD7.T160
PCD2
Master
RS232
Converter
PCD7.T120
S-Bus RS485
RS232
PCD4
Converter
PCD7.T120
Slaves
Termination-Box
PCD7.T160
RS422
PCD6
Converter
PCD7.T140
Page 3-56
SAIA-Burgess Electronics Ltd.
(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 :
26/739 E4
*) 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.
(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 :
Page 3-58
*) 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.
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;"
"UART:9600, ,100,50;"
"UART:9600, , ,30;"
→
Timeout = 500ms,
TS-Delay = 50ms,
TN-Delay = TS-Del/2 + default-
TN-Del = 25ms + 1ms = 26ms,
Default Break-Length = 4 char.
→ default Timeout and Break-Length,
TS-Delay = 100ms,
TN-Delay = 50ms
Default Break-Length = 4 char.
→ 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.
Assign interface in C mode.
2.
Initialize modem.
3.
Dial partner station telephone number.
4.
When the connection is made (DCD = high), reassign the interface in
S-Bus mode.
5.
Exchange data.
6.
Break connection and reassign interface in C mode.
Procedure for receiving a call :
1.
Assign interface in C mode.
2.
Initialize modem.
3.
In case of a call (DCD = high), reassign interface in S-Bus mode.
4.
As soon as the connection is broken off, reassign the interface again in C mode.
Page 3-60
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
Port 1
S-Bus Port 1
PCD2.
M120
RS 485
Port 1
PCD1.
M120
Slave 0
PCD6.
M300
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.
First check hardware installation according to the installation requirements(consult the appropriate hardware manual)
2.
The slave stations are then allocated their station numbers by the programming unit, as described in "Station number definition" on page 3-1.
3.
Load user programs into the slave stations with the programming unit and switch the CPUs to RUN.
4.
Load user program into the master station (do not switch CPU to
RUN).
5.
Use the debugger to display serial interface diagnostic flags and registers, and registers 1000+1, in the refresh window.
6.
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:
; Création:
TEST_M.SRC
22.06.99
C. Alfonsi
$sasi
TEXT 100 “UART:9600;”
“MODE:SM2,R4;”
“DIAG:F100,R998;”
$endsasi
XOB
SASI
LD
16
1
100
R 1000
0
; Cold start routine
; Assignation S-Bus
; Assignation RS 485 interface
; with parameters in Text 100
; Reset status register of server 0
LD R 1001
0
0
0
; Reset status register of server 1
EXOB
; ---------------------------------------------------------------------------
COB ; Main Program
CSB
ECOB
0
SB 0
0
(0) (TBSY = 0)
1 Read status slave 0 0 srxm 1
0
; slave n° 0
; channel 1
; read status k 0 ; cpu 0
R 1000 ; copy to R 1000
(1) (TBSY = 0)
2 Read status slave 1
1 srxm 1
; slave n° 1 k 0 ; cpu 0
R 1001 ; copy to R 1001
(2) (TBSY = 0)
Page 3-62
SAIA-Burgess Electronics Ltd.
(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
$endsasi
XOB
SASI
EXOB
COB
ECOB
100
0
0
16
1
100
“UART:9600;”
“MODE:SS2”
“DIAG:F100,R998;”
; Cold start routine
; Assignation S-Bus
; Assignation RS 485 interface
; with parameters in Text 100
; Main Program
; 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
$endsasi
XOB
SASI
EXOB
COB
ECOB
100
0
0
16
1
100
“UART:9600;”
“MODE:SS2”
“DIAG:F100,R998;”
; Cold start routine
; Assignation S-Bus
; Assignation RS 485 interface
; with parameters in Text 100
; Main Program
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 pivate line
Modem
Modem
Port 1 RS 232
PCD1.
M120
Slave 0
Modem
Port 1 RS 232
PCD2.
M120
Slave n
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:
; Création:
TEST_M1.SRC
22.06.99
C. Alfonsi
$sasi
TEXT 100 “UART:9600,100,30;”
“MODE:SM1,R4;”
“DIAG:O32,R0;”
$endsasi
XOB
SASI
16
1
100
; Cold start routine
; Assignation S-Bus
; Assignation RS 232 interface
; with parameters in Text 100
EXOB
; -----------------------------------------------------
COB
STH
DYN
ANL
CPB
I 0
F 0
0
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
; 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:
; Création:
TEST_SN.SRC
22.06.99
C. Alfonsi
Manual S-Bus
$sasi
TEXT 100 “UART:9600,100,30;”
“MODE:SS1;”
“DIAG:O32,R0;”
$endsasi
XOB
SASI
16
1
100
EXOB
; --------------------------------------------------------------------
COB 0
0
; Main Program
ECOB
; Cold start routine
; Assignation S-Bus
; Assignation RS 232 interface
; with parameters in Text 100
Page 3-66
SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
3.15 Example of user programs in FUPLA
Data Transfer Service
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
Port 1
S-Bus Port 1
PCD2.
M120
RS 485
Port 1
PCD1.
M120
Slave 20
Slave 22
PCD2.
M120
26/739 E4
(SB-34-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-67
Data Transfer Service
Program for the master controller
Initialization of interface:
Manual S-Bus
Page 3-68
SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Communication with slave 20:
Data Transfer Service
26/739 E4
(SB-34-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-69
Data Transfer Service
Communication with slave 22:
Manual S-Bus
Page 3-70
SAIA-Burgess Electronics Ltd.
(SB-34-E.DOC)
26/739 E4
Manual S-Bus
Program for the slave controller 20
Data Transfer Service
26/739 E4
(SB-34-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 3-71
Data Transfer Service
Program for the slave controller 22
Manual S-Bus
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
Applications
Programming, commissioning and diagnosis
Local point-to-point
Master
PG
RS232, RS422, RS485
S-Bus protocol
Slave
PCD 1/2/4/6
Manual S-Bus
In an RS 485 network
Master
PG
PCD 1
S-Bus
PCD 2
Slaves
RS485
PCD 4 PCD 6
By modem via the telephone dialling network
PG
Master
RS232
Modem
Public Phone
Network
Modem RS232
Slaves
PCD 1
Modem PCD 2
Modem
Modem
PCD 4
PCD 6
Page 4-2
SAIA-Burgess Electronics Ltd.
(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
Port 0
Port 0
Port 0
Port 0
Port 0 with PCD8.P800
Port 4
Standard Protocol
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 S-
Bus 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.
Adjust interfaces, baud rates and transmission mode at the PC.
Call "Connection Options" from the "Online" menu in the
"Project Manager".
26/739 E4
(SB-40-E.DOC)
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.
3.
Join PCD8.K111 connecting cable between PC and PCD.
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
4.
Press the 'S-Bus' button
Commissioning service
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.
Page 4-8
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.
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 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.
Page 4-10
SAIA-Burgess Electronics Ltd.
(SB-40-E.DOC)
26/739 E4
Manual S-Bus
4.4 Connection of the PG Unit via S-Bus
Commissioning service
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 S-
Bus 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
5.
Modems
Modems
This part concerns modems used on the Public Telephone Network
(PSTN), these modems are called Public Line Modems (PLM)
DTE
Master
PG4
DCE
RS232
Modem
Public Phone
Network or GSM
DCE
Modem
RS232
DTE
Slave
PCD
DTE : D ata T erminal E quipment
DCE : D ata C ommunication E quipment
26/739 E4
(SB-51-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 5-1
Modems
5.1 Transmission speeds
Manual S-Bus
Data speeds are defined in ITU-T standards ( I nternational T elecommunication U nion - T elecommunication Standardization Sector).
Former the ITU-T was called CCITT standards ( C omité C onsultatif I nternational T éléphonique et T élégraphique)
Main defined modem communications standards :
ITU-T V.21
ITU-T V.22
300 bps
1 200 bps
ITU-T V.23
1 200/75 bps
ITU-T V.22bis
2 400 bps
ITU-T V.32
4 800 and 9 600 bps
ITU-T V.32bis
4 800, 7 200, 9 600, 12 000 and 14 400 bps
ITU-T V.34
ITU-T V.42
33 600 bps
Error control MNP (Microcom Networking Protocol)
MNP 2-4 for V.22, V.22bis, V.32 and V32bis modems
ITU-T V.42bis
Data compression for V.42 modems
ITU-T V.90
56 000 bps
ITU-T V.110
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
ITU-T V.120
Synchronous and asynchronous bit rate adaptation for
ISDN with error correction.
Baud rates same as V.110
V.32terbo
V.Fast
MNP 5
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
4 800 bps
ITU-T V.29
9 600 bps (also supported by many fax-modems)
ITU-T V.17
14 400 bps
Page 5-2
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
5.2 Operating your modem
Manual S-Bus
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)
ATO
ATD
ATA
Command
State
ATH
Hang Up
Connecting
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
E1
F1
(L2)
(M1)
Q0
V1
X4
&A3
&B1
&C1
PCD modem
B0
E0
F1
(L2)
(M0)
Q0
V1
X4
&A3
&B1
&C1
Description
Handshake options ITU-T standard V.32
Local Echo : PG4 --> enabled, PCD --> disabled
Local Echo OFF once a connection has been made
No function for this modem, for other modems : speaker volume setting
M0 : speaker off
M1 : speaker on until carrier detected
Return result codes
Display result codes as words (e.g. "OK", "CONNECT", ....)
Provides basic call progress result codes, connection speed,
Busy signal detection and dial tone detection
Display protocol result codes
DTE - DCE speed independent of DCE - DCE speed
(fixed DTE speed)
Track status of carrier detect signal (DCD)
26/739 E4
(SB-51-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 5-7
Modems Manual S-Bus
&G0
&H0
&I0
&K0
&L0
&M0
&N0
&P0
&R1
&S0
&T5
&X0
&Y3
PG4 modem
&D0 or D2
&N6
&G0
&H0
&I0
&K0
&L0
&M0
&N0
&P0
&R1
&S0
&T5
&X0
&Y3
PCD modem
&D0 or D2
&N6
Description
&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
Disable transmit data flow control (CTS)
Disable receive data software flow control
Data compression disabled
Normal phone line operation
Normal mode, no error control
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.
Pulse dial make/break ratio : North America
Ignore RTS
DSR always on
Modem testing : deny remote digital loop back
Synchronous timing source
Transmit BREAK sequentially with received data stream
(non-destructive, unexpected)
Synchronous clock speed : 9 600 bps
Summary of main important modem functions which must be set for S-Bus PGU :
•
Data compression must be disabled (for Break and parity modes)
•
Error control must be disabled (for Break and Parity modes)
•
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)
Page 5-8
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:
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 Sent before the telephone number when dialling
Prefix
Dial command Sent after the number when dialling, this is usually "\r"
Suffix (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.
Page 5-10
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
Connected 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.
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
0x0D
0x0A
0x07
0x08
\f
\t
0x0C
0x09
\v 0x0B
\xhh 0xhh
\\
\"
0x5C
0x22
\
CR
LF
BEL bell
BS backspace
FF
HT
VT
" carriage return line feed form feed tab vertical tab hex value \x00..\xFF backslash quotation mark
Page 5-12
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
An existing modem can be selected with the "down arrow" key:
Modems
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
S e t D TR an d R TS
Start Up
Phase no
DSR or CTS
High
Wait 1,5 sec
Put Modem in Command mode
Wait 1,5 sec
RESET modem
Wait 3 sec
Initialize Modem in Auto-answer mode
Wait 1,5 sec no
DSR or CTS
High
Assign port to work in
S-BUS PGU with modems
Set DTR - Reset RTS
Connection with modem OK
(DSR) no
Assign port for communication in mode MC0
Set DTR and RTS yes
STANDBY
:
Waiting for the connection of the modem
Send RESET string
Send INIT string
Check the connection with the modem
Wait incomming call
Answer to S-Bus resquest of the remote console
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 :
M0 :
Local echo disabled.
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
Notes :
Manual S-Bus
Page 5-18
SAIA-Burgess Electronics Ltd.
(SB-51-E.DOC)
26/739 E4
Manual S-Bus
5.3 Connection via the Public Telephone Network
Modems
5.3.1
Application diagram
DCE DTE
Master
PG4
RS232
Modem
Public Phone
Network or GSM
DTE :
DCE :
D ata T erminal E quipment
D ata C ommunication E quipment
DCE
Modem
RS232
DTE
Slave
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.
RTS
CTS
DTR
REQUEST TO SEND
CLEAR TO SEND
DATA TERMINAL READY
DSR DATA SET READY
DCD DATA CARRIER DETECT
26/739 E4
(SB-52-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 5-19
Modems Manual S-Bus
The following ports support S-Bus PGU with modems :
PCD1.M120/M130 : port 1 (RS 232)
PCD2 : port 1 (RS 232)
PCD4: port 1 (RS 232) with bus module PCD4.C120
or C340
PCD6.M540 :
PCD6.M1/2 :
PCD6.M300 : port 2 (RS 232) all RS 232 ports (0..3) all RS 232 ports (0..3)
Page 5-20
SAIA-Burgess Electronics Ltd.
(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.
•
With the "Modem" button it is possible to verify the reset and initialization strings of the selected modem.
•
Confirm with the OK button.
Page 5-22
5.
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 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.
Page 5-24
Training
Sequence delay (TS)
Turnaround delay (TN)
Training sequence delay, in milliseconds. This is the delay between setting RTS (Request To Send) and the transmission of the message.
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
Hangup 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" ; set 45 seconds time-out
Timeout=45
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
The number of additional dialling attempts made on failure to connect to the remote modem. Max. is 3.
Page 5-26
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":
•
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.
26/739 E4
(SB-52-E.DOC)
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
5.3.6
Ending the connection
Either select "Hangup" from the "Online" menu:
Modems 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
5.4 Modem +
Manual S-Bus
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 :
• 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.
Page 5-32
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 :
• a RESTART COLD/WARM is performed
• a File Load command
5.4.2
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 PGU-
PLM 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
0 s
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 :
0 (with modem re-initialisation)
1 (without modem re-initialisation)
0 (with modem re-initialisation).
Page 5-34
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 S-
Bus- 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 S-
Bus 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-Bus-
PGU 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 PGU-
PLM 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
5.5 Example of PCD program
Modems
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
Fupla program of PCD:
Modems
26/739 E4
(SB-52-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 5-41
Modems Manual S-Bus
Page 5-42
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
GSP
GSP
GATEWAY
station
GSP
SCS 2
GMP
26/739 E4
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
(SB-60-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 6-1
S-Bus Gateway
6.2 Features of the Gateway
Manual S-Bus
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-Bus-
PGU, 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]
TN delay [ms]
0
27
0
20
0
20
0
5
0
3
0
2
0
2
0
1
0
1
Timeout [ms] Br/Par 15000 9000 5000 3000 2000 1000 500 250 200
Timeout [ms] Data 15000 15000 7500 4500 3000 1500 750 375 300
0
1
200
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>
<timeout>
<TS-delay>
<TN-delay>
Specifies the baud rate for the GSP for communication with the external master.
This has no significance for the Gateway Slave Port.
The training sequence delay to be initialised for communication with the external master.
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 "UART: 9600,,0,1;MODE:GS1;DIAG:F500,R500"
Page 6-6
SAIA-Burgess Electronics Ltd.
(SB-60-E.DOC)
26/739 E4
Manual S-Bus
6.5 Using STXM / SRXM in the Gateway station
S-Bus Gateway
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>
<diag_def>
Register number to specify the S-Bus destination address.
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
6.6 Setting Timeout in an S-Bus network
Manual S-Bus
Consider the following diagram for a simple Master-Slave network :
Timeout minimum value
Master -
Slave TN TS Telegram TN TS Response
Page 6-8
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
Telegram
GMP -
Slave Network
GMP Timeout value
TN TS Telegram TN TS Response
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).
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 :
2 GMP baud drate
1
110
150
300
600
1'200
2'400
4'800
9'600
19'200
38'400
For data mode:
22'500
13'500
7'500
4'500
3'000
1'500
750
375
300
300
27'000
15'000
-
9'000
6'000
3'000
1'500
750
600
600
GMP baud rate
1
110 33'750
150 20'250
300 11'250
600
1'200
2'400
4'800
6'750
4'500
2'250
1'125
9'600
19'200
38'400
563
450
450
2
40'500
22'500
-
13'500
9'000
4'500
2'250
1'125
900
900
Number of masters
3 4
33'750
-
-
20'250
13'500
6'750
3'375
1'688
1'350
1'350
22'500
-
-
13'500
9'000
4'500
2'250
1'125
900
900
18'000
12'000
6'000
3'000
-
-
-
1'500
1'200
1'200
Number of masters
3 4
27'000
18'000
9'000
4'500
-
-
-
2'250
1'800
1'800
5
22'500
15'000
7'500
3'750
-
-
-
1'875
1'500
1'500
5
33'750
22'500
11'250
5'625
-
-
-
2'812
2'250
2'250
6
6
27'000
18'000
9'000
4'500
-
-
-
2'250
1'800
1'800
40'500
27'000
13'500
6'750
-
-
-
3'375
2'700
2'700
26/739 E4
(SB-60-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 6-9
S-Bus Gateway
6.7 Possible sources of errors
Manual S-Bus
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
7.
Using S-Bus with the PG3
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
7.1 Station number definition
Manual S-Bus
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.
4.
Save your changes and go back to the main menu
5.
From the "coNnect" menu, on the "Comms mode" line select PGU
MODE.
Page 7-2
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
Page 7-4
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.
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 Manual S-Bus
2.
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".
Page 7-6
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)
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 S-
Bus".
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 S-
Bus 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
7.3 Connection of the PG Unit via S-Bus
Manual 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" ring)
AnswerOff="ATS0=0\r"
Timeout=45
Retries=2
CmdOk="OK"
Connect="CONNECT"
;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
;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" ;Reset PCD modem
PCDInit="ATM0E0S0=2S25=250\r" ;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
Reset
Init
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 S-
Bus connection is made. S-Bus data mode is always switched on.
Resets the modem to its factory default state
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
DialSuffix
Hangup
Command
Sent before the telephone number when dialling
Sent after the number when dialling, this is usually "\r"
(CR).
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.
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 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
26/739 E4
(SB-70-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 7-11
Using S-Bus with the PG3
Retries
CmdOk
Connect
Manual S-Bus
The number of additional dialling attempts made on failure to connect to the remote modem. Max. is 3.
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.
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
0x0C FF
0x09 HT
\v 0x0B VT
\xhh 0xhh
\\
\"
0x0D CR
0x0A LF
0x07
0x08
BEL
BS carriage return line feed bell backspace
0x5C \
0x22 " form feed tab vertical tab hex value \x00..\xFF backslash quotation mark
Page 7-12
SAIA-Burgess Electronics Ltd.
(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
7.5 Connection via the Public Telephone Network
Manual S-Bus
7.5.1
Application diagram
DTE
Master
PG3
DCE
RS232
Modem
Public Phone
Network or GSM
DCE DTE
Modem
RS232
Slave
PCD
DTE :
DCE :
D ata T erminal E quipment
D ata C ommunication E quipment
Cable
DTE
(PG3, 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.
The following ports support S-Bus PGU with modems :
PCD1.M120/M130 : port 1 (RS 232)
PCD2 : port 1 (RS 232)
PCD4: port 1 (RS 232) with bus module PCD4.C120
or C340
PCD6.M540 :
PCD6.M1/2 :
PCD6.M300 : port 2 (RS 232) all RS 232 ports (0..3) all RS 232 ports (0..3)
Page 7-14
SAIA-Burgess Electronics Ltd.
(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"
•
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
26/739 E4
(SB-70-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 7-15
Using S-Bus with the PG3 Manual S-Bus
3.
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.
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".
Page 7-16
SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus Using S-Bus with the PG3
7.5.3
Configuring the PC (PG3)
1.
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
7.6 Example of PCD program (with modem)
Manual S-Bus
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)
•
PG3
The program is made in the form of a sequential block.
Usage :
COB
...
CSB
...
ECOB x
0
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) (Call or Redial)
(1)
20 Init modem
(Time 1 sec)
1 Dial phone number
(11)
(12)
11
(Carrier detect)
(1)
Incomming call
(2)
2
(Dial timeout)
Load Redial Timer
(5) (Connection OK)
30 S-Bus mode
(3) (xbsy)
(6) (1)
6 ACTIVE CONNECTION
(7) (Connection loosed)
7 Hang up
(8) (xbsy)
(9)
9
(Time elapsed)
Hang up with delay
(10) (xbsy)
(4)
3 Full S-Bus
(time 3s)
Init modem
21
23
De Assign serial line
(21)
22
(xbsy)
Reset modem
(22) (time 1s)
Init modem
Slave S-Bus
31 De Assign serial line
(31)
33
(xbsy)
Slave S-Bus
26/739 E4
(SB-70-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 7-23
Using S-Bus with the PG3
; Definitions of the symbols
Modem EQU
CALL EQU
CONNECT EQU
INC_CALL dcd_f
EQU
EQU diag_f xbsy diag_f0 xbsy_sb diag_r diag_r0 pcd_ident timer
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU 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
Manual S-Bus
SB 0
F 8100
F 8102
F 8103
F 8150
F 8156
F 8160
F 8166
R 4090
R 4091
R 4095
T 0
T 1
TEXT 0
TEXT 1
TEXT 2
TEXT 3
TEXT 4
TEXT 5
TEXT 6
1
2
TEXT 7
1
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 sasidiag
; Declare diagnostic flags
$endinit
; TR 0 -----------------------------------------------------Call or Redial
SICL smod ; Read and store the CD signal
OUT dcd dcd_f
;
STH
ANL
ANL
ANL
CALL rd_timer dcd_f xbsy_sb
; If request to initiate a call
; and time to redial
; and modem off hook
; and OK to perform a sasi OFF
; Macro Step Init Modem -------------------------------
; ST 21 ----------------------------------------------------
SASI smod sasioff
; De-assign serial channel
; TR 21 ----------------------------------------------------Xbsy
STL xbsy_sb ; Wait until end of SASI OFF
; ST 22 ---------------------------------------------------Reset modem
SASI smod ; Enter MC mode
ACC
SOCL
SOCL
STXT sasimc
H smod
0 smod
1 smod resmod
; Set RTS
; Set DTR
; Send reset modem string
LD timer sec1
; 1 sec delay
; TR 22 ---------------------------------------------------Time 1 sec
STL timer ; Wait until text transmitted
ANL xbsy ; and timer finished
; ST 23 ---------------------------------------------------Init modem
STXT smod initmod
; Send modem init string
LD timer sec1
; 1 sec delay
;------------------------------------------------------------
; TR 1 -----------------------------------------------------Time (1s)
STL
ANL xbsy timer
; Text send completely
; and timer elapsed
; ST 1 -----------------------------------------------------Dial Phone Number
STXT smod ; Send dialing command
LD dialnb timer ; Load maximum time for CD detection
CD_time
; TR 2 -----------------------------------------------------Dial Timeout
SICL ; Read DCD signal
OUT
STL
ANL smod dcd dcd_f timer dcd_f
; and store it
; Time elapsed ?
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
SASI redial_tim 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
RES
RES sec3
CONNECT
INC_CALL
; Reset the connect flag
; Reset the incomming call flag
; TR 4 -----------------------------------------------------Time 3 sec
STL
ANL timer 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
; ST 32 ---------------------------------------------------
; Wait until end of SASI OFF
SASI
SOCL smod sasisb smod
0
; Re-assign serial channel
; in mode SD0
; Set DTR
SOCL smod
1
; Set RTS
; -----------------------------------------------------------
; TR 6 -----------------------------------------------------Empty
; ST 6 -----------------------------------------------------Connection active
LD timer ; load maximum communication time
SET commtime
CONNECT ; indicate the connection
; TR 7 -----------------------------------------------------Connection Loosed
SICL smod ; Wait until no DCD
ACC dcd
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
SASI
H end 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.
Page 7-28
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).
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]
TS delay [ms]
27
0
20
0
20
0
5
0
3
0
2
0
2
0
1
0
1
0
Timeout [ms] Br/Par 15000 9000 5000 3000 2000 1000 500 250 200
Timeout [ms] Data 15000 15000 7500 4500 3000 1500 750 375 300
1
0
200
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
Notes :
Manual S-Bus
Page 7-30
SAIA-Burgess Electronics Ltd.
(SB-70-E.DOC)
26/739 E4
Manual S-Bus Appendixes
8.
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 from version V001
PCD2.M110/M120 from version V001
PCD2.M150
PCD4.Mxx0 from version V0A0 from version V003
PCD4.Mxx5
PCD4.M445
PCD6.M540
PCD6.M2x0
PCD6.M300
from version V00B from version V00C (possibly V001) from version V002 from version V007 from version V001
Hardware : PCD1.M1x0
all versions
PCD2.M110/M120 from version A
PCD2.M150
PCD4.Mxx0
all versions from version G
PCD4.Mxx5
PCD4.M445
PCD6.M540
PCD6.M2x0
PCD6.M300
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 all
20mA current loop none
RS 232 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
interface 0 (PGU) or 1
*)
PCD2.M1x0 interface 0 (PGU) or 1
*)
PCD2.F520/F530
PCD4.C120
interface 2 interface 1
PCD4.C130
PCD4.C340
PCD6.M540
PCD6.M210
interface 3 all interfaces interface 2 interfaces 0..3
*)
PCD6.M220/M230 interfaces 2 and 3
PCD6.M300
all interfaces
*)
*) with the interface module PCD7.F120
26/739 E4
(SB-81-E.DOC)
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 P8-PGU
Cable type PCD8. / baud rate
PCD1.M1x0
0: RS 232 (PGU)
Optional:
1: RS 232 or
PCD2.M110
/M120 or
PCD2.M220
PCD2.M150
or
PCD2.M250
RS 422 / RS 485
0: RS 232 (PGU)
or RS 485
Optional:
1: RS 232 or
RS 422 / RS 485
2: RS 232
3: RS 422 / RS 485
0: RS 232 (PGU)
or RS 485
Optional:
1: RS 232 or
RS 422 / RS 485
2: RS 232
3: RS 422 / RS 485
---
---
---
..K100, K110 or K111 / 9.6 Kbps
---
---
---
---
---
---
---
---
---
---
---
0: RS 232 (PGU) ..K100, K110 or K111 / 9.6 Kbps PCD4.Mxxx
with ..C100
PCD4.Mxxx
with ..C110
PCD4.Mxxx
with ..C120
0: RS 232 (PGU)
1: 20mA CL
0: RS 232 (PGU)
1: RS 232
2: 20mA CL
3: 20mA CL
..K100, K110 or K111 / 9.6 Kbps
---
..K100, K110 or K111 / 9.6 Kbps
---
---
---
PCD4.Mxxx
with ..C130
PCD4.Mxxx
with ..C340
0: RS 232 (PGU)
1: RS 422 / RS 485
2: RS 422
3: RS 232
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
---
---
---
..K100, K110 or K111 / 9.6 Kbps
---
---
---
PCD6.M100
P8
PCD6.M210
P8
0: RS 232
1: RS 232
2: RS 232
3: RS 232
..P800 / 9.6 Kbps
..P800 / 9.6 Kbps
---
---
---
---
S-Bus-PGU
Cable type / max. baud rate
Converter
(optional)
..K111 / 38.4 Kbps ..T120
..K111 / 38.4 Kbps
Standard / 38.4 Kbps
..K111 / 19.2 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
Standard / 38.4 Kbps
..K111 / 19.2 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
Standard / 38.4 Kbps
..K111 / 38.4 Kbps
..K111 / 38.4K bps
---
..K111 / 38.4 Kbps
Standard / 19.2 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
---
---
---
Standard / 19.2 Kbps
Standard / 19.2 Kbps
Standard / 19.2 Kbps
Standard / 19.2 Kbps
..T120
---
..T120
---
..T120
---
..T120
---
..T120
---
..T120
---
..T120
---
..T120
..T120
---
..T120
..T120
---
---
..T120
---
..T140
..T120
..T120
..T120
---
---
---
---
..T120
..T120
..T120
..T120
Remark : 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
PCD6.M220
P8
0: RS 422 / RS 485
1: RS 422
2: RS 232
3: RS 232
PCD6.M230
P8
0: 20mA CL
1: 20mA CL
2: RS 232
3: RS 232
PCD6.M250
P8
0: 20mA CL
1: 20mA CL
2: 20mA CL
3: 20mA CL
PCD6.M260
P8
0: RS 422 / RS 485
1: RS 422 / RS 485
2: RS 422 / RS 485
3: RS 422 / RS 485
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
PCD6.M540
0: RS 232 (PGU)
1: RS 422 / RS 485
2: RS 232
3: 20mA CL
..P800 / 9.6 Kbps
---
---
---
---
..P800 / 9.6 Kbps
---
---
---
---
..P800 / 9.6 Kbps
---
---
---
---
..P800 / 9.6 Kbps
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
..K100, K110 or K111 / 9.6 Kbps
---
---
---
S-Bus-PGU
Cable type / max. baud rate
Converter
(optional)
---
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
Standard / 19.2 Kbps
---
---
---
Standard / 19.2 Kbps
Standard / 19.2 Kbps
---
---
---
---
---
---
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 38.4 Kbps
..K111 / 38.4 Kbps
---
---
..T140
..T120
..T120
---
---
---
..T120
..T120
---
---
---
---
---
---
---
---
---
---
..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
..K111 / 38.4 Kbps
Standard / 38.4 Kbps
Standard / 19.2 Kbps
---
..T120
---
---
..T120
---
---
..T120
---
---
..T120
---
---
..T120
---
..T120
---
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.
DSR = 1 PG connected, assignment with P8 protocol
DSR = 0 no PG connected, so no assignment either
Page 8-4
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)
D-type, 9 pole
(male)
PC or
PCD8.P100
7
4
5
16
1
2
3
PGD
TX
RX
PGD
RX
TX
SGN
RTS
CTS
(P100)
Switch
SGN
DSR
RTS
CTS
+5V
5
6
7
8
9
3
4
1
2
PGU
PCD
(P8 and S-bus protocol)
PCD8.K111
Programming cable with 9-pole D-type connector for connection of the programming unit with P8 or S-Bus protocol.
PC
1
2
3
4
5
7
8
RX
TX
DTR
SGN
RTS
CTS
RX
TX
SGN
DSR
RTS
CTS
6
7
4
5
8
9
1
2
3
PGU
PCD
(P8 and S-Bus protocol)
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.
DSR = 1 P8 protocol
DSR = 0 S-Bus protocol, if interface has been configured for
S-Bus, otherwise no assignment.
26/739 E4
(SB-81-E.DOC)
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..
K111
K111
K111
K111
K100, K110
K100, K110
K100, K110
K100, K110
Utility Firmware P8-PGU
(port 0) new new yes
S-Bus PGU
(port 0) yes
Notes
Ideal case new old old new new old old old new old new old new old yes no no yes yes yes yes no no no no no no no
S-Bus not supported by firmware.
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 : new = from V1.7 (for the PG3)
Firmware version : new = from PCD2.M1x0
-V001
PCD4.Mxx0
PCD6.M540
-V003
-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
- V001
PCD2.M110/M120 - V001
PCD2.M150
PCD4.Mxx0
- V0A0
- V003
PCD4.Mxx5
PCD6.M540
PCD6.M1/M2
PCD6.M300
- 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
EXOB
L
3
0
16
3
10
; Assign channel 3
; Definition text 10
; Channel 3
; Reset RTS
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 1 st
version)
PCD4.xx5 firmware
PCD6.M300 firmware from V00D (possibly V$CA) from V001 (possibly Vß09)
Software version from which the S-Bus data mode is provided :
PG3
PG4
SCOMM-DLL 32 bit
SCOMM-DLL 16 bit
C-Library 16 bit
S-Bus Analyser from V 2.1
from V 1.4
from V $114 from V $14 from V $121 from V $007
Page 8-8
SAIA-Burgess Electronics Ltd.
(SB-81-E.DOC)
26/739 E4
Manual S-Bus Appendixes
S-BUS FIRMWARE COMPATIBILITY
Features
PCD1.
PCD2.
PCD4.
PCD6.
M1x0 M110/M120 M150 Mxx0 Mxx5 M540 M1../M2..
M300
FW
≥
V.
FW HW FW HW FW HW FW HW FW HW FW HW FW HW FW HW
Remarks
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
S-Bus Master
005 x 001 x 0A0 x 002 x 00B x 001 x 007 x 001 x
005 x 001 A 0A0 x 003 x 00B x 002 x 007 x 001 x PCD8.K111 required
005 x 001 A 0A0 x 003 G 00B x 002 C 007 x 001 x
005 x 001 A 0A0 x 003 G 00B x 002 C 007 x 001 x PCD8.K111 required
005 x 004 A 0A0 x ----00C x --------001 x major modif. to kernel
005 x 001 x 0A0 x 004 x 00B x 003 x 008 x 001 x
001 x 003 x 0A0 x 004 x 00B x 003 x 008 x 001 x with the Debugger
005 x 005 x 0A0 x ----00D x --------001 x also with Gateway
001 x 004 x 0A0 x $52 x 00C x $41 x
005 x 003 x 0A0 x ----00C x -----
---
009
--x
001
001 x x new switches
070 x 080 x 0A0 x ----0E0 x --------030 x transparent for telegr.
001 x 001 x 0A0 x 002 x 00B x 001 x 007 x 001 x
001 x 001 x 0A0 x 003 x 00B x 002 x 007 x 001 x
001 x 003 x 0A0 x 005 x 00B x 004 x 009 x 001 x
001 x 003 x 0A0 x 005 x 00B x 004 x 009 x 001 x
001 x 003 x 0A0 x 005 x 00B x 004 x 009 x 001 x TFUL mechanism
005 x 005 x 0A0 x ----00D x --------001 x activated with SASI
005 x 003 x 0A0 x 005 x 00B x 004 x 009 x 001 x read system info slave
005 x 003 x 0A0 x 005 x 00B x 004 x 009 x 001 x to transfer DB’s
001 x 004 x 0A0 x 005 x 00B x 004 x 009 x 001 x
001 x 003 x 0A0 x 005 x 00B x 004 x 009 x 001 x
005 x 001 x 0A0 x 003 x 00B x 002 x 007 x 001 x
--not implemented in this PCD
X not depending of the hardware version.
1) PCD1 has been implemented with the slave protocol, from firmware V005 all S-Bus Master and Gateway functionalities are allowed.
2) 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
Notes :
Appendixes
26/739E4
(SB-82-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 8-10
Manual S-Bus Appendixes
S-BUS SOFTWARE COMPATIBILITY
Features
PCD1.
PCD2.
PCD4.
PCD6.
Mx0 M110/M120 M150 Mxx0 Mxx5 M540 M1../M2..
M300
SW
≥
V.
PG3 PG4 PG3 PG4 PG3 PG4 PG3 PG4 PG3 PG4 PG3 PG4 PG3 PG4 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
S-Bus Master
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
2.1
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.4
1.7
1.21
$219 2.0.80
1.6
1.21
1.6
1.21
1.6
1.21
1.6
1.21
2.1
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.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.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.7
1.21
$219 2.0.80
---
1.7
1.21
$219 2.0.80
1.6
1.21
1.6
1.21
1.6
1.21
1.6
1.21
2.1
1.9
1.21
$219 2.0.80
1.9
1.21
1.9
1.21
1.9
1.21
1.9
1.21
2.1
2.1
2.0
1.9
1.9
1.7
1.9
1.9
2.0
1.9
1.9
1.9
1.9
1.7
1.4
1.4
$219 2.0.80
2.0
1.3
$219 2.0.80
---
1.3
$219 2.0.80
---
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.3
$219 2.0.80
1.7
1.3
$219 2.0.80
1.9
1.3
$219 2.0.80
1.9
1.9
1.21
$219 2.0.80
1.9
1.21
1.9
1.21
1.9
1.21
1.9
1.21
2.1
1.3
1.4
1.4
1.21
1.4
1.21
$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
---
---
1.9
1.9
1.9
1.9
1.7
---
---
1.4
---
---
1.3
1.3
1.3
---
1.4
1.4
1.21
1.4
1.21
1.7
1.21
2.1
2.0
1.9
1.9
1.7
1.9
1.9
2.0
1.9
1.9
1.9
1.9
1.7
1.4
1.4
1.3
1.3
1.3
1.3
1.3
1.3
1.4
1.4
1.21
1.4
1.21
---
---
2.0
---
---
1.7
1.9
1.9
---
1.9
1.9
1.9
1.9
1.7
---
---
1.4
---
---
1.3
1.3
1.3
---
1.4
1.4
1.21
1.4
1.21
---
---
---
1.9
---
1.7
1.9
1.9
---
1.9
1.9
1.9
1.9
1.7
---
---
---
1.3
---
1.3
1.3
1.3
---
1.4
1.4
1.21
1.4
1.21
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
1.4
--not implemented in this PCD
1) PCD1 has been implemented with the slave protocol, from firmware V005 all S-Bus Master and Gateway functionalities are allowed.
2) 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.
3) 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
Notes :
Appendixes
26/739E4
(SB-82-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 8-12
From :
Company :
Department :
Name :
Address :
Tel. :
Date :
Send back to :
SAIA-Burgess Electronics Ltd.
Bahnhofstrasse 18
CH-3280 Murten (Switzerland) http://www.saia-burgess.com
BA : Electronic Controllers
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.

Public link updated
The public link to your chat has been updated.
Advertisement