Schneider Electric TSXSCG116 Communication module UNI-TELWAY User Guide
விளம்பரம்
விளம்பரம்
Preface
Differences between TSX SCG 116 and TSX SCM 21.6 modules
The TSX SCG 116 serial communication module supports the same functions as the
TSX SCM 21.6 module.
Experienced users of this module will find differences in the following areas:
. Connecting the module (refer to sub-section 2.1),
. Only two TSX SCG 116 modules can be installed in a Micro-PLC configuration,
. Configuration is lost in the event of a power break (refer to sub-section 2.2),
. When a TSX SCG 116 installed in a TSX 17 Micro-PLC is the source or target for messages, the usable data length is restricted to 30 bytes max. A TSX SCG 116
Master can automatically route messages of up to 128 bytes between Slaves
(refer to sub-section 2.5),
. Status word TXTi,S (refer to sub-section 2.5),
. Limits to operation (refer to sub-section 2.8),
. Register words IWn,0 and IWn,1 (refer to sub-section 3.3),
. Routing between communication modules is fully application and user transparent
(e.g. Modem
↔
TSX SCG 113
↔
TSX SCG 116
↔
Uni-Telway bus).
1
Section
1 Introduction
Contents
1.1 The Uni-Telway Bus
1.2 Exchanges Between PLCs and XBT Terminals
1.3 Exchanges Between PLCs and Sensors and Actuators
1.4 Exchanges Between PLCs
2 Installation
Contents
2.1 Description and Connection
2.2 Uni-Telway Configuration
2.3 Checking Communication
2.4 Connection Between PLCs and XBT Terminals
2.5 Using a Text Block
2.6 Connection Between PLCs and Sensors and Actuators
2.7 Connection for Exchanges Between PLCs
2.8 Limits to Operation
2.9 Communication via Telway 7
3 Additional Programming Information
Contents
3.1 Broadcast Messages
3.2 Events
3.3 Discrete Bits and Register Words
3.4 Communication Example
3.5 Read Objects Request
Page
9
10
5
6
8
53
57
61
49
50
51
18
20
21
11
12
14
26
27
45
46
2
X
Table of Contents
Section
4 Appendix
Contents
4.1 Performance Levels
4.2 List of Requests Supported by TSX Series 7 PLCs
4.3 Standard Requests
4.4 Specific Read Requests
4.5 Specific Write Requests
4.6 Exchange Possibilities
Page
63
64
65
67
71
83
93
3
4
X
Introduction
Sub-section
1.1 The Uni-Telway Bus
1.1-1 General
1.1-2 Operating Modes
1.2 Exchanges Between PLCs and XBT Terminals
1.3 Exchanges Between PLCs and Sensors and Actuators
1.4 Exchanges Between PLCs
Section 1
Page
6
6
7
8
9
10
5
1.1
The Uni-Telway Bus
1.1-1 General
The Uni-Telway industrial bus is the standard means of communication between
Telemecanique's control devices including PLCs, operator dialog terminals, speed drives, numerical controls, weighing indicators.
Uni-Telway also simplifies communication with devices from other vendors, such as supervision and control computers.
Uni-Telway can be used for two types of application:
. Control and surveillance of system devices by the PLC
Devices such as ATV .5 speed drives, LT8 protection relays, ASN specialized couplers and numerical controls.
TSX
ALTIVAR 45
ATV 45
Speed drive
TSX 17-20/PL7-2
Micro-PLC
NUM 760
Numerical controller
NUM 760
TSX 47-30 PLC
Uni-Telway Bus
. Man-Machine dialog and supervision
Devices such as XBT operator dialog terminals or Monitor 77 and the capacity to support open communications with networks and computers from other vendors.
TSX 17-20/PL7-2
Micro-PLC
TSX
TSX 47-30 PLC
XBT-B8
Uni-Telway Bus Uni-Telway Bus
Uni-Telway requires:
. 1 Master
This device supervises the data link and checks its operation. It controls the allocation of bus access time to the various connected devices. This location comprises a modular TSX Series 7 PLC equipped with a TSX SCM 21.6 serial communication module or a TSX 17-20/PL7-2 Micro-PLC (fitted with a TSX
P17-20 FC or FD Micro-software cartridge) and a TSX SCG 116 serial communication module.
. 1 to 27 Slaves
6
Introduction
1
1.1-2 Operating Modes
The services supported depend on the devices connected. The standard or specific request question and answer dialog is used to access services.
Standard requests are described in the Uni-Telway Bus Reference Manual
(TSX D24 004E). Requests that are specific to TSX Series 7 PLCs are described in the Appendix of this manual.
Depending on the configuration of its communication module, a PLC can be:
. A Master and support Client and/or Server status,
. A Slave and support Client and/or Server status.
The module controls the physical and data link layers of the Uni-Telway protocol. It performs the routing to and from the PLC processor that handles Uni-Telway protocol control.
A TSX SCM 21.6 or TSX SCG 116 module can act as the Uni-Telway bus Master on power-up, regardless of the status of its host PLC. Communication between devices can then commence.
CLIENT
SERVER
The device that initiates communications. It asks questions (reads), sends answers/data (writes) or orders (Run, Stop, etc.).
The device that executes the order sent by the client and sends a confirm after execution.
1 Request
CLIENT SERVER
2 Action
3 Confirm
A PLC is a server for its system tasks (programming, adjust, diagnostics). It is also a Client of other PLCs (and machine tool numerical controls, sensors, actuators) via the user program text blocks (when sending commands, reading status data).
TSX 7
Request
Request
TXT
XBT-.8
SYSTEM
ATV .5
SLAVE
CLIENT
Confirm MASTER
SERVER CLIENT
Confirm SLAVE
SERVER
Important: BEING A CLIENT OR A SERVER IS COMPLETELY SEPARATE FROM THE MASTER/SLAVE
RELATIONSHIP ON THE BUS.
7
1.2
Exchanges Between PLCs and XBT Terminals
XBT-B8
Telemecanique
Uni-Telway Bus
Telemecanique
TSX 17-20/PL7-2
Micro-PLC
PLC
XBT
The TSX SCG 116 module is the data link Master. The PLC system is a server that answers requests from XBT terminals.
A Slave with client or server status.
As a client it can be used to adjust TSX Series 7 PLCs (adjust bits, words, function blocks, etc.).
As a server it can display messages received, etc.
8
Introduction
1
1.3
Exchanges Between PLCs and Sensors and Actuators
TSX 17-20/PL7-2
Micro-PLC
ALTIVAR 45
ATV 45
Speed drive
VW3 A45 103
Module
Télémécanique
TSX SCA 60
PLC
ATV 45
TSX SCA 62
Telemecanique
Uni-Telway Bus
TSX SCA 50
Telemecanique
The module is the data link Master. The application program, via a text block is a Client that can:
.
Start and stop the ATV 45 speed drive,
.
Set the acceleration or deceleration slopes,
.
Set the direction of motion (forward or reverse),
.
Display a velocity instruction,
.
Request information (status, reading values),
.
Etc.
A Slave with server status. It can provide the PLC with various types of information:
.
Mains voltage,
.
Stator current,
.
Rotation frequency,
.
Thermal status,
.
Etc.
9
1.4
Exchanges Between PLCs
TSX 87-30 PLC
TSX
TSX 47-30 PLC
TSX
Telemecanique
Uni-Telway Bus
TSX 17-20/PL7-2
Micro-PLC
TSX SCA 62
Telemecanique Telemecanique
PLCs In the configuration illustrated above, the TSX SCM 21.6 module in the TSX 87-30 PLC is the data link Master.
The TSX SCG 116 module in the TSX 17-20 Micro-PLC and the
TSX SCM 21.6 module in the TSX 47-30 PLC are Slaves.
Each PLC is a Client via its application program and a Server via its system.
10
X
Installation
Section 2
Sub-section
2.1 Description and Connection
2.1-1 Hardware Presentation
2.1-2 Connecting the Module
2.2 Uni-Telway Configuration
2.2-1 Default Configuration
2.2-2 Changing the Default Configuration
2.2-3 Table Structure
2.2-4 Writing a Configuration
2.2-5 Example
2.3 Checking Communication
2.3-1 Register Words
2.3-2 Device Status Read Request
2.4 Connection Between PLCs and XBT Terminals
2.5 Using a Text Block
2.5-1 General
2.5-2 Master PLC
2.5-3 Slave PLC
2.6 Connection Between PLCs and Sensors and Actuators
2.7 Connection for Exchanges Between PLCs
2.7-1 Presentation
2.7-2 Various Types of Exchanges
2.7-3 List of Standard and Specific Services
2.7-4 Examples
2.8 Limits to Operation
2.9 Communication via Telway 7
26
27
27
28
30
32
45
46
Page
12
12
13
18
18
19
14
14
14
15
16
17
20
21
21
21
23
11
2.1
Description and Connection
2.1-1 Hardware Presentation
Connection to the Uni-Telway bus requires:
2
1
5 6
3 4
1
2
A TSX 17-20 Micro-PLC fitted with a PL7-2 language micro-software cartridge (Ref. nbr.
TSX P17 20 FC or TSX P17 20 FD).
The hardware configuration comprises:
. The power supply 1 ,
. The PLC processor with programming port
2 and status LEDs 3 ,
. The 24K RAM program memory cartridge
(with storage for 2K of data when PL7-2 is used). The memory is battery backed-up by the battery located at 4 ,
. A slot 5 for the PL7-2 language microsoftware cartridge,
. A 9-pin connector 6 for the I/O bus extension.
3
4
5
6
7
A TSX SCG 116 serial communication module that enables the Micro-PLC to connect to a Uni-Telway bus. The module comprises:
. A 9-pin I/O bus extension connector and cable, for connecting to the previous module 8 ,
. A 15-pin connector 2 for connecting to a
TSX SCA 62 subscriber socket via a
1.5 meter TSX CSC 015 cable,
. A ground connection 1 ,
. A 9-pin connector 7 for connecting the I/O bus extension to the next module.
8
The module configuration code is 63.
The module has four indicator LEDs:
. A red "I/O" LED 4 indicating a module fault,
. A green "RUN" LED 3 that lights when the self-tests are complete, indicating that the module is powered-up and operating normally,
. A red "ADR" LED 5 that lights if a terminal block addressing fault occurs or if the terminal block is absent,
. A red "NET" LED 6 that lights on the Master module when there are no Slaves on the bus. This LED lights on the Slave module when there is no polling. The
"NET" LED will light if "ADR" is lit.
Important: Before using the Uni-Telway bus, it is essential to ensure that the various modules are correctly grounded.
12
Installation
2
2.1-2 Connecting the Module
Connecting to the Micro-PLC
The module is connected to the Micro-PLC or extension block by its built-in cable.
The module must therefore always be located to the right of the Micro-PLC or extension block.
It can be installed as the first, second or third extension module.
0
1 2 3
Up to two TSX SCG 116 modules can be installed in a Micro-PLC configuration.
Note: The last extension block or module in a configuration must have an end of line terminator connected to the I/O bus extension connector at the lower right of the module. The terminator is supplied separately, its reference number is TSX 17 ACC10.
For more information on the installation of extension blocks and their dimensions, refer to the TSX 17 Micro-PLC Installation Manual (TSX D11 000E).
Connecting to the Uni-Telway bus
The module is connected to the
Uni-Telway bus via a 1.5 meter long TSX CSC 015 cable and a
TSX SCA 62 subscriber socket.
Both ends of the cable are fitted with 15-pin male sub-D connectors.
The address coding of a Micro-
PLC on the Uni-Telway bus is set by the micro-switches located in the subscriber socket.
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Telemecanique
TSX CSC 015
Cable
(1.5 meter)
When a TSX 17-20 Micro-PLC is connected to the end of a Uni-Telway bus, the line adaptor circuit jumper must be set to the ON position.
For more information on address coding and end of line adaptors, refer to Section
2 of the Uni-Telway Bus Reference Manual (TSX D24 004E).
13
2.2
Uni-Telway Configuration
2.2-1 Default Configuration
TSX SCG 116 modules start-up with the default configuration when they are connected to a TSX SCA 62 subscriber socket via a TSX CSC 015 cable.
Depending on the address set on the micro-switches in the subscriber socket, the default configuration is:
. Uni-Telway Master if the address is equal to 0,
. Uni-Telway Slave if the address is not 0 (1 to 31).
The parameters of the default configuration are:
Uni-Telway Master:
. Poll 31 data link addresses,
. Binary data flow: 9600 bits/second (bps),
. Time-out: 100 ms,
. Eight bytes of events data.
Uni-Telway Slave:
. System address set by the subscriber socket connected to the module,
. Binary data flow: 9600 bits/second (bps),
. Time-out: 100 ms,
. No "Client" application address (request - confirm),
. No "line monitoring" application address (unsolicited data).
2.2-2 Changing the Default Configuration
If the default configuration is inadequate (unsuitable data flow rate, number of devices polled, use of "client" or "line monitoring" application addresses, etc.), a new configuration designed specifically to meet the user's requirements must be sent by the application program (sending a parameter table by text block).
This table comprises 5 memory words (10 bytes). Their coding is entered in:
. Hexadecimal: function, number of polled link addresses, addresses,
. BCD: binary data flow, time out.
Important:
As TSX SCG 116 modules are not fitted with a back-up battery, a user defined configuration sent by text block must be sent each time the module is poweredup.
When the TSX SCG 116 module is connected to a TSX SCA 62 subscriber socket, the software configuration must have the same settings as the subscriber socket; function code for Uni-Telway Master or Slave and
Uni-Telway system address for a Uni-Telway Slave. If there is any difference in the settings, the hardware setting overrides the software setting.
14
Installation
2
2.2-3 Table Structure
Uni-Telway Master
Wi
Wi + 4
F E D C
Function (5)
0
0
B A 9
0
0
8 7 6 5 4 3 2 1 0
Number of link addresses polled
0 0
Binary data flow
Time out
0 Size of events data
Uni-Telway Slave
Wi
Wi + 4
F E D C
Function (6)
B A 9
0
8 7 6 5 4 3 2 1
Server system address (Ad0)
0 0 0 0
Binary data flow
Line monitoring application address (Ad2)
Time out
Client application address (Ad1)
0
Parameter Meanings
Function: Specifies the channel operating mode:
. 5 = Uni-Telway Master,
. 6 = Uni-Telway Slave.
Nbr. of link addresses: 152 addresses max. polled by the Master,
Binary data flow: 300, 600, 1200, 2400, 4800, 9600 or 19200 Bits per second
(bps),
All devices connected to the bus must have the same binary data flow.
Time-out: This gives the maximum authorized period between the end of message transmission (request, selection, etc.) and acknowledgement by the destination device. The time value is coded in BCD with a time base of 10 milliseconds (ms). The minimum time is that of the slowest device connected to the bus and must always at least equal the time required to send 10 characters on the line (e.g. 80 ms at 1200 bps).
15
Size of events data:
Events data is sent to the Master on the initiative of a Slave. The size of data processed by the module is 8 bytes max. for the first 32 Slaves on the bus (refer to sub-section 3.1).
Server system address (Ad0):
This address is coded in the subscriber socket that the module is connected to. It allows access to the Slave PLC's system (adjust, diagnostics, program up/download functions, etc.).
Client application address (Ad1):
This address is assigned by configuration to the Slave module. It enables messages to be sent to, or received from other devices connected to the Uni-Telway bus, whether they require a response or not.
Line monitoring application address (Ad2):
This address is assigned to the Slave module by configuration. It enables the reception of unsolicited data from other devices on the Uni-Telway bus.
When the configuration of a Slave PLC is sent and addresses Ad1 or Ad2 are not required, the corresponding byte in the configuration table must be set to zero.
2.2-4 Writing a Configuration
When the default configuration is unsuitable for the application, the user must send a table of new parameters to the module. This new table is defined by internal words
(Wi) or constant words (CWi) and is sent by text block.
Summary of text block parameters:
. CPL type text block TXTi,
. TXTi,M = module address (module nbr. 1, 2 or 3) and channel nbr. = 0,
. TXTi,C = configuration write request code: H'0040',
. TXTi,L = length of the table to be sent to the module: 10 bytes.
These variables can be initialized by program or by configuration.
The exchange is started by setting text block inputs S,I and O to 1,
The end of the exchange is shown by TXTi,D = 1 and TXTi,E = 0.
The report TXTi,R can take one of two values:
H'00FE' Correct configuration, accepted and stored by the module,
16
Installation
2
H'00FD'
Note:
Incorrect configuration, rejected by the module. The previous configuration is retained (parameter out of range, TXTi,L > 10, etc.).
It is possible to change the configuration parameters using a TSX T407 terminal fitted with the TSX
TS4 310 Adjustment Cartridge. Any modifications made will be lost if a power break occurs.
2.2-5 Example
Configuring a device with the following characteristics:
. Uni-Telway Master (function = 5),
. TSX SCG 116 module number = 3,
. Poll 15 data link addresses (H'0F'),
. Binary data flow = 19200 bps,
. Time-out = 40 ms,
. Eight events bytes reserved for each Slave.
The transmission table located after internal word W100 therefore comprises the following values:
W100 = H'500F',
W101 = B'0000',
W102 = B'1920' (binary data flow corresponding to 19200 bps),
W103 = B'0004' (40 ms = 4 x 10 ms),
W104 = B'0008'
The transmission table is sent to the module by text block TXT2.
The text block parameters are:
. CPL type text block,
. TXT2,M = H'0300' Module nbr. = 03, Channel nbr. = 00,
. TXT2,C = H'0040' configuration write request code = H'0040',
. TXT2,L = 10 send 5 words (10 bytes).
The module configuration is sent by the application program (setting inputs S, I and
O to 1).
17
2.3
Checking Communication
Once the various modules are configured, the user has a number of ways of checking performance, such as using:
. The register words of the various modules,
. The "read device status" request,
. The TSX TS4 310 Adjustment Cartridge that checks which devices are connected to the bus, identifies them and performs complete bus diagnostics. For more detailed information refer to TSX TS4 310 Adjustment Cartridge User's Manual
(TSX D12 006E).
2.3-1 Register Words
The following register word bits are significant when set to 1.
Master PLC
. IWn,0,3 Module ready,
. IWn,0,4 General fault,
. IWn,0,B Module not configured,
. IWn,0,C Module in Run,
. IWn,3,0 One or more data link addresses did not reply before time-out.
Slave PLC
. IWn,0,3 Module ready,
. IWn,0,4 General fault,
. IWn,0,B Module not configured,
. IWn,0,C Module in Run,
. IWn,3,0 No polling on the line,
. IWn,3,1 Address Ad0 is not polled,
. IWn,3,2 Address Ad1 is not polled or is not configured,
. IWn,3,3 Address Ad2 is not polled or is not configured.
18
Installation
2
2.3-2 Device Status Read Request
When Master PLC bit IWn,3,0 is set to 1, the status of devices connected to the bus can be determined using the "read device status" request (request code A3).
This request is sent to channel 1 of the data link Master module:
Example
The TSX SCG 116 Master module controls 4 Slave devices.
Transmission
This request is sent by Master PLC text block TXT7. The TSX SCG 116 module number is 3 and the various parameters are:
. TXT7,M = H'0300'
. TXT7,C = H'07A3'
. TXT7,L = 0
Module nbr. = 3, Channel nbr. = 00,
Category code = H'07', Request code = H'A3',
No transmission table.
Request transmission is triggered by setting inputs S,I and O of text block TXT7 to 1.
Reception
The answer code is given by parameter TXT7,R:
. TXT7,R = H'D3' for correct exchange,
. TXT7,R = H'FD' for incorrect exchange.
The reception table of text block TXT7 comprises:
. The number of devices that can be controlled by the module (152 max. = H'98'),
. The status of each device, indicated by a succession of 152 bits (19 bytes), where the first bit gives the status of device 1, the second of device 2, and so on.
. Bit x = 0
. Bit y = 1
Device x disconnected,
Device y connected.
Once the text block exchange is complete, the reception table comprises the following parameters:
Wi = H'0998'; Wi+1 = H'0000'; Wi+2 = H'0000'; ... Wi+9 = H'0000'.
The least significant byte shows the number of devices that can be controlled (98),
The most significant byte shows whether the devices are connected or not.
H'09' = L'1001': Devices 1 and 4 connected,
Devices 2 and 3 disconnected.
Note: The data link Master always sends back the status of the devices connected to the bus (152 max.) even if they are not all actually present. Only those bits corresponding to the controlled devices are significant. The length of the text block reception table must be set correctly (10 words). If incorrect, the text block will generate an error during the exchange.
19
2.4
Connection Between PLCs and XBT Terminals
The XBT man-machine dialog terminal can connect to the Uni-Telway bus. The asynchronous serial link that it uses conforms to Uni-Telway standards.
The XBT-.8 terminal is connected to the bus via a TSX SCA 62 subscriber socket.
This means of connection will automatically set-up the configuration of the module.
Connection to a TSX SCA 62 subscriber socket
TSX 17-20/PL7-2
Micro-PLC
15-pin
Sub-D (M)
TSX SCA 62
Subscriber socket
Telemecanique
15 pin
Sub D (M)
Uni-Telway Bus
XBT-B8
25-pin
Sub-D (M)
TSX CSC 015
Cable
(1.5 meter)
XBT Z908
Cable
(1.8 meter)
The coding of the TSX SCA 62 subscriber socket must be:
. 0 for the link with the TSX SCG 116 (Master) module,
. Appropriate for the address assigned to the XBT-B8 terminal.
20
Installation
2
2.5
Using a Text Block
2.5-1 General
Communication uses a question and answer dialog called Request/Confirm.
Request structure
Requests comprise:
. The request code (one byte),
. The category code (one byte),
. Parameters and/or data (126 bytes max. or limited to 30 bytes with a TSX 17-20).
Request code
Category code
Data
Confirm structure
Confirms comprise:
. The confirm code (one byte),
. Parameters and/or data (127 bytes max. or limited to 31 bytes with a TSX 17-20).
Confirm Data
Important The TSX SCG 116 module can automatically route messages of up to 128 bytes between Slaves.
A TSX 17-20 Micro-PLC connected to the Uni-Telway bus via a TSX SCG 116 module can send and receive messages of up to 32 bytes max. Therefore, messages of more than 32 bytes that are destined for a TSX 17-20 cannot be processed by it.
2.5-2 Master PLC
The request is sent by the application program from the client Master PLC by text block. This text block (with S, I and O at 1, for requests that require a confirm) must comprise all request parameters.
The existing relationship between the structure of a request/confirm and the text block parameters are described overleaf.
21
Transmission
Request code
Category code
Byte Byte Word
Transmission table
1st. word
2nd.
word
TxTi,C = H' 07 '
Example: Write object request = H'37',
TXTi,C = H'0737'.
The category code must always take the value H'07'.
TXTi,M Comprises the physical location of the module, followed by the data link address (encoded in hexadecimal) of the exchange destination Slave increased by H'64'.
TXTi,M = 0 Module nbr.
Destination link address + H'64'
Example: TXTi,M = H'0365' corresponds to the Master module numbered 3, addressing the Slave at data link address 1.
TXTi,L Comprises the length of the transmission table (in bytes).
Reception
Confirm Byte Byte Word
Reception table
1st. word
2nd.
word
TxTi,R = H' 00 '
22
Installation
2
TXTi,S
TXTi,D
TXTi,E
Comprises the number of bytes received in the text block reception table when a correct exchange is performed. If the exchange is incorrect, TXTi,S takes the following values:
1 : exchange cancelled by Reset,
2 : transmission or reception length error,
3 : exchange error (see sub-section 2.8),
6 : incorrect buffer address,
11 : text block type not supported.
This bit goes to 1 when the text block completes its exchange.
This bit goes to 1 if an exchange error occurs (for further details refer to sub-section 2.8).
2.5-3 Slave PLC
The request is sent by the application program from the client Slave PLC via a text block. This text block (with S, I and O at 1, for requests that require a confirm) must comprise all request parameters.
When a Slave PLC is a client, it must specify the address of the destination entity when sending a request. This address is coded in 5 bytes and must be included at the start of text block transmission table.
The existing relationship between the structure of a request/confirm and the text block parameters are:
Transmission from Ad1
Request code
Category code
Byte Byte Word
Destination address
Transmission table network nbr.
gate nbr.
channel nbr.
0 station nbr.
module addr.
1st. word
2nd. word
3rd.
word
4th.
word
5th.
word
TxTi,C = H' 07 '
23
TXTi,M Sender address. Comprises the module number of the TSX SCG 116 module, followed by the data link address (encoded in hexadecimal) of the exchange source Slave incremented by H'64'.
0 Module Nbr.
Data link addr.+H'64' TXTi,M =
Example: TXTi,M = H'026B' corresponds to a Slave module numbered 2 and a message sender at data link address 7 (corresponding to Ad1: H’6B’ =
H’7’ + H’64’).
TXTi,L Comprises the length of the transmission table (in bytes) including the destination address.
Reception on Ad1
Confirm Byte Byte Word
Reception table
1st. word
2nd.
word
TxTi,R = H' 00
TXTi,S
TXTi,D
TXTi,E
'
Comprises the number of bytes received in the text block reception table when a correct exchange is performed. If the exchange is incorrect, TXTi,S takes the following values:
1 : exchange cancelled by Reset,
2 : transmission or reception length error,
3 : exchange error (see sub-section 2.8),
6 : incorrect buffer address,
11 : text block type not supported.
This bit goes to 1 when the text block completes its exchange.
This bit goes to 1 if an exchange error occurs (for further details refer to sub-section 2.8).
Note Receiving data via the Master PLC's text block:
When a Slave PLC sends a request to the Master PLC's text block, the parameters received by the destination text block are:
24
Installation
2
Request code
Category code
Byte Byte
Reception table
1st. word
2nd.
word
TxTi,R = H' 00 '
The data received is shifted by one byte (category code). The shift procedure is described in detail in sub-section 3.5.
Reception on Ad2 (text block in Input)
Request code
Category code
Byte Byte
Sender address
Reception table network number gate number station number channel number module number
1st. word
2nd. word
3rd. word
4th. word
TxTi,R = H' 00
TXTi,S
TXTi,D
TXTi,E
'
Comprises the number of bytes received in the text block reception table when a correct exchange is performed. If the exchange is incorrect, TXTi,S takes the following values:
1 : exchange cancelled by Reset,
2 : transmission or reception length error,
3 : exchange error (see sub-section 2.8),
6 : incorrect buffer address,
11 : text block type not supported.
This bit goes to 1 when the text block completes its exchange.
This bit goes to 1 if an exchange error occurs (for further details refer to sub-section 2.8).
25
2.6
Connection Between PLCs and Sensors and Actuators
Example
Reading the velocity reference of an ATV 45 speed drive.
TSX 17-20/PL7-2
Micro-PLC ALTIVAR 45
ATV 45
Speed drive
VW3 A45 103
Coupler
Télémécanique
TSX SCA 62
Uni-Telway Bus
TSX SCA 60
Telemecanique
Data
. TSX 17-20:
- TSX SCG 116 module number = 1,
TSX SCA 50
Telemecanique
. ATV 45:
- Velocity reference = W193
- Data link address = 1.
(see ATV 45 documentation),
. Read word request:
- Request code = H'04' (see list of requests),
- Parameter = number of the word to read.
. Text block:
- The request is sent by application program text block TXT2,
- Start of the transmission table = W115,
- Start of the reception table = W100.
Transmission (Text block):
. TXT2,C = H'0704'
. TXT2,M = H'0165'
. TXT2,L = 2
. Transmission table:
Category code = H'07', Request code = H'04',
Module number = 1, link address = 1,
Length (in bytes) of the transmission table,
W115 = 193 (number of the word to read).
Reception (Text block):
. TXT2,R = H'34'
. TXT2,D = 1
. TXT2,E = 0
. Reception table:
Correct exchange confirm,
W100 = 400 (velocity reference = 40 Hz).
The ATV 45 speed drive documentation specifies that the velocity reference is expressed with a time-base of 0.1 Hz.
26
Installation
2
2.7
Connection for Exchanges Between PLCs
2.7-1 Presentation
Dialog between PLCs connected to the Uni-Telway bus uses text blocks.
The transmission text block can send its messages or data to:
. The system gate of the PLC that is the destination of the exchange (access to all standard and specific requests as described in the Appendix),
. An application program text block (message system access).
The table below shows all of the possibilities for dialog between Master and Slave
PLCs:
Master PLC
Text block
System gate
Text block
Text block
Slave PLC
System gate
Text block
Text block
Text block
Text block
Text block
Slave PLC
System gate
Text block
Each of the possibilities listed above will be described in an example corresponding to the bus layout shown below:
TSX 17-20/PL7-2
Micro-PLC
TSX 17-20/PL7-2
Micro-PLC
Master
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Ad0 = 1
Telemecanique
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Slave 1
27
2.7-2 Various Types of Exchanges
Three data link addresses can be assigned to a Slave PLC:
. Address Ad0 (system address),
. Address Ad1 (client application address),
. Address Ad2 (line monitoring application address).
Logical entities
(Slave PLC processor)
Example of Slave module channels
Uni-Telway link address
Answers questions
SYSTEM 67
Ad0
(3 = 67-64)
Sends questions to a server device on a
Uni-Telway Bus
Receives the
"Unsolicited data" request
CLIENT
APPLICATION
LINE MONITORING
APPLICATION
68
69
Ad1
(4 = 68-64)
Ad2
(5 = 69-64)
Access to the system gate is always available through address Ad0. This address is coded in the TSX SCA 62 subscriber socket. Access to specific client application
(Ad1) and line monitoring (Ad2) addresses are optional. When these addresses are used, they need to be configured first.
Master to Slave exchange
PLC
MASTER
MODULE
System a
MODULE
SLAVE
PLC
System
Appli.
TxTi b
Ad0
Ad1
Ad2
Appli.
TxTj a Master
→
Ad0
For communication from the Master application program (text block) to the system of the Slave PLC (access to PL7 objects).
b Master
→
Ad2
28
Installation
2
Slave to Master exchange
PLC
MASTER
MODULE
System
Appli.
TxTi a b
Ad0
Ad1
Ad2
MODULE
SLAVE
PLC
System
Appli.
TxTj a Slave (Ad1)
→
Master
For communication from the slave application program (text block) to the system of the master PLC.
b Slave (Ad1)
→
Master
To send messages from the slave application program (text block) to the application program of the master PLC (text block).
Slave to Slave exchange
SENDER SLAVE
PLC MODULE
System
Appli.
TxTi
Ad0
Ad1
Ad2 a b
DESTINATION SLAVE
MODULE PLC
Ad0
Ad1
Ad2
System
Appli.
TxTj
M
O
D
U
L
E
PLC
System
Application
TxTk
MASTER a Sender Slave (Ad1)
→
Destination Slave (Ad0)
For communication from the application program of the sender Slave (text block) to the system of the destination Slave.
b Sender Slave (Ad1)
→
Destination Slave (Ad2)
To send messages from the application program of the s ender Slave (text block) to the application program of the destination Slave (text block).
29
2.7-3 List of Standard and Specific Services
Family
Data
(read)
Service
Read a Bit (*)
Read a Word (*)
Read Objects (*)
Read a System Bit
Read the Memory
Image of an I/O bit.
Read a Constant Word
Read a System Word
Read a Timer
Request Confirm
Hex.
Dec. Hex. Dec.
Description
00 00 30 48 Reads a bit (B).
04 04 34 52 Reads a word (W).
36 54 66 102 Reads objects (bits, words, bit or word strings, etc.).
01 01 31 49 Reads a system bit (SY).
02 02 32 50 Reads the image of an I/O Bit.
Read a Monostable
Read a Counter
Read the Current Step of a Drum Controller
Read a Step from a
Drum Controller
Read a Register
Read Grafcet Steps
05 05 35 53 Reads a constant word (CW).
06 06 36 54 Reads a system word (SW).
09 09 39 57 Reads the parameters of a timer (T).
0A 10 3A 58 Reads the parameters of a monostable (M).
0B 11 3B 59 Reads the parameters of a counter (C).
0C 12 3C 60 Reads the current step of a of a drum controller.
0D 13 3D 61 Reads a step from a drum controller.
0E 14 3E 62 Reads the parameters of a register (R).
2A 42 5A 90 Reads Grafcet steps (Xi).
(*) Standard requests, the coding of which is given in the Uni-Telway Bus
Reference Manual (TSX D24 004E).
Only specific requests are described in the Appendix (sub-section 4.4).
30
Installation
2
Data
Family
(write)
Unsolicited
Data
Operating
Modes
Write a Bit (*)
Write a Word (*)
Write Objects (*)
Write a System Bit
Write the Memory
Image of an I/O Bit
Write a System Word
Write Timer Preset
Write Monostable
Preset
Write Counter Preset
Write a Register Input
Stop a Drum Controller
Move to the Next Drum
Controller Step
Run Drum Controller
Unsolicited Data (*)
RUN (*)
Service
STOP (*)
Request Confirm
Hex.
Dec. Hex. Dec.
Description
10 16 FE 254 Writes a bit (B).
14 20 FE 254 Writes a word (W).
37 55 FE 254 Writes objects (bits, words, bit or word strings, etc.).
11 17 FE 254 Writes a system bit (SY).
12 18 FE 254 Writes the image of an
I/O bit.
15 21 FE 254 Writes a system word (SW).
17 23 FE 254 Writes a timer preset (T).
18 24 FE 254 Writes a monostable preset
(M).
19 25 FE 254 Writes a counter preset (C).
1A 26 FE 254 Writes a register input (R)
26 38 FE 254 Stops a drum controller (D).
27 39 FE 254 Moves to the next step of a drum controller.
28 40 58 88 Runs a drum controller.
FC 252 X X Sends data without first receiving a request.
24 36 FE 254 Sets a device to Run.
25 37 FE 254 Sets a device to Stop.
(*) Standard requests, the coding of which is given in the Uni-Telway Bus
Reference Manual (TSX D24 004E).
Only specific requests are described in the Appendix (see sub-section 4.4).
Note: There are other standard or specific requests supported by PLCs. These are used for specific applications such as programming or diagnostics using Telemecanique terminals and are not described in this manual.
31
2.7-4 Examples
Presentation of the Examples
The various possibilities for communication between Master and Slave PLCs are described in the examples of dialog between devices connected to the Uni-Telway bus as shown below:
TSX 17-20/PL7-2
Micro-PLC
TSX 17-20/PL7-2
Micro-PLC
Master
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Ad0 = 1
Telemecanique
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Slave 1
Master (text block)
→
Slave (system gate)
Read Slave 1 word W100 by the Master.
Slave (text block)
→
Master (system gate)
Read the parameters of the Master’s timer T6 by Slave 2.
Master (text block)
→
Slave (text block)
Send the message "PIN FAULT" from the Master to Slave 2.
Slave (text block)
→
Master (text block)
Send the message "FAULT STORED" from Slave 2 to the Master.
Slave (text block)
→
Slave (system gate)
Transfer word W10 from Slave 2 to word W54 of Slave 1.
Slave (text block)
→
Slave (text block)
Send the message "HIGHER THRESHOLD REACHED" from
Slave 2 to Slave 1.
32
Installation
2
Example 1:
TSX 17-20/PL7-2
Micro-PLC
Master (text block)
→
Slave (system gate)
Read Slave 1 word W100 by the Master.
TSX 17-20/PL7-2
Micro-PLC
Master
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Ad0 = 1
Telemecanique
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Slave 1
Data . Master: TSX SCG 116 module number = 3,
. Slave 1: Destination data link address = 1 (Ad0),
. Read word request:
- Request code = H'04' (see request list),
- Parameter = number of the word to read.
Transmission
. Text block:
- The request is sent by text block TXT1 of the application program,
- Start of transmission table = W115,
- Start of reception table = W100.
. Text block:
- TXT1,C = H'0704'
- TXT1,M = H'0365'
- TXT1,L = 2
- Transmission table
Request code = H'04',
Module nbr. = 3, Data link address = 1,
Send 2 bytes,
W115 = 100 number of the word to read.
Reception . Text block:
- TXT1,R = H'34'
- TXT1,D = 1
- TXT1,E = 0
- TXT1,S = 2
- Reception table
Correct exchange confirm,
Receive 2 bytes,
W100 = 1500
The content of word W100 of the Slave is therefore 1500.
33
Example 2 Slave (text block)
→
Master (system gate)
Read the parameters of the Master’s timer T6 by Slave 2.
Addressing principles (reminders)
A Slave PLC has 3 data link addresses. They are defined by configuration and are:
. System address (Ad0)
All of the messages received on this address are sent to the system gate of the exchange destination PLC. This address is required and is defined by coding the
TSX SCA 62 subscriber socket or by configuration if there is no subscriber socket.
. Client application address (Ad1)
This address is controlled by the application program of the Slave (text block). It enables transmission of the request to any Uni-Telway address (system gate or text block in the Master or Slave PLC or in any other device) and the reception of all related reports or confirms.
Address Ad1 is coded in parameter TXTi,M.
Using this address requires the coding, at the start of the text block transmission table, of the address of the exchange destination.
. Line monitoring application address (Ad2)
This address is assigned to the Slave module for receiving unsolicited data
(request H'FC') from other devices on the Uni-Telway bus.
The messages received at this address are sent to the application program through a text block set to receive.
Note: Addresses Ad1 (client application) and Ad2 (line monitoring application) can only be configured by text block. They are optional, therefore if they are not required it is not necessary to needlessly lengthen the polling cycle.
34
Installation
2
TXTi,M comprises:
. The TSX SCG 116 module number (1 to 3),
. The data link source address where the exchange originated (data link address
Ad1 incremented by H'64').
Destination address
This is included at the start of the transmission table of the text block that originated the exchange, in the format shown below:
Wi
Wi+1
Wi+2
Wi+3 network number gate number channel number
DATA
0 station number module address
The following parameters are used:
Network number:
The number of the Telway 7 network where the destination device is located. It takes a value of:
. 00 for a single Telway 7 network or no network.
Station number:
The address of the PLC on the Telway 7 network. It takes a value of:
. H'FE' if there is no Telway 7 network or if a Master or Slave of the Uni-Telway bus is being addressed.
Gate number:
The number of the logic gate that is the destination of the exchange. It takes a value of:
. 00: access to the system gate,
. 05: access to a Uni-Telway module or more generally to a Uni-Telway Slave connected to one of these modules,
. H'10' to H'4F': access to text blocks (text block number + H'10').
Note: The other values are reserved, they must not be used.
35
Module location
The location of the module that is the destination of the exchange. It takes the values:
. 1 to 3 for the module number for TSX 17-20 Micro-PLCs,
. 0 to F for the rack number followed by 0 to 7 for the module location for TSX
47/67/87 PLCs,
. H'FE' if the destination device is on the same Uni-Telway bus,
. 00 for a gate number other than 5.
Module channel number
The channel number assigned to the Uni-Telway Slave. It takes the value of the destination data link of the exchange, incremented by H'64' or:
. 00 for a gate number other than 5.
Dialog Example
Read the parameters of Master PLC timer T6 by Slave 2.
TSX 17-20/PL7-2
Micro-PLC
TSX 17-20/PL7-2
Micro-PLC
Master
Data
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Ad0 = 1
Telemecanique
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Slave 1
. Master: TSX SCG 116 module number = 3,
. Slave 2: TSX SCG 116 module number = 1,
Sender data link address = 4 (Ad1),
. Read timer request:
- Request code = H'09' (see request list),
- Parameter = Number of the timer to read.
36
Installation
2
Data
(Contd)
. Text block:
. The request is sent by text block TXT2 of the application program,
. Start of transmission table = W115,
. Start of reception table = W100.
. Text block: Transmission
- TXT2,C = H'0709'
- TXT2,M = H'0168'
- TXT2,L = 8
- Transmission table:
Request code = H'09',
Module nbr. = 1, Data link address = 4,
Send 8 bytes,
Destination address (Master PLC system gate)
Network Nbr./00
Gate/Station Nbr.
Channel Nbr./Module Address
Timer Nbr.
Reception . Text block:
. TXT2,R = H'39'
. TXT2,D = 1
. TXT2,E = 0
. TXT2,S = 8
. Reception table:
W115
W116
W117
W118
00
00
00
Correct exchange confirm,
Receive 8 bytes,
6
00
FE
00
W100
W101
W102
W103
00
01
3600
1712
02
01
. Answer analysis:
W100 = H'0002'
LSB = 02
→ time base 1 second,
MSB = 00
→ not timed-out.
W101 = H'0101'
LSB = 01
→ timer running,
MSB = 01
→ changeable preset.
W102 = 3600
The configuration preset value is 3600.
W103 = 1712
The current value when the request was processed was 1712.
37
Example 3:
TSX 17-20/PL7-2
Micro-PLC
Master (text block)
→
Slave (text block)
Send the message "PIN FAULT" from the Master to Slave 2.
TSX 17-20/PL7-2
Micro-PLC
Master
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Ad0 = 1
Telemecanique
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Data
Slave 1
. Master: TSX SCG 116 module number = 3,
. Slave 2: TSX SCG 116 module number = 1,
. Sender data link address = 5 (Ad2),
. Unsolicited data request:
- Request code = H'FC' (see request list)
- Parameter = message to send.
. Sender text block (Master):
- The request is sent by text block TXT3 of the application program
(set-up with S and O at 1 as there is no answer or confirm),
- Start of transmission table = W100,
- There is no reception table as there is no answer.
. Destination text block (Slave):
- When a message is sent by a device connected to the Uni-Telway bus, to a text block of a Slave PLC, the Slave must know which text block is ready to receive request H'FC'. To do this the Slave
PLC must be set-up with S and O at 1 on initialization (first exchange), then set to await messages with S and I at 1.
- Message reception is ensured by text block TXT0 of the application program,
- Start of reception table = W10. The reception table comprises the address of the exchange coded in 5 bytes.
38
Installation
2
Transmission
(Master)
. Text block:
- TXT3,C = H'07FC' Category code = H'07',
- TXT3,M = H'0369' Module number = 3, Data link address = 5,
- TXT3,L = 9
- Transmission table:
Send 9 bytes,
W100
W101
W102
W103
W104
49 (I)
20 (Space)
41 (A)
4C (L)
50 (P)
4E (N)
46 (F)
55 (U)
54 (T)
Reception . Text block (in Input): ("set" reception):
(Slave 2) - TXT0,C = H'07FC' Request code H'FC',
- TXT0,M = H'0169' Module number = 1, Data link address = 5,
- TXT0,L = 0 No transmission table.
. Text block (data reception):
- TXT0,R = H'FC' Receive request H'FC',
- TXT0,D = 1
- TXT0,E = 0
- TXT0,S = 15
- Reception table:
Receive 15 bytes.
Sender Category code
Sender address
W10
W11
W12
W13
W14
W15
W16
W17
00
13
00
49 (I)
20 (Space)
41 (A)
4C (L)
07
FE
00
50 (P)
4E (N)
46 (F)
55 (U)
54 (T)
. Answer analysis:
Network nbr. = H'00'
Station nbr.
= H'FE'
Gate nbr.
= H'13'
Module nbr.
= H'00'
Channel nbr. = H'00'
(sender address)
(sender not on a Telway 7 network),
(sender not on a Telway 7 network),
(text block 3 - H'10' + H’03’),
(gate nbr. other than H'05'),
(gate nbr. other than H'05'),
39
Example 4
TSX 17-20/PL7-2
Micro-PLC
Slave (text block)
→
Master (text block)
Send the message "FAULT STORED" from Slave 2 to the Master.
TSX 17-20/PL7-2
Micro-PLC
Master
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Telemecanique
Ad0 = 1
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Data
Slave 1
. Master: TSX SCG 116 module number = 3,
. Slave 2: TSX SCG 116 module number = 1,
. Sender data link address = 4 (Ad1),
. Unsolicited data request:
- Request code = H'FC' (see request list)
- Parameter = message to send.
. Sender text block (Slave):
- The request is sent by text block TXT1 of the application program
(set-up with S and O at 1 as there is no report or confirm),
- Start of transmission table = W100. The transmission table comprises the address of the exchange sender coded in 5 bytes,
- The data received is shifted by one byte (category code). Refer to sub-section 3.5 for a full description of this function,
- There is no reception table as there is no confirm.
. Destination text block (Master):
- The TXTi, M parameter comprises the number of the Master module and the data link address that originated the exchange,
- Message reception is ensured by text block TXT5 (set with S and
I at 1) of the application program,
- Start of reception table = W50,
- In the case of a message destined for the text block of the Master, the first byte in the reception table is the category code (refer to sub-section 2.5).
40
Installation
2
Transmission
(Slave)
. Text block:
- TXT1,C = H'07FC' Request code = H'FC',
- TXT1,M = H'0168' Module number = 1, Data link address = 4,
- TXT1,L = 18
- Transmission table:
Send 18 bytes,
Destination address
Data
W100
W101
W102
W103
W104
W105
W106
W107
W108
00
15
00
41 (A)
4C (L)
20 (Space)
54 (T)
52 (R)
44 (D)
00
FE
00
46 (F)
55 (U)
54 (T)
53 (S)
4F (O)
45 (E)
Reception . Text block ("set" reception):
(Master) - TXT5,C = H'07FC' Request code H'FC',
- TXT5,M = H'0368' Module number = 3, Data link address = 4,
- TXT5,L = 0 No transmission table.
. Text block (data reception)
- TXT5,R = H'FC'
- TXT5,D = 1
- TXT5,E = 0
- TXT5,S = 13
- Reception table:
Receive request H'FC',
Receive 13 bytes.
Sender Category code
Data
W500
W501
W502
W503
W504
W505
W506
46 (F)
55 (U)
54 (T)
53 (S)
4F (O)
45 (E)
07
41 (A)
4C (L)
20 (Space)
54 (T)
52 (R)
44 (D)
41
Example 5
TSX 17-20/PL7-2
Micro-PLC
Slave (text block)
→
Slave (system gate)
Transfer word W10 from Slave 2 to word W54 of Slave 1:
TSX 17-20/PL7-2
Micro-PLC
Master
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Ad0 = 1
Telemecanique
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Data . Slave 2: TSX SCG 116 module number = 1,
Sender data link address = 4 (Ad1),
. Slave 2: Destination data link address = 1 (Ad0).
. Write word request:
- Request code = H'14',
- Parameter = number and value of the word to write.
. Text block:
- The request is sent by text block TXT4 of the application program,
- Start of transmission table = W40. The transmission table comprises the address of the exchange sender coded in 5 bytes,
- There is no reception table as there is no answer or confirm.
. Text block:
Slave 1
Transmission
- TXT4,C = H'0714' Request code H'14',
- TXT4,M = H'0168' Module number = 1,
Data link address Ad1 = 4,
- TXT4,L = 10
- Transmission table:
Send 10 bytes,
Destination address
Nbr. of the word to read
Value of word W10
W40
W41
W42
W43
W44
Reception . Text block:
- TXT4,R = H'FE' Correct exchange.
00
05
65
54
112
00
FE
FE
42
Installation
2
Example 6
TSX 17-20/PL7-2
Micro-PLC
Slave (text block)
→
Slave (text block)
Send the message "HIGHER THRESHOLD REACHED" from
Slave 2 to Slave 1:
TSX 17-20/PL7-2
Micro-PLC
Master
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave 2
Uni-Telway Bus
Ad0 = 1
Telemecanique
Ad1 not configured
Ad2 = 2
Telemecanique
Ad0 = 3
Ad1 = 4
Ad2 = 5
Data
Slave 1
. Slave 2: TSX SCG 116 module number = 1,
Sender data link address = 4 (Ad1),
. Slave 1: TSX SCG 116 module number = 2,
Destination data link address = 2 (Ad2).
. Unsolicited data request:
- Request code = H'FC',
- Parameter = Message to send.
. Sender text block (Slave 2):
- The request is sent by text block TXT7 of the application program,
- Start of transmission table = W80. The transmission table comprises the address of the exchange sender coded in 5 bytes,
- There is no reception table as there is no answer.
. Destination text block (Slave 1):
- When a message is sent by a device connected to the Uni-Telway bus, to the text block of a Slave PLC, the Slave module must know which text block is ready to receive request H'FC'. This requires that the destination text block be set-up with S and O at 1 on initialization (first exchange) and then be set to await messages with S and I at 1,
- Message reception is ensured by text block TXT4 set-up to await reception of the application program (S and I at 1),
- Start of reception table = W20. The transmission table comprises the address of the exchange sender coded in 5 bytes.
43
Transmission
. Text block:
- TXT7,C = H'07FC' Request code = H'FC',
- TXT7,M = H'0168' Module number = 1, Data link address = 4,
- TXT7,L = 26
- Transmission table:
Send 26 bytes,
W80 00 00
Destination address
Data
W85
W86
W87
W88
W81
W82
W83
W84
W89
W90
W91
W92
05
66
49 (I)
48 (H)
52 (R)
54 (T)
52 (R)
53 (S)
52 (R)
41 (A)
48 (H)
44 (D)
FE
FE
48 (H)
47 (G)
45 (E)
20 (Space)
48 (H)
45 (E)
20 (Space)
45 (E)
43 (C)
45 (E)
Reception . Text block (S and I at 1): ("set" reception).
- TXT4,C = H'07FC' Request code H'FC',
- TXT4,M = H'0266' Module number = 2, Data link address = 2,
- TXT4,L = 0 No transmission table.
. Text block (data reception)
- TXT4,R = H'FC' Receive request H'FC',
- TXT4,D = 1,
- TXT4,E = 0,
- TXT4,S = 26
- Reception table:
Receive 26 bytes.
Sender category code
Sender address
Data
W26
W27
W28
W29
W20
W21
W22
W23
W24
W25
W30
W31
W32
00
05
68
49 (I)
48 (H)
52 (R)
54 (T)
52 (R)
53 (S)
52 (R)
41 (A)
48 (H)
44 (D)
07
FE
FE
48 (H)
47 (G)
45 (E)
20 (Space)
48 (H)
45 (E)
20 (Space)
45 (E)
43 (C)
45 (E)
44
Installation
2
2.8
Limits to Operation
Exchanges of messages or data on the Uni-Telway bus are limited by:
. Exchanges between the module and the processor,
. The limits of the Master module,
. The limits of the Slave module,
. Flow checking (message loss on power-break, etc.).
Module - Processor Exchange
. The processor of a TSX 17-20 can exchange an input and an output message on every second cycle of the application program.
Master Module Limits
. The Master module can store 7 messages from the Uni-Telway bus until they are routed to the PLC processor. It can also store 4 messages from the PLC processor, destined for the Uni-Telway bus.
Slave Module Limits
. System Access (Ad0):
The module can only control one exchange (request/confirm cycle) with the system at a time. If a message is received on the line while an exchange is in progress, it is refused (NACK).
. Client Application Address (Ad1):
The module can only control one exchange with the application program at a time.
To start another exchange, the first must be completed (reception of a text block that resets bit D of the text block).
. Line monitoring Application Address (Ad2):
The module does not restrict communication in line monitoring mode on data link address Ad2.
TSX 17-20 Processor Limits
. Local module to module exchanges can be performed,
. The system can only process one request at a time,
. The maximum message size is 32 bytes (request or confirm + parameters + data),
. Exchanges are possible between the processor and the module even when the
PLC is stopped,
. Exchanges between a Telway 7 network and a Uni-Telway Slave module are possible (refer to sub-section 2.9).
45
Flow control
. Master PLC
When a text block set with S, I and O at 0 sends a request, it awaits reception and remains in this state until it receives an answer. If the destination device suffers a power supply fault or is disconnected, the sender text block will remain inhibited.
There are two possible cases:
- Destination power break or disconnection during the exchange:
Bits TXTi,D and TXTi,E remain at 0.
The Master (Client) application program must allow for this situation by including a "time-out" in sender text block operation.
If no answer is received before time-out, then the text block must be reset to 0.
- Destination power break or disconnection before the start of the exchange or non-existent device:
A text block error occurs, bits TXTi,D and TXTi,E are set to 1 and status word
TXTi,S takes a value of 3.
. Slave PLC
As the Slave module can only process one text block at a time, it uses a set 10 second time-out that is reset on each exchange request. If no answer is received before time-out, the sender text block automatically generates an error
(TXTi,E = 1 and TXTi,S = 3).
2.9
Communication via Telway 7
Exchanges between TSX 17-20 Slave Micro-PLCs connected to the Uni-Telway bus and stations connected to the Telway 7 network are fully transparent when performed via the Uni-Telway Master PLC (TSX 47/67/87) connected to Telway 7.
Example: Slave PLC to Telway 7 station
A TSX 17-20 Slave on the Uni-Telway bus (refer to next page) has to set the preset for Monostable M6 to a value of 1000 in the TSX 47-30 PLC, station 2 of the
Telway 7 network.
46
Installation
2
TSX 47-30
Master TSX
Uni-Telway Bus
Station 1
Telway 7
TSX
Station 2
TSX 47-30
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Telemecanique
Ad2 not configured
Ad0 = 5
Ad1 = 6
Data
Transmission
. TSX 17-20: TSX SCG 116 module number = 1,
Sender data link address = Ad1 (data link address 6),
. TSX 47-30: Telway 7, station 2,
Exchange destination: system gate.
. Monostable preset write request:
- Request code = H'18',
- Parameters = number and value of the preset to write.
. Text block:
- The request is sent by text block TXT2 (CPL type) of the application program,
- Start of transmission table = W50. The transmission table comprises the destination address coded in 5 bytes,
- There is no reception table as there is no data to receive.
. Text block:
- TXT2,C = H'0718' Request code = H'18',
- TXT2,M = H'016A' Module number = 1, Data link address = 6,
- TXT2,L = 10 Send 10 bytes,
- Transmission table:
Destination address
Data
W50
W51
W52
W53
W54
00
00
00
6
1000
00
02
00
Reception . Text block:
- TXT2,V = H'FE' Exchange correct
47
48
X
Additional Programming Information
Sub-section
3.1 Broadcast Messages
3.2 Events
3.2-1 Processing by the Module
3.2-2 Example
3.3 Discrete Bits and Register Words
3.3-1 Discrete Bits
3.3-2 Register Words
3.4 Communication Example
3.4-1 General
3.4-2 Master PLC
3.4-3 Slave PLC
3.5 Read Objects Request
3.5-1 Data Shift
Section 3
57
57
58
59
53
53
54
61
61
Page
50
51
51
52
49
3.1
Broadcast Messages
General
The "broadcast message" service allows a message to be sent from the data link
Master device to all of the Slave devices connected to the same Uni-Telway bus.
The "broadcast message" service does not support acknowledgements at data link level.
If one of the Slaves is not available when this service is used, it will not receive the message.
Addressing
The data is sent by a coupler type text block with the following characteristics:
TXTi,M Comprises the sender address and the destinations:
. Location of the TSX SCG 116 Master module,
. The data link address of the exchange destination devices. If they are broadcast messages, this data link address will be set to H'FF' by convention.
TXTi,C Takes the value H'07xy' where xy corresponds to the request code of the required function (e.g. operating mode requests).
Notes: The processing of this request performed by the destination devices depends on the type of device connected.
In the case of a TSX SCG 116 Slave module the message is received on data link address Ad0
(system gate). The message is sent at data link level without acknowledgement (ACK) from the destination.
The "unsolicited data" request is not accepted by the system gate of a Slave PLC connected to the bus via a TSX SCG 116 module.
50
Additional Programming Information
3
3.2
Events
3.2-1 Processing by the Module
This service enables a Slave server that supports this function to send data on events to the Uni-Telway Master module on its own initiative.
This data is sent using simplified addressing, by the "unsolicited data" request that does not require an answer from the destination. The module receives and stores the events data received in a buffer. The PLC's application is informed via the register field of a change in value. Therefore, each IWn,4 and IWn,5 input register word is assigned a data link address with the following correspondence.
IWn,4,0
→ data link address 1,
IWn,4,1
→ data link address 2,
IWn,4,2
→ data link address 3,
............................................. ....,
IWn,5,E
→ data link address 31
IWn,5,F
→ data link address 32.
Example If the events data and data link addresses 4, 8 and 31 have been changed, the module will set register bits IWn,4,3, IWn,4,7 and
IWn,5,E to 1.
The module processes the events data for data link addresses 1 to 32. The size of the data sent can be parametered when the Master module is configured, but is restricted to 8 bytes max. per data link address (refer to sub-section 2.2).
Addressing
Sending events enables the sender to not have to give the destination address. The data is automatically sent to the Master module.
Data acquisition
The data (stored in Master module RAM) is read by sending a read events data request (code H'A8') by text block to channel 0 of a TSX SCG 116 module or to channel 1 of a TSX SCM 21.6 module.
51
It is possible to acquire the events data from a number of devices using the same request by assigning the value of the input register words IWn,4 and IWn,5 to the first two words of the request sender's text block. Each module then sends back the number of bytes defined when the Master module was configured.
The data is received in the reception table of the sender text block.
Important If the data link Master is a TSX 17-20 Micro-PLC, the maximum size of the messages is 30 bytes.
If the size of the events data is more than 30 bytes, the application program must allow for it and not request more than 30 characters at a time.
3.2-2 Example
Data
. The TSX SCG 116 module (module number = 1) of the TSX 17-20 Master Micro-
PLC indicates a change of state in the events data for data link addresses 1, 4, 8,
16 and 22 by setting bits IW1,4,0; IW1,4,3; IW1,4,7; IW1,4,F and IW1,5,5 to 1,
. The size of the events data is configured in the module as 4 bytes for each data link address,
. The request is sent by text block TXT2 (set-up with S, I and O at 1) of the application program,
. Start of the exchange table = W15,
. Start of the reception table = W0.
Transmission
. TXT2,M comprises:
The rack number where the TSX SCG 116 Master module is located (1),
The address of the Uni-Telway channel (0):
TXT2,M = H'0100'.
. TXT2,C = Read events data request code:
TXT2,C = H'A8'.
. TXT2,L = Comprises the length of the transmission table in bytes:
TXT2,L = 4.
. Transmission table:
To read the events data received in the buffer of the Master module. The first two words in the transmission table should comprise the values of register words IW1,4 and IW1,5.
W15
W16 content of IW 1,4 content of IW 1,5
52
Additional Programming Information
3
Reception
Once the exchange is complete, the text block reception table (located after W0 with a length of 30 bytes) contains the events data received by the module. An answer field, the size of which is defined in bytes when the module is configured, is assigned to each logical channel that sends events data:
Data device 1
Data device 4
Data device 8
Data device 16
Data device 22
W0
W1
W2
W3
W4
W5
W6
W7
W8
W9
The number of bytes received is indicated by parameter TXT2,S that has a value of
TXT2,S = 20 (4 bytes per logical channel that has sent events data).
Report:
The report TXT2,R contains the value of the answer code once the exchange is complete. The report value is H'D8' if the exchange is correct or H'FD' if the exchange is incorrect.
3.3
Discrete Bits and Register Words
3.3-1 Discrete Bits
The TSX SCG 116 (RS-485 Uni-Telway) module does not have transmission bit control signals. The transmission validation signals used in RS-485 are controlled by the communication protocol and are used to switch the transmitter to high impedance in a user transparent manner.
53
3.3-2 Register Words
The register interface of TSX SCG 116 modules only comprise input registers:
These status words can only be accessed in read. They describe the operation of the module and channel 0.
5
6
7
8
Input registers
IWn,0
This status word is common to Uni-Telway Master or Slave operation contains data on complete module operation. These bits are significant at 1.
C
D
E
F
A
B
Bit
0
1
2
3
4
9
Function Description
Not assigned
Not assigned
Reserved
Module
Available
General fault
Indicates the end of the self-tests and consequently that the module is available (ready).
This bit goes to 1 whenever a fault appears, regardless of its cause.
Not assigned
Not assigned
Not assigned
Blocking fault
Module self-test in progress
A RAM, REPROM or internal logic fault. This fault permanently inhibits the module which must be replaced. This fault can also be caused by the lack of a 12V supply or by the 220V and 12V supplies not being switched on at the same time, especially when external supplies are used for some modules or components. Check that any other modules installed in front of the TSX SCG 116 module are supplied at the same time as the Micro-
PLC. The RUN and I/O LEDs on the front panel of the module indicate this fault.
Every time it is powered-up, the module runs a series of self-tests, indicated by this bit. The module is not available and cannot be programmed while the self-tests are in progress.
Not assigned
Module not configured
This bit is at 1 when channel 0 is not configured
Module in RUN mode Uni-Telway function
Reserved
Not assigned
Not assigned
54
Additional Programming Information
3
7
8
9
A
D
E
B
C
4
5
6
F
Bit
0
1
2
3
IWn,1
This status word is common to Uni-Telway Master or Slave operation. It contains data on complete module operation. These bits are significant at 1:
Description Function
Not assigned
Reserved
Not assigned
Channel 0 configuration
Adaptor code
Channel 0
0 if the channel is not configured
1 if the channel is configured
The type of adaptor fitted to the channel is coded in these three bits:
100 = RS-485 Uni-Telway adaptor
Not assigned
Not assigned
Not assigned
Not assigned
Not assigned
Not assigned
Not assigned
Not assigned
PWF At 1, this bit indicates a power return but is provided for information only.
It must be reset (by OWn,1,F) to accept another power return.
IWn,3 Master Module
Only bit 0 of this word is used. It is significant at 1.
IWn,3,0 : Indicates that at least one data link address has not replied before time-out.
IWn,4 Master Module
Indicates a change in state in the events data addressed by Slaves with a data link address from 1 to 16.
Wn,4,0 : Data modification at address 1,
IWn,4,1 : Data modification at address 2,
.....................................................................
.....................................................................
IWn,4,E : Data modification at address 15,
IWn,4,F : Data modification at address 16.
55
IWn,5 Master Module
Indicates a change in state in the events data addressed by Slaves with a data link address from 17 to 32.
IWn,5,0 : Data modification at address 17,
IWn,5,1 : Data modification at address 18,
.....................................................................
.....................................................................
IWn,5,E : Data modification at address 31,
IWn,5,F : Data modification at address 32.
IWn,3 Slave Module
Only bits 0 to 3 of this word are used. They are significant at 1.
IWn,3,0 : Indicates no polling on the line,
IWn,3,1 : Indicates that address Ad0 is not polled or not configured,
IWn,3,2 : Indicates that address Ad1 is not polled or not configured,
IWn,3,3 : Indicates that address Ad2 is not polled or not configured.
Other register words
The other register words are not used.
56
Additional Programming Information
3
3.4
Communication Example
3.4-1 General
The program described below is provided as an example of how to send data between TSX 17-20 PLCs connected to a Uni-Telway bus as shown below.
TSX 17-20/PL7-2
Micro-PLC
Master
Uni-Telway Bus
Ad0 = 1
Ad1 = 2
Ad2 not configured
Telemecanique Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Slave
Master device
A TSX 17-20 Micro-PLC fitted with:
. A PL7-2 V2.0 or higher Micro-software cartridge,
. A TSX DSF 635 I/O module at location 1,
. A TSX SCG 116 module at location 2.
Slave device
A TSX 17-20 Micro-PLC fitted with:
. A PL7-2 V2.0 or higher Micro-software cartridge,
. A TSX SCG 116 module at location 1.
Principle
Every second word W20, the image of the first 16 inputs of the Slave PLC, is transferred to word W10 of the Master PLC. This word then activates the outputs from the Master.
57
3.4-2 Master PLC
The configuration must be sent to the module on each power return (SY0 or SY1 at 1).
The transmission table located in constant words after CW0 comprises 5 words:
CW0 = H’5002’
CW1 = H’0000’
CW2 = H’9600’
CW3 = H’0010’
CW4 = H’0000’
Uni-Telway Master, polls 2 data link addresses,
9600 bps binary data exchange rate,
100 ms time-out,
No events data.
Text block TXT0 of the application program sends the configuration of the Master module when a power return is sensed (B0) and when the module is available (ready)
(IW2,0,3). The configuration parameters are:
TXT0,C = H’0040’ Configuration write request,
TXT0,M = H’0200’ Module location = 2, channel = 0,
TXT0,L = 10 Send a 5 word table (10 bytes).
Program
POWER
RETURN
?
Y
N
LABEL : 10 "POWER RETURN"
!SY0 B0 !
! !
! !
+-] [--+------+------+------+------+------+------+------+------+---( R )----+
! !
! !
!SY1 !
! !
+-] [--+
!
!
SEND
CONFIGURATION
TRANSFER
DATA RECEIVED
FROM OUTPUTS
LABEL : 20 "CONFIGURATION"
! t 0 B1 !
! +========+ !
+ -+ R D +--+------+------+------+------+------+---( )----+
! ! ! !
! !CW0 ! !
!B0 IW2,0, !<-->CPL ! !
! 3 ! ! !
+-]/[--+-]/[--+-+ S^ E +--+ +
! ! ! ! !
! ! ! ! !
! ! ! M=H0200! !
! ! ! ! !
+ +-+ O ! +
! ! ! ! !
! ! ! C=H0040! !
! ! !LG=10 ! !
! ! ! ! !
+ +-+ I ! +
! +========+ !
! !
LABEL : 30 "PROCESS DATA"
! B0 !
! !
+------+------+------+------+------+------+------+------+------+---( S )----+
! !
! !
! !
! +=======================+ !
+------+------+------+------+------+------+------+-+W10 -> 00,0[16] +-+
! +=======================+ !
! !
58
Additional Programming Information
3
3.4-3 Slave PLC
The configuration must be sent to the module on each power return (SY0 or SY1 at 1).
The transmission table located in constant words after CW0 comprises 5 words:
CW0 = H’6001’
CW1 = H’0000’
CW2 = H’9600’
CW3 = H’0010’
CW4 = H’0002’
Uni-Telway Slave, data link address Ad0 = 1,
9600 bps binary data exchange rate,
100 ms time-out,
Ad2 not configured, Ad1 = 2.
Text block TXT0 of the application program sends the configuration of the Master module when a power return is sensed (B0 = 0) and when the module is available
(ready) (IW1,0,3 = 1).
The configuration parameters are:
TXT0,C = H’0040’ Configuration write request,
TXT0,M = H’0100’ Module location = 1, channel = 0,
TXT0,L = 10 Send a 5 word table (10 bytes).
The application program must send the image of the inputs of the Slave PLC (W10) to the Master every second. The request is sent by Ad1 and text block TXT1 to the system gate of the Master.
The transmission table of text block TXT1 that sends the write word request comprises the destination address (Master PLC system gate) encoded in 5 bytes, followed by the request parameters (number or the word and contents to write).
The transmission table located after W16 comprises:
W16 = H’0000’
W17 = H’00FE’
W18 = H’0000’
W19 = 10’
W20 = I0,0 [16]
Network nbr./00,
Gate nbr./Station nbr.,
Channel nbr./Module nbr.,
Nbr. of the word to write,
Image of the first 16 inputs (values to send).
The parameters of the sender text block are:
TXT1,M = H’0166’ Module location = 1, Sender data link address = 2,
TXT1,C = H’0714’ Write word request code = H’14’,
TXT1,L = 10 Send 10 bytes (5 words).
59
Program
POWER
RETURN
?
Y
SEND
CONFIGURATION
N
INITIALIZE
TRANSMISSION
TABLE
SEND THE
REQUEST
EVERY
SECOND
LABEL : 10 "POWER RETURN"
!SY0 B0 !
! !
+-] [--+------+------+------+------+------+------+------+------+---( R )----+
! !
! !
!SY1 !
! !
+-] [--+
!
!
LABEL : 20 "CONFIGURATION"
! t 0 B1 !
! +========+ !
+ -+ R D +--+------+------+------+------+------+---( )----+
! ! ! !
! !CW0 ! !
!IW1,0, B0 !<-->CPL ! !
!3 ! ! !
+-] [--+-]/[--+-+ S^ E +--+ +
! ! ! ! !
! ! ! ! !
! ! ! M=H0100! !
! ! ! ! !
+ +-+ O ! +
! ! ! ! !
! ! ! C=H0040! !
! ! !LG=10 ! !
! ! ! ! !
+ +-+ I ! +
! +========+ !
! !
LABEL : 30 "TRANSMISSION TABLE"
! !
! +=======================+ !
+------+------+------+------+------+------+------+-+I0,0[16] -> W20 +-+
! +=======================+ !
! !
! !
! +=======================+ !
+------+------+------+------+------+------+------+-+10 -> W19 +-+
! +=======================+ !
! !
LABEL : 40 "TRANSMISSION TABLE"
! !
! +=======================+ !
+------+------+------+------+------+------+------+-+0 -> W16 +-+
! +=======================+ !
! ! !
! ! !
! +=======================+ !
+ +-+H'00FE' -> W17 +-+
! +=======================+ !
! ! !
! ! !
! +=======================+ !
+ +-+0 -> W18 +-+
! +=======================+ !
! ! !
! ! B0 !
! ! !
+ +-----+-----+---( S )----+
! +
LABEL : 50 "SEND REQUEST"
!I0,0 t 1 B3 !
! +========+ !
+-] [--+------+-+ R D +--+------+------+------+------+------+---( )----+
! ! ! !
! !W16 ! !
!TXT1,D SY6 !<-->CPL ! !
!3 ! ! !
+-] [--+-] [--+-+ S^ E +--+ +
! ! ! ! !
! ! ! ! !
! ! ! M=H0166! !
! ! ! ! !
+ +-+ O ! +
! ! ! ! !
! ! ! C=H0714! !
! ! !LG=10 ! !
! ! ! ! !
+ +-+ I ! +
! +========+ !
! !
60
Additional Programming Information
3
3.5
Read Objects Request
3.5-1 Data Shift
The object read request (code H’36’) enables access to simple objects (words, word strings, etc.).
The structure of this request is detailed in the Appendix of this manual.
When this request is sent, the user must specify the parameters of the sender text block (TXTi,C; TXTi,M; TXTi,L; etc.) along with its transmission table. The transmission table must comprise the following parameters:
. The segment that the request is addressed to,
. The type of object to read,
. The address of the first object to read,
. The number of objects to read.
Once the request has been processed by the destination device, it will send the type of object read and the requested data to the start of the sender’s text block reception table.
The structure of the sender’s text block is shown opposite (when reading words for example):
Wi
Wi + 1
Wi + 2
Wi + 3
1st. LSB
2nd. LSB
3rd. LSB etc...
Type of Object
1st. MSB
2nd. MSB
3rd. MSB
The data received is therefore shifted by one byte and encoded in two successive words.
The application program must therefore take into account the shift when processing the data received.
The data received can be shifted by using a word transfer operation where the source and destination indexes have the same values:
The result of transfer Wi[k]
→
Wi[k] is shown in the table opposite.
Wi
Wi + 1
Wi + 2
Wi + 3
1st. MSB
2nd. MSB
3rd. MSB
...
1st. LSB
2nd. LSB
3rd. LSB
...
Wi + K-1
...
Type of Object
...
...
61
62
X
Appendix
Sub-section
4.1 Performance Levels
4.2 List of Requests Supported by TSX Series 7 PLCs
4.2-1 Standard Requests
4.2-2 Specific Requests
4.3 Standard Requests
4.3-1 Read Objects
4.3-2 Write Objects
4.4 Specific Read Requests
4.4-1 Read a System Bit
4.4-2 Read the Memory Image of an I/O Bit
4.4-3 Read a Constant Word
4.4-4 Read a System Word
4.4-5 Read a Timer
4.4-6 Read a Monostable
4.4-7 Read a Counter
4.4-8 Read the Current Drum Controller Step
4.4-9 Read a Drum Controller Step
4.4-10 Read a Register
4.4-11 Read Grafcet Steps
4.5 Specific Write Requests
4.5-1 Write a System Bit
4.5-2 Write the Memory Image of an I/O Bit
4.5-3 Write a System Word
4.5-4 Write a Timer Preset
4.5-5 Write a Monostable Preset
4.5-6 Write a Counter Preset
4.5-7 Write a Register Input Word
4.5-8 Stop a Drum Controller
4.5-9 Move to the Next Drum Controller Step
4.5-10 Start a Drum Controller
4.6 Exchange Possibilities
Section 4
Page
64
65
65
66
71
71
72
74
75
76
77
78
79
80
81
82
67
67
69
83
83
84
85
86
87
88
89
90
91
92
93
63
4.1
Performance Levels
The overall response time from the transmission of a request to the reception of an answer depends on:
. The network cycle time,
. The software response time of the TSX SCG 116 module,
. The variation in synchronization between the client, network and server cycles.
Bus Cycle Time
The bus cycle time (BCT) corresponds to the time between two polls of the same network address. (Refer to Sub-section 4.3 of the Uni-Telway Bus Reference
Manual).
Module software response time
The module software response time of the TSX SCG 116 module is:
. 10 ms approx. (validity check and routing).
Difference between client, network and server cycles
The difference between the client, network and server cycles depends on:
- The cycle time of the Master PLC,
- The bus cycle time,
- The server cycle time (Slave PLC cycle time, etc.).
64
Appendix
4
4.2
List of Requests Supported by TSX Series 7 PLCs
4.2-1 Standard Requests
Family Service
Data
(Read)
Read a Bit (*)
Request Confirm
Hex. Dec. Hex. Dec.
Description
00 00 30 48 Reads a bit (B)
Data
(Write)
Unsolicited
Data
Operating
Modes
Read a Word (*)
Read Objects
Write a Bit (*)
Write a Word (*)
Write Objects
Unsolicited Data (*)
RUN (*)
STOP (*)
04 04 34 52 Reads a word (W)
36 54 66 102 Reads objects (bits, words, word, strings, etc.).
10 16 FE 254 Writes a bit (B)
14 20 FE 254 Writes a word (W)
37 55 FE 254 Writes objects (bits, words, bit or word strings, etc.).
FC 252 X X Sends data without receiving a request first.
24 36 FE 254 Sets a device to Run.
25 36 FE 254 Sets a device to Stop.
(*) Standard requests are described in detail in the Appendix of the Uni-Telway
Bus Reference Manual (TSX D24 004E).
65
4.2-2 Specific Requests
Service
Read a System Bit
Read the Memory Image of an I/O Bit
Read a Constant Word
Read a System Word
Read a Timer
Read a Monostable
Read a Counter
Read the Current Drum Controller Step
Read a Drum Controller Step
Read a Register
Read a Grafcet Step
Write a System Bit
Write the Memory Image of an I/O Bit
Write a System Word
Write a Timer Preset
Write a Monostable Preset
Write a Counter Preset
Write a Register Input
Stop a Drum Controller
Move to the Next Drum Step
Start Drum Controller
Request Confirm
Hex. Dec. Hex. Dec.
Description
05
06
01
02
01
02
05
06
31
32
35
36
49
50
53
54
Reads a system bit (SY).
Reads the image of an I/O bit.
Reads a constant word (CW).
Reads a system word (SW)
09 09 39 57 Reads the parameters of a timer
(T).
0A 10 3A 58 Reads the parameters of a monostable (M).
0B 11 3B 59 Reads the parameters of a counter (C).
0C 12 3C 60 Reads a drum controller (D).
0D 13 3D 61 Reads a drum controller (D).
0E 14 3E 62 Reads the parameters of a register (R).
2A 42 5A 90 Reads a Grafcet step (Xi).
15
17
11
12
18
17 FE 254 Writes a system bit (SY).
18 FE 254 Writes the image of an I/O bit.
21 FE 254 Writes a system word (SW).
23 FE 254 Writes a timer preset (T).
24 FE 254 Writes a monostable preset
(M).
26
27
19 25 FE 254 Writes a counter preset (C).
1A 26 FE 254 Writes a register input (R).
28
38 FE 254 Stops a drum controller (D).
39 FE 254 Moves to the next drum controller step (D).
40 58 88 Starts a drum controller (D).
66
Appendix
4
4.3
Standard Requests
4.3-1 Read Objects
This request permits reading of simple objects (words or bit strings etc.).
Request format
Request code
Hex.
Category code
Segment
Type of object
36/54
Object
Address
Segment
Type of object
Object addres
Number of objects to read
: Specifies the addressing mode used for the objects to be read and the position where they are located (in hexadecimal notation).
The segments accessible by TSX Series 7 PLCs are
(in hexadecimal notation):
10 : Common object segment,
68 : Internal word space.
: Specifies the object to read:
7 : a 16-bit signed integer.
: .
The physical or logical address in the segment,
.
The sequence number of the object in the segment:
- 0 : The current date and time, in the common segment,
- 1 : The stored time and date, in the common segment.
Confirm format
Positive confirm
Confirm code
Hex.
Type of object
66/102
Type of object
Data
: Returns the type of object selected when the request is sent.
67
Read objects (contd)
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Unknown segment or object,
.
Address out of range,
.
Too many objects for the reception buffer.
Request Examples
Read words
Segment
Type of object
Object address
: 68,
: 7
→
Wi,
: index of the first Wi to read.
Read Date and Time
Segment
Type of object
Object address
Quantity
: 10 (common),
: 0 by default,
: 0
→ current time and date,
: 1
→ saved time and date,
: 0 by default.
68
Appendix
4
4.3-2 Write Objects
This request writes simple objects (words, word strings, etc.).
Request format
Request code
Hex.
Category code
Segment
Type of object
37/55
Object address
Number of objects to write
Data
Segment
Type of object
Object address
: Specifies the addressing mode and the addressing field.
10 : Common object segment,
68 : Internal word space.
: Specifies the object to write:
7 : a 16-bit signed integer.
: .
The physical or logical address in the segment,
.
The sequence number of the object in the segment:
- 0 : The current date and time, in the common segment,
- 1 : The stored time and date, in the common segment.
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
69
Write Objects (contd)
Negative confirm (contd)
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
Unknown object,
.
Address of the last object out of range.
Request Examples
Write words
Segment
Type of object
Object address
Quantity
Data
: 68,
: 7
→
Wi,
: index of the first Wi to write,
: number,
: table of n objects,
Write Date and Time
Segment
Type of object
Object address
Quantity
Data
: 10 (common),
: 0 by default,
: 0
→ current time and date,
: 0 by default,
: 17 ASCII characters that contain the time and date information:
YYYYMMDDHHMMSS.TZ
(T: tenths of a second, Z: trailer).
70
Appendix
4
4.4
Specific Read Requests
4.4-1 Read a System Bit
This request reads a system bit SY.
Request format
Request code
Hex.
Category code
System bit number
01/01
Confirm format
Positive confirm
Confirm code
Hex.
Value
31/49
Value : Comprises a string of 8 bits, where the address of the first bit is the largest multiple of 8 contained in the system bit number that is to be read.
Only the bit corresponding to the bit to be found is significant.
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Bit number out of range.
71
4.4-2 Read the Memory Image of an I/O Bit
This request reads the memory image generated by an I/O module.
Request format
Request code
Hex.
Category code
02/02
Module number
Confirm format
Positive confirm
Confirm code
Hex.
Fault object
Configuration
Reserved Reserved Reserved Reserved
Nbr.
of output bits
Value of output bits
32/50 00 0F 00 1F 10
Nbr.
of input bits
20
Value of input bits
Nbr.
of output bit
10
Output bit forcing list
Nbr.
of input bits
20
Input bit forcing list
Fault Code : Bit 7
Bit 6
= Fault: (0 = no, 1 = yes),
= 1 if extended format confirm,
Bits 5 and 4 = 0,
Bits 0 to 3 = Type of fault:
0000 : OK,
0001 : OK, minor fault present,
0010 : module absent,
0011 : module failure,
0100 : not an I/O module,
0101 : incompatible with configuration,
0110 : module not required,
0111 : not used,
1000 : not used.
72
Appendix
4
Read the Memory Image of an I/O Bit (contd)
Configuration: bit 7 bit 6 bits 0 to 5
= module presence required (0 = no, 1 = yes),
= 0 (reserved),
= module code,
(if module presence is required: bit 7 = 1),
Configuration = 0, if no configuration is declared.
Number of output bits:
The TSX 17-20 Micro-PLC always returns the maximum number of output bits (16 or H'10').
Value of the output bits:
The value of the module output bits. If the module comprises
8 or 16 outputs, the unused bits take null or insignificant values.
Number of input bits:
The TSX 17-20 Micro-PLC always returns the maximum number of input bits (32 or H'20').
Value of the input bits:
The value of the input bits from the module. If the module comprises 12, 22 or 24 inputs, the unused bits comprise null or insignificant values.
Output bit forcing list:
Output bit forcing status:
.
0 the bit is not forced,
.
1 the bit is forced, its forcing status is found in the output bit value parameter.
Input bit forcing list:
Input bit forcing status:
.
0 the bit is not forced,
.
1 the bit is forced, its forcing status is found in the input bit value parameter.
Negative confirm
Confirm code
Hex.
FD/253
Reasons for rejection: .
Unknown request,
.
Module number out of range.
73
4.4-3 Read a Constant Word
This request reads constant words (CW).
Request format
Request
Code
Hex.
Category code
Word number
05/05
Confirm format
Positive confirm
Confirm code
Hex.
Value
35/53
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Word number out of range.
74
4.4-4 Read a System Word
This request reads system words (CW).
Request format
Request code
Hex.
Category code
Word number
06/06
Confirm format
Positive confirm
Confirm code
Hex.
Value
36/54
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Word number out of range.
Appendix
4
75
4.4-5 Read a Timer
This request reads all of the parameters of a timer.
Request format
Request code
Hex.
Category code
09/09
Timer number
Confirm format
Positive confirm
Confirm code
Hex.
Time base
Timer timedout
Timmer running
Type of preset
39/57
Time base
Timer timed-out
Timer running
Type of preset
Preset value
Current value
: 0 → 10 ms
1 → 100 ms
2 →
3 →
1 sec.
1 min.
: 0 → no
1 → yes
: 0 → no
1 → yes
: 0 → preset cannot be modified,
1 → preset can be modified.
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Timer number out of range,
.
RAM cannot be executed.
76
4.4-6 Read a Monostable
This request reads all of the parameters of a monostable.
Request format
Request code
Hex.
Category code
0A/10
Monostable number
Confirm format
Positive confirm
Confirm code
Hex.
Time base
Monostable running
Type of preset
3A/58
Preset value
Current value
Time base
Monostable running
Type of preset:
: 0 → 10 ms
1 → 100 ms
2 →
3 →
1 sec.
1 min.
: 0 → no
1 → yes
0 → preset cannot be modified
1 → preset can be modified
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Monostable number out of range,
.
RAM cannot be executed.
Annexes
4
77
4.4-7 Read a Counter
This request reads all of the parameters of a counter.
Request format
Request code
Hex.
Category code
Counter
Number
0B/11
The fast counter is numbered counter 31.
Confirm format
Positive confirm
Confirm code
Hex.
Downcount
Overflow
Upcount overflow
Counter
Running
Type of preset
3B/59
Preset value
Current value
Downcount overflow
Upcount overflow
Counter running
Type of preset
: 1 if the current counter value has gone from 0 to
9999,
: 1 if the current counter value has gone from 9999 to 0,
: 0 → no,
1 → yes,
: 0 → preset cannot be modified,
1 → preset can be modified.
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Counter number out of range,
.
RAM cannot be executed.
78
4.4-8 Read the Current Drum Controller Step
This request reads all of the parameters of a drum controller.
Request format
Request code
Hex.
Category code
0C/12
Drum number
Confirm format
Positive confirm
Confirm code
Hex.
Time base
Drum full
Duration of step in progress
3C/60
Drum length in steps
Current step number
Value of the current step
Appendix
4
Time base
Drum full
: 0 → 10 ms,
1 → 100 ms,
2 →
3 →
1 sec.,
1 min.
: Indicates that the last step defined is being executed.
0 → no,
1 → yes.
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Drum controller number out of range,
.
RAM cannot be executed.
79
4.4-9 Read a Drum Controller Step
This request reads the parameters of any step of a drum controller.
Request format
Request code
Hex.
Category code
Drum number
0D/13
Step number
Confirm format
Positive confirm
Confirm code
Hex.
Time base
Drum full
Duration of step in progress
3D/61
Drum length in steps
Current step
Value of the required step
Time base
Drum full
: 0 → 10 ms,
1 → 100 ms,
2 →
3 →
1 sec.,
1 min.
: Indicates that the last step defined is being executed.
0 → no,
1 → yes.
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Drum number out of range,
.
Step number out of range,
.
RAM cannot be executed.
80
4.4-10 Read a Register
This request reads all of the parameters of a register.
Request format
Request code
Hex.
Category code
Register number
0E/14
Confirm format
Positive confirm
Confirm code
Hex.
Register type
Register empty
Register full
3E/62
Register type
Register empty
Register full
Register length
Input word
: 0 = FIFO register,
1 = LIFO register,
: 0 = no,
1 = yes,
: 0 = no,
1 = yes.
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Register number out of range,
.
RAM cannot be executed.
Output word
Appendix
4
81
4.4-11 Read Grafcet Steps
This request reads the Grafcet step activity bits (Xi).
Request format
Request code
Hex.
Category code
Portion number
2A/42
Portion number: 0 = portion [X0
● ● ● ● ●
X127]
Confirm format
Positive confirm
Confirm code
Hex.
5A/90
Data
Register type : A succession of 128 bits corresponding to the step number in the selected portion: bit i = 0: step Xi inactive, bit i = 1: step Xi active.
The TSX 17-20 Micro-PLC will only allow 96 Grafcet steps, therefore bits X96 to
X127 are always at 0.
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Portion number out of range,
.
No reservation.
82
4.5
Specific Write Requests
4.5-1 Write a System Bit
This request writes a system bit SY...
Request format
Request code
Hex.
Category code
11/17
System bit number
Bit value
Bit value : 0 or 1.
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
Bit number out of range,
Appendix
4
83
4.5-2 Write the Memory Image of an I/O Bit
This request writes the memory image of an I/O module. As memory image processing is used, no check is made to ensure that the module exists.
Request format
Request code
Hex.
Category code
I/O module number
12/18
Input or output selection
I/O bit number
Bit value
I/O module number:
Bits 0 to 7: Logical module number (0 to 3),
Bit 15 must always be at 1.
Input or Output selection:
0 : Outputs,
1 : Inputs.
I/O Bit number: 0 → 15 : for outputs,
0 → 31 : for inputs,
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
I/O module number out of range,
.
I/O bit number out of range.
84
4.5-3 Write a System Word
This request writes a system word (SW..).
Request format
Request code
Hex.
Category code
System word number
15/21
Value
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
System word number out of range.
Appendix
4
85
4.5-4 Write a Timer Preset
This request writes the preset value of a timer (T) if it can be modified.
Request format
Request code
Hex.
Category code
Timer number
17/23
Preset value
Preset value
: Between 0 and 9999 (H'00' to H'270F' inclusive).
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Timer number out of range,
.
Preset cannot be modified,
.
Preset value out of range,
.
Cannot execute RAM.
86
Appendix
4
4.5-5 Write a Monostable Preset
This request writes the preset value of a monostable (M), if it can be changed.
Request format
Request code
Hex.
Category code
System word number
18/24
Preset value
Value
: Between 0 and 9999 (H'00' to H'270F') inclusive.
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Monostable number out of range,
.
Preset cannot be changed,
.
Preset value out of range,
.
Cannot execute RAM.
87
4.5-6 Write a Counter Preset
This request writes the preset value of a counter.
Request format
Request code
Hex.
Category code
Counter number
19/25
Preset value :
Value
Between 0 and 9999 (H'00' to H'270F') inclusive.
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Counter number out of range,
.
Preset cannot be modified,
.
Preset value out of range,
.
Cannot execute RAM.
88
4.5-7 Write a Register Input Word
This request writes a register input word (R).
Request format
Request code
Hex.
Category code
1A/26
Register number
Imput word value
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
Register number out of range,
.
Cannot execute RAM.
Appendix
4
89
4.5-8 Stop a Drum Controller
This request stops a drum controller.
Request format
Request code
Hex.
Category code
Drum controller
Number
26/38
Step number
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
Drum controller number out of range,
.
Step number out of range,
.
Cannot execute RAM,
.
No reservation.
90
Appendix
4
4.5-9 Move to the Next Drum Controller Step
This request moves a drum controller to the next step and updates the order bits.
Request format
Request code
Hex.
Category code
Drum number
27/39
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
No reservation,
.
Drum controller number out of range,
.
Cannot execute RAM.
91
4.5-10 Start a Drum Controller
This request starts a drum controller.
Request format
Request code
Hex.
Category code
28/40
Drum number
Confirm format
Positive confirm
Confirm code
Hex.
FE/254
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection : .
Unknown request,
.
Inadequate access rights,
.
Drum controller number out of range,
.
Cannot execute RAM,
.
No reservation.
92
Appendix
4
4.6
Exchange Possibilities
Communication between Slave devices connected to different Uni-Telway busses is possible. Communication can be established with the Master PLC in Run or Stop, with or without an application program loaded.
Addressing example
TSX 17-20/PL7-2
Micro-PLC
Module locations
1 3
TSX 17-20/PL7-2
Micro-PLC
Ad0 = 4
Ad1 = 5
Ad2 = 6
Telemecanique
Master Master
Telemecanique
TSX SCA 62
Telemecanique
Uni-Telway Bus
TSX SCA 62
Ad0 = 2
Ad1 = 3
Ad2 = 4
Telemecanique
TSX 17-20/PL7-2
Micro-PLC
Slave Slave
The destination address (e.g., the system gate) is encoded in 5 bytes at the start of the sender’s transmission table. In the example shown above, the 5 bytes are:
Network nbr = H’00’,
Station nbr.
= H’FE’,
Gate nbr.
= H’05’
Module nbr.
= H’01’
Channel nbr.
= H’68’
Access to a Uni-Telway module,
Location of the Master module of the second
Uni-Telway bus, target of the exchange,
Destination address (Ad0 + H’64’).
93
94
பதிவிறக்கு
விளம்பரம்