Schneider Electric TSX17ACC5 Adapter module UNI-TELWAY Bus User Guide
Pubblicità
Pubblicità
X
Section
1 Presentation
Contents
1.1 General
1.2 Hardware Installation
2 Software Installation
Contents
2.1 Principles
2.2 Examples of Communication Between PLCs
2.3 Application Example
2.4 Additional Programming Information
3 Appendix
Contents
3.1 Performance Levels
3.2 Requests Supported by TSX Series 7 PLCs
3.3 Standard Requests
3.4 Specific Read Requests
3.5 Specific Write Requests
3.6 Exchange Possibilities
General Contents
Page
3
4
9
13
14
28
38
44
51
55
67
47
48
49
77
1
2
X
Presentation
Section 1
Sub-section
1.1 General
1.1-1 Overview
1.1-2 Reminders
1.1-3 Exchanges Between PLCs and XBT Terminals
1.1-4 Exchanges Between PLCs and Sensors and Actuators
1.1-5 Exchanges Between PLCs
1.2 Hardware Installation
1.2-1 Hardware Description
1.2-2 Connection to the Uni-Telway Bus
1.2-3 Connecting the Programming Terminal
1.2-4 Using the programming port on the TSX 17-20 PLC
Page
4
4
7
8
5
6
9
9
10
11
12
3
1.1
General
1.1-1 Overview
The Uni-Telway industrial bus is the standard means of communication between
Telemecanique 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 PLC:
Devices such as ATV45 speed drives, LT8 protection relays, ASN specialized couplers, numerical controls.
TSX
TSX 47-30
ALTIVAR 45
ATV 45
Speed drive
TSX 17-20/PL7-2
Micro-PLC
NUM 760
Numerical controller
NUM 760
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 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 TSX Series 7 PLC equipped with a TSX SCM 21.6 (for TSX 47/67/
87 PLCs) or a TSX SCG 116 (for TSX 17-20 PLCs) serial communication module.
. 1 to 27 Slaves
4
Presentation
1
The services available depend on the devices connected. Services are accessed through a standard or specific question and answer dialog.
Standard requests are described in the Uni-Telway Reference Manual. Requests that are specific to TSX-17 PL7-2 Micro-PLCs are described in the Appendix of this manual.
Operating Modes
The Micro-PLC is a Slave supporting Client and/or Server status.
The TSX 17-20 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.
1.1-2 Reminders
CLIENT: The device that initiates communications. It asks questions (reads), sends answers (writes) or orders (Run, Stop, etc.).
SERVER: 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).
Request
TSX 7 PLC
TXT
SYSTEM
Request
XBT-B8
SLAVE
CLIENT
Confirm MASTER
SERVER CLIENT
Confirm
TSX 17-20 PLC
TXT
SYSTEM
Request
SLAVE
SERVER CLIENT
Confirm
ATV 5
SLAVE
SERVER
Important: Being a Client or a Server is completely separate from the master/slave relationship on the bus.
5
1.1-3 Exchanges Between PLCs and XBT Terminals
TSX 87-30 PLC
TSX
Telemecanique
TSX SCM 62
Telemecanique
TSX CSC015
TSX 17-20/PL7-2
Micro-PLC
TSX 17 ACC5
Adapter
XBT B8
TSX 87-30 The TSX SCM 21.6 module is the data link master. The PLC system is a server that answers requests from Monitor 77 and XBT terminals.
TSX 17-20 A slave with client status from its application program or server status from its system.
XBT-B8 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.
6
Presentation
1
1.1-4 Exchanges Between PLCs and Sensors and Actuators
TSX 87-30 PLC
TSX
VW3 A45 103
Coupler
Télémécanique
ATV 45
ALTIVAR 45
TSX SCA 62
TSX SCA 60
TSX SCA 50
Telemecanique Telemecanique Telemecanique
TSX 17-20/PL7-2
Micro-PLC
TSX 17 ACC5
PLC
ATV45
The TSX SCM 21.6 module in the TSX 87-30 is the data link master.
The TSX 17 ACC5 Adapter on the TSX 17-20 is a slave.
Their application programs, via the text blocks are clients that can:
.
start and stop the ATV45,
.
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, that can provide the PLC with various types of information:
.
mains voltage,
.
stator current,
.
rotation frequency,
.
thermal status,
.
etc.
7
1.1-5 Exchanges Between PLCs
TSX 87-30 PLC
TSX
Telemecanique
TSX
TSX 47-30 PLC
TSX SCA 62
TSX CSC 015
Telemecanique
TSX 17-20/PL7-2
Micro-PLC
Telemecanique
TSX 17 ACC5
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 17-20 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.
8
Presentation
1
1.2
Hardware Installation
1.2-1 Hardware Description
Connection to a Uni-Telway Bus requires:
2
1
5
3
4
A TSX 17 Micro-PLC with a PL7-2 language software cartridge, Ref. number TSX P17 20F., comprising:
1 power supply,
2
3 processor with programming port (15-pin connector), processor status indicator,
4
5
24K byte RAM program memory (and 2K bytes of data when using PL7-2 language) that can be battery backed-up, location for the plug-on PL7-2 language cartridge.
4
3
6
5
2
1
An adapter module (Ref. TSX 17 ACC5) that connects the Micro-PLC to the Uni-Telway bus via the programming port, comprising:
1 0.90 meter cable that is used to connect the TSX 17 ACC5 adapter to the programming port of the PLC,
2 9-pin connecter, that connects to the programming port of the PLC,
4
5
3
6 indicator LED that indicates when the module is connected to the PLC's programming port, connecter to connect by cable directly to the Uni-Telway bus,
15-pin connecter that is used to connect the adapter to a TSX SCA 62 subscriber socket and the Uni-Telway bus, ground connecter for grounding the device.
There are two ways of connecting a TSX 17 ACC5 adapter:
9
1.2-2 Connection to the Uni-Telway Bus
Connection to the TSX 17-20 PLC can be made in two ways:
. by standard connection via a TSX SCA 62 subscriber socket and a
TSX CSC 015 cable (length 1.5 meters) that connects to the 15-pin connector on the top of the TSX 17 ACC5 Adapter module.
TSX CSC 015
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
The address coding of a TSX 17-20 Micro-
PLC on a Uni-Telway bus is defined by software configuration. The settings of the microswitches located in the subscriber sockets are overridden.
TSX 17 ACC5
(*)
(*) Cable supplied with TSX 17 ACC5 adapter
When a TSX 17-20 Micro-PLC is located at the end of the line, the line adapter jumper must be set to ON refer to the Uni-Telway Bus Reference Manual
(TSX D24 004E).
. by specific connection directly to the Uni-Telway bus via the screw connecters on the terminal block of the TSX 17 ACC5 adapter module. This type of connection is difficult to implement and requires strict observation of the wiring precautions when making the connections including cutting power to the PLC and the Adapter, to the Uni-Telway bus and all devices connected to it, for the entire duration of wiring operations.
Uni-Telway Bus
Blue
White
Red
White
TSX 17-20/PL7-2
Micro-PLC
Blue
White
Red
White
Shield Shield
TSX 17 ACC5
(*)
OVL OVL D(A) D(B)
UTW ADAPTER
(*) Cable supplied with the TSX 17 ACC5 adapter.
TSX 17 ACC5
Important, for specific connections:
The TSX 17 ACC5 adapter does not ensure end of line termination and impedance adaptation. Therefore, never install a TSX 17-20 PLC as the last device on the Uni-Telway bus.
10
Presentation
1
1.2-3 Connecting the Programming Terminal
For connected mode operation, e.g. programming or debug, the TSX T407 terminal must be connected to the TSX 17-20 Micro-PLC via the TSX 17 ACC7 Adapter that provides its power supply and performs line adaptation between current loop and
RS-485.
TSX T407 or TSX T607 Terminals
These terminals are connected to the Micro-PLC via the the TSX 17
ACC7 adapter. The adapter can be fitted over the programming port and attached to the Micro-
PLC (as shown opposite) or connected by a TSX CTC 03 cable, between the adapter and the Micro-PLC.
Telemecanique
TSX 17 ACC7
Adapter
IBM PC-PS/2 Micro Computer
To connect an IBM micro computer to a TSX 17 Micro-PLC, use the TSX 17 ACC PC connection kit.
TSX 17 ACC7 connection
Important
When the TSX 17-20 Micro-PLC is connected to a Uni-Telway bus via a
TSX 17 ACC5 Adapter, a TSX T407 programming terminal cannot be connected to it.
Therefore, when a TSX T407 programming terminal is connected, the
TSX 17-20 Micro-PLC cannot be connected to the Uni-Telway bus.
11
1.2-4 Using the Programming Port on the TSX 17-20 PLC
To use the programming port for connecting to a Uni-Telway bus and to a terminal, follow the set-up procedure described below:
. Step 1 Programming and debugging the application
TSX T407 Terminal
TSX T607 Terminal
TSX 17 ACC7
IBM PC-PS/2
Micro computer
TSX 17 ACC PC
. Step 2 Using the application with a Uni-Telway bus.
TSX 17-20
Programming port
Uni-Telway Bus TSX 17 ACC5 TSX 17-20
Programming port
. Step 3 Adjust and Diagnostics
- with Uni-Telway Bus Connected:
Uni-Telway Bus
Telemecanique Telemecanique
TSX 47-30
Telemecanique
TSX TS4 31
Cartridge
TSX 17 ACC5
TSX 17-20
TSX
Master
Slave
TSX T407
A TSX T407 terminal fitted with the TSX TS4 31 adjustment cartridge and connected to the programming port of the Uni-Telway bus Master PLC can perform adjust and diagnostics functions on the TSX 17-20 PLC and diagnostics on the Uni-Telway bus.
- with Uni-Telway Bus Disconnected:
The TSX T407 terminal is connected to the Micro-PLC as described on the previous page. All local mode adjust and diagnostics functions are available.
12
X
Software Installation
Section 2
Sub-section
2.1 Principles
2.1-1 Configuring the TSX ACC5 Adapter
2.1-2 Using a Text Block
2.1-3 Exchanges Between PLCs and Sensors and Actuators
2.1-4 Exchanges Between PLCs
2.1-5 Limits to Operation
2.1-6 Communication via Telway 7
2.2 Examples of Communication Between PLCs
2.2-1 Slave to Master (System Gate) Exchange
2.2-2 Master to Slave (Text Block) Exchange
2.2-3 Slave to Master (Application) Exchange
2.2-4 Slave to Slave (System Gate) Exchange
2.2-5 Slave to Slave (Text Block) Exchange
2.3 Application Example
2.3-1 Presentation
2.3-2 Application Description
2.3-3 Slave B
2.3-4 Slave A
2.4 Additional Programming Information
2.4-1 Broadcast Messages
2.4-2 Events
28
29
31
33
35
36
38
38
38
39
40
Page
14
14
16
19
20
25
26
44
44
45
13
2.1
Principles
2.1-1 Configuring the TSX 17 ACC5 Adapter
The TSX 17-20 Micro-PLC has two link addresses on the Uni-Telway bus:
. Server and line monitoring application address (Ad0)
This address is assigned by software configuration. It allows access to the Micro-
PLC's system (adjust, debug, etc.). All requests received on this address are sent to the system gate of the PLC that is the destination of the exchange. This address also enables the reception of unsolicited data from other devices on the Uni-
Telway bus (using request H'FE'). The mess ages received on the address are sent to the application program and a text block that is set to receive.
. Client application address (Ad1)
This address is assigned automatically and follows address Ad0. It is controlled by the application program of the slave module (text block). It enables messages to be sent to any other address on the Uni-Telway bus (system gate or text block in the master or in another slave PLC or any other device) and the reception of related confirms or answers.
The modification of addresses Ad0, Ad1 and the binary data flow is performed by changing the configuration of the programming port of the TSX 17-20 Micro-PLC.
Entering another configuration requires a TSX T407, TSX T607 programming terminal or an IBM PC-PS/2 micro-computer with PL7-2 programming software for use with TSX 17-20 Micro-PLCs.
Uni-Telway mode configuration example with TSX T407 terminal
Access to the configuration of the programming port of the TSX 17-20 Micro-PLC is gained from the mode selection screen by pressing the following dynamic soft keys:
RUN
TSX 17-20
ADJ PRG DBG TRF HELP ./.
PRG
Allows access to Program mode,
LAD : ladder diagram
FST : fast processing
CNF : configuration
LAD FST CNF
INT
./.
CNF
Allows access to the main configuration mode screen.
STOP
I/O : inputs/outputs
SAV : power save
LIN : terminal connect
COMi,j = 4 NCW = 128
I/O SAV LIN COM NCW CWi
14
Software Installation
2
LIN
BAUD
ADR
Note:
CAR
UTW
Enables access to PLC programming port configuration modification. When using a
TSX 17-20, the programming port can be configured for connection to a Uni-Telway bus or a peripheral in character mode.
LIN
TSX <-> UNITW
BAUD : 9600
PRTV : ODD
ADR : 0
INT
DATA : 8
STOP : 1
CAR BAU ADR
The transmission speed (baud rate) of the line used to transmit data is configured by repeated pressure on the baud key. The transmission speeds that can be selected are 300, 600, 1200, 2400, 4800 or 9600 bits/second.
The transmission speed selected must be the same for all devices connected to the Uni-Telway bus (normally 9600 Bits/second).
Pressing this key allows the user to enter the data link address (Ad0) of the PLC connected to the Uni-Telway bus. The entry is validated by pressing <ENT>. The other addresses on the bus are set automatically by incrementation (Ad1 = Ad0+1). The value of the Ad0 data link address must be between 1 and 151.
The character format cannot be modified in Uni-Telway mode. The selected values are:
. DATA = 8 data bits,
. STOP = 1 stop bit,
. PRTY = ODD (odd parity).
Pressing this key allows the user to configure the programming port of the PLC in character mode.
CAR
TSX <-> CARACT
BAUD : 9600
PRTV : ODD
ECHO : NO
INT
DATA : 8
STOP : 1
UTW BAU PAR ECO DAT STO
Pressing this key allows the user to configure the programming port of the PLC in
Uni-Telway mode.
UTW
I m p o r t a n t
A new configuration only becomes effective after the PLC is initialized.
15
2.1-2 Using a Text Block
When a TSX 17-20 Micro-PLC slave is only a server on the Uni-Telway Bus, communication is performed automatically without requiring a specific application program.
When a client slave PLC needs to send a request, it is sent through a text block.
Request structure and text block utilization is described below.
Communication is essentially performed via a question and answer dialog referred to as Request/Confirm.
Request structure
A request comprises 32 bytes:
. the request code (one byte),
. the category code (one byte),
. parameters and/or data limited to 30 bytes.
Request code
Category code
Confirm structure
A confirm comprises 32 bytes:
. the confirm code (one byte),
. parameters and/or data limited to 31 bytes.
Data
Confirm code
Data
The request is sent by the application program from the Client TSX 17-20 PLC by text block. This Coupler type text block (set 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 on the next page.
16
Software Installation
2
Transmission
Request code
Category code
Byte Byte Word
Transmission table
1st. word
2nd. word
TxTi,C = H' 07 '
Note: The category code must always take the value H'07'.
TXTi,C The least significant byte comprises the request code. The most significant byte comprises the category code and always takes the value H'07'.
Examples:
TXTi,C = H'07FC' corresponds to the "unsolicited data" request. No confirm will be sent by the destination device. The destination can be a text block in another slave device or the TSX SCM 21.6 that is the Uni-
Telway bus master.
TXTj,C < > H'07FC' corresponds to a standard or specific request that requires a confirm from the destination. The destination device can be the system gate of the master PLC or a slave.
TXTi,M The LSB comprises the physical location of the exchange destination device.
In Uni-Telway mode, the MSB always takes the value H'00'.
Examples:
TXTi,M = H'0000' corresponds to the bus master module at data link address 1.
TXTj,M = H'0004' corresponds to the device at data link address 4.
TXTi,L Comprises the length of the transmission table (in bytes).
17
Reception
Confirm code
Byte Byte Word
Transmission table
1st. word
2nd. word
TxTi,R = H' 00 '
TXTi,M On reception of a message, the LSB comprises the data link address of the request sender device.
In Uni-Telway mode, the MSB always takes the value H'00'.
Examples:
TXTi,M = H'0000' corresponds to reception of a message from bus master.
TXTj,M = H'0008' corresponds to reception of a message from the device with data link address 8 on the bus.
TXTi,R Takes the value H'00FC'if the text block receives the unsolicited data request.
It takes the value of the exchange confirm if it originated the request.
TXTi,S Contains the number of bytes received in the text block reception table, if the exchange was correct. If an exchange error occurs, TXTi,S takes the following values:
1 :
2 :
3 :
11 : exchange cancelled by Reset, transmission table length error, message refused, text block type not supported.
18
Software Installation
2
2.1-3 Exchanges Between PLCs and Sensors and Actuators
Reading the velocity reference of an ATV45 speed drive.
TSX SCA 50
Telemecanique TSX SCA 62
Uni-Telway Bus
TSX SCA 60
Telemecanique
TSX CSC 015 TSX 17-20/PL7-2
Micro-PLC
VW 3
A45 103
ATV 45
ALTIVAR 45
TSX 17 ACC5
Ad0 = 2
Ad1 = 3
Data
. ATV45:
. Velocity reference = W193
. Data link address = 1
(see ATV45 documentation).
. Read word request:
. request code = H'04' (see list of services)
. parameter = number of the word to read.
. Text block:
. The request is sent by application program text block TXT2.
. Start of the transmission table = W31.
. Start of the reception table = W0.
Transmission
. Text block:
. TXT2,C = H'0704'
. TXT2,M = H'0001'
. TXT2,L = 2
. Transmission table: category code = H'07', request code H'04'.
destination link address = 1, length (in bytes) of the transmission table.
W31 = 193 number of the word to read.
Reception
. Text block:
. TXT2,R = H'34'
. TXT2,D = 1
. TXT2,E = 0
. Transmission table: correct exchange confirm.
W0 = 400 (velocity reference = 40 Hz).
The ATV45 documentation specifies that the velocity reference is expressed with a time-base of 0.1 Hz.
19
2.1-4 Exchanges Between PLCs
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 the various possibilities for dialog between a master PLC and slave PLCs:
(*)
(**)
MASTER PLC
Text block
System gate
Text block
Application
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.
This type of exchange is described in the TSX SCM 21.6 User's Manual (TSX D24 005E).
TSX 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
TSX 17 ACC5
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
TSX 17 ACC5
20
Software Installation
2
Addressing
Two data link addresses can be assigned to a slave TSX 17-20 PLC:
. Address Ad0 (system address and line monitoring application),
. Address Ad1 (client application address),
Logical entities
(slave PLC processor)
Uni-Telway bus link address
.
Answers questions
. Receives the "unsolicited data" request
S Y S T E M A d 0
. Sends questions to a server device on the
Uni-Telway bus
C L I E N T
A P P L I C A T I O N
A d 1
Access to the system gate is always available through address Ad0. This address is defined by configuration.
Access to the client application address (Ad1) is optional. This address is automatically defined when the address Ad0 is configured (Ad0 = Ad0+1).
Master to slave exchange
MASTER
PLC TSX SCM 21
SYSTEM
APPLIC.
TxTi a b Ad0
Ad1
SLAVE
PLC
SYSTEM
APPLIC.
TxTj
Master ---> Ad0 a) For communication from the master application program (text block) to the system of the slave PLC (access to PL7 objects).
b) To send messages from the master application program (text block) to the application program of the slave PLC (text block).
Routing is performed automatically by the TSX 17-20.
21
Slave to master exchange
PLC
MASTER
TSX SCM 21 a
SYSTEM
APPLIC.
TxTi b
Ad0
Ad1
SLAVE
PLC
SYSTEM
APPLIC.
TxTj
Slave (Ad1) ---> Master a) For communication from the application program of the slave (text block) to the system of the master.
b) For sending messages from the application program of the slave (text block) to the application program of the master (text block).
Slave to slave exchange
SENDER SLAVE
PLC
DESTINATION SLAVE
PLC
SYSTEM
APPLIC.
TxTi
Ad0
Ad1 a
Ad0
Ad1
SYSTEM
APPLIC.
TxTj b
TSX SCM 21.6
SYS-
TEM
APPLIC.
TxT
MASTER
From sender slave (Ad1) to destination slave (Ad0) a) For communication from the application program of the sender slave (text block) to the system of the destination slave.
b) To send messages from the application program of the sender slave (text block) to the application program of the destination slave (text block).
22
Software Installation
2
A list of standard and specific services is shown below:
Family
Data
(read)
Service Request Confirm
Hex. Dec. Hex. Dec.
Description
00 00 30 48 Reads a bit (B).
Read a Bit (*)
Read a Word (*)
Read Objects (*)
Read a System Bit 01 01 31 49 Reads a system bit
(SY).
Read the Memory Image 02 02 32 50 Reads the image of an of an I/O Bit I/O bit.
Read a Constant Word 05 05 35 53 Reads a constant word
(CW).
Read a System Word
Read a Timer
04 04 34 52 Reads a word (W).
36 54 66 102 Reads objects (bits, words, bit or word strings, etc.).
06 06 36 54 Reads a system word
(SW).
09 09 39 57 Reads the parameters of a timer (T).
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
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 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 Reference
Manual (TSX D24 004E).
Only specific requests are described in Appendix 3.2-2.
23
Family
Data
(write)
Unsolicited
Data
Operating
Modes
Service
Write a Bit (*)
Write a Word (*)
Request Confirm
Hex. Dec. Hex. Dec.
10
14
16
20
FE
FE
254
254
Description
Writes a bit (B).
Writes a word (W).
Write Objects (*) 37 55 FE 254 Writes objects (bits, words, bit or word strings, etc.).
11 17 FE 254 Writes a system bit (SY).
Write a System Bit
Write the Memory Image 12 18 FE 254 Writes the image of an I/O Bit of an I/O bit.
Write a System Word
Write Timer Preset
Write Monostable
Write Counter Preset
Write a Register Input
15
17
18
19
21
23
24
25
FE
FE
FE
FE
254
254
254
254
Writes a system word (SW).
Writes a timer preset (T).
Writes a monostable Preset (M).
Writes a counter preset (C).
1A 26 FE 254 Writes a register Word input word (R).
26 38 FE 254 Stops a drum controller (D).
Stop a Drum Controller
Move to the Next Drum
Controller Step
Run Drum Controller
Unsolicited Data
RUN (*)
STOP (*)
27
28
FC
39
40
252
FE
58
X
254
88
X
Moves to the next step of a drum controller.
Runs a drum controller.
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 Reference
Manual (TSX D24 004E).
Only specific requests are described in Appendix 2.3-2.
Note: There are other standard or specific requests supported by the TSX 17-20 PLC. These are used for specific applications such as programming or diagnostics using Telemecanique terminals and are not described in this manual.
24
Software Installation
2
2.1-5 Limits to Operation
Exchanges of messages or data on the Uni-Telway bus are limited by:
. Exchanges between the Uni-Telway bus and the PLC processor,
. The limits of the master module (refer to the TSX SCM 21.6 User's Manual),
. The limits of the slave PLC processor,
. Flow checking (message loss on power break).
Exchanges between Uni-Telway bus and master PLC
The time that elapses between reception of a request and transfer of a response to the output buffer of the TSX 17-20 PLC is a maximum of two PLC cycles.
Slave PLC Limits
. System Access (Ad0)
The slave PLC can only control one exchange with the system (request/confirm cycle or reception of unsolicited data) 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. Before starting another exchange, the first must be completed (reception of a text block that resets bit D of the text block).
. Processor Limits
. It is possible to access the system gate of the TSX 17-20 PLC even if it is stopped,
. The system can only process one request at a time,
. The maximum message size is 32 bytes (request or confirm + parameters + data).
Flow control
When a text block set for transmission (with S, I and O at 1) sends a request, it awaits reception and remains in this state until it receives an answer. If the destination station suffers a power supply fault or is disconnected, the sender text block will remain blocked:
Bits TXTi,D and TXTi,E remain at 0.
The application program of the client PLC 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 is reset to 0 (RESET
TXTi).
25
2.1-6 Communication via Telway 7
Exchanges between devices connected to the Uni-Telway bus and stations connected to the Telway 7 network are fully user transparent and performed via the
Uni-Telway master.
I mportant A TSX 17-20 slave PLC can only be a server for a station connected to the Telway 7 network.
It cannot send a message to a Telway 7 station .
Example: Telway 7 Station 2 to Slave A
The TSX 47-30 PLC, that is station 2 on the Telway 7 network must write the value
2345 in word W1000 of TSX 17-20 Slave A on the Uni-Telway bus.
Station 1
Telway 7
Station 2
TSX 47-30
TSX 47-30
TSX TSX
TSX SCA 50
Master
TSX SCA 62
Telemecanique
Uni-Telway Bus
Ad0 = 5
Ad1 = 6
Ad2 not configured
Telemecanique
TSX SCA 62
TSX
TSX 17-20/PL7-2
Micro-PLC
Ad0 = 1
Ad1 = 2
TSX 17 ACC5
TSX 87-30
Slave
Data
. Master: The TSX SCM 21.6 Uni-Telway master module is located in rack 0, slot 6. The PLC with the Uni-Telway Master module is also Station
1 on the Telway 7 network.
. TSX 17-20: Uni-Telway slave,
Data link address 1,
. Write word request:
. Request code = H'14',
. Parameters = number and value of the word to write.
26
Software Installation
2
. Text block:
. As the message sender is on the Telway 7 network, the sender text block is a coupler type network text block (NET). Its TXTi,A parameter must correspond to the Telway 7 network address of the PLC where the Uni-Telway master module is installed.
. The request is sent by text block TXT6 of the sender PLC's application program.
. Start of the transmission table = W200. The transmission table comprises only the parameters and the data for the request.
. There is no reception table as there is no data assigned to the confirm.
Transmission
. Text block:
. TXT6,A = 1
. TXT6,C = H'0714'
. TXT6,M = H'0665'
. TXT6,L = 4
. Transmission table:
Uni-Telway master = Telway 7 station 1
Category code = H'07', request code = H'14'.
Master location (rack 0, slot 6),
Destination data link address = 1.
Transmission table length (in bytes).
W 2 0 0
W 2 0 1
1 0 0
2 3 4 5
Reception
. Text block:
TXT6,V = H'FE' correct exchange
Nbr. of word to write
Contents of W100
27
2.2
Examples of Communication Between PLCs
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 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
TSX 17 ACC5 TSX 17 ACC5
The various examples will be discussed in detail in the rest of this section. The main points covered are:
Slave (text block)
→
Master (system gate)
Read the parameters of timer T10 of the TSX 87-30 Master PLC by Slave A.
Master (text block)
→
Slave (text block)
Send the message "PIN FAULT" from the TSX 87-30 Master PLC to Slave B.
Slave (text block)
→
Master (text block)
Send the message "TEXT OK" from Slave B to the TSX 87-30 Master PLC.
Slave (text block)
→
Slave (system gate)
Transfer word W10 from Slave A to word W54 of Slave B.
Slave (text block)
→
Slave (text block)
Send the message "HIGHER THRESHOLD NOT REACHED" from Slave A to
Slave B.
28
Software Installation
2
2.2-1 Slave to Master (System Gate) Exchange
Read the parameters of timer T10 in the TSX 87-30 Master PLC by Slave A.
TSX 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
TSX 17 ACC5 TSX 17 ACC5
Data
. Read timer request:
. request code = H'09' (see list of services)
. parameter = number of the timer to read.
. Text block:
. the request is sent by text block TXT2 of the application program,
. start of transmission table = W30,
. start of reception table = W0.
Transmission
. Text block:
. TXT2,C = H'0709'
. TXT2,M = H'0000'
. TXT2,L = 2
. transmission table: category code = H'07', request code = H'09' master PLC, data link address = 0, transmission table length (in bytes),
W30
W31
W32
10 Timer number
29
Reception
. Text block:
. TXT2,R = H'39'
. TXT2,D = 1
. TXT2,E = 0
. TXT2,S = 8
. Reception table correct exchange confirm.
receive 8 bytes.
W0
W1
W2
W3
00
01
3600
1712
02
01
. Response analysis:
W0 = H'0002'
LSB = 02
→ time base 1 second,
MSB = 00
→ not timed-out.
W1 = H'0101'
LSB = 01
→ timer running,
MSB = 01
→ preset can be modified.
W2 = 3600
The configuration preset value is 3600.
W3 = 1712
The current value when the request was processed was 1712.
30
Software Installation
2
2.2-2 Master to Slave (Text Block) Exchange
Send the message "PIN FAULT" from the TSX 87-30 Master PLC to Slave B.
TSX 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
TSX 17 ACC5 TSX 17 ACC5
Data
. 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 as an output with S and O at 1 as there is no answer or confirm),
. start of transmission table = W300,
. 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 data link address Ad0 of a TSX 17-20, the destination application program must comprise a text block set to receive (S and I at 1), ready to receive request H'FC'.
. As the message received does not specify a destination text block in the
Micro-PLC, if more than one are active at the time and set to receive, the text block with the lowest number will receive request H'FC'.
. Message reception is ensured by text block TXT2 of the application program,
. Start of reception table = W10. The reception table comprises the message sent by the master.
31
Transmission (Master)
The detailed coding of the request by the PLC that comprises the master
TSX SCM 21.6 module (located in Rack 0, Slot 3) is described in the TSX SCM 21.6
Channel 1 - Uni-Telway Bus - User's Manual (TSX D24 005E). The parameters of the text block are listed for reference only.
. TXT3,C = H'07FC'
. TXT3,M = H'0367'
. TXT3,L = 13
. Transmission table:
Category code = H'07', request code = H'FC',
Rack 0, slot 3, data link address Ad0 = 3,
Transmission table length in bytes.
W300
W301
W302
W303
W304
49 (I)
20 (Space)
41 (A)
4C (L)
50 (P)
4E (N)
46 (F)
55 (U)
54 (T)
Reception (slave)
. Text block (S and I at 1): (before reception of the request)
. TXT2,C = H'0000'
. TXT2,M = H'0000'
. TXT2,L = 0 no transmission table.
. Text block (after data reception)
. TXT2,M = H'0000'
. TXT2,R = H'00FC'
. TXT2,D = 1
. TXT2,E = 0
. TXT2,S = 13
. Reception table: receive message from the Master, receive request H'FC', receive 13 bytes.
W10
W11
W12
W13
W14
49 (I)
20 (Space)
41 (A)
4C (L)
50 (P)
4E (N)
46 (F)
55 (U)
54 (T)
32
Software Installation
2
2.2-3 Slave to Master (Application) Exchange
Send the message "TEXT OK" from Slave B to the TSX 87-30 Master.
TSX 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
TSX 17 ACC5 TSX 17 ACC5
Data
TSX 17-20: sender data link address = 4 (Ad1).
. Unsolicited data request:
. request code = H'FC' (see request list)
. parameter = message to send.
. Sender text block (slave):
. Sending a message (request H'FC') to the master is performed automatically using simplified addressing (event triggered data comprising up to 8
bytes). The TSX 17-20 directs the message to the TSX SCM 21.6 module in the master, that stores it in a buffer.
. The request is sent by text block TXT1 of the application program (set with S and O at 1 as there is no acknowledgement or confirm from the application program),
. Start of transmission table = W100. The transmission table comprises the message to be sent,
. There is no reception table as there is no answer.
. Destination application (master):
. Event triggered data sent by the TSX 17-20 is read by the application program of the master (sending request H'A8' to channel 1) when it detects a change in the data.
. The amount of data sent is restricted to 8 bytes max. and can be set when the master TSX SCM 21.6 module is configured.
For additional information on reception and processing of event triggered data by the master, refer to the TSX SCM 21.6 User's Manual (TSX D24 005E).
33
34
Transmission
. Text block:
. TXT1,C = H'07FC'
. TXT1,M = H'0000'
. TXT1,L = 8
. Transmission table:
W100
W101
W102
W103
Category code = H'07', request code = H'FC',
Master PLC (data link address 0),
Transmission table length (in bytes).
45 (E)
54 (T)
4F (0)
20 (Space)
54 (T)
53 (S)
20 (Space)
4B (K)
Reception (master)
A detailed description of text block parameters that can be used to read the event triggered data received by the TSX SCM 21.6 that is the destination of the exchange
(Rack 0, Slot 6) can be found in the TSX SCM 21.6 User's Manual (TSX D24 005E), in sub-section 3.2. The parameters of this text block (TXT5 for example) are given for information only.
. Text block (transmission):
. Start of transmission table = W264,
. Start of reception table = W200,
. TXT5,C = H'00A8'
. TXT5,M = H'0601' read events request code H'FC', rack 0, slot 6, module channel 1,
. TXT5,L = 2
. Transmission table transmission table length in bytes.
W264 Content of IW06,4
. Text block (data reception)
. TXT5,V = H'D8'
. TXT5,D = 1
. TXT5,E = 0
. TXT5,S = 8
. Reception table:
W200
W201
W202
W203 if the exchange is correct, if not H'FD', receive 8 bytes.
45 (E)
54 (T)
4F (0)
20 (Space)
54 (T)
53 (S)
20 (Space)
4B (K)
}
Data from
Slave B
Software Installation
2
2.2-4 Slave to Slave (System Gate) Exchange
Transfer word W10 from Slave A to word W54 of Slave B:
TSX 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
TSX 17 ACC5 TSX 17 ACC5
Data
. Slave A: sender data link address = 2 (Ad1).
. Slave B: destination data link address = 3 (Ad0).
. Write word request:
. request code = H'14'
. parameters = 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 = W400. The transmission table comprises the number and the value of the word to write,
. There is no reception table as there is no data assigned to the confirm.
Transmission
. Text block:
. TXT4,C = H'0714'
. TXT4,M = H'0003'
. TXT4,L = 4
. transmission table: category code = H'07', request code H'14', destination data link address Ad0 = 3, length (in bytes) of the transmission table,
Nbr. of the word to write
Value of word W10
W400
W401
54
4534
Reception
. Text block:
. TXT4,R = H'FE' correct exchange.
35
2.2-5 Slave to Slave (Text Block) Exchange
Send the message "HIGHER THRESHOLD REACHED" from Slave A to Slave B:
TSX 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
TSX 17 ACC5 TSX 17 ACC5
Data
. Slave A: sender data link address = 2 (Ad1).
. Slave B: destination data link address = 3 (Ad0).
. Unsolicited data request:
. request code = H'FC',
. parameter = message to send.
. Sender text block (Slave A):
. When the TSX 17-20 sends a message to a slave (request H'FC'), the maximum message length is 30 bytes,
. The request is sent by text block TXT7 (with S and I set to 1), of the application program,
. Start of transmission table = W800. The transmission table comprises the message to be sent,
. There is no reception table as there is no confirm.
. Destination text block (Slave B):
. When a message is sent to the data link address Ad0 of a TSX 17-20, by a device connected to the Uni-Telway bus, the destination application program must have a text block set to await reception (S and I at 1), ready to receive request
H'FC'.
. The message received does not specify a destination Micro-PLC text block number. Therefore, if a number of text blocks are awaiting reception at the same time, the one with the lowest number will effectively receive request H'FC'.
36
Software Installation
2
. Message reception is ensured by text block 4 (set to await reception) of the application program,
. Start of reception table = W200. The reception table comprises the message sent by slave A.
Transmission
. Text block:
. TXT7,C = H'07FC'
. TXT7,M = H'0004'
. TXT7,L = 20
. Transmission table:
Category code = H'07', request code = H'FC',
Data link address = 4 (Ad1),
Transmission table length in bytes.
W800
W801
W802
W803
W804
W805
W806
W807
W808
W809
49 (I)
48 (H)
52 (R)
54 (T)
52 (R)
53 (S)
52 (R)
41 (A)
48 (H)
44 (D)
48 (H)
47 (G)
45 (E)
20 (Space)
48 (H)
45 (E)
20 (Space)
45 (E)
43 (C)
45 (E)
Reception
. Text block before reception (S and I at 1):
. TXT4,C = H'0000'
. TXT4,M = H'0000'
. TXT4,L = 0 no transmission table.
. Text block (data reception)
. TXT4,M = H'0002'
. TXT4,R = H'FC'
. TXT4,D = 1
. TXT4,E = 0
. TXT4,S = 20
. Reception table: message from data link address 2 (Slave A), receive request H'FC', receive 20 bytes.
Sender Category Code
W200
W201
W202
W203
W204
W205
W206
W207
W208
W209
49 (I)
48 (H)
52 (R)
54 (T)
52 (R)
53 (S)
52 (R)
41 (A)
48 (H)
44 (D)
48 (H)
47 (G)
45 (E)
20 (Space)
48 (H)
45 (E)
20 (Space)
45 (E)
43 (C)
45 (E)
37
2.3
Application Example
2.3-1 Presentation
The program described below is an example of a dialog between TSX 17-20 PLCs connected to the bus illustrated below:
TSX 87-30 PLC
TSX
SLAVE A
Ad0 = 1
Ad1 = 2
Uni-Telway Bus
MASTER
Telemecanique
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
Ad0 = 3
Ad1 = 4
SLAVE B
Telemecanique
Uni-Telway Bus
TSX SCA 62
TSX 17-20/PL7-2
Micro-PLC
TSX 17 ACC5 TSX 17 ACC5
Slave A A TSX 17-20 PLC that is fitted with:
. a PL7-2 language cartridge,
. a TSX 17 ACC5 adapter,
. a TSX 17 ACC2 display unit.
Configuration: Ad0 = 1,
Ad1 = 2.
Slave B A TSX 17-20 PLC that is fitted with:
. a PL7-2 language cartridge,
. a TSX 17 ACC5 adapter,
Configuration: Ad0 = 3,
Ad1 = 4.
2.3-2 Application Description
On each change of value of word W100, the application program of the TSX 17-20
PLC configured as Slave B will transfer the new value of the word system word SW16 of the TSX 17-20 PLC configured as Slave A, for display on the TSX 17 ACC2 display unit.
Reminder The TSX ACC2 display unit increases the amount of data displayed by the PLC by adding a 4-digit
BCD display of the content of system word SW16, if SW14=1 .
38
Software Installation
2
2.3-3 Slave B
Flowchart
MONITORING
TIMER
PROCESSING ?
YES
NO
WORD W100
CHANGED ?
YES
STORE
NEW
VALUE
INITIALIZE
PARAMETERS
NO
PROCESSING:
SEND REQUEST
POWER BREAK
OR
DISCONNECTION
NO
YES RESET THE
SENDER TEXT
BLOCK
CORRECT
REPORT
YES
RESET
"PROCESSING"
BIT
NO
Program continues...
39
Setting the Request Parameters
Sending the "write system word" request is performed by text block TXT0 of the application program in Slave B. This coupler type (CPL) text block must be set for to send and receive (send word W100 and receive a report).
The transmission table, located after W10 comprises two words:
. W10 = number of the system word to write (16),
. W11 = contents of the system word number (W100).
There is no reception table as there is no data assigned to the confirm.
The text block parameters are:
. TXT0,C = H'7015'
. TXT0,M = H'0001'
. TXT0,L = 4 category code = H'07', request code = H'15', destination data link address (Ad0 = 1), transmission table length (in bytes)
2.3-4 Slave A
Flowchart
SET SY14
TO 1
The "write system word" request does not require a specific application program in
Slave PLC A.
It is necessary to set system bit SY14 to 1, to enable the display of system word
SW16 by the TSX ACC2 display unit.
The value of SW16 is displayed with Slave PLC A in Run or in Stop.
Program
LABEL : 11 "POWER RETURN"
!SY0 SY14 !
! !
+-] [--+------+------+------+------+------+------+------+------+---( S )----+
! !
! !
40
Software Installation
2
Program Listing
LABEL : 10 "START TIMER"
!B10 T 0 B40 !
! +========+ !
+-] [--+------+-+ E D +--+------+------+------+------+------+---( )----+
! ! ! ! ! !
! ! ! ! ! !
! ! ! !100ms=TB! !
! ! ! ! ! !
+ + +-+ C R +--+ +
! ! ! ! !
! ! ! ! !
! ! !P=50 ! !
! ! ! ! !
+ + ! ! +
! ! +========+ !
! ! !
! ! 50 !
! ! !
+ +------+------+------+------+------+------+------+------+---( )----+
! !
! !
LABEL : 20 "WORD W100 CHANGED?"
! W100 70 !
! +========+ !
+-+ = +--+------+------+------+------+------+------+------+---( J )----+
! +========+ !
! W50 !
LABEL : 30 "STORE"
! +=======================+ !
+------+------+------+------+------+------+------+-+W100 -> W50 +-+
! +=======================+ !
! !
! !
LABEL : 40 "INITIALIZATION"
!
! B10 !
! !
+------+------+------+------+------+------+------+------+------+---( S )----+
! ! !
! ! !
! ! !
+ +---( S )----+
! !
! !
! !
! +=======================+ !
+------+------+------+------+------+------+------+-+16 -> W10 +-+
! +=======================+ !
! !
! !
! +=======================+ !
+------+------+------+------+------+------+------+-+BCD W100 -> W11 +-+
! +=======================+ !
! !
41
LABEL : 50 "SEND TXT"
!B30 t 0 B50 !
! +========+ !
+-] [--+------+-+ R D +--+------+------+------+------+------+---( )----+
! ! ! !
! !W10 ! !
!B20 !<-->CPL ! !
! ! ! !
+-] [--+------+-+ S^ E +--+ +
! ! ! ! !
! ! ! ! !
! ! ! M=H0001! !
! ! ! ! !
+ +-+ O ! +
! ! ! ! !
! ! ! C=H0715! !
! ! !LG=4 ! !
! ! ! ! !
+ +-+ I ! !
! +========+ !
LABEL : 60 "CONFIRM"
! B20 !
! !
+------+------+------+------+------+------+------+------+------+---( R )----+
! ! !
! ! !
! ! B30 !
! ! !
+ +---( R )----+
! !
! !
!TXTO,D TXTO,E B40 B30 !
! !
+-]/[--+-]/[--+-] [--+------+------+------+------+------+------+---( S )----+
! !
! !
! TXTO,R TXTO,D B10 !
! +========+ !
+-+ = +--+-] [--+------+------+------+------+------+------+---( R )----+
! +========+ !
H'FE
LABEL : 70 "PROGRAM CONTINUES"
!BO !
! !
+-] [--+------+------+------+------+------+------+------+------+---( )----+
! !
! !
Comments on text block t0
Parameters TXT0,C/TXT0,M/TXT0,L are defined when text block TXT0 is configured:
. TXT0,C
. TXT0,C
=
. TXT0,M =
=
H'0715'
H'0001'
4
. Transmission table category code = H'07', request code = H'15', destination data link address (Ad0 = 1), transmission table length (in bytes)
W10
W11
16 (Nbr. of system word to write)
Value of W100 in BCD
42
Software Installation
2
Slave B Program Analysis
When the value of word W100 changes (W100 different from W50), its new value is stored in W50 (labels 20 and 30).
The initialization of the various sender text block parameters with the "write system word" request is done at label 40:
. set B10 to 1 Processing in progress,
. set B20 to 1 Start the text block,
. Load the value 16 in W10 (start of the transmission table),
. Load W11 with the new value of W100 (converted to BCD) for display by the
TSX ACC2 display unit.
Once the text block has been started (at Label 50), bits B20 and B30 (start and reset the text block) must be reset to 0 (at Label 60).
When a text block set to send and receive sends a request, it then awaits reception of a confirm. If a power break or a disconnection from the bus occurs at the destination end, the text block will remain blocked with bits TXTi,D and TXTi,E at 0.
The application program must allow for this.
Provision for this is made by using timer T0 (set for 5 seconds). As soon as a request is sent, T0 is triggered (by Label 10). If no confirm has been received by the text block after 5 seconds, it will be reset to 0 by B30 (at Label 60).
As soon as a correct confirm is received (TXT0,R = H'00FE'), Bit B10 (processing in progress) is reset to 0 (at Label 60). The program is then set to await a change in the value of W100 before starting a new exchange.
43
2.4
Additional Programming Information
2.4-1 Broadcast Messages
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 nor confirms at application level.
If one of the slaves is not available when this service is used, it will not receive the message.
Reception of request H'FC'
When a broadcast message is sent by the data link master on the Uni-Telway bus, the application program of the TSX 17-20 must comprise a text block set to await reception (S and I at 1), ready to receive request H'FC'.
The message received does not specify a destination Micro-PLC text block number.
Therefore, if a number of text blocks are awaiting reception at the same time, the one with the lowest number will effectively receive request H'FC'.
TXTi,M
TXTi,R
After reception, comprises the data link address of the sender: H'0000'.
Takes the value H'00FC'.
Reception of another request
When another request is broadcast, it is received by the system gate of the
TSX 17-20 PLC in a fully user transparent manner.
44
Software Installation
2
2.4-2 Events
This service enables a slave server that supports this function to send data on events to the TSX SCM 21.6 Uni-Telway master module on its own initiative.
This data is sent by the "unsolicited data" request that does not require an answer from the destination.
The amount of data sent is restricted to 8 bytes and can be set when the
TSX SCM 21.6 master module is configured. For further information refer to the
TSX SCM 21.6 User's Manual (TSX D24 005E), sub-section 2.2.
Addressing
When the TSX 17-20 Micro-PLC sends a message to the master PLC using the
"events" request, this message comprising event related data is automatically directed to channel 1 of the master module.
. message:
. TXTi,C = H'07FC'
. TXTi,M = H'0000'
8 bytes max.
category code = H'07', request code = H'FC', message destined for the master.
Data Acquisition
The data (stored in TSX SCM 21.6 master module RAM) is read by the the application program of the master when the read events data request (code H'A8') is sent to channel 1 of the TSX SCM 21.6 module.
For more information on the processing of events data by the master, refer to the
TSX SCM 21.6 User's Manual (TSX D24 005E), sub-section 3.2.
45
46
X
Appendix
Sub-section
3.1 Performance Levels
3.2 Requests Supported by TSX Series 7 PLCs
3.2-1 Standard Requests
3.2-2 Specific Requests
3.3 Standard Requests
3.3-1 Read Objects
3.3-2 Write Objects
3.4 Specific Read Requests
3.4-1 Read a System Bit
3.4-2 Read the Memory Image of an I/O Bit
3.4-3 Read a Constant Word
3.4-4 Read a System Word
3.4-5 Read a Timer
3.4-6 Read a Monostable
3.4-7 Read a Counter
3.4-8 Read the Current Drum Controller Step
3.4-9 Read a Drum Controller Step
3.4-10 Read a Register
3.4-11 Read Grafcet Steps
3.5 Specific Write Requests
3.5-1 Write a System Bit
3.5-2 Write the Memory Image of an I/O Bit
3.5-3 Write a System Word
3.5-4 Write a Timer Preset
3.5-5 Write a Monostable Preset
3.5-6 Write a Counter Preset
3.5-7 Write a Register Input Word
3.5-8 Stop a Drum Controller
3.5-9 Move to the Next Drum Controller Step
3.5-10 Start a Drum Controller
3.6 Exchange Possibilities
This section ends on page
Section 3
Page
48
49
49
50
51
51
53
55
61
62
63
64
65
55
56
58
59
60
66
67
67
68
69
70
71
72
73
74
75
76
77
78
47
3.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 PLC processor,
. 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 Reference Manual).
Module software response time
The PLC processor response time is a maximum of two cycles between the reception of a request and the availability of a response in the output buffer of the
TSX 17-20 Micro-PLC.
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.).
48
Appendix
3
3.2
Requests Supported by TSX Series 7 PLCs
3.2-1 Standard Requests
Family Service
Data
(Read)
Data
(Write)
Unsolicited
Data
Operating
Modes
Read a Bit (*)
Read a Word (*)
Read Objects
Write a Bit (*)
Write a Word (*)
Write Objects
Unsolicited Data (*)
RUN (*)
STOP (*)
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, 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 254 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
Reference Manual (TSX D24 004E), sub-section 5.4.
49
3.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
01 01 31 49 Reads a system bit (SY).
02 02 32 50 Reads the image of an I/O bit.
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 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).
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 drum controller step (D).
28 40 58 88 Starts a drum controller (D).
50
Appendix
3
3.3
Standard Requests
3.3-1 Read Objects
This request permits reading of simple objects (words or bit strings etc.).
Request format
Request code
H/D
Category code
Segment
Type of object
36/54
Object address
Segment
Type of object
Object address
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 be read:
7 : a 16-bit signed integer.
: . The physical or logical address n 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
H/D
Type of object
66/102
Type of object
Data
: Returns the type of object selected when the question is sent.
51
Negative confirm
Confirm code
H/D
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.
52
Appendix
3
3.3-2 Write Objects
This request writes simple objects (words, word strings, etc.).
Request format
Request code
H/D
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
H/D
FE/254
Negative confirm
Confirm code
H/D
FD/253
53
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).
54
Appendix
3
3.4
Specific Read Requests
3.4-1 Read a System Bit
This request reads a system bit SY.
Request format
Request code
H/D
Category code
System bit number
01/01
Confirm format
Positive confirm
Confirm code
H/D
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
H/D
FD/253
Causes for rejection : .
Unknown request.
.
Bit number out of range.
55
3.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
H/D
Category code
Module
Number
02/02
Confirm format
Positive confirm
Confirm code
H/D
Fault object
Configuration
Reserved Reserved Reserved Reserved
Nbr. of output
Bits
32/50 00 0F 00 1F 10
Value of output bits
Nbr. of input bits
20
Value of input bits
Nbr. of output bits
10
Output bit forcing list
Nbr. of input bits
20
Input bit forcing list
Fault Code : Bit 7 = Fault: (0 = no, 1 = yes)
Bit 6 = 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
56
Appendix
3
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 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 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
H/D
FD/253
Reasons for rejection: .
Unknown request,
.
Module number out of range.
57
3.4-3 Read a Constant Word
This request reads constant words (CW).
Request format
Request code
Hex.
Category code
05/05
Word number
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.
58
3.4-4 Read a System Word
This request reads system words (CW).
Request format
Request code
Hex.
Category code
06/06
Word number
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
3
59
3.4-5 Read a Timer
This request reads all of the parameters of a timer.
Request format
Request code
Hex.
Category code
Timer
Number
09/09
Confirm format
Positive confirm
Confirm code
Hex.
Time base
Timer timedout
Timer 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.
60
3.4-6 Read a Monostable
This request reads all of the parameters of a monostable.
Request format
Request code
Hex.
Category code
Monostable number
0A/10
Confirm format
Positive confirm
Confirm code
Hex.
Time base
Monostable running
Type of preset
3A/58
Time base:
Monostable 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 → 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.
Appendix
3
61
3.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.
62
3.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
Drum number
0C/12
Confirm format
Positive confirm
Confirm code
Hex.
Time base
Drum full
Duration of step in progress
3C/60
Drum length in steps
Current step
Value of the required step
Appendix
3
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.
63
3.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
Step number
0D/13
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 → 1 sec.,
3 → 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.
64
3.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
0 = FIFO register,
1 = LIFO register,
0 → no
1 → yes
0 → no
1 → yes
Input word
Negative confirm
Confirm code
Hex.
FD/253
Causes for rejection: .
Unknown request,
.
Register number out of range,
.
RAM cannot be executed.
Output word
Appendix
3
65
3.4-11 Read Grafcet Steps
This request reads the Grafcet step activity bits (Xi).
Request format
Request code
Hex.
Category code
2A/42
Register number
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 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.
66
3.5
Specific Write Requests
3.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
3
67
3.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...3),
Input or output selection: 0 : Outputs,
1 : Inputs.
I/O Bit number: 0 → 15 : for outputs,
0 → 31 : for inputs,
Bit 15 must always be set to 1.
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,
.
I/O module number out of range,
.
I/O bit number out of range.
68
3.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
3
69
3.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 H270F') 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.
70
Appendix
3
3.5-5 Write the 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.
71
3.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
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,
.
Counter number out of range,
.
Preset cannot be modified,
.
Preset value out of range,
.
Cannot execute RAM.
72
3.5-7 Write a Register Input Word
This request writes a register input word (R).
Request format
Request code
Hex.
Category code
Register number
1A/26
Input 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
3
73
3.5-8 Stop a Drum Controller
This request stops a drum controller.
Request format
Request code
Hex.
Category code
Drum controller number
Step number
26/38
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.
74
Appendix
3
3.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 controller 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.
75
3.5-10 Start a Drum Controller
This request starts a drum controller.
Request format
Request code hex.
Category code
Drum controller number
28/40
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.
76
Appendix
3
3.6
Exchange Possibilities
A Uni-Telway Bus
TSX 87-30 PLC
TSX
XGS On
OK
L1
L2
DEF1
DEF2
IN1
IN2
OUT1
OUT2
XGS C
Interrogator
Master
TSX 17-20/PL7-2
Micro-PLC
Uni-Telway Bus
Slave
A Uni-Telway bus with a Telway 7 Network
TSX 87-30 PLC
TSX
NUM 760
Master
Uni-Telway Bus
NUM 760
TSX 17-20/PL7-2
Micro-PLC
Slave
Telway 7
TSX
NO
TSX 47-20 PLC
TSX 47-30 PLC
TSX
TSX 17-20/PL7-2
Micro-PLC
NO
TSX
TSX 47-30 PLC
TSX
TSX 47-30
Master Slave
Uni-Telway Bus
Telway 7
Transparent communications stop when a slave PLC is reached.
To go beyond that point communications have to be processed by the application program of the slave PLC.
77
78
Scarica
Pubblicità