Schneider Electric PL7 Micro/Junior/Pro - Communication applications, volume 1 User Guide
விளம்பரம்
விளம்பரம்
PL7 Micro/Junior/Pro
Communication applications
Volume 1
TLX DS COM PL7 xxE eng
2
TLX DS COM PL7 xxE
Related Documentation
At a Glance This manual consists of three volumes: l Volume 1 l l Common communication function l Nano transport PLCs l Communication in character mode l Communication by Uni-telway bus
Volume 2 l Communication by Modbus l l Communication by Modem l Communication by Modbus plus l Communication by FIPIO bus
Volume 3 l l
Communication on FIPWAY network
Communication on ETHERNET network l Multi-network architecture
Related Documentation
TLX DS COM PL7 xxE
3
Related Documentation
4
TLX DS COM PL7 xxE
Table of Contents
About the book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Part I
Chapter 1 General points about the operations function Communication
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Presentation of the operation Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 2
Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1
Addressing a processor’s channels of communication . . . . . . . . . . . . . . . . . . . . 26
Addressing a TSX SCY 21600/21601 communication module . . . . . . . . . . . . . . 27
Examples of intra-station addressing : Uni-telway addressing . . . . . . . . . . . . . . 28
Examples of intra-station addressing : FIPIO addressing . . . . . . . . . . . . . . . . . . 30
2.2
Communication via a programming terminal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Communicating via a programming terminal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Examples of connection in Uni-telway mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Examples of remote connection in FIPIO or FIPWAY mode. . . . . . . . . . . . . . . . 39
Examples of remote connection in Uni-telway mode . . . . . . . . . . . . . . . . . . . . . 41
Examples of remote connection in ETHWAY mode or in TCP/IP mode . . . . . . . 43
Chapter 3
Communication functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.1
5
6
Management parameters: communication and operation reports . . . . . . . . . . . . 56
Management parameters : Length and Timeout . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.2
Help whilst entering the communication functions . . . . . . . . . . . . . . . . . . . . . . . . 66
Help with entering the communication functions . . . . . . . . . . . . . . . . . . . . . . . . . 67
Accessing a specific function, method or procedure type instruction . . . . . . . . . 68
3.3
Description of the different communication functions . . . . . . . . . . . . . . . . . . . . . 72
Reading standard objects: READ_VAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Reading standard objects : example of network use . . . . . . . . . . . . . . . . . . . . . . 79
Reading Standard Objects: example of an exchange of variables with parameter
Reading standard objects : More detail on reading bits. . . . . . . . . . . . . . . . . . . . 83
Reading standard objects : reading a timer’s current parameters . . . . . . . . . . . . 85
Reading standard objects : reading the current parameters of a monostable . . . 86
Writing standard objects: example of network use . . . . . . . . . . . . . . . . . . . . . . . 90
Writing standard objects: example of exchange of variables with parameter
Transmitting UNI-TE Requests: SEND_REQ . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
UNI-TE request transmission input Help screen . . . . . . . . . . . . . . . . . . . . . . . . . 96
UNI-TE request transmission example of network use . . . . . . . . . . . . . . . . . . . . 97
UNI-TE request transmission: List of requests . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Text Type Data Exchange: examples of use . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Text Type Data Exchange: examples of use with an Altivar . . . . . . . . . . . . . . . 108
Writing a string of characters. PRINT_CHAR. . . . . . . . . . . . . . . . . . . . . . . . . . 115
Writing a chain of characters : input help screen . . . . . . . . . . . . . . . . . . . . . . . 117
Writing of a chain of characters : example of use . . . . . . . . . . . . . . . . . . . . . . . 118
Reading a character string: INPUT_CHAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Reading a string of characters : input Help screen . . . . . . . . . . . . . . . . . . . . . . 122
Reading a character string : example of use . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Sending/receiving a string of characters : OUT_IN_CHAR. . . . . . . . . . . . . . . . 125
Sending/receiving a string of characters : input Help screen . . . . . . . . . . . . . . 127
Sending/receiving a string of characters : example of use . . . . . . . . . . . . . . . . 128
Stopping an exchange whilst in action. : CANCEL . . . . . . . . . . . . . . . . . . . . . . 130
Stopping an exchange whilst in action : example of use. . . . . . . . . . . . . . . . . . 131
Shifting a byte to the right in a table : ROR1_ARB . . . . . . . . . . . . . . . . . . . . . . 133
Shifting a byte to the right in a table : example of use. . . . . . . . . . . . . . . . . . . . 134
Reading of common Modbus Plus data: READ_GDATA . . . . . . . . . . . . . . . . . 137
Writing of Modbus Plus common data : WRITE_GDATA . . . . . . . . . . . . . . . . . 138
Asynchronous messaging service : WRITE_Asyn and READ_Asyn . . . . . . . 142
3.4
Specifications for Communication between TSX Micro/Premium and Series 7 146
General rules for changing between applications . . . . . . . . . . . . . . . . . . . . . . 147
General rules for an exchange to a UNI-TE server . . . . . . . . . . . . . . . . . . . . . . 149
3.5
Chapter 4
Configuration of the operations function Communication. . 161
Configuration of the communication function . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Reminders concerning the configuration editor. . . . . . . . . . . . . . . . . . . . . . . . . 163
How to declare a communication module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
How to declare a communication channel in a processor or module TSX SCY 21600/
Description of configuration screens for communication. . . . . . . . . . . . . . . . . . 166
Description of communication debugging screens . . . . . . . . . . . . . . . . . . . . . . 168
Part II
Remoting of Nano PLCs . . . . . . . . . . . . . . . . . . . . . . . . 171
Chapter 5
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
7
8
Chapter 6
Nano PLC remoting services . . . . . . . . . . . . . . . . . . . . . . . . . 183
Conversion of analog values of input channels . . . . . . . . . . . . . . . . . . . . . . . . . 192
Chapter 7
Configuring remoting of Nano PLCs . . . . . . . . . . . . . . . . . . . 195
How to access parameters of module TSX STZ 10. . . . . . . . . . . . . . . . . . . . . . 196
Configuration screen for remoting Nano PLCs . . . . . . . . . . . . . . . . . . . . . . . . . 197
Modbus parameters associated with the application . . . . . . . . . . . . . . . . . . . . . 198
Chapter 8
Programming Nano PLC remoting . . . . . . . . . . . . . . . . . . . . . 201
Example of communication with Nano PLCs . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Configuring and programming the example. . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Chapter 9
Debugging Nano PLC remoting . . . . . . . . . . . . . . . . . . . . . . . 207
Debugging screen for remoting Nano PLCs . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Chapter 10
Language objects associated to Nano PLC remoting . . . . . 211
Explicit exchange management and reports . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Language objects associated with configuration . . . . . . . . . . . . . . . . . . . . . . . . 217
Part III
Communication using character mode . . . . . . . . . . . . . 219
Chapter 11
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
11.1
Introduction to communication via character mode . . . . . . . . . . . . . . . . . . . . . . 222
11.2
Chapter 12
Configuring character mode communication . . . . . . . . . . . . 231
How to access PCMCIA card parameters in character mode . . . . . . . . . . . . . . 232
How to access TSX SCY 21600 / 21601 module parameters. . . . . . . . . . . . . . 234
Parameters in character mode linked to transmission . . . . . . . . . . . . . . . . . . . 237
Parameters in character mode linked to message ends . . . . . . . . . . . . . . . . . . 239
Parameters in character mode linked to flow control . . . . . . . . . . . . . . . . . . . . 241
Chapter 13
Programming communication in character mode. . . . . . . . . 245
Chapter 14
Debugging communication using character mode . . . . . . . . 247
Debugging parameters in character mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Chapter 15 Language objects associated with character mode
communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Explicit exchange management and reports . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Language objects associated with configuration. . . . . . . . . . . . . . . . . . . . . . . . 258
Part IV
Communication via Uni-telway bus . . . . . . . . . . . . . . . 261
Chapter 16
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
9
10
Chapter 17
Configuring a Uni-telway communication . . . . . . . . . . . . . . . 271
How to access Uni-telway PCMCIA card parameters . . . . . . . . . . . . . . . . . . . . 272
How to access TSX SCY 21600/21601 module parameters . . . . . . . . . . . . . . . 274
Uni-telway parameters linked to the application . . . . . . . . . . . . . . . . . . . . . . . . 277
Uni-telway parameters linked to transmission . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Chapter 18
Programming a Uni-telway communication . . . . . . . . . . . . . 281
18.1
18.2
18.3
Example of a slave exchange with the master system . . . . . . . . . . . . . . . . . . . 290
Example of a direct slave exchange with the master system . . . . . . . . . . . . . . 292
18.4
Example of a slave exchange with the slave server . . . . . . . . . . . . . . . . . . . . . 296
Example of a slave exchange with the slave application . . . . . . . . . . . . . . . . . . 298
Example 2 of a slave exchange with the slave system . . . . . . . . . . . . . . . . . . . 299
Example of a direct slave exchange with a slave system . . . . . . . . . . . . . . . . . 303
18.5
Chapter 19
Debugging a Uni-telway communication. . . . . . . . . . . . . . . . 307
Requests available for the communication channel test . . . . . . . . . . . . . . . . . . 310
How to test a channel with Identification and Mirror requests . . . . . . . . . . . . . . 311
Chapter 20 Language objects associated with Uni-telway communication
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
20.1
Language objects associated with master Uni-telway mode. . . . . . . . . . . . . . . 314
Language object for implicit exchange in master Uni-telway mode . . . . . . . . . 315
Language object for explicit exchange in master Uni-telway mode . . . . . . . . . 316
Language objects associated with configuration in master Uni-telway mode . . 320
20.2
Language objects associated with slave Uni-telway mode . . . . . . . . . . . . . . . . 321
Language objects for implicit exchange in Uni-telway slave mode . . . . . . . . . . 322
Language object for explicit exchange in Uni-telway slave mode . . . . . . . . . . . 323
Language objects associated with configuration in slave Uni-telway mode . . . 326
Index
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
11
12
About the book
At a Glance
Document Scope This manual deals with the software implementation of the communication application.
Validity Note
Revision History
This updated publication includes the functions of PL7 V4.3.
2
3
Rev. No.
1
4
Changes
Common Remote location of Nano PLCs ASCII mode
Uni-telwau bus
This version takes in order some OPR
This version takes in order some OPRs and a few corrections.
For PL7 V4.3
Related
Documents
Title of Documentation
Hardware implementation manual
Reference Number
TSX DM 57 4x F
User Comments We welcome your comments about this document. You can reach us by e-mail at
TLX DS COM PL7 xxE
13
About the book
14
TLX DS COM PL7 xxE
Common communication function
I
presentation
Aim of this spacer
What's in this part?
This spacer presents a general view of the operations function Communication and describes its use with the software PL7.
This Part contains the following Chapters:
Chapter
1
2
3
4
Chaptername
General points about the operations function Communication
Addressing
Communication functions
Configuration of the operations function Communication
Page
15
TLX DS COM PL7 xxE
Common communication function
16
TLX DS COM PL7 xxE
General points about the operations function
Communication
1
Presentation
Aim of this chapter
What's in this
Chapter?
This chapter presents a summary of the operations function Communication and its services.
This Chapter contains the following Maps:
Topic
Presentation of the operation Communication
How to implement a message
Page
TLX DS COM PL7 xxE
17
General points
Presentation of the operation Communication
Presentation
Types of communication
The communication function allows the exchange of data between all devices connected by a bus or network.
This function applies: l l to the specific communication modules shown on rack, to the processors through the terminal point or cards PCMCIA.
The different communication functions available are: l l l l l l l l l l l the terminal port function the extension link function to TSX Nano for PLC TSX Micro the character mode function the Uni-telway function the Modbus/Jbus function the Modem function the Modbus Plus function the FIPIO function(manager and agent) the FIPWAY function the ETHERNET (TCP/IP) function the Bridge function
18
TLX DS COM PL7 xxE
General points
How to implement a message
Presentation
Method
The method below describes the principal stages to follow in order to implement a communication function
The procedure is as follows:
Step
1
2
3
4
5
Action
Determine all the necessary hardware and software components : terminal equipment, branch cables, connection fittings, main cables, wiring testing systems, development systems for process control applications, installation operation systems (adjustment, diagnostics, maintenance).
Assemble and test the wiring system (cables and connection fittings).
Connect the terminal fittings and configure their communication channels.
Test the accessibility of each channel at all architecture points by using PL7 in local mode and in connected mode on both the TSX 57 or TSX 37 present (use of the "transparency" function). This is applicable to PL7-2 or PL7-3 if the TSX
17 or the TSX model 40 is present in the configuration).
Program the PLC applications in the same way as their communication functions.
TLX DS COM PL7 xxE
19
General points
20
TLX DS COM PL7 xxE
Addressing
2
Presentation
Aim of this chapter
What's in this
Chapter?
This chapter presents X-WAY communications principles of addressing.
This Chapter contains the following Sections:
Section
2.1
2.2
Topic
General points
Communication via a programming terminal
Page
TLX DS COM PL7 xxE
21
Addressing
2.1
General points
Presentation
Aim of this subchapter
This sub- chapter presents the communication X-WAY’s general rules for addressing.
What's in this
Section?
This Section contains the following Maps:
Topic
Addressing of a communication item
Addressing system with PL7 language
Type of addressing
Addressing a processor’s channels of communication
Addressing a TSX SCY 21600/21601 communication module
Examples of intra-station addressing : Uni-telway addressing
Examples of intra-station addressing : FIPIO addressing
Inter-station Addressing Examples
Page
22
TLX DS COM PL7 xxE
Addressing
Addressing of a communication item
Presentation
Addressing
In a X-WAY architecture each station is identified by an unique address made up of a network number and a station number.
Inside a station each item of communication also has a topological address which determines its access path.
Addressing is of the form:
ADR#{n.s}xy.i.j
The following table shows the different addressing parameters:
Parameter
{n.s} xy.i.j
Description corresponds to the X-WAY addressing l l n: indicates the number of the network.
s: indicates the number of the station.
l l corresponds to the topological address l xy: indicates the number of the rack and of the module respectively (corresponds to the geographical position of the module ).
i: indicates the number of the channel.
j: indicates the destination device address (slave number,
…).
Example
Note: If the number of the rack is other than 0, the number of the module is entered with two digits (examples: 05, 10, ...).
The example is concerned with slave 2, in channel 1, in the module placed in slot 5 of rack 7 in station 3 on network 20:
ADR#{20.3}705.1.2
TLX DS COM PL7 xxE
23
Addressing
Addressing system with PL7 language
Presentation
Key words
Some key words are used in order to facilitate access to certain items of communication (server UNI-TE, application PL7,…) or in order to carry out broadcast exchanges.
These exchanges are carried out by communication functions, which are described in the following chapter.
l l
The key words are: l the key word SYS allows access to UNI-T, which is the server of the CPU, of a channel, of a communication module, … .
the key word APP allows access to the PL7 application of a station.
the key word ALL is defined to describe a particular type of broadcast. It can replace one of the elements of a topological address. The level of dissemination is determined according to location of the key word ALL in the address: l joined onto the network number, broadcast occurs in all of the stations in the selected network (example: 2.ALL allows access to all stations connected to l network 2), joined onto the station number, broadcasting occurs in all the items linked to the intra-station communication channels (example: 2.4.ALL allows access to all of the communication items in station 4 found on network 2).
Note: When the transmitting application wishes to communicate with a text block function in the PL7-2 or PL7-3 application of a PLC TSX series 7, the key word must be APP.num
where num corresponds to the number of the exchanges target text block
24
TLX DS COM PL7 xxE
Addressing
Type of addressing
Presentation The following table repeats the different types of addressing.
Local addresses The local addresses contain the topological addresses and the slave addresses on a bus.
Destination
UNI-TE server of a TSX Micro/Premium
PL7 application Micro/Junior/Pro
PL7-3 application
Uni-telway slave
Modus slave
Character mode link
Module server
Sub-module server
Server to a FIPIO device
Address
SYS
APP
APP.number of the text block module.channel.slave number module.channel.slave number module.channel.SYS
module.SYS
module.channel.SYS
\module.channel.connecting point\SYS
Distant addresses
Addresses in circulation
Distant addresses correspond to the addresses of equipment connected to a network.
Destination
Target on a distant network
Destination on a local network
Address
{network.station}local address
{station]local address
The addresses in circulation are functions of the destination equipment.
Destination
Broadcasting to all stations
Broadcasting to all modules
Broadcasting to all Uni-telway or Modbus slaves
Address
{network.ALL}local address
ALL.SYS
module.channel.ALL
TLX DS COM PL7 xxE
25
Addressing
Addressing a processor’s channels of communication
Presentation
With a single format supply
The following examples give the different types of addressing associated with a processor’s channels of communication.
The examples will be based upon a TSX Premium processor.
Following the desired configuration, there may be a single or double format supply in the rack which takes up 1 or 2 slots. The modules have a geographic address depending on the position of the module in the rack.
The supply takes up a slot The processor’s communication channels will therefore be able to have the following addresses:
With a single format supply
Module 0. Channel 2 : FIPIO port (built-in channel )
Module 0. Channel 1 : PCMCIA card (welcome channel)
Module 0. Channel 0 : terminal port (built-in channel )
The supply takes up two slots. The processor’s communication channels could therefore have the following addresses:
26
Module 1. Channel 2 : FIPIO port (built-in channel)
Module 1. Channel 1 : PCMCIA card (welcome channel)
Module 1. Channel 0 : terminal port (built-in channel)
TLX DS COM PL7 xxE
Addressing
Addressing a TSX SCY 21600/21601 communication module
Presentation The following examples give the different types of addressing associated with the
TSX SCY 21600 and the TSX SCY 21601 communication modules.
The examples will be based upon a TSX Premium processor.
Note: Remember that these kind of communication modules are limited in accordance with the type of processor being used. Refer back to the starting manual in order to evaluate the number of communication operations channels.
Examples
Module 0.
Channel 0 : terminal port
(built-in channel )
The modules communication channels will be able to have the following addresses:
Rack 0
Module 5.
Channel 0 : built-in link
Module 0.
Channel 1 : PCMCIA card
( welcome channel )
Rack 1
Module 5.
Channel 1 : PCMCIA card
Module 110.
Channel 0 : built-in link
Module 110.
Channel 1 : PCMCIA card
Rack 7
Module 705.
Channel 0 : built-in link
Module 705. Channel 1 : PCMCIA card
TLX DS COM PL7 xxE
27
Addressing
Examples of intra-station addressing : Uni-telway addressing
Presentation With this addressing, a master station may gain access to different slaves connected on a bus.
In the following examples, the slaves are linked to the master station (station with a
TSXPremium processor) by an Uni-telway bus. See Communication via Uni-telway
Addressing rules Addressing applies in this configuration: l l for the modules address: l always 0 if the master station is a TSX Micro PLC l 0 to 710 if the master station is a TSX Premium PLC for the channel address: l l 0 if it is a terminal port connection l 0 if it is the built in link connection of a TSX SCY 2160 module • l 1 if it a PCMCIA card connection for the slave: l 1 to 98 if the slave is connected to a PCMCIA card or to the built in link of a
TSX SCY 2160 module • .In this case the station master can scan up to 98 l slaves.
1 to 8 if the slave is connected to the terminal point. In this case the station master can scan up to 8 slaves.
Terminal port connection
A piece of equipment with the address Ad0=8 is connected to the terminal port of a
TSX Premium.
Master
Slave
Ad0 = 8
Addressing of slave 8: ADR#0.0.8
28
TLX DS COM PL7 xxE
Addressing
Module TSX SCY
21600/21601 connection
A piece of equipment with the address Ad0=1 is connected to the built in link of a
TSX SCY 21600/21601 in position 2 in the rack.
Master
Slave
Ad0 = 1
Addressing of slave 1: ADR#2.0.8
TLX DS COM PL7 xxE
29
Addressing
Examples of intra-station addressing : FIPIO addressing
Presentation Exchanges with the manager are changes of variables or changes of messages.
See(See : PL7 Junior, Pro ; Application-specific functions volume 1) .
To gain access to the server of messaging UNI-TE the syntax of the addressing is as follows:
\module . channel . Linkage point \ SYS
Addressing rules In the case of a FIPIO communication, addressing applies: l for the modules address: l l
0 if the station master possesses a single format supply
1 if the station master possesses a double format supply l l for the channel address: always 2 because the link is built into the processor for the connecting point: 1 to 127 because it is possible to connect up to 127 items of equipment on the bus
Examples In the following example, the manager is aimed at TSX Premium at connecting point
4 or CCX 17 at connection point 8.
30
Addressing of equipment item number 4: \0.2.4\SYS
Addressing of equipment item number 8: \0.20,8\SYS
TLX DS COM PL7 xxE
Addressing
Inter-station Addressing Examples
At a Glance
Example 1
For an inter-station exchange to take place (i.e. an exchange between two stations on the same network or on two different networks), the address must show both the number of the network and the number of the destination entity.
The multi-network configuration is as follows:
Network #1
Network #11 Network #13
Network #8
Network #21
TLX DS COM PL7 xxE
In the first case, station B addresses station A's system:
ADR#{21.1}SYS
In the second case, station B addresses station C:
ADR#{1.2}5.0.56
31
Addressing
Example 2
Station 4
The example below shows how to access a CCX17 system connected to a FIPIO bus (connection point 6) and communicate with text block TXT 8 on a model 40 programmable PLC on network 2.
FIPWAY: Network #2
Station 2
Communication with TXT 8 block
FIPIO
Network #3
Station 1
FIPWAY
Station 3
Communication with CCX 17 system
Connection Point 6
The address of the TXT 8 text block on the TSX 7 station 4 PLC is:
ADR#{2.4}APP.8
The address of the CCX 17 system is:
ADR#{2.4}\0.2.6\SYS
32
TLX DS COM PL7 xxE
Example 3
Addressing
For a TSX47-107 PLC, the Uni-Telway (SCI) communication module integrated into the processor is accessed by channel 100 = 0.100.x.
The address is:
ADR#{2.4}\0.100.x
TLX DS COM PL7 xxE
33
Addressing
2.2
Communication via a programming terminal
Presentation
Aim of this chapter
What's in this
Section?
This sub-chapter presents the general rules of addressing and communication via a programming terminal.
This Section contains the following Maps:
Topic
Communicating via a programming terminal
How to define the PLC’s address
Examples of connection in Uni-telway mode
Examples of remote connection in FIPIO or FIPWAY mode
Examples of remote connection in Uni-telway mode
Examples of remote connection in ETHWAY mode or in TCP/IP mode
Page
34
TLX DS COM PL7 xxE
Addressing
Communicating via a programming terminal
Presentation
Connection possibilities
As for the PLCs TSX Micro and TSX Premium communicating via networks, it is possible to access these stations via the programming terminals.
Access to a remote item of equipment by the programming terminal requires the definition of a driver and of the address of the item of equipment in the PL7 software.
This address must be known in order to be able to locate a network PLC.
It is therefore necessary to configure the addresses of each station or item of l l l equipment present on the bus or network before starting to communicate.
The addresses can be configured: by the PL7 software for the TSX Micro and TSX Premium PLC, in a physical way (example: address coding on the packages TSX SCA 62), by specific software.
l l l
A programming terminal can connect: in Uni-telway mode, in FIPIO or FIPWAY mode, in TCP/IP mode.
TLX DS COM PL7 xxE
35
Addressing
How to define the PLC’s address
Presentation
Steps to follow
This procedure allows connection to a remote PLC on a network or a bus.
The procedure is as follows:
Step
1
2
Action
Open PL7 software
Select the command AP
→
Define the address of the PLC… .
Result
Define PLC Address
Driver
UNTLW01
Address
SYS
OK Cancel
?
Observations
3
4
5
Select the driver according to the mode of communication.
Enter the address of the PLC to be accessed.
Validate with the key Ok .
The driver UNTLW01 is chosen by default. It allows access to the stations which are uniquely in Uni-telway mode.
For a connection in FIPIO mode, select driver FIO01 or FIP02 .
For a connection in ETHWAY mode, select driver XIP01
The address by default is SYS . This address corresponds to a connection in local mode in order to access the PLC’s system.
For a remote connection, the address must be modified by the remote destination address.
36
TLX DS COM PL7 xxE
Addressing
Examples of connection in Uni-telway mode
Presentation
Connection in local mode
In uni-telway mode, the addresses 1, 2 and 3 are reserved for the programming terminal.
The programming terminal is connected on the PLC’s TER or AUX port.
Connection to a slave on the terminal port
In this configuration, the values by default are appropriate.
The PLC slave is connected to the master by the TER port and the programming terminal is linked to the AUX port.
Master
Slave Ad0 = 4 l l
In this configuration, the definition of the PLC’s address is as follows: the driver is at its value by default.
the address is 0,0,4 .
TLX DS COM PL7 xxE
37
Addressing
Connection to a slave on a
PCMCIA card
The PLC slave is connected to the master by the PCMCIA card and the programming terminal is linked to the TER or AUX port.
Master
Slave Ad0 = 4
In this configuration, the definition of the PLC address is as follows: l l the driver is at its value by default.
the address is 0,1,4 .
38
TLX DS COM PL7 xxE
Addressing
Examples of remote connection in FIPIO or FIPWAY mode
Presentation
Connection in
FIPIO mode
A programming terminal can connect to the PLC in FIPIO mode or in FIPWAY mode.
In both cases, the programming terminal must be fitted: l either from coupler TSX FPC 10 with the drivers that are linked to it ( each machine equipped with a PC AT bus), l or from coupler TSX FPP K200 with the drivers that are linked to it ( each machine equipped with a PCMCIA slot),
In order to communicate in FIPIO mode, the connection port for the programming terminal is 63.
\0,10,0\SYS
0
FIPIO
1
\0,1.4\SYS
4
63 l l
To access station 0, the definition of the PLC address is as follows: the driver is at value FIP01 .
the address is \0,1,0\SYS .
l l
To access station 4, the definition of the PLC address is as follows: the driver is at value FIP01 .
the address is \0,1,4\SYS .
TLX DS COM PL7 xxE
39
Addressing
Connection in
FIPIO mode
To communicate in FIPWAY mode, the programming terminal has its own address.
FIPWAY network #1
S4
S1
S3 l l
To access station 1, the definition of the PLC’s address is as follows: the driver is at value FIP01 .
the address is {1,1}SYS .
40
TLX DS COM PL7 xxE
Addressing
Examples of remote connection in Uni-telway mode
Presentation The programming terminal accesses the remote stations connected to a network.
In this configuration, the programming terminal must be connected to a Uni-telway bus. The station master of the Uni-telway bus must be directly linked to the remote station via a network, or linked by interposed networks.
Connection via single network
Network #17
The main station of the Uni-telway bus is linked directly to the remote station S1 via a FIPWAY network.
The programming terminal selects the system of the remote station S1.
Master l l
In this configuration, the definition of the PLC’s address is as follows: the driver is at its value by default.
the address is {17,1}SYS .
TLX DS COM PL7 xxE
41
Addressing
Connection via interposed networks
The remote station is accessible via several networks.
The programming terminal is linked to a station in Uni-telway mode and selects systems of stations A and B.
1 ETHERNET Network #1 2
Network #11
3
B
4
FIPWAY
Network #12
5
Uni-telway
56
C
4
FIPWAY
6
Network #21 1
FIPWAY
A l l
To access station A, the definition of the PLC’s address is as follows: the driver is at its value by default.
the address is {21,1}SYS .
To enter station B, the definition of the PLC’s address is as follows: l l the driver is at its value by default.
the address is {11,4}SYS .
42
TLX DS COM PL7 xxE
Addressing
Examples of remote connection in ETHWAY mode or in TCP/IP mode
Presentation A programming terminal can connect to the PLC in ETHWAY mode or in TCP/IP mode.
In both cases, the programming terminal is linked to the network via any ETHERNET network card.
Note: When the programming terminal is a portable computer, fitted with the operating system for Windows 95 or OS/2, the PCMCIA ETHENET card can not be used to communicate in ETHWAY mode.
TLX DS COM PL7 xxE
43
Addressing
Connection in
ETHWAY mode
To communicate in ETHWAY mode with a programming terminal, the ETHERNET network card is bound to the driver ETHWAY01 or ETHWAY02 (possibility to have two occurences).
While the driver configures ETHWAY01 it is necessary to provide it with an address
{network.station}for the local station.
ETHWAY network #1
1
2
3
3 FIPWAY network #4
4
A
To access station A, the definition of the PLC’s address is as follows: l l the driver is at value the address is
ETHWAY01
{4,4}SYS
.
To enter station B, the definition of the PLC’s address is as follows: l l the driver is at value the address is
ETHWAY01
{1,3}5,0,8 .
.
Uni-telway
8
B
44
TLX DS COM PL7 xxE
Connection in
TCP/IP mode.
Addressing
To communicate in TCP/IP mode with a programming terminal, the ETHERNET network card is bound to the driver XIP01 or XIP02 (possibility to have two occurences).
First the XIP driver has the station addresses linked to the programming terminal in its configuration and it must be started before all X-WAY communication on TCP/IP.
While the XIP driver configures itself, it is necessary to provide it with an address
{network.station}for the local station.
ETHERNET network #1
1
2
3
3
4
FIPWAY network #4
A
To access station A, the definition of the PLC’s address is as follows: l l the driver is at value the address is
XIP01
{4,4}SYS .
.
To enter station B, the definition of the PLC’s address is as follows: l l the driver is at value the address is
XIP01
{1,3}5,0,8 .
.
Uni-telway
8
B
TLX DS COM PL7 xxE
45
Addressing
46
TLX DS COM PL7 xxE
Communication functions
3
Presentation
Aim of this chapter
What's in this
Chapter?
This chapter presents the communication functions
This Chapter contains the following Sections:
Section
3.1
3.2
3.3
3.4
3.5
Topic
General points
Help whilst entering the communication functions
Description of the different communication functions
Characteristics of communication
Objects linked to communication
Page
TLX DS COM PL7 xxE
47
Communication functions
3.1
General points
Presentation
Aim of this subchapter
This sub-chapter presents the principle and the structure of the communication functions.
What's in this
Section?
This Section contains the following Maps:
Topic
Presentation of the communication tools
Structure of communication functions
The communication functions
Target address
Structure of management parameters
Management parameters: communication and operation reports
Management parameters : Length and Timeout
Performances
Server function
Page
48
TLX DS COM PL7 xxE
Communication functions
Presentation of the communication tools
Presentation All the channels of X-WAY communication use a messaging service to allow the exchange of data.
The PL7 language interface offers specific communication functions which authorize the sending and/or the receipt of messages to / from a communication item.
The destination items of an exchange can be localized just as well in a local station as in a remote station on a communication channel or directly in the CPU.
The communications functions offer an independent interface of the location of the target entity and hide the code of the communication requests from the user. They also guarantee communication compatibility with the TSX model 40 PLC, the TSX
17 and the series 100 PLC.
Note: The processing of communication functions is asynchronous with the processing of the applied task which has allowed them to be activated. The only functions that are the exception, are the functions for the sending/receipt of telegrams and the operation shutdown function, because their running is synchronous with the running of the activation task.
A communication function is said to be synchronous when it is fully implemented during the PLC task that activated it.
A communication function is said to be asynchronous when it is implemented during one or more PLC tasks after the one that activated it.
TLX DS COM PL7 xxE
49
Communication functions
Structure of communication functions
Presentation
Syntax l l l
A communication function uses: an address parameter, parameters specific to a communication operation, management parameters
The syntax of a communication function presents itself in the following form:
Function (Target address, Specific parameters, Management parameters)
The following table describes the different constituent parts of a function:
Part
Function
Target address
Specific parameters
Management parameters
Description corresponds to the type of communication function.
indicates the address of the destination of the exchange.
depend on the type of communication function. They are described for every communication function.
The management parameters are common to all asynchronous communication functions. They are made up of: l a parameter that gives information about the activity of the function, l a parameter that specifies the exchange number that identifies the transaction in action l a parameter that contains the report of the exchange ( communication report and operation report), l a timeout parameter that allows the control of the absence of response l a length parameter that allows the storage of the number of bytes to send or the number of bytes received.
50
TLX DS COM PL7 xxE
Communication functions
The communication functions
Presentation Functions allow communication from one item of equipment to another. Certain functions are common to several types of communication channel, others can be specific to one communication function.
Note: The processing of communication functions is asynchronous in relation to the processing of the application task that has activated them. Only the telegram sending/receipt function and the operation shutdown function are the exceptions because their execution is synchronous with the running of the activation task
Asynchronous communication functions
A communication function is said to be asynchronous when it is implemented during one or more PLC tasks after the one that activated it.
The following table presents the communication functions with asynchronous application:
Function
READ_VAR
WRITE_VAR
SEND_REQ
DATA_EXCH
PRINT_CHAR
INPUT_CHAR
OUT_IN_CHAR
READ_GDATA
WRITE_GDATA
SERVER
READ_Asyn
WRITE_Asyn
Purpose… the basic language for reading objects: words, bits, double words, floating internals, constant words, word and bit system, timers, monostables, drum, registers and counters.
the reading of base language objects: word, bit, double word, floating internals, word and bit system.
emission of UNI-TE requests sending and/or request of receipt of data writing of a chain of characters.
reading of a chain of characters.
sending of a chain of characters and wait for a response.
reading of Modbus Plus common data writing of Modbus Plus common data to handle requests READ_VAR and WRITE_VAR on Modbus immediately (immediate server)..
reading of 1 K of electronic messaging.
the writing of 1 K of electronic messaging.
Note: Triggering the asynchronous functions on edge and not on state is recommended.
TLX DS COM PL7 xxE
51
Communication functions
Synchronous communication functions
A communication function is said to be synchronous when it is fully implemented during the PLC task that activated it.
The following table presents the communication functions with synchronous application:
Function
SEND_TLG
RCV_TLG
CANCEL
ROR1_ARB
SWAP
Purpose… sending a telegram.
receipt of a telegram.
stopping an exchange whilst in action.
shifting a byte in a table to the right.
swapping bytes in a table of words.
Note: Functions ROR1_ARB and SWAP do not effect the communication processing, but they are necessary to handle the response of certain UNI-TE requests. For example, reading a table of words with the function SEND_REQ .
52
TLX DS COM PL7 xxE
Yes
No
Communication functions
READ_VAR
WRITE_VAR
SEND_REQ
DATA_EXCH
PRINT_CHAR
INPUT_CHAR
OUT_IN_CHAR
SEND_TLG
RCV_TLG
READ_GDATA
WRITE_GDATA
SERVER
WRITE_Asyn
READ_Asyn
Availability of the functions according to their protocol
Function
The following table shows the protocol supporting the communication functions:
FIPWAY FIPIO Modbus
-
-
-
-
-
-
X
X
X
X
-
-
-
-
X
X
-
X
X
X
X
X
X
X
-
-
-
-
-
-
-
-
-
-
-
-
-
-
X
X
X
Uni-telway character mode
X -
-
-
-
X
X
X
-
-
-
-
-
-
-
-
-
-
-
-
-
X
X
X
-
-
X
-
-
X
-
-
-
-
-
X
-
-
-
X
X
-
Modbus
Plus
X
-
-
-
X
X
X
X
X
X
TCP/IP
ETHWAY
X
-
-
TCP/IP
TCP/IP
Caption :
X
-
TLX DS COM PL7 xxE
53
Communication functions
Target address
Presentation This parameter indicates the address of the target equipment of the exchange.
It can be localized: l either by the internal words (%MW) or the internal constants (%KW), l or written directly in immediate value.
To facilitate the preparation phase of the exchange, the PL7 language uses an operator with the syntax ADR# that authorizes the assignment of an immediate value, which is an address in a table that always has six internal words (%MW) or six constant consecutive words (%KW). See
Example
%MWi:6:=ADR#{2.4}\0.2.4\SYS
54
TLX DS COM PL7 xxE
Communication functions
Structure of management parameters
Presentation
Structure
With four internal words (%MWk:4), parameters identify the address of the PL7 data used to monitor the communication functions.
The first two words %MWk and %MWK+1 are managed by the system.
You will be in charge of managing the last two words %MWk+2 and %MWk+3.
The four words %MWk:4 respect the following structure :
Most significant byte Least significant byte
Data managed by the system
Data managed by you
Number of the word
%MWk
%MWk+1
%MWk+2
%MWk+3
Number of exchange
Operation report
Timeout
Length
Activity bit
Communication report
Activity bit
Number of exchange
This bit corresponds to %MWk:x0. It signals the state of the application of the communication function.
It is set at 1 whilst started and drops back down to 0 at the end of its execution.
During the sending of a communication function, the system automatically assigns it a number, allowing the identification of the exchange.
This number allows the exchange in progress to be stopped if necessary (by the functions intermediary CANCEL ).
TLX DS COM PL7 xxE
55
Communication functions
Management parameters: communication and operation reports
At a Glance Communication and operation reports are part of the management parameters.
Note: It is recommended that you always test reports for communication functions as soon as their execution is complete and prior to a subsequent activation. On cold start, you must check that all the management parameters of the communication functions have been reset to 0.
Communication report
This report is common to all functions. It is significant when the value of the activity bit changes from 1 to 0.
Reports whose value is between 16#01 and 16#FE concern errors detected by the processor which executed the function.
The different values which this report may have are shown in the table below:
16#07
16#08
16#09
16#0A
16#0B
16#0C
16#0D
16#0E
Value
16#00
16#01
16#02
16#03
16#04
16#05
16#06
16#0F
16#10
16#11
16#12
16#13
Communication report (least significant byte)
Exchange successful
Exchange stopped on timeout
Exchange stopped at user's request ( CANCEL )
Incorrect address format
Incorrect destination address
Incorrect management parameter format
Incorrect specific parameters
Problem sending to destination
Reserved
Size of receive buffer insufficient
Size of send buffer insufficient
No processor system resources
Incorrect exchange number
No telegram received
Incorrect length
Telegram service not configured
Network module missing
No request
Application server already active
Incorrect UNI-TE V2 transaction number
56
TLX DS COM PL7 xxE
Communication functions
Value
16#FF
Communication report (least significant byte)
Message refused
Note: The function can detect an error in the parameters before activating the exchange. In this case, the activity bit remains at 0, and the report is initialized with the values corresponding to the fault.
Operation report This report byte, which is specific to each function, specifies the result of the operation on the remote application.
l l
It is only significant if the communication report has the following values:
16#00 (exchange successful),
16#FF (message refused).
If the communication report has the value 16#00, the operation report has the following values:
Value
16#00
16#01
16#02
16#03
Operation report (most significant byte)
Positive result
Request not processed
Incorrect response
Reserved
If the communication report has the value 16#FF, the operation report has the following values:
Value
16#01
16#02
16#03
16#04
16#05
16#06
16#07
16#08
16#0B
16#0C
16#0D
16#0F
Operation report (most significant byte)
Lack of resources in direction of processor
Lack of line resources
No device or without resources (*)
Line error
Length error
Faulty communication channel
Addressing error
Application error
No system resources communication function not active
Destination does not exist
Intra-station routing problem or channel not configured
TLX DS COM PL7 xxE
57
Communication functions
Value
16#11
16#12
16#14
16#15
16#16
16#17
16#18
16#21
Operation report (most significant byte)
Address format not handled
Lack of destination resources
Connection not operational (example: ETHERNET TCP/IP)
Lack of resources on local channel
Access not authorized (example: ETHERNET TCP/IP)
Inconsistent network configuration (example: ETHERNET TCP/IP)
Connection temporarily unavailable
Application server in stop
Legend:
(*) Code only handled by the following PCMCIA cards: TSX FPP20 and TSX
FPP10
58
TLX DS COM PL7 xxE
Communication functions
Management parameters : Length and Timeout
Introduction
Length
These two parameters are dependant upon you.
The length parameter is used both to specify the number of characters (in bytes) to send when sending a message and to store the number of characters (in bytes) received upon the receipt of a message.
Each time before starting certain communication functions SEND_REQ ,
DATA_EXCH , PRINT_CHAR , SEND_TLG you must update the length parameter.
Note: For a function PRINT_CHAR for example, the length parameter %MWk+3 must contain the number of octets (characters) to be sent before sending a message. After sending the characters, it contains the number of characters sent in the form of a communication report. If another function, which has a differing amount of bytes to be sent from the preceding function, uses the same report table during the application, you must initialize %MWk+3 with the new number of bytes to be sent. If not %MWk+3 maintains the number of bytes sent by the preceding function.
TLX DS COM PL7 xxE
59
Communication functions
Timeout Timeout determines the maximum waiting time for a response. The time base for this parameter is 100 ms (value 0 corresponds to an infinite stand by value).
If timeout has elapsed, the exchange finishes with an error report, in the same way the receipt of a response is refused by the system after the end of timeout.
Example
Start function
End of timeout
Activity bit = 1
Timeout activation
Report set to zero
Allocation of exchange number
Receive response
Activity bit = 0
Report = 1
Activity bit = 0
Stop timeout
Report update
Note: The timeout value of a communication function must be sufficient to guarantee the reception of the response to the question asked. This time depends on the type of network and on the load in effect at the moment of the transaction.
60
TLX DS COM PL7 xxE
Communication functions
Performances
At a Glance
Total number of communication functions l l l
The exposed performances are as follows: the total number of communication functions executed by type of processor, the communication function number by protocol and communication channel, the maximum frame size.
TSX Micro PLCs permit, at the most, simultaneous execution: l l of four communication functions with the terminal port (channel 0), of four communication functions with the PCMCIA card (channel 1).
TSX 57 10 PLCs permit, at the most, the simultaneous execution of 16 communication functions with all their communication channels.
TSX 57 20 PLCs permit, at the most, the simultaneous execution of 32 communication functions with all their communication channels.
TSX 57 25/30, PCX 57 35 and PMX 57 35 PLCs permit, at the most, the simultaneous execution of 48 communication functions with all their communication channels.
TSX 57 40/45and PMX 57 45 PLCs authorize, at the most, the simultaneous execution of 64 communication functions with all their communication channels.
TLX DS COM PL7 xxE
61
Communication functions
Capacity of each communication channel
Configuration
The following table groups together the capacities of each communication channel simultaneously processing transactions according to different configurations.
TSX Micro TSX 57 10 TSX 57 20
Uni-telway master terminal port
Uni-telway master PCMCIA or SCY link
Uni-telway client slave terminal port
Uni-telway client slave PCMCIA or SCY link
Uni-telway server slave terminal port 4
Uni-telway server slave PCMCIA or SCY link 4
Modbus terminal port (1)
Modbus PCMCIA or SCY link
4
4
4
1
4
1
Character mode terminal block
Character mode PCMCIA or SCY link
FIPWAY messages
FIPWAY telegrams (2)
Modbus Plus
ETHERNET
4
-
1
4
4
1 (10 ms)
-
8
4
6
1
1
4
8
1
8
8
1 (10 ms)
4
16
-
8
4
6
1
1
4
8
1
8
8
1 (10 ms)
4
16
4
6
1
1
4
8
TSX 57 25/30/40/45
PCX 57, PMX 57
1
8
-
8
8
1 (10 ms)
4
16
Key:
(-)
(1)
(2)
None
Only for TSX Micro PLCs
The TSX FPP 20 card permits the sending of telegrams every ten ms.
Note: The performances of the communication functions of the TSX Micro and
TSX Premium PLCs decrease when the MAST task period increases, but the cycle capacity remains constant.
Note: TSX Premium PLC terminal blocks only support 10 or 11 bit formats.
62
TLX DS COM PL7 xxE
Maximum frame size
Communication functions
The maximum frame size depends on the communication channel, on the communication coupler and on the type of function executing the messaging.
Protocol
Uni-telway
Character mode
FIPWAY
Modbus
ETHWAY
TCP/IP
Modbus Plus
Channel
Terminal block
Maximum frame in bytes
128
TSX SCP 11• and TSX SCY 2160• 240
Terminal block 120
TSX SCP 11• and TSX SCY 2160• 4096
TSX FFP 20 128
TSX SCP 11• and TSX SCY 2160• 256
256
TSX MBP 100
1024
256
TLX DS COM PL7 xxE
63
Communication functions
Server function
Introduction
Illustration
The server function allows response to requests from client equipment.
Processors TSX 57, 35,PCX 57 35, PMX 57 35 offer two request servers: l a main server (recommended for requests with less than 256 bytes ), l a auxiliary server (recommended for requests with less than 1024 bytes),
The two servers can be simultaneously activated.
The following chart represents the prompting of the servers in the PLC cycle:
Input
Main server
(UNI-TE server)
MAST task
Processing
Auxiliary server
(asynchronous server)
Output
64
TLX DS COM PL7 xxE
Main server
Subordinate server
Communication functions
This server corresponds to port 0 (server UNI-TE). It is activated at the beginning of the PLC’s MAST cycle.
The response time seen from the client PLC depends on the server PLC’s cycle time. It allows the handling by PLC cycle of up to 4 simultaneous requests.
All UNI-TE requests are supported. The size of the request must be less than 256 bytes.
This item is addressable to the topological address SYS or {network.station}SYS.
This server corresponds to port 7 (server UNI-TE). It is only activated as a periodic task at the end of the PLC cycle after the processing of the MAST task, whilst waiting for the beginning of the following cycle.
More importantly the beginning of the following cycle could interrupt a request that is in action. Access to this server is therefore reserved to applications that do not require any form of coherence in the read or written data.
The application response time will be essentially a function of the PLC cycle time.
The size of the response can be 1024 bytes. It is not accessible via a communication function, the server handled the requests READ/WRITE object (bit or word), Read object list…
TLX DS COM PL7 xxE
65
Communication functions
3.2
Help whilst entering the communication functions
Presentation
Aim of subchapter
What's in this
Section?
This sub-chapter presents help when entering communication functions with the software PL7.
This Section contains the following Maps:
Topic
Help with entering the communication functions
Accessing a specific function, method or procedure type instruction
Help on address input
Page
66
TLX DS COM PL7 xxE
Communication functions
Help with entering the communication functions
Introduction
Illustration
Whilst programming you can have access to the input help screen giving information about all the parameters of a communication function.
This help is accessed via the functions in the PL7 software library.
The following illustration shows the help screen when entering a communication function.
READ_VAR
Parameters
Address:
Type of Object to Read:
Address of the first object to Read:
Number of Consecutive
Objects to Read:
Reception Zone:
Report:
Possible types: %KWi:n, %MWi:n, (n=6)
Immediate Address (ADR#)
4
?
OK Cancel
Availability
Note: The number and the type of field vary according to the communication function selected.
This screen is available for the following communication functions: l l l l l l l l
DATA_EXCH
INPUT_CHAR
OUT_IN_CHAR
PRINT_CHAR
READ_VAR
SEND_REQ
SEND_TLG
WRITE_VAR
TLX DS COM PL7 xxE
67
Communication functions
Accessing a specific function, method or procedure type instruction
Presentation l l
Application-specific function entry can be accessed by: directly entering the instruction and its parameters in an operate block, by the entry help function accessible through the program editors (LD, IL, ST).
Calling up a function
Step
1
2
3
4
5
Action
Access the required editor.
Depending on the editor used, choose one of the following methods to open the function library.
l l l
Press Shift + F8 (LD, IL,ST editors).
Click on the (LD editor) icon.
Select the command Utilities
→
Note: The function library appears.
Enter call for a (IL, ST editors) function.
PL7 : Library functions
EF
Function information Parameters
Family Lib.V. App.V
Name
Characters string 2.00
-
Interpolation Command 1.0
-
SMOVE
Movement Command
Communication
Call format
2.00
-
3.07
-
Parameters of the METHOD:
Name Type Kind Comment
Channel MAIN Channel
NRUN WORD
G9 World
IN
IN
Movement number
G9
Detail...
Comment
Automatic movement command
Family
%CH103.2
01
90
?
Display the call
SMOVE %CH103.2 ( 01.90.01.10000000.20000.0 )
OK Cancel
Select the specific application in the Family field.
Select the instruction in the Name field.
Many of the instructions have a customized entry help screen.
Access this screen by clicking on the Details button.
68
TLX DS COM PL7 xxE
Step
6
7
Communication functions
Action
Enter each instruction parameter (each instruction is developed in the relevant application-specific documentation) l in the customized screen or l in the Entry field in the Library Functions screen. To do this, the Parameter item must be selected in the Function Information field.
Click Ok to confirm.
TLX DS COM PL7 xxE
69
Communication functions
Help on address input
Introduction
How to access the help
To facilitate the input of the address, a help screen is given.
This screen allows a description of the architecture in which the communication function is integrated and generated.
In completing the fields of this description, the address is automatically generated.
When entering the parameters of the communication function, you can access help on the address entry in the following way:
Step
1
Action
Select the following button:
?
Illustration
70
The following illustration shows the Help screen when entering the address for a communication function.
Help for Address Entry
Mode
Local Remote
Address Generated
ADR#I0.0I.0.0.1
Network level
Network Selection
Number 0
Station Level
Destination Station: TSX37
Go to
Station Selection
Number: 0
Module
Rack :
Module :
System Module :
Application
0
0
Channel 0
Channel 1
Type : TSX37
Type
Master
Slave
FIP Manager
FIP Agent
Device Level
Destination Device
OK
Protocol: UNI_TELWAY
Slave No.:
Broadcast
1
Type
Master
Slave
FIP Manager
FIP Agent
Cancel
TLX DS COM PL7 xxE
Mode
Network level
Station level
Protocol
Device Level
Limitations
Communication functions
The first parameter to select is the Mode It allows the selection of a type of l l communication: local (bus communication), remote (network communication).
l l l
Only for remote communications, network level allows: input of the network number, input of the station number, selection of the type of station.
This parameter allows according to the communication function to select the type of exchange: l The box Application selects an exchange with a PL7 application (corresponds to APP addressing).
l The box System selects the PLC system of the station designated by the l network level (corresponds to the address SYS).
The box Module signifies that the destination device is connected to the station by a link (Uni-telway, Modbus, Modbus Plus ou FIPIO). This case requires the information: l l the position of the module which supports this link, the type of this module.
The field Protocol defines the exchange protocol between the network station and the exchange destination device.
This parameter allows you to specify: l l the type of destination device, the address of this device.
In the Help screen for address entry, certain communications (from a Uni-telway slave) make it necessary to code the address of the destination in the send buffer.
See
Transmitting UNI-TE Requests: SEND_REQ, p. 94.
The Help window allows complete input of the part corresponding to ADR# while warning the user that he must code the supplementary buffer.
The coding of remote station addresses is only supported by the following devices:
TSX 17, TSX 37, TSX 47-107, TSX 57.
For third party devices only the input of the port number is proposed, in other cases the input of the address must be made manually.
TLX DS COM PL7 xxE
71
Communication functions
3.3
Description of the different communication functions
Presentation
Aim of this subchapter
This sub-chapter presents every type of communication function.
What's in this
Section?
This Section contains the following Maps:
Topic
Reading standard objects: READ_VAR
Reading standard objects : input Help screen
Reading standard objects : example of use
Reading standard objects : example of network use
Reading Standard Objects: example of an exchange of variables with parameter check
Reading standard objects : More detail on reading bits
Reading standard objects : reading a timer’s current parameters
Reading standard objects : reading the current parameters of a monostable
Writing standard objects : WRITE_VAR
Writing Standard Objects: Entry screen help
Writing standard objects: example of use
Writing standard objects: example of network use
Writing standard objects: example of exchange of variables with parameter monitoring
Transmitting UNI-TE Requests: SEND_REQ
UNI-TE request transmission input Help screen
UNI-TE request transmission example of network use
UNI-TE request transmission: List of requests
Exchange of text data : DATA_EXCH
Exchange of text data : input Help screen
Text Type Data Exchange: examples of use
Text Type Data Exchange: examples of use with an Altivar
Sending a telegram : SEND_TLG
Sending a telegram: entry help screen
Page
72
TLX DS COM PL7 xxE
TLX DS COM PL7 xxE
Communication functions
Topic
Sending a telegram : example of use
Receiving a telegram : RCV_TLG
Receiving a telegram : example of use
Writing a string of characters. PRINT_CHAR
Writing a chain of characters : input help screen
Writing of a chain of characters : example of use
Reading a character string: INPUT_CHAR
Reading a string of characters : input Help screen
Reading a character string : example of use
Sending/receiving a string of characters : OUT_IN_CHAR
Sending/receiving a string of characters : input Help screen
Sending/receiving a string of characters : example of use
Stopping an exchange whilst in action. : CANCEL
Stopping an exchange whilst in action : example of use
Shifting a byte to the right in a table : ROR1_ARB
Shifting a byte to the right in a table : example of use
Swapping bytes in a word table : SWAP
Reading of common Modbus Plus data: READ_GDATA
Writing of Modbus Plus common data : WRITE_GDATA
Immediate server : SERVER
Immediate server : example of use
Asynchronous messaging service : WRITE_Asyn and READ_Asyn
Page
73
Communication functions
Reading standard objects: READ_VAR
Introduction The function READ_VAR allows reading of the value of one or several language objects: l internal bit, internal word, system bit, system word, constant word, double internal word, double constant word, l structured objects (timer, monostable, counter, register, drum).
The objects read must always be consecutive. They can be located in a remote CPU or in a device connected by a communication channel of the type ETHERNET TCP/
IP, FIPWAY, Uni-telway, terminal port, Modbus, Modbus Plus, Modem.
The reply must contain a maximum number of bytes depending on the protocol and the type of destination product. See
At the end of the reading operation, the length of the received data is stored in word
4 of the management parameter. See
Structure of management parameters, p. 55.
The function READ_VAR can read up to 1000 consecutive bits in a remote device, whatever this device is and whatever protocol is used (Uni-telway ou Modbus/Jbus).
Note: Reading more than 1000 bits requires the use of the function SEND_REQ .
Note that PLCs TSX 07, TSX 37, TSX 57 cannot send more than 1000 bits following a read request.
74
TLX DS COM PL7 xxE
Syntax
TLX DS COM PL7 xxE
Communication functions
The syntax of the communication function READ_VAR is presented in the following form:
READ_VAR(ADR#0.0.6, '%MW', 100, 10, %MW10:10, %MW40:4)
The following table shows the different function parameters.
Parameter
ADR#0.0.6
'%MW'
100
10
%MW10:10
%MW40:4
Description
Address of the exchange destination. The following addresses
{Network.Station}APP, {Network.Station} APP.num and addresses in circulation are prohibited in this field.
String of characters specifying the type of object to be read: l l l l l l l l l l l l l l l
%I: external input bit
%IW: external input word
%M: internal bit
%MW: internal word
%S: system bit
%SW: system word
%KW: constant word
%MD: double internal word
%KD: double constant word
%T: timer (PL7-3)
%TM: timer (standard CEI 1131)
%MN: monostable
%R: register
%C: counter
%DR: drum
Double word indicating index of the first object to be read.
Word specifying the number of objects to be read.
Table of words containing the value of objects read.
Management parameters. The operation report takes one of the following values: l l l l
16#00: correct read operation
16#01: operating error
16#02: incorrect response
16#03: size of the response is inconsistent
Note: It is not necessary to initialize the length parameter before starting the function.
In Modbus, only objects %M and %MW are usable.
75
Communication functions
Rules for use In PL7, the input of object types must be consistent. Writing must be either all in lower case or all in upper case, if not the function sends a report of 16#06 (incorrect specific parameters).
For the PLCs TSX Micro or TSX Premium, read access of internal bits (via Unil l telway) has the following feature: the forcing value of the bits is returned in the reponse.
the reading of 1 bit thus comprises two response bytes: l the first contains the value of the 8 bits from that requested.
l l the second contains the indentifier of the forcing of these bits.
to read one of the last 8 bits from the memory it is obligatory to read the last 8, if not the function sends a operating report 16#01.
Note: Preview in the size of the reception table, the forcing identifier bytes. If not, error code 16#03 is returned in the report.
76
TLX DS COM PL7 xxE
Communication functions
Reading standard objects : input Help screen
Introduction For this communication function, you can call up the input help screen.
Function parameters
This function supports six parameters:
Parameters
Address
Types of objects
ADR#
%MWX:n
%MW Type of object to be read
Address of first object to be read
%MDx
%KDx
Immediate value
Number of consecutive objects %MWx
%KWx immediate value
Response
Report
%MWx:n
%MWx:4
Comments
If you input a value directly into the field, the Help button for the inputting of addresses is greyed out.
An object list is suggested to you.
In %KDx, an input field for the value is displayed.
In %KWx, a value input field is displayed.
-
-
Example
Note: The symbols are accepted.
The following screen shows an example of function entry:
READ_VAR
Parameters
Address :
Type of object to Read:
Address of first object to
Read:
Number of consecutive
Objects to Read:
Reception Zone:
ADR#0.0.6
%MW
%KD16
10
%MW10
Report:
100
%MW40
10
4
Possible types : %MWin (n=4)
?
OK Cancel
TLX DS COM PL7 xxE
77
Communication functions
Reading standard objects : example of use
Introduction
Illustration
The example deals with the master station reading the internal words %MW100 à
%MW109 from station with address 6 on a Uni-telway bus. The value of the words read must range from the internal word %MW10, the management parameters are introduced from %MW40.
The two stations are connected by Uni-telway bus.
TSX Premium master Slave
Send
Ad0 = 6
Uni-telway
Programming of the function is as follows:
%I3.0
P
%MW40:x0
OPERATE
(1)
(1) READ_VAR(ADR#0.0.6, '%MW', 100, 10, %MW10:10, %MW40:4)
Query parameters:
Parameters
ADR#0.0.6
‘%MW’
100
10
%MW10:10
%MW40:4
Description l l l
0: module
0: channel 0
6: sender address Ad0
Type of object (internal word) address of first object
Number of consecutive objects
Content of reply
Report
78
TLX DS COM PL7 xxE
Communication functions
Reading standard objects : example of network use
Introduction
Illustration
The example deals with the reading of a table of 5 words %MW0 à %MW4 from UNItelway slave with network address 20, station 1, communication coupler TSX SCM
2116 in slot 5, channel in the communication coupler 1, server address Ad0 = 3.
The two stations are connected via a FIPWAY network.
TSX 87
TSX Premium
{20.1}
Uni-telway
FIPWAY network 20
{20.2}
Ad0 = 3
Ad0 = 1
TLX DS COM PL7 xxE
79
Communication functions
Send Programming of the function is as follows:
%I3.1
P
%MW50:x0
OPERATE
(1)
(1) READ_VAR(ADR#{20.1}5.1.3, '%MW’, 0, 5, %MW20:5, %MW50:4)
Query parameters:
Parameters
ADR#{20.1}5.1.3
‘%MW’
0
5
%MW20:5
%MW50:4
Description l l l l
{20.1}: network 20, station 1
5: module
1: channel 1
3: sender address Ad0
Type of object (internal word) address of first object
Number of consecutive objects
Content of reply
Report
80
TLX DS COM PL7 xxE
Communication functions
Reading Standard Objects: example of an exchange of variables with parameter check
At a Glance
Programming the Function
The following example illustrates the READ_VAR communication function with a management parameter check.
Reading a variable
%M21 %I1.2
OPERATE
%MW210:4:=0
OPERATE
%MW212:=50
OPERATE
(1)
%M21
S
(1) READ_VAR(ADR#3.1.7, ‘%MW’, 20, 1, %MW1701:1, %MW210:4) l l l l the input bit %I1.2 can be used to control the function.
the internal bit %M21 can be used to test for function activity.
the first OPERATE block can be used to initialize the management parameters.
the second OPERATE block can be used to initialize the timeout value to 5 s.
TLX DS COM PL7 xxE
81
Communication functions
Programming the check
Exchange check
%M21 %MW210:x0
COMPARE
EN >
%MW211
=
0
<
<>
OPERATE
INC %MW214
OPERATE
INC %MW215
%M21
R
%Q2.2
S
OPERATE
INC %MW216
OPERATE
%MW217:=%MW211 l l l l l the internal word %MW214 counts the number of exchanges.
the internal word %MW215 counts the number of successful exchanges.
the internal word %MW216 counts the number of exchanges generating errors.
the internal word %MW217 stores the error message.
the external output bit %Q2.2 can be used to signal an exchange fault externally.
82
TLX DS COM PL7 xxE
Communication functions
Reading standard objects : More detail on reading bits
Introduction The following examples illustrate the communication function READ_VAR for the reading of bits.
Reading internal
32 bits
The function syntax for reading internal bits is as follows:
READ_VAR(ADR#{20.1}5.1.3, '%M’, 0, 32, %MW100:4, %MW50:4)
The reception table must consist of 8 bytes (4 words), 4 bytes for the value and 4 bytes for the forcing identifier.
Value
Forcing
%MW100
%MW101
%MW102
%MW103
0000
1111
0000
0000
0000
1111
0000
0000
1100
0000
0101
0000
1100
1111
0101
1111
There is forcing when a flag is set to 1, the forcing value is that of the corresponding read bit.
Example
Byte 0
0
1
1
0
1
0
1
Value of the bits Bits forcing
0 1
0
1
0
1
0
1
0
Description
The bit is forced with the value 0.
The bit is not forced.
The bit is forced with the value 1.
The bit is not forced.
The bit is forced with the value 0.
The bit is not forced.
The bit is forced with the value 1.
The bit is not forced.
TLX DS COM PL7 xxE
83
Communication functions
Reading internal
16 bits
The function syntax for reading internal bits is as follows:
READ_VAR(ADR#{20.1}5.1.3, '%M’, 0, 18, %MW100:3, %MW50:4)
The reception table must contain 3 words (or 6 bytes). In effect, to obtain the value of 18 bits, 3 bytes are necessary (modulo 8 nearest to 18) and 3 bytes in addition to contain the forcing value of the 18 bits.
Value %MW100 0000 0000 1111 1111
Forcing %MW101 0000 0000 0000 1111
%MW102 0000 1111 0000 0000
84
TLX DS COM PL7 xxE
Communication functions
Reading standard objects : reading a timer’s current parameters
Introduction
Reading of a timer %T
The following example illustrates the communication function READ_VAR to read the parameters of a timer %T or %TM.
The function syntax for reading a timer is as follows:
READ_VAR(ADR#{17.1}7.1.3, '%M’, 0, 1, %MW100:4, %MW50:4)
The reception table must contain 8 bytes (4 words).
%MW100
E8 01
Preselection type
%MW101
0FG 03
Preset value
%MW102
03 27
Current value
%MW103
00 00
Output R
Output D
Time base
Interpretation of the read bytes
The bytes are interpreted in the following manner:
03
00
00
Value
01
03 E8
27 0F
Comments
Type of preset (see reference manual)
Preset value (1000)
Current value of timer (9999)
Time base (1min.)
Current value of the output R (0 or 1)
Current value of the output D (0 or 1)
TLX DS COM PL7 xxE
85
Communication functions
Reading standard objects : reading the current parameters of a monostable
Introduction
Reading a monostable
The following example illustrates the communication function READ_VAR to read the parameters of a monostable %MN.
The function syntax for reading a timer is as follows:
READ_VAR(ADR#{17.1}7.1.3, '%MN’, 0, 1, %MW100:4, %MW50:4)
The reception table must contain 7 bytes (4 words).
%MW100
D2 01
Preselection type
%MW101
0FG 04
Preset value
%MW102
03 00
Current value
%MW103
00
Output R
Time base
Rules for use If you read the current parameters of two monostables, the parameters of the second begin at the end of the end of the parameters of the first from byte 8 onwards. There is therefore a shift of one byte which must be taken into account when interpreting the read parameters.
The case is identical when reading register parameters which are read on an odd number of bytes (9).
In this case, if you read the parameters of several consecutive functions, there will be shift of 1 byte to the left for even parameters in relation to odd parameters.
This shift does not take place when the number of bytes in the read parameters is even.
86
TLX DS COM PL7 xxE
Communication functions
Writing standard objects : WRITE_VAR
Introduction
Syntax
Parameter
ADR#0.0.6
‘%MW’
0
50
%MW100:50
%MW50:4
The function WRITE_VAR allows the writing of the value or values of one or several language objects of the same type (internal bit, internal word, constant word, system bit, system word, double internal word, double constant word).
The objects to be written must always be consecutive. They can be located in a remote CPU or in a device connected by a communication channel of the type Unitelway, terminal port, FIPWAY, Modbus, Modbus Plus, ETHWAY.
The syntax of the communication function WRITE_VAR is presented in the following form:
WRITE_VAR(ADR#0.0.6, '%MW', 0, 50, %MW100:50, %MW50:4)
The following table describes the different parameters of the function.
Description
Address of the exchange destination. The following addresses {Network.Station}APP,
{Network.Station}APP.num and addresses in circulation are prohibited in this field.
String of characters specifying the type of object to be read: l l l l l l l l l l l l l
%M: internal bit
%MW: internal word
%S: system bit
%SW: system word
%KW: constant word
%MD: double internal word
%KD: double constant word
%T: timer (PL7-3)
%TM: timer (standard IEC 1131)
%MN: monostable
%R: register
%C: counter
%DR: drum
Double word indicating index of the first object to be written.
Word specifying the number of objects to be written.
Table of words containing the value of objects to be sent.
Management parameters. The operation report takes one of the following values: l l l
16#00: correct read operation
16#01: operating error
16#02: incorrect response
Note: The length parameter must not be initialized before the start of the function.
In Modbus, only objects %M and %MW are usable.
TLX DS COM PL7 xxE
87
Communication functions
Writing Standard Objects: Entry screen help
At a Glance The Entry Help Screen may be consulted in this communication function.
Parameters of the Function
This function supports six parameters:
Parameters
Address
Type of Object
ADR#
%MWX:n
%MW Type of Object to Write
Address of first object to write %MDx
%KDx
Immediate Value
Number of consecutive objects to write
%MWx
%KWx
Immediate Value
Data to Write
Report
%MWx:n
%MWx:4
Comments
If you enter a value directly into the field, the Entry Help button is grayed out.
You are offered a list of objects.
In %KDx, an entry field for the value is displayed.
In %KWx, an entry field for the value is displayed.
-
-
Example
Note: Symbols are accepted.
The following screen shows an example of function entry:
WRITE_VAR
Parameters
Address:
Type of Object to Write:
Address of first object to write:
Number of consecutive objects to write :
Data to Write:
Report:
ADR#0.0.6
%MW
%KD16
10
%MW10
%MW40
10
4
Possible types: %KWin, %MWin, (n=6)
Immediate Address (ADR#)
?
OK Cancel
88
TLX DS COM PL7 xxE
Communication functions
Writing standard objects: example of use
Introduction
Illustration
The example shows the writing by the master station of 50 internal words %MW0 à
%MW4 to the address slave 6 (Ad0=6). The value of the words to be written is found in the internal words %MW100 à %MW149 of the master station, the management parameters are resident from %MW50.
The two stations are connected by Uni-telway bus.
TSX Premium master Slave
Send
Uni-telway Ad0 = 6
Programming of the function is as follows:
%I3.5
P
%MW50:x0
OPERATE
(1)
(1) WRITE_VAR(ADR#0.0.6, '%MW', 0, 50, %MW100:50, %MW50:4)
Query parameters:
Parameters
ADR#0.0.6
'%MW'
0
50
%MW100:50
%MW50:4
Description l l l
0: module
0: channel 0
6: sender address Ad0
Type of object (internal word) address of first object
Number of consecutive objects
Content of reply
Report
TLX DS COM PL7 xxE
89
Communication functions
Writing standard objects: example of network use
Introduction
Illustration
The example shows the writing of a 50-word table %MW0 à %MW49 to the slave
Uni-telway network address 20, station 1, communication coupler TSX SCM 2116, slot 5, communication coupler channel 1, server address Ad0 = 3. The values to be written are in the words %MW0 à %MW49 of the transmitter, the management parameters reside from %MW 100.
The two stations are connected via a FIPWAY network.
TSX 87
TSX Premium
{20.1}
Uni-telway
FIPWAY network 20
{20.2}
Ad0 = 3
Ad0 = 1
90
TLX DS COM PL7 xxE
Send
Communication functions
Programming of the function is as follows:
%I3.1
P
%MW100:x0
OPERATE
(1)
(1) WRITE_VAR(ADR#{20.1}5.1.3, '%MW', 0, 50, %MW0:50, %MW100:4)
Query parameters:
Parameters
ADR#{20.1}5.1.3
'%MW'
0
50
%MW0:50
%MW100:4
Description l l l l
{20.1}: network 20, station 1
5: module
1: channel 1
3: server address Ad0
Type of object (internal word) address of first object
Number of consecutive objects
Datas to be written
Report
TLX DS COM PL7 xxE
91
Communication functions
Writing standard objects: example of exchange of variables with parameter monitoring
Introduction
Programming the function
The following example illustrates the communication function WRITE_VAR with management parameter monitoring.
Writing a variable
%M20 %I1.2
OPERATE
%MW200:4:=0
OPERATE
INC %MW1700
OPERATE
%MW202:=50
OPERATE
(1)
%M20
S
(1) WRITE_VAR(ADR#3.1.7, '%MW', 20, 1, %MW1700:1, %MW200:4) l l l l l
Input bit %I1.2 allows a function to be activated.
The internal bit %M20 allows the activity of the function to be tested.
The first block OPERATE allows initialization fo the management parameters.
The second block OPERATE allows the value of the word %MW1700 to be incremented.
The third block OPERATE allows the value of the timeout to be pre-set at 5s.
92
TLX DS COM PL7 xxE
Communication functions
Programming the monitoring
Exchange monitoring
%M20 %MW200:x0
COMPARE
EN >
%MW201
=
0
<
<>
OPERATE
INC %MW204
OPERATE
INC %MW205
%M20
R
%Q2.2
S
OPERATE
INC %MW204
OPERATE
%MW207:=%MW201 l l l l l
The internal word %MW204 counts the number of exchanges.
The internal word %MW205 counts the number of correct exchanges.
The internal word %MW206 counts the number of failed exchanges.
The internal word %MW207 stores the error message.
The external output bit %Q2.2 allows external warning of an exchange error.
TLX DS COM PL7 xxE
93
Communication functions
Transmitting UNI-TE Requests: SEND_REQ
At a Glance
Syntax
The SEND_REQ function allows the coding and transmission of all UNI-TE requests and Modbus/Jbus as well as the associated response reception.
Note: In some cases it is necessary to reclassify the received objets through the
SEND_REQ function (see Shifting a byte to the right in a table : ROR1_ARB,
Details of the UNI-TE requests coding are provided in the TSX DR NET
Communication Reference Manual document, the coding of Modbus/Jbus requests is provided in the TSX DG MDB manual.
The SEND_REQ communication function syntax appears in the following form:
SEND_REQ (ADR#0.0.6, 15, %MW0: 1, %MW150: 24, %MW40: 4)
The following table describes the function's different parameters.
Parameter
ADR#0.0.6
15
%MW0:1
%MW150:24
Description
The destination entity address for the exchange. The following {Station
Network} APP addresses, {Station Network}APP.num and the (ALL) broadcast addresses are forbidden in this field.
This parameter specifies the value of the request code in accordance with the UNI-TE standard. It is decimalized by default (example: 252 for non-solicited data requests). If the user wants to code the requests hexadecimally, the code request must have the following syntax: 16# followed by a hexadecimal code request (example 16#FC for the request for non-solicited data).
Data to be transmitted. The size of the word table depends upon the send request.
It must have a minimum length of one word even if the request does not consist of any particular data to be transmitted (request Run, Stop,
Identification, etc.). The length of the data to be transmitted must be memorized in the fourth word of the parameter manager (word length) before launching this function.
Word table containing the reply data. It must have a minimum length of one word even if the request does not consist of any particular data to be received (request non-solicited data). The length of the data actually received is indicated at the end of the exchange, in the fourth word of the parameter manager.
94
TLX DS COM PL7 xxE
TLX DS COM PL7 xxE
Parameter
%MW40:4
Communication functions
Description
Parameter Manager The operation report takes one of the following values: l l l l
16#00: correct operation
16#02: incorrect reply
16#FD: operational error
Other values: l Request code + 16#30: upon positive reply for certain requests l l
16#FE: upon positive reply for certain requests
16#FB: upon reply to a mirror request
Note: The fourth word of the parameter manager table corresponds to the length parameter. Before the function execution it must contain the length (in bytes) of the data that is to be transmitted. Once the request has been carried out it is automatically updated and contains the length of the reply (in bytes).
The SEND_REQ function allows more than 1000 bits to be read in a remote device.
Note that the TSX 07, TSX 37, TSX 57 PLCs can return no more than 1000 bits following a read request.
95
Communication functions
UNI-TE request transmission input Help screen
Introduction
Function parameters
Parameters
Address
Request code
Data to be sent.
Response
Report
For this communication function, you can call up the input Help screen.
This function supports five parameters:
Types of objects
ADR#
%MWX:n
%MWx
%KWx immediate value
%MWx:n
%KWx:n
%MWx:n
%MWx:4
Comments
If you input a value directly into the field, the Help button for the inputting of addresses is greyed out.
In %KWx, a value input field is displayed.
-
-
-
Example
Note: The symbols are accepted.
The following screen shows an example of inputting function input:
SEND_REQ
Parameters
Address :
Request Code:
Data to Send:
Reception Zone:
Report:
ADR#0.0.6
15
%MW0
%MW150
%MW90
1
24
4
?
OK Cancel
96
TLX DS COM PL7 xxE
Communication functions
UNI-TE request transmission example of network use
Introduction
Illustration
The example shows the identification by the master station {Network 20. Station 2} of the station connected on network 20 station 1 and address Ad0 = 3 on Uni-telway.
The identification request has the code 15 in decimal (or 0F in hexadecimal).
The two stations are connected via a FIPWAY network.
TSX 87
TSX Premium
{20.1}
Uni-telway
FIPWAY network 20
{20.2}
Ad0 = 3
Ad0 = 1
TLX DS COM PL7 xxE
97
Communication functions
Send Programming of the function is as follows:
%I3.2
P
%MW100:x0
OPERATE
(1)
(1) SEND_REQ(ADR#{20.1}5.1.3, 15, %MW0:1, %MW150:24, %MW100:4)
Query parameters:
Parameters
ADR#{20.1}5.1.3
15
%MW0:1
%MW150:24
%MW100:4
Description l l l l
{20.1}: network 20, station 1
5: module
1: channel 1
3: server address Ad0
Request 15 (or 16#0F if coding is in hexadecimal)
Data sent (for the example: no data to send)
Contents of the response (receipt of 24 words)
Report
Note: Before starting the function each time, initialize the length parameter (in the example: %MW103 = 0).
98
TLX DS COM PL7 xxE
Communication functions
UNI-TE request transmission: List of requests
Introduction l l l l
UNI-TE protocol allows: identification and diagnosis of all equipment using a UNI-TE server.
provision of a set of services for read/write access to data types.
to download data between devices.
protection of a server to avoid conflicting access during a critical period.
These different services are accessed by the SEND_REQ with a code for the UNI-
TE request to be sent.
General use requests
Name of request
IDENTIFICATION
These requests allow the identification and diagnosis of all types of equipment using a UNI-TE server.
Comment Code request
16#0F
Code report
16#3F
READ_CPU
PROTOCOLE_VERSION
MIRROR
16#4F
16#30
16#7F
16#60
16#FA 16#FB provides information l l l l product range, specific-application type, product type, catalog reference.
performs system diagnostics on all equipment.
allows adaptation of the protocol version for two communicating items.
tests for tracking of information between 2 communicating devices.
TLX DS COM PL7 xxE
99
Communication functions
Access to standard objects
Name of request
These requests provide a set of services allowing read/write access to bit and internal word data, word and bit systems, floating points, constants and Grafcet data.
Comment
READ_INTERNAL_BIT
WRITE_INTERNAL_BIT
READ_SYSTEM_BIT
WRITE_SYSTEM_BIT
READ_INTERNAL_WORD
WRITE_INTERNAL_WORD
READ_SYSTEM_WORD
WRITE_SYSTEM_WORD
READ_CONSTANT_WORD
FORCE_INTERNAL_BIT
READ_GRAFCET_BIT
Code request
16#00
16#10
16#01
16#11
16#04
16#14
16#06
16#15
16#05
16#1B
16#2A
Code report
16#30
16#FE
16#31
16#FE
16#34
16#FE
16#36
16#FE
16#35
16#FE
16#5A allows the value of an internal bit to be read.
allows the value of an internal bit to be written.
allows the value of a system bit to be read.
allows the value of a system bit to be written.
allows the value of an internal word to be read.
allows the value of an internal word to be written.
allows the value of a system word to be read.
allows the value of a system word to be written.
allows the value of a constant word to be read.
allows an internal bit to be forced.
allows the status of 127 Grafcet steps to be read.
Access to objects of an I/O module
Name of request
These requests provide a set of services allowing read/write access to the input/ output data of the modules.
Comment
READ_DIGITAL_MODULE_IMAGE
Code request
16#49
Code report
16#79
WRITE_DIGITAL_MODULE_IMAGE 16#4A 16#7A
READ_STATUS_MODULE
READ_IO_CHANNEL
WRITE_IO_CHANNEL
16#44 16#74
16#43 16#73
16#48 16#78 allows image bits for input/output of a single All or
Nothing module to be read.
allows image bits for input/output of a single All or
Nothing module to be written.
allows identification of the physical structure and complete status of a piece of equipment.
allows input/output objects at channel level to be read (configuration data, status, …).
allows input/output objects at channel level to be written (configuration data, status, …).
100
TLX DS COM PL7 xxE
Communication functions
Access to generic objects
Name of request
READ_OBJECT
WRITE_OBJECT
These requests provide a set of read/write services for application, system, network management (error counter, …), equipment management (configuration data, …) objects.
Comment Code request
16#36
Code report
16#66
WRITE_GENERIC_OBJECT
READ_OBJECT_LIST
WRITE_OBJECT_LIST
ACTION_GENERIC_OBJECT
16#37
16#83
16#38
16#39
16#9F
16#FE
16#B3
16#68
16#69
16#CF allows one or more consecutive objects of the same type to be read.
allows one or more consecutive objects of the same type to be written.
allows all or part of a structured or simple object to be written.
allows objects of different types to be read within the same request.
allows objects of different types to be written within the same request.
allows management of operating modes, activation of specific communication operations, …
Management of operating modes
Name of request
RUN
STOP
INIT
These requests provide a set of services which allow work on a processor’s operating modes.
Comment Code request
16#24
16#25
Code report
16#FE
16#FE
16#33 16#63 allows the processor’s tasks to start operating.
allows operation of the processor’s tasks to be stopped.
allows activation of a cold or warm restart.
TLX DS COM PL7 xxE
101
Communication functions
Data transfer
Name of request
OPEN_DOWNLOAD
WRITE_DOWNLOAD
CLOSE_DOWNLOAD
OPEN_UPLOAD
READ_UPLOAD
CLOSE_UPLOAD
BACKUP
These requests provide a set of services which allow the downloading or remote offloading of data between devices as well as the transfer or comparison of data within the same device.
Comment Code request
16#3A
16#3B
16#3C
16#3D
16#3E
Code report
16#6A
16#6B
16#6C
16#6D
16#6E
16#3F
16#45
16#6F
16#75 allows initialization of a loading phase of the data.
allows a data segment to be downloaded.
allows a loading sequence to be terminated.
allows a backup phase to be initialized.
allows the contents of a file segment to be read during backup.
allows a backup sequence to be terminated.
allows memory zones to be compared or memory zones to be backed up.
Semaphore management
Name of request
RESERVE
RELEASE
I_AM_ALIVE
These requests provide a semaphore mechanism allowing protection of a server to avoid conflicting access during a critical period.
Comment Code request
16#1D
Code report
16#FE
16#1E
16#2D
16#FE
16#FE allows a client to partially or globally keep the functions of a server.
allows client to release the reserved server.
necessary to maintain client’s server reservation.
102
TLX DS COM PL7 xxE
Communication functions
Exchange of text data : DATA_EXCH
Introduction
Syntax
The function DATA_EXCH allows data to be sent, data to be received or the linkage of both sending and receiving.
This function is used either to exchange data between two PL7 applications, or to send data to an item of equipment that has a specific application protocol.
The syntax of the communication function DATA_EXCH is presented in the following form:
DATA_EXCH(ADR#{20.2}APP, 2, %MW70:10, %MW80:1, %MW90:4)
The following table shows the different function parameters.
Parameter Description
ADR#{20.2}APP Address of the destination exchange item in sending mode or the address of the emitter in receipt mode. If it is an exchange operation, the broadcast addresses (ALL) are prohibited.
2
%MW70:10
Type of operation: l l
This parameter specifies the operation to be carried out: l 1: emission followed by a stand – by request for the receipt of a message ( unusable in the Uni-telway slave
2: single emission
3: stand – by request for the receipt of a message
Data to send (word table containing the complete coding ).
It must have a minimum length of one word even if there is not any data to be sent ( receipt operation ). The length of data to be sent( in bytes ) must be stored in the fourth word of the management parameter (word length) before starting this function.
%MW80:1
%MW900:4
Table of words containing the value of data received.
It must have a minimum length of one word even if there is not any data received (emission operation). The length of data actually received is indicated (in bytes), at the end of the exchange, in the fourth word of the management parameter.
Management parameters. The operation report takes one of the following values: l l l
16#00: correct operation
16#02: incorrect operation
16#03: size of the incorrect response ( this value is insignificant if it is an emission operation)
TLX DS COM PL7 xxE
103
Communication functions
Note: The fourth word in the management parameters table corresponds to the length parameter. It must contain the length (in bytes) of the data to be sent, before the function is executed. Once the request is executed it is automatically updated and contains the length of the response (in bytes).
Programming rules
Word
%MW70
%MW71
%MW72
%MW73
%MW74 to
%MW79
During the programming of a function DATA_EXCH the data that is to be sent must contain the complete coding of the frame that corresponds to the request.
Example of writing objects, carried out by the function DATA_EXCH . The data to be sent is coded in the following way:
Comment Byte 1 (most significant)
16#07
Byte 0 (least significant
16#37
16#07
16#00
16#00
16#xx
16#68
16#0A
16#0A
16#xx l l l l
Byte 0: request code (writing object)
Byte 1: category code
Byte 0: segment
Byte 1: type of objects
Address of destination equipment
Quantity
Value of data to be sent
104
TLX DS COM PL7 xxE
Communication functions
Exchange of text data : input Help screen
Introduction
Function parameters
Parameters
Address
Mode
Data to be sent.
Response
Report
For this communication function, you can call up the input help screen.
This function supports five parameters:
Types of objects
ADR#
%MWX:n
%MWx
%KWx immediate value
%MWx:n
%KWx:n
%MWx:n
%MWx:4
Comments
If you input a value directly into the field, the Help button for the inputting of addresses is greyed out.
In %MWx or %KWx, a value input field is displayed.
-
-
-
Example
Note: The symbols are accepted.
The following screen shows an example of inputting a function input:
DATA_EXCH
Parameters
Address:
Mode:
ADR#{20.1}APP
2 Transmiss
Data to Send :
Data to Receive:
Report:
%MW70
%MW80
%MW90 4
Possible types : %MWi,%KWi,
Immediate Address (ADR#)
10
1
?
OK Cancel
TLX DS COM PL7 xxE
105
Communication functions
Text Type Data Exchange: examples of use
At a Glance
Illustration
This example deals with sending data to station 2 of network 20. The word %MW93 shall contain the length of the data to be sent: %MW93 = 20 (10 words to be sent).
The two stations are connected via a FIPWAY network.
FIPWAY network 20
TSX Micro
TSX Premium
Sending
{20.2}
{20.1}
The function is programmed as follows:
%I3.2
P
%MW90:x0
OPERATE
(1)
(1) DATA_EXCH(ADR#{20.2}APP, 2, %MW70:10, %MW80:1, %MW90:4)
Parameters of the request:
Parameters
ADR#{20.2}APP
2
%MW70:10
%MW80:1
%MW90:4
Description l l
{20.2}: network 20, station 2
APP: application
Send request
Data sent (in the example: 10 words to be sent)
Contents of response (in the example: no data to be received)
Report
Note: Before each function launch, initialize the length parameter (%MW93 = 20 bytes in the example).
106
TLX DS COM PL7 xxE
Receiving
Communication functions
Station 2 of network 20 receives the data sent by station 1. The function is programmed as follows:
%I3.2
P
%MW90:x0
OPERATE
(1)
(1) DATA_EXCH(ADR#{20.1}APP, 3, %MW70:1, %MW80:10, %MW90:4)
Parameters of the request:
Parameters
ADR#{20.1}APP
3
%MW70:1
%MW80:10
%MW90:4
Description l l
{20.1}: network 20, station 1
APP: application
Receive request
Contents of data to be sent (in the example: no data to be sent)
Data sent (in the example: 10 words to be received)
Report
Note: Before each function launch, initialize the length parameter (%MW93 = 0 bytes in the example).
TLX DS COM PL7 xxE
107
Communication functions
Text Type Data Exchange: examples of use with an Altivar
At a Glance
Send
This example deals with a Uni-Telway transmission request (request code 16#F2) by a TSX Premium PLC to an Altivar ATV58 (address Ad0 = 6).
The SEND_REQ communication function with request code 16#F2 does not work, the
PLC cannot read the report.
The solution is to send the DATA_EXCH function in send/receive.
Syntax as follows:
DATA_EXCH(ADR#0.1.6, 1, %MW100:6, %MW200:6, %MW250:4)
Parameters of the request:
Parameters
ADR#0.1.6
1
%MW100:6
%MW200:6
%MW250:4
Description l l l
0 : module
1 : channel 1
6 : Destination address Ad0
Operation type: transmission followed by "await reception" request
Table to send
Table to receive
Report
Note: Before each function launch, initialize the length parameter (%MW253 = 12 octets in the example).
108
TLX DS COM PL7 xxE
Communication functions
Table Structure The following table shows the byte table to be sent:
Parameters
%MW100
%MW101
%MW102
%MW103
%MW104
%MW105
Description l l
Byte 0: request code 16#F2
Byte 1: category code 16#07
16#0000 Value
Command word CMD
Setpoint word FRH
Acceleration adjustment ACC
Deceleration adjustments DEC
The following table shows the byte table to be received:
Parameters
%MW200
%MW201
%MW202
%MW203
%MW204
%MW205
Description
Response Code 16#37F2 l l l l l l l l l l
Byte 0: Value 16#00
Byte 1: most significant setpoint byte FRH
Byte 0: least significant setpoint byte FRH
Byte 1: most significant status register byte ETA
Byte 0: least significant status register byte ETA
Byte 1: most significant fault register byte FLT
Byte 0: least significant fault register byte FLT
Byte 1: most significant motor current byte LCR
Byte 0: least significant motor current byte LCR
Byte 1: Value 16#00
TLX DS COM PL7 xxE
109
Communication functions
Sending a telegram : SEND_TLG
Introduction
Syntax
Function SEND_TLG allows telegram data to be sent to a remote PL7 application.
Data to be sent has a maximum length of 16 bytes. Unlike the other communication functions, it is processed immediately (synchronous). The activity bit parameters and timeout therefore do not exist.
Consequently the word table assigned to the management parameters only uses two words instead of four.
This function is only usable in the processor on
FIPWAY, and for the address stations 0 to15.
The syntax of the communication function SEND_TLG is presented in the following format:
SEND_TLG(ADR#{20.3}APP, %MW190:8, %MW200:2)
The following table shows the different function parameters.
Parameter Description
ADR#{20.3}APP Address of the exchange destination item Only the addresses{network.Station}APP.number are authorized.
%MW190:8
%MW200:2
Data to be sent. This word table has a maximum length of 8 words ( 16 bytes).
Management parameters. The word table must contain : the communication report and the length of the data to send.
The operation report takes one of the following values: l l l l l l l l
16#00: correct exchange
16#03: Incorrect address format
16#04: Incorrect target address
16#05: Incorrect management parameters
16#06: Incorrect specific parameters
16#07: Module at fault
16#0A: Size of emission buffer is insufficient
16#0B: Absence of resource system
Note: The length of data sent must be stored( in bytes) in the second word of the management parameter (word length) before starting this function.
110
TLX DS COM PL7 xxE
Communication functions
Sending a telegram: entry help screen
At a Glance
Function parameters
Parameters:
Address
Data to send
Report
For this communication function, you can request help from the entry help screen.
This function supports three parameters:
Type of Object
ADR#
%MWX:n
%MWx:n
%KWx:n
%MWx:2
Comments
If you enter a value directly into the field, the address entry help button grays out.
The number of words lies between 1 and 8.
The number of words for the management parameters is 2.
Example
Note: Symbols are accepted.
The following screen shows an example of function entry:
SEND_TLG
Parameters
Address: ADR#{20.3}APP
?
Data to send: 8
Report:
%MW190
%MW200 2
Accepted types: %MWi:n (n=2)
OK Cancel
TLX DS COM PL7 xxE
111
Communication functions
Sending a telegram : example of use
Introduction
Illustration
The example shows a telegram with 8 words being sent from station 1 to remote station 3 on the FIPWAY 20 network.
The two stations are connected via a FIPWAY network.
FIPWAY network 20
TSX Premium TSX Micro
Send
112
{20.1} {20.3}
Programming of the function is as follows:
%I3.10
P
(1) SEND_TLG(ADR#{20.3}APP, %MW180:8, %MW200:2)
Query parameters:
Parameters
ADR#{20.3}APP
%MW190:8
%MW200:2
Description l l
{20.2}: network 20, station 3
APP: application
Contents of the telegram to be sent
Report
OPERATE
(1)
Note: The word %MW 201 must be initialized to 16 (8 words) before sending the request.
Synchronous implementation of this function requires the immediate testing of the operation report after the program line that activates the implementation of this function.
TLX DS COM PL7 xxE
Communication functions
Receiving a telegram : RCV_TLG
Introduction
Syntax
Parameter
%MW300
%MW310:8
%MW320:2
Function RCV_TLG allows the telegram data coming from a remote PL7 application to be read.
Data to be received has a maximum length of 16 bytes. Unlike the other communication functions, it is processed immediately (synchronous). The activity bit parameters and timeout therefore do not exist.
Consequently the word table assigned to the management parameters only uses two words instead of four.
It can be activated in a factual task, in the FAST task or the MAST task. This function is only usable in the processor on FIPWAY, and for the address stations 0 to15.
The syntax of the communication function RCV_TLG is presented in the following format:
RCV_TLG(%MW300, %MW310:8, %MW320:2)
The following table shows the different function parameters.
Description
Address of the station sending the telegram when the message has been received.
The least significant byte corresponds to the number of the network in hexadecimals.
The most significant byte corresponds to the number of the station in hexadecimal.
Reception buffer. Word table containing the data received. The maximum length of this table is 8 words ( 16 bytes).
l l l l l l l l
Management parameters. The table with two words must contain : l l for the first word, the communication and operation report, for the second word, the length of the data actually received.
The operation report takes one of the following values:
16#00: correct exchange
16#05: incorrect management parameters
16#06: incorrect specific parameters
16#09: size of reception buffer is insufficient
16#0B: absence of resource system
16#0D: no telegram received
16#10: network coupler absent
16#0F: telegram service non-configured
Note: Length of data received is indicated in bytes (maximum 16).
TLX DS COM PL7 xxE
113
Communication functions
Receiving a telegram : example of use
Introduction
Illustration
The example shows the receipt of a telegram with 8 words (16 bytes) from a remote application.
The two stations are connected via a FIPWAY network.
FIPWAY network 20
TSX Premium TSX Micro
Receive
{20.1} {20.3}
Programming of the function is as follows :
%I3.11
P
OPERATE
(1)
(1) RCV_TLG(%MW300, %MW310:8, %MW320:2)
Query parameters :
Parameters
%MW300
%MW310:8
%MW200:2
Description
Contains the address of the sender at the end of the exchange.
Contents of the telegram received
Report
Note: When a function RCV_TLG is programmed in a factual task,it can not be used in the MAST or FAST task.
Synchronous implementation of this function requires the immediate testing of the operation report after the program line that activates the implementation of this function.
114
TLX DS COM PL7 xxE
Communication functions
Writing a string of characters. PRINT_CHAR
Introduction
Syntax
Function PRINT_CHAR allows the sending of a chain of characters of 4 K bytes, 120 bytes on the terminal port, destined to be sent on a character mode link or to the PLC terminal port.
A message can also be transmitted in immediate value form (series of bytes between apostrophes, example : ‘Message to send’).
Special characters can also be transmitted, they must then start with the $ character followed by the hexadecimal value of the character to be sent, example $0D.
Another possibility is that the special characters are defined as : $R= CR ( return carriage), $L = LF (return to the line ), $N = CR+LF.
The syntax of the communication function DATA_EXCH is presented in the following format :
PRINT_CHAR(ADR#{20.3}2.0.SYS, ‘Overheating oven 4$L$R’,
%MW110:4)
The following table shows the different function parameters.
Parameter
ADR#{20.3}2.0
.SYS
‘Oven overheating
4$L$R’
%MW900:4
Description
Address of the character mode channel that is sending the message.
Only the system addresses (which finish with SYS) are supported by this function ( example : { Network.Station}Rack module.Channel.SYS).
Character string to be sent. It is either stored in a byte table (%MB..) or provided with an immediate value.
l l
Its length is at a maximum : l 4 Kbytes to a character chain link managed by a PCMCIA TSX
SCP11 card • and via the built-in link in module TSX SCY 2160 •,
120 bytes to a terminal point,
250 bytes if the value is provided in immediate value.
Management parameters. The operation report takes one of the following values : l l l l
16#00 : correct operation
16#01 : operating error
16#02 : incorrect operation
16#04 : signals error RTS/CTS
TLX DS COM PL7 xxE
115
Communication functions
Programming rules
Note: The length of data sent is stored in the fourth word of the management parameter (word length) before starting this function. If the length is initialized at 0, the whole of the character string is sent.
After sending the characters, it contains the number of characters sent in the form of a communication report.
The special characters are preceded by the character $ in the string to be sent.
Characters $ are not sent by the sender, they must therefore not be counted during the initialization of the length parameter.
The spaces between two characters are the equivalent of a byte.
So in the example Oven overheating 4$L$R ,the length of the data to send is
19 bytes.
When sending a character string longer than 240 bytes, it will need several PLC cycles ( there is fragmentation of the string ).
It is, therefore, important that you ensure that the management data is not modified during function processing. The system guarantees that the string will be sent coherently in several fragments, but it does not prohibit the sending of another character string between two fragments.
On a terminal port link configured in character mode , if the function PRINT_CHAR is activated whilst the function INPUT_CHAR is running, the function PRINT_CHAR stays blocked. It is recommended that you program a timeout to occur in these functions.
116
TLX DS COM PL7 xxE
Communication functions
Writing a chain of characters : input help screen
Introduction
Function parameters
Parameters
Address
Chain to send
Report
For this communication function, you can call up the input help screen.
This function supports six parameters:
Types of objects
ADR#
%MWX:n
%MBx:n
%KBx:n
Immediate value
%MWx:2
Comments
If you input a value directly into the field, the Help button for the inputting of addresses is greyed out.
In %KBx:n, a value input field is displayed.
There are two words for the management parameter.
Example
Note: The symbols are accepted.
The following screen shows an example of input function:
PRINT_CHAR
Parameters
Address :
String to Send
Variable :
Value :
ADR#{20.3}2.0.SYS
oven overheat 4$L$R
?
Report : %MW110
Possible types : %MWi:n (n=4)
4
OK Cancel
TLX DS COM PL7 xxE
117
Communication functions
Writing of a chain of characters : example of use
Introduction
Illustration
The example shows the sending of a chain of characters to a video terminal connected via a link integrated from the module TSX SCY 21600 / 21601 of a PLC with the address network 20, station 3.
The two stations are connected via a FIPWAY network.
FIPWAY network 20
TSX Premium TSX Micro
{20.1}
{20.3}
118
TLX DS COM PL7 xxE
Send
Communication functions
Programming of the function is as follows :
%I3.6
P
%MW110:x0
OPERATE
(1)
(1) PRINT_CHAR(ADR#{20.3}2.0.SYS, ‘Overheating oven 4$L$R’, %MW110:4)
Query parameters
Parameters
ADR#{20.3}2.0.SYS
‘Oven overheating
4$L$R’
%MW50:4
Description l l l l
{20.3} : network 20, station 3
2 : module
0 : channel 0
SYS :system address
Chain of characters to be sent ( input in immediate value)
Report
Note: Before starting the function each time, initialize the length parameter (in the example: %MW113 = 19 ).
TLX DS COM PL7 xxE
119
Communication functions
Reading a character string: INPUT_CHAR
At a Glance
Syntax
The function INPUT_CHAR enables a request to be sent to a character mode communication module to read a character string. The received message is saved in a byte table %MB.
Up to 4 KB can be received with this function (120 bytes for the terminal block). It should be consistent with the channel configuration, otherwise an error will reoccur.
l l
Two exclusive possibilities are offered: reading a number of characters: no condition must be configured, reading a message: a stop condition must be configured in the configuration screen.
The syntax for the communication function INPUT_CHAR is as follows:
INPUT_CHAR(ADR#{20.5}0.0.SYS, 1, 0, %MB200:20, %MW120:4)
The following table describes the different function parameters.
Parameter
ADR#{20.5}0.0
.SYS
1
Description
Address of the character mode channel receiving the message. Only the system addresses (which end in SYS) are supported by this function
(example: {Network.Station}RackModule.Channel.SYS).
Reset to 0. This parameter specifies that the coupler receiver memory is reset to zero.
l l value at 0: the memory is not reset to zero, value at 1: memory is reset to zero.
0
Note: For communication with the terminal block, the value has to be 1.
Number of characters: l value at 0: reading an available message, in this case a stop condition must be specified in the configuration screen, l value above 0: defines the number of characters to be read.
%MB200:20
Note: For communication with the terminal block, only the value 0 is permitted. In this case, the message end character is: l l by default, a carriage return (CR) for a Premium PLC, the character configured on the screen for a Micro PLC.
String received. It is saved in a byte table (%MB..).
120
TLX DS COM PL7 xxE
Programming rules
Parameter
%MW120:4
Communication functions
Description
Management parameters. The length of the received data is saved in the last at the end of the execution of this function.
The operation report takes one of the following values: l l l l l l
16#00 : correct operation
16#01 : operation error
16#02 : incorrect operation
16#03 : size of the incorrect response
16#06 : coupler configured in character mode
16#07 : coupler configured in message mode
When several INPUT_CHAR are launched simultaneously, the Reset to 0 parameter must be positioned (the receiving coupler memory is not reset to zero). Resetting the coupler memory to zero can be requested for the next message in order to avoid receiving old data.
When Reset is at 1, INPUT_CHAR must be launched before sending the data.
Receiving a character string of more than 240 bytes requires several PLC cycles
(there is string fragmentation). Therefore, it is important to ensure that the management data are not modified during the function processing. The system guarantees the coherent reception of the string in several fragments.
TLX DS COM PL7 xxE
121
Communication functions
Reading a string of characters : input Help screen
Introduction
Function parameters
Parameters
Address reset module memory
Number of characters
String to be sent
Report
For this communication function, you can call up the input Help screen.
This function supports three parameters:
Types of objects
ADR#
%MWx:n
%MWx
%KWx
Immediate value
%MWx
%KWx
Immediate value
%MBx:n
%MWx:4
-
-
Comments
If you input a value directly into the field, the Help button for the inputting of addresses is greyed out.
The selection of Yes/No directly displays the immediate value 1/0 .
When this number equals 0, the whole following message will be received.
Example
Note: The symbols are accepted.
The following screen shows an example of the function input:
INPUT_CHAR
Parameters
Address : ADR#{21.5}0.0.SYS
?
Reset Module Memory :
Type of Read
1 Yes
Read Message with Stop Condition
Define Number of Characters to Read
No
Number of Characters :
String to Receive :
Report :
0
%MB200 20
%MW120 4
Possible types : %MBi:n (i must be even)
OK Cancel
122
TLX DS COM PL7 xxE
Communication functions
Reading a character string : example of use
Introduction
Illustration
The example deals with the reading of a string of characters sent by a video terminal plugged into the TER port in the PLC with network address 20, station 5.
The two stations are connected via a FIPWAY network.
FIPWAY network 20
TSX Premium TSX Micro
{20.5}
{20.1}
TLX DS COM PL7 xxE
123
Communication functions
Receive Programming of the function is as follows :
%I3.6
P
%MW120:x0
OPERATE
(1)
(1) INPUT_CHAR(ADR#{20.5}0.0.SYS, 1, 0, %MB200:20, %MW120:4)
Query parameters :
Parameters
ADR#{20.5}0.0.SYS
1
0
%MB200:20
%MW110:4
Description l l l l
{20.5} : network 20, station 5
0 : module
0 : channel 0
SYS : system address
Reset to zero
Reading of the whole string of characters
Contents of the message in bytes
Report
Note: Each time before each starting of the function, initialize the length parameter
(in the example : %MW113 = 19).
124
TLX DS COM PL7 xxE
Communication functions
Sending/receiving a string of characters : OUT_IN_CHAR
Introduction
Syntax
The function OUT_IN_CHAR allows the sending of a string of a maximum of 240 bytes (120 bytes for the terminal port) followed by a receipt message call (the sending alone or the reception alone are equally possible).
A message can also be transmitted in immediate value form (series of words between apostrophes, example : 'Message to send’).
Special characters can also be transmitted, they must then start with the $ character followed by the hexadecimal value of the character to be sent, example $0D.
Another possibility is that the special characters are defined as : $R= CR (carriage return), $L = LF (new line),$N = CR+LF.
Although the principal use of this function is the communication with a terminal port, it can be used in another link of the character mode type. On receiving a message request, the destination coupler resets its receive memory. It is mandatory to configure an end message or pause in the configuration screen.
The syntax of the communication function OUT_IN_CHAR is presented in the following format :
OUT_IN_CHAR(ADR#{20.5}0.0.SYS, 1, %MB300:10, %MB310:10,
%MW170:4)
The following table describes the different parameters of the function.
Parameter
ADR#{20.5}2.0
.SYS
1
%MB300:10
%MB3100:10
Description
Address of the character mode channel that is sending the message.
Only the system addresses (which finish with SYS) are supported by this function (example : {Network.Station}RackModule.Channel.SYS).
Mode.
This parameter specifies the operation mode : l l l
1 : sending a message and receive request
2 : sending a message
3 : receive message request
Character string to be sent. This table must have a minimum length of one character, even if there is no data to be sent.
Character string or message received. This table must have a minimum length of one character, even if there is no data to receive.
TLX DS COM PL7 xxE
125
Communication functions
Parameter
%MW170:4
Description
Management parameters. The operation report takes one of the following values: l l l l l l l
16#00 : correct operation
16#01 : operating error
16#02 : incorrect operation
16#03 : size of the incorrect response
16#04 : signals error RTS/CTS
16#06 : coupler configured without stop condition
16#08 : draft error
Note: The length of data sent is stored in the fourth word of the management parameter (word length) before starting this function. If the length is initialized at 0, the whole of the character string is sent.
The length of the received data is stored in the fourth word of the management parameter (length word). A stop condition must have been configured.
126
TLX DS COM PL7 xxE
Communication functions
Sending/receiving a string of characters : input Help screen
Introduction
Function parameters
Parameters
Address
Mode
String to be sent
String to receive
Report
For this communication function, you can call up the input Help screen.
This function supports three parameters :
Types of objects
ADR#
%MWx:n
%MWx
%KWx
Immediate value
%MBx:n
%KBx:n
Immediate value
%MBx:n
%MWx:4
-
-
Comments
If you input a value directly into the field, the Help button for the inputting of addresses is greyed out.
Selecting from the drop-down list Exchange, Send,
Receive directly displays the immediate value 1, 2 or 3 .
If the input of the string is carried out by %MBx:n, the field of the immediate value disappears.
Example
Note: The symbols are accepted.
The following screen shows an example of function input:
OUT_IN_CHAR
Parameters
Address : ADR#{20.5}0.0.SYS
?
Mode :
String to Send :
Variable :
1
%MB300
Exchange
10
String to Receive :
Report :
%MB310 10
%MW170
Possible types : %MWi:n (n=4)
4
OK Cancel
TLX DS COM PL7 xxE
127
Communication functions
Sending/receiving a string of characters : example of use
Introduction
Illustration
The example deals with the sending/receiving of a character string to and from a video terminal connected to the TER port configured in character mode.
The two stations are connected via a FIPWAY network.
FIPWAY network 20
TSX Premium TSX Micro
{20.5}
{20.1}
Programming Programming of the function is as follows :
%I3.8
P
%MW170:x0
OPERATE
(1)
(1) OUT_IN_CHAR(ADR#{20.5}0.0.SYS, 1, %MB300:10, %MB310:10, %MW170:4)
Query parameters :
Parameters
ADR#{20.5}0.0.SYS
1
%MB300:10
%MB310:10
%MW170:4
Description l l l l
{20.5} : network 20, station 5
0 : module
0 : channel 0
SYS : system address
Send / receive
Contents of the message to be sent in bytes
Contents of the message received in bytes
Report
128
TLX DS COM PL7 xxE
Communication functions
Note: Each time before each starting of the function, initalize the length parameter
(in the example : %MW173 = 10).
After the exchange, it will contain the length of the received data.
TLX DS COM PL7 xxE
129
Communication functions
Stopping an exchange whilst in action. : CANCEL
Introduction
Syntax
The function CANCEL allows the interruption of an asynchronous function whilst in action. The exchange number assigned at the beginning of the transaction allows identification of the function to be halted.
The execution of this function is synchronous with the execution of program PL7.
The syntax of the communication function CANCEL is presented in the following format :
CANCEL(%MW180, %MW185)
The following table describes the different parameters of the function.
Parameter
%MW180
%MW185
Description
Exchange number. This parameter specifies the exchange number whose execution must be interrupted.
Note :
The exchange number is indicated in the most significant byte of the first word in the management parameters of the function to be interrupted.
Management parameters. The operation report takes one of the following values : l 16#00 : correct operation. Communication is interrupted, the activity bit of the interrupted function is set to 0 and its report takes the value l
2.
16#0C : incorrect exchange number
130
TLX DS COM PL7 xxE
Communication functions
Stopping an exchange whilst in action : example of use
Introduction
Sending the function
OUT_IN_CHAR
The example deals with the stopping of the communication function OUT_IN_CAR .
When starting the function OUT_IN_CHAR , an exchange number is automatically assigned to it. This number distinguishes the exchange until the end of the operation. The function CANCEL uses this number to interrupt this operation.
Programming of the function is as follows :
%I3.8
P
%MW170:x0
OPERATE
(1)
(1) OUT_IN_CHAR(ADR#{20.5}0.0.SYS, 1, %MB300:10, %MB310:10, %MW170:4)
Sending the function CANCEL
To prepare the cancellation of the exchange OUT_IN_CHAR it is necessary to make a shift of 8 bits to put the most significant bit of %MW170 in %MW180 for example.
%MW180 will be used by the function CANCEL , and will contain the exchange number of the function OUT_IN_CHAR
Programming the shift of the 8 bits is as follows :
OPERATE
(1)
(1) %MW180:=SHR(%MW170,8))
Programming of the function is as follows :
%I3.9
P
(1) CANCEL(%MW180, %MW185)
OPERATE
(1)
TLX DS COM PL7 xxE
131
Communication functions
Query parameters :
Parameters
%MW180
%MW185
Description
Contains the exchange number of the function OU_IN_CHAR to be interrupted.
Report
132
TLX DS COM PL7 xxE
Communication functions
Shifting a byte to the right in a table : ROR1_ARB
Introduction
Syntax
The function ROR1_ARB allows a byte to be circularly shifted to the right in a table of bytes. It is used after receiving a response to certain UNI-TE requests (function
SEND-REQ for example).
The function ROR1_ARB does not carry out communication processing, on the other hand, it is necessary to process certain UNI-TE requests (for example, reading a word table with the function SEND_REQ ).
The syntax of the communication function ROR1_ARB is presented in the following format :
ROR1_ARB(%MB420:12)
The following table describes the different parameters of the function.
Parameter
%MB420:12
Description
This byte table specifies the address of the first word in the table and the number of bytes contained in the table to be shifted.
TLX DS COM PL7 xxE
133
Communication functions
Shifting a byte to the right in a table : example of use
Introduction
Sending the function
SEND_REQ
The example deals with the shifting of a table following the reading of a table of 5 words in the PLC with network address 2 and station address 4.
The function of reading objects is carried out by the communication function
SEND_REQ and the request code = 36 (16#0036).
Programming of the function is as follows :
%I3.2
%MW220:x0
P
OPERATE
(1)
(1) SEND_REQ(ADR#{2.4}SYS, 16#0036, %MW200:6, %MW210:6, %MW220:4)
The send table is as follows :
Word
%MW200
Value
16#0768
%MW201
%MW202
50
05
Description l l
16#07 : type of object (16 bit integer).
16#68 : segment (internal words).
Source of the word table to be read (decimal value).
Number of words to be read (decimal value).
The table of words read is as follows :
Word Byte 1 Byte 0
%MW210 := Least significant bit of first word read 16#07 (type of object)
%MW211 := Least significant bit of second word read
Most significant bit of first word read
%MW212 := Least significant bit of third word read Most significant bit of second word read
%MW213 := Least significant bit of fourth word read
Most significant bit of third word read
%MW214 := Least significant bit of fifth word read Most significant bit of forth word read
%MW215 := Not significant Most significant bit of fifth word read
The least significant byte of the first word read contains the type of objects read, the reception table is thus shifted by 1 byte.
134
TLX DS COM PL7 xxE
use of the
ROR1_ARB function
Communication functions
To re-categorize the receive table, it is necessary to make a one byte right shift by means of the function ROR1_ARB .
The receive table becomes :
Word
%MW210 :=
%MW211 :=
%MW212 :=
%MW213 :=
%MW214 :=
%MW215 :=
Byte 1 Byte 0
Most significant bit of first word read Least significant bit of first word read
Most significant bit of second word read
Most significant bit of third word read
Most significant bit of fourth word read
Least significant bit of second word read
Least significant bit of third word read
Least significant bit of fourth word read
Most significant bit of fifth word read Least significant bit of fifth word read
Not significant 16#07 (type of object)
TLX DS COM PL7 xxE
135
Communication functions
Swapping bytes in a word table : SWAP
Introduction
Syntax
The function SWAP allows, in a word table, the inverting of all the least significant bytes and the most significant bytes.
This facilitates the management of messages, especially using Modbus.
:
The syntax of the communication function SWAP is presented in the following format
SWAP(%MW40:4)
The following table describes the different parameters of the function.
Parameter
%MW40:
Description
This byte table is defined by : l l
%MW40 : first word in table to be inverted
4 : number of words to be inverted
Example The table of words to be inverted is as follows :
Word
%MW40 :=
%MW41 :=
%MW42 :=
%MW43 :=
Value
16#0F43
16#21AC
16#8127
16#8811
After the application of the function SWAP , the table is as follows :
Word
%MW40 :=
%MW41 :=
%MW42 :=
%MW43 :=
Value
16#430F
16#AC21
16#2781
16#1188
136
TLX DS COM PL7 xxE
Communication functions
Reading of common Modbus Plus data: READ_GDATA
Introduction
Syntax
A TSX Micro or Premium PLC can use global data exchange to communicate with remote Modbus stations.
Global data is a data base shared between a maximum of 64 stations on a network
. Each station can write 32 words that are usable by all the other stations, and can read 32 words from each remote station.
Function READ_GDATA allows the reading of 32n words from a remote station.
The syntax of the communication function READ_GDATA is presented in the following form :
READ_GDATA(ADR#0.1.10, %MW100:32, %MW200:4)
The following table describes the different parameters of the function.
Parameter
ADR#0.1.10
%MW100:32
%MW200:4
Description
Address of the exchange destination item
Address of the receipt zone of the global data
Report
Note: The address of the target item is initialized with the node value to which the station containing the objects to be read is linked.
It is not necessary to initialize the length parameter before starting the function.
At the end of the operation, the management word contains the size in number of bytes of the global data produced by the station specified in the address.
TLX DS COM PL7 xxE
137
Communication functions
Writing of Modbus Plus common data : WRITE_GDATA
Presentation
Syntax
A TSX Micro or Premium PLCcan use global data exchange to communicate with remote Modbus stations.
Global data is a data base shared between a maximum of 64 stations on a network
. Each station can write 32 words that are usable by all the other stations, and can read 32 words from each remote station.
Function WRITE_GDATA allows 32 words from a remote station to be written.
The syntax of the communication function WRITE_GDATA is presented in the following form :
WRITE_GDATA(ADR#0.1.SYS, %MW100:32, %MW200:4)
The following table describes the different parameters of the function.
Parameter
ADR#0.1.SYS
%MW100:32
%MW200:4
Description
System address of the local PCMCIA card
Note :
The parameter of the receipt address must be initialized with the value of the address of the local Modbus Plus server.
Address of the zone containing the words to be produced
Report
Note: The function is defined to transfer 32 internal words %MW from the PL7 application to the common data buffer in the PCMCIA card. A buffer of a maximum of 32 words contains the data. All the contents of the buffer will be recopied into the global data base. The word indicating the length is not used.
138
TLX DS COM PL7 xxE
Communication functions
Immediate server : SERVER
Presentation
Availability
Syntax
Function SERVER allows the UNI_TE requests to be processed immediately from the application program.
This function can be activated in the MAST task or in the FAST task.
At any given moment only one function SERVER can be activated by the application.
It can only be used to process the requests from a Modbus link (PCMCIA TSX SCP
114 card in the TSX SCY 21601 module, configured in Modbus slave with an immediate server).
The syntax of the communication function SERVER is presented in the following format :
SERVER(ADR#{20.3}APP, %MW190, %MW200:2)
The following table describes the different parameters of the function.
Parameter Description
ADR#{20.3}APP Address of the exchange destination. Table of three words to store the address {Network.Station}Port.Module.Module channel to which the request transmitter is linked.
%MW190
%MW200:2
Request response. This word allows the storage of the received request code (least significant byte), and the returned response code (least significant byte).
l l l l l l l l l
Management parameters. The table with two words must contain : l l for the first word, the exchange number and activity bit, for the second word, the communication and operation report.
The operation report takes one of the following values :
16#00 : Correct exchange
16#01 : Timeout, the response has not been able to be sent in less than 2 seconds
16#02 : Stop on user request (STOP,S0,INIT,a cold or warm restart)
16#03 : Incorrect address format
16#05 : Incorrect management parameters
16#07 : Problem with sending to destination
16#11 : No request received
16#12 : Function SERVER
16#FF : Message refused already called by another task
TLX DS COM PL7 xxE
139
Communication functions
Exchange principal
Note: When the communication report has the value 16#FF (message refused) an error has been detected. The operation report (most significant byte) can therefore take the value 16#14 ( server stopped).
the following diagram shows exchanges when using the communication function
SERVER .
Input
First request :
READ_VARI
Response to the first request READ_VARI
Second request :
READ_VAR2
Response to the second request READ_VAR2
Application
Function SERVER activated
Function SERVER activated
Output
140
TLX DS COM PL7 xxE
Communication functions
Immediate server : example of use
Introduction
Send
The communication function SERVER responds to a request READ_VAR about the reading of x amount of words (corresponds to the code 16#03 according to the
Modbus protocol ).
Programming of the function is as follows :
%MW100:X0
OPERATE
(1)
(1) SERVER (%MW0:3, %MW10, %MW100:2)
Query parameters :
Parameters
%MW0:3
%MW10
%MW100:2
Description
This table contains the address of the request transmitter
(network, station, port, module, channel ).
Request response.
l Byte 1 = 16#03 : request code for the reading of x amount of words by Modbus l Byte 0 = 16#03 : Response code to the received request for the reading of x amount of words by Modbus
Report
TLX DS COM PL7 xxE
141
Communication functions
Asynchronous messaging service : WRITE_Asyn and READ_Asyn
Introduction These two functions allow the TSX ETY 110 coupler’s asynchronous electronic messaging channel to write or to read 1 Kbytes of PL7 objects.
Functions WRITE_Asyn and READ_Asyn are only sent at the end of the MAST task , if this task is configured in periodic mode. It is possible to simultaneously activate 8 functions.
The size of the transmitting and reception buffers is expressed in words. It is 512 words or 1024 bytes.
Note: The asynchronous server function supports the UNI-TE V2.0 or V1 protocol.
Functions WRITE_Asyn and READ_Asyn use the UNI-TE V2.0 protocol.
142
TLX DS COM PL7 xxE
Principal of the exchanges
Communication functions
The following diagram shows the exchanges between two stations for a function WRITE_Asyn :
E
P
S
E
P
S
Triggering the function
WRITE_Asyn
Transmitting the function
E
P
S
Immediate transmission of the response
Receiving the function
Processing requests
Receipt of messages
Routingresponsestofunctions
WRITE_Asyn
E
P
S
E
P
S
Receipt of the response in the function WRITE_Asyn
Activity bit down
TLX DS COM PL7 xxE
143
Communication functions
Syntax The syntax of communication functions WRITE_Asyn and READ_Asyn are presented in the following format :
WRITE_Asyn(ADR#{1.2}SYS, ‘%MW’, 100, 800, %MW10:800,
%MW1000:4)
READ_Asyn(ADR#{1.2}SYS, '%MW', 100, 800, %MW10:800, %MW1000:4)
The following table describes the different parameters of the function.
Parameter
ADR#{1.2}SYS
‘%MW’
100
800
%MW10:800
%MW1000:4
Description
Address of the exchange destination.This three word table stores the addresses of the type:{Network.Station}RackModule.Channel Slave or
SYS.
String of characters specifying the type of object to be read : l l
%M : internal bit
%MW : internal word
Double word indicating index of the first object to be written or read.
Word specifying the number of objects to be written or read.
Transmission buffer or receipt buffer. This table contains the values of the words to be written or the word read.
Management parameters.
l l l l l l l l l
The operation report takes one of the following values: l l
16#00 : correct exchange
16#01 : timeout, the response has not been able to be sent in less than 2 seconds
16#02 : stop on user request (STOP,S0,INIT,a cold or warm restart)
16#03 : Incorrect address format
16#05 : incorrect management parameters
16#07 : destination absent
16#09 : size of reception buffer is insufficient
16#10 : size of emission buffer is insufficient
16#11 : absence of resource system ( 8 functions already active)
16#19 : incorrect exchange number
16#FF : message refused
Note: It is necessary to program a Timeout value to stop an exchange that is in action when the response does not come back to the transmitter.
144
TLX DS COM PL7 xxE
Communication functions
3.4
Characteristics of communication
Presentation
Aim of this subchapter
This sub-chapter presents the compatibility problems between the TSX Micro/
Premium PLC and the series 7 PLC.
What's in this
Section?
This Section contains the following Maps:
Topic
Specifications for Communication between TSX Micro/Premium and Series 7
General rules for changing between applications
General rules for an exchange to a UNI-TE server
Other examples of compatibility
Page
TLX DS COM PL7 xxE
145
Communication functions
Specifications for Communication between TSX Micro/Premium and Series 7
At a Glance To enable communication between a TSX Micro or a TSX Premium PLC and series
7 PLCs, such as TSX 47-107 or TSX 17, compatibility must be established on the level of communication blocks and then on the exchange level.
Note: The TER port of Premium PLCs only supports 10 or 11 bit format.
Compatibility of
Communication
Blocks
Local
Remote
PL7-3 defines 5 types of text blocks. A text block is characterized by destination entities, while a function specializes in a type of operation.
Correspondence between text block and communication function takes into account l l two parameters:
Type of destination
Type of communication operation
Text block
Uni-telway
FIPIO
Terminal port
CPL SYS TER TXT TLG Equivalent functions
X SEND_REQ, READ_VAR, WRITE_VAR (2)
X (1)
-
-
-
-
X
-
-
-
-
SEND_REQ, READ_VAR, WRITE_VAR (2)
PRINT_CHAR, INPUT_CHAR,
OUT_IN_CHAR
Character mode X PRINT_CHAR, INPUT_CHAR,
OUT_IN_CHAR
UNI-TE
Uni-telway
FIPIO
Application
Telegram
-
X
X (1) -
-
-
X
-
-
-
-
-
-
-
-
X
-
-
-
-
-
-
-
X
SEND_REQ, READ_VAR, WRITE_VAR (2)
SEND_REQ, READ_VAR, WRITE_VAR (2)
SEND_REQ, READ_VAR, WRITE_VAR
DATA_EXCH
SEND_TLG, RCV_TLG
(2)
Legend:
X
-
(1)
(2)
Correspondence with functions
No correspondence
Only with the integrated FIPIO link
SEND_REQ performs the same operations as READ_VAR and WRITE_VAR
Compatibility of
Exchanges
Communication functions, which allow communication with the TSX 17, TSX 47,
TSX 47 or 1000 series PLCs.
146
TLX DS COM PL7 xxE
Communication functions
General rules for changing between applications
Introduction Function DATA_EXCH allows transmitting,receiving of data to a PL7 application. This kind of processing is carried out by the TXT text block in PL7-3.
During an exchange between TSX Micro or TSX Premium and a series 7 PLC, the l l text blocks and the communication functions are adapted according to the direction of the exchange :
From a TSX Premium PLC to a series 7 PLC ,
From a series 7 PLC to a TSX Premium PLC ,
Exchange from a
Premium to a series 7
The TSX Premium transmits a communication function to a series 7 PLC.
l From the TSX Premium’s side, the communication function must have the following address : l
ADR#{Network.Station}APP.i
with i= number of text block receiver.
From the side of the series 7 PLC, the text block must be initialized in the following way :
TXT,T to the value 16#FF.
Note: Parameter TXT,A contains the address of the transmitter (Network.station).
Exchange from a series 7 to a
Premium
The series 7 PLC transmits a text block to a TSX Premium PLC.
l From the TSX Premium’s side, the communication function must have the following address : l
ADR#{Network.Station}APP.i
with i= number of text block transmitter.
From the side of the series 7 PLC, the text block must be initialized in the following way :
TXT,T to the value 16#00.
Note: Parameter TXT,A contains the destination address (Network.station).
TLX DS COM PL7 xxE
147
Communication functions
Examples The examples handle the exchanges from a TSX Premium to a TSX 107 and vice versa. Value H’1101 corresponds to network 17 (H’11’) and station (H’01’).
Communication function to text block:
DATA_EXCH(ADR#{17.3}APP.3,2,
%MW20:10, %MW30:1, %MW50:4)
Receipt of a message from a TSX 57 to a TXT3 text block:
TXT3 TXT
TXT3,=H’FF’/*Always FF*/
TXT3,L=Length
TXT3,A=h’1101’
Input TXT3
FIPWAY network 17
TSX Premium TSX 107
{17.1}
Text block to the communication function:
DATA_EXCH(ADR#{17.3}APP,3,
%MW70:1, %MW80:10, %MW90:4)
{17.3}
Sending a message to a TSX 57 with the TXT4 text block:
TXT4 TXT
TXT4,T=0/*Always for TSX 37_57*/
TXT4,L=Length in bytes
TXT4,A=H’1101’
Wi=message
Output TXT4
148
TLX DS COM PL7 xxE
Communication functions
General rules for an exchange to a UNI-TE server
Introduction
Example
Function ( READ_VAR , WRITE_VAR , SEND_REQ can communicate with the system of a TSX 47’s server.
In the same way, a SYS Text Block also allows communication to a TSX Micro server and TSX Premium.
The examples handle the exchanges from a TSX Premium to a TSX 107 and vice versa. Value H’1101 corresponds to network 17 (H’11’) and station (H’01’).
Writing of ten words in the TSX 47-107 from the TSX 57 :
WRITE_VAR(ADR#{17.3}SYS, '%MW', 0,
10, %MW50:10, %MW100:4)
FIPWAY network 17
TSX Premium TSX 107
{17.1}
Reading of a bit from TXT 57 with text block TXT3 SYS :
TXT3 SYS
TXT3,C=H’00’
TXT3,L=2
TXT3,A=H’1101’
Wi=bit number
EXCHG TXT3
{17.3}
TLX DS COM PL7 xxE
149
Communication functions
Other examples of compatibility
Examples To ensure compatibility, the following are the programming rules which should be respected :
Comment TSX 37/57 network 2, station 1
Transmission function
DATA_EXCH(ADR#{2.2}APP,
8,2, %MW10:20, %MW50:1,
%MW100:4)
Transmission to text block 8
Initialization of length before transmission
Receipt function
DATA_EXCH(ADR#{2.2}APP,
8,3, %MW10:1, %MW50:10,
%MW100:4)
Function awaiting a text block with any number
Function in exchange
DATA_EXCH(ADR#{2.2}APP,
8,1, %MW10:1, %MW50:10,
%MW100:4)
The function transmits an outgoing message from text block 8 and begins to await a response from this same text block.
TSX 47 -107 network 2, station 2
Text block receipt
TXT8,A=H’0201’ /
*transmitter address*/
TXT8,T=H’FF’
INPUT TXT8
TXT8,L=40
Text block 8 can not recognize the transmitter number and so is placed in the mean while on all possible numbers ( 255)
Text block transmission
TXT8,A=H’0201’ /
*destination address*/
TXT8,T=H’00’
TXT8,L=20
OUTPUT TXT8
Text block 8 always transmits to number 0 to communicate with a communication function
Text block transmission
TXT8,A=H’0201’ /
*transmitter address*/
TXT8,T=H’FF’
INPUT TXT8
TXT8,A=H’0201’ /
*destination address*/
TXT8,T=H’00’
TXT8,L=20
OUTPUT TXT8
Text block 8 behaves identically like the last two examples
There is therefore exchange compatibility between a transmitting function and a text block receiver.
There is therefore exchange compatibility between a transmitting text block and a receiver function.
Therefore there is exchange compatibility between a function in exchange and a text block receiving and then transmitting.
150
TLX DS COM PL7 xxE
Communication functions
TSX 37/57 network 2, station 1
Function receiving and transmitting
DATA_EXCH(ADR#{2.2}APP,
8,3, %MW10:1, %MW50:10,
%MW100:4)
DATA_EXCH(ADR#{2.2}APP,
8,2, %MW10:20, %MW50:1,
%MW100:4)
TSX 47 -107 network 2, station 2
Text block transmission/receipt
TXT8,A=H’0201’ /
*destination address*/
TXT8,T=H’00’
TXT8,L=20
Text block 8 can not recognize the number of the function, it is therefore impossible to initialize the TXT,T parameter to a value that can be used for transmitting and then for the receipt of the communication.
Comment
A text block in exchange and a function transmitting and then receiving are incompatible to do an exchange.
TLX DS COM PL7 xxE
151
Communication functions
3.5
Objects linked to communication
Introduction
Aim of subchapter
What's in this
Section?
This chapter presents the exchange modes of language objects linked to communication.
This Section contains the following Maps:
Topic
Default exchanges
Specified exchanges : General points
Exchange and report management
Page
152
TLX DS COM PL7 xxE
Communication functions
Default exchanges
Introduction An integrated interface where the addition of a module automatically expands the application of language objects allowing the programming of this interface or this module.
These objects correspond to the images of the input/output of the module or of the integrated interface.
The bits %I and the words %IW, images of the input values of the module, are automatically updated in the PLC processor at the beginning of the task, whether the task is in RUN or in STOP mode.
The bits %Q and the words %QW, images of the output values of the module, are automatically updated in the module by the processor at the end of the task, the task being in RUN mode.
l l
Note: When the task is in STOP mode, following the chosen configuration : the output is put into fallback position (fallback mode), the output is maintained at its last value (maintenance mode).
Illustration The chart illustrates the operation cycle relating to a PLC task (cyclic execution).
Internal processing
Acquisition of input
RUN STOP
Program processing
Update output
TLX DS COM PL7 xxE
153
Communication functions
Examples
Object
%I103.1
%IW4.2
%IW0.1.1:x0
%Q\0.2.1\0.8
%I6.5.ERR
FIPIO
-
%I107.MOD.ERR
-
The table below shows some examples of default exchanges relating to a given operation.
Operation
TOR
Analog
Uni-telway
Description
Gives status of channel 1 of the module situated in position 3 on rack 1.
Gives the analog value of channel 2 of the module situated in position 4 on rack
0.
Gives the general state of the slaves, the communication channel is situated in channel 1 of the processor in position 0 of rack 0.
Gives the status of output 8 from slave 1 on FIPIO bus.
Indicates, when the bit is set to 1, that channel 5 of the module situated in position 6 of rack 0 has an error.
Indicates, when the bit is set to 1, that the module situated in position 7 of rack
1 has an error.
154
TLX DS COM PL7 xxE
Communication functions
Specified exchanges : General points
Introduction The specified exchanges are the exchanges carried out on request of the program user with help instructions : l READ_STS
2)
: (See : PL7 Micro, Junior, Pro ; Communication applications Volume l l
WRITE_CMD : (See : PL7 Junior, Pro ; Application-specific functions volume 1),
WRITE_PARAM : (See : PL7 Junior, Pro ; Application-specific functions volume l
1),
READ_PARAM : (See : PL7 Junior, Pro ; Application-specific functions volume l
1),
SAVE_PARAM : (See : PL7 Junior, Pro ; Application-specific functions volume l
1),
RESTORE_PARAM : (See : PL7 Junior, Pro ; Application-specific functions volume 1).
These exchanges apply to the whole of %MW objects which are of the same kind
(state, controls or parameters) on the same channel.
Note: These objects are not necessary when programming of a task function, but they carry extra information (ex : Terminal block fault, module absent…) and the extra orders to implement an advanced programming of the task functions (for more information on the specified exchange that is specific to a task, refer to the chapter that deals with this subject).
TLX DS COM PL7 xxE
155
Communication functions
General principles on the use of the specified instructions
The diagram below presents the different kinds of specified exchanges that are possible between the PLC’s processor and the module (or the built-in interface ).
PLC processor Communication module
Communication channel
Objects %MWxy.i.r
or
%MWxy.MOD.r (1)
State parameters
READ_STS
State parameters
Control parameters
WRITE_CMD
Control parameters
Adjustment parameters actual
WRITE_PARAM
READ_PARAM
SAVE_PARAM
Adjustment parameters actual
Adjustment parameters initial
RESTORE_PARAM
(1) Only with the instructions READ_STS and WRITE_CMD.
Management of the exchanges
During a specified exchange, it may be interesting to monitor the progress that this makes, in order to, for example, not take into consideration the data read until the exchange has effectively been carried out.
For this, two kinds of information are available : l Detecting an exchange whilst in action : l the end of exchange report.
The diagram below describes the principal of the management of an exchange
Application of an explicit exchange
Detection of an exchange in progress
Report of the end of the exchange
Logic channel
%Chxy.i
The channel %CHxy.i is a general syntax to update all the associated objects to this channel via specified instructions.
Example READ_STS%CH102.3
156
TLX DS COM PL7 xxE
Communication functions
Exchange and report management
Introduction When the data is exchanged between the PLC memory and the module, the l l considerations taken by the coupler may require the running of several task cycles.
To manage the exchanges, 2 words are used :
%MWxy.i.0 : Exchange in progress,
%MWxy.i.1 : Report
Note: These words are the object of a detailed description in each task insert.
Illustration The illustration below presents the different data bits for the management of the exchange.
Adjustment (X2)
Command (X1)
State (X0)
State parameters
Control parameters
Adjustment parameters
READ_STS
WRITE_CMD
WRITE_PARAM
READ_PARAM
SAVE_PARAM
RESTORE_PARAM
TLX DS COM PL7 xxE
157
Communication functions
Description of the data bits
Each of the word bits %MWxy.i and %Mwxy.i.1 is associated to a kind of parameter : l the bits in position 0 are associated to the state parameters : l l the bit %Mwxy.i.X0 indicates if a request to read the status word is in action, the bits in position 1 are associated to the control parameters : l the bit %Mwxy.i.0:X1 if the control parameters are sent to the communication channel, l the bit %MWxy.i.1:X1 if the control parameters are accepted by the communication channel, l the bits in position 2 are associated to the adjustment parameters : l the bit MWxy.i.0:X2 indicates if the adjustment parameters are exchanged with the communication channel ( by
WRITE_PARAM,READ_PARAM,SAVE_PARAM,RESTORE_PARAM), l the bit %MWxy.i.1:X2 specifies if the adjustment parameters are accepted by the communication channel. If the exchange has progressed correctly, the bit changes to 0,
Note: The exchange and report words also exist at the level of module
(%MWxy.MOD and %MWxy.MOD.1).
158
TLX DS COM PL7 xxE
Example
Communication functions
Phase 1 : Transmitting data with the help of the instruction WRITE_PARAM
PLC memory
State parameters
Control parameters
Adjustment parameters
1
0
Built-in task function
State parameters
Control parameters
Adjustment parameters
When the instruction is scanned by the PLC processor, the bit Exchange in
progress is set to 1 in %MWxy.i.0:X2
Phase 2 : Analysis of data by the E/S module and the report
PLC memory
State parameters
Control parameters
Adjustment parameters
0
1
E/S memory module of built-in task function
State parameters
Control parameters
Adjustment parameters
When the data is exchanged between the PLC memory and the module, the considerations taken by the coupler is managed by the bit %MWxy.i.1:X2 : Report
(0 =correct exchange, 1= unsuccessful exchange).
Note: There are not any adjustment parameters at the modular level.
TLX DS COM PL7 xxE
159
Communication functions
160
TLX DS COM PL7 xxE
Configuration of the operations function Communication
4
Presentation
Aim of this chapter
What's in this
Chapter?
This chapter presents the configuration and the debugging of the operations function Communication.
This Chapter contains the following Maps:
Topic
Configuration of the communication function
Reminders concerning the configuration editor
How to declare a communication module
How to declare a communication channel in a processor or module TSX SCY
21600/21601
Description of configuration screens for communication
Description of communication debugging screens
Page
TLX DS COM PL7 xxE
161
Communication configuration
Configuration of the communication function
Introduction Before creating an application program, it is necessary to define the physical operating context in which it will be ran, this means the type of processor and the modules positioned in each slot.
The use of communication functions also requires the definition of the parameters of the communication channels being used ( choice of protocol, definition of the specific parameters,…).
To do this the PL7 Micro,PL7 Junior and PL7 Pro software propose the configuration tool which allows these operations to be carried out easily.
In connected operation, they also propose a debugging function that allows certain parameters to be adjusted in order to be better adapted to the application.
162
TLX DS COM PL7 xxE
Communication configuration
Reminders concerning the configuration editor
Presentation
Illustration
Accessing the editor
The configuration editor enables the various constitutive elements of the PLC to be declared and configured in a graphical and intuitive manner: l l l l rack, power supply, processor, application-specific modules.
In online mode the configuration editor also performs debug, adjustment and diagnostics functions.
The following screen provides an example of a hardware configuration.
Configuration
TSX 57103 V4.0 ...
XMWI
XTI..
0
0
0
2
6
P
S
Y
0
T
S
X
1
0
5
7
3 o o
C o m m
1
D
E
Y
0
8
D
2
2
3
2
D
2
K
D
E
Y
3
D
S
Y
1
6
R
5
4
2
C
C
T
Y
5
6
0
2
1
1
S
C
Y
6
I
S
P
0
0
Y
1
1
The following table shows the different ways of accessing the configuration editor.
From: the menu bar the application browser
Action
Select Tools
→
Configuration.
Double-click on Hardware configuration or select it using the arrow keys and confirm with Enter.
Application Browser
Structure View
STATION
Configuration
Hardware configuration
Software configuration
Program
MAST Task
Events
DFB types
Variables
Animation tables
TLX DS COM PL7 xxE
163
Communication configuration
How to declare a communication module
Introduction
Steps to follow
This operation allows the declaration of a communication module in a PLC rack through the use of software.
The procedure is as follows :
Step
1
Action
Double click on the slot in which the communication module must be configured.
Result
Screen Add a module appears.
Add Module
Family:
Analog Modules1.5
Communication 1.5
Counting 1.5
Discrete
Movement
1.5
1.5
Remote BusX 1.0
Simulation
Weighing
1.0
1.7
Module:
TSX ETY 110 TCP/IP ETHWAY MODULE
TSX ETY 120 ETHERNET ETY120 MODULE
TSX ETY 210 TCP/IP ETHWAY MODULE
TSX IBX 100 InterBus-S ISA MODULE
TSX IBY 100 InterBus-S MODULE
TSX PBY 100 PROFIBUS-DP MODULE
TSX SAY 100 AS-interface MODULE
TSX SCY 21600 PCMCIA INRACK BOARD
TSX SCY 21601 PCMCIA INRACK BOARD
OK
Cancel
2
3
4
Select in the field Label the choice Communication
Select in the field Module the reference of the module.
Validate the choice with Ok.
Result
The module is declared in its slot. The latter is greyed out and contains the reference of the module.
Configuration
TSX 57102 V3.3 ...
XMWI
XTI..
0
0
0
2
6
P
S
Y
0
T
S
X
1
0
5
7
2
1
1
2
0
8
0
A
E
Y
3 4
S
C
Y
6
0
2
1
1
164
TLX DS COM PL7 xxE
Communication configuration
How to declare a communication channel in a processor or module TSX SCY
21600/21601
Introduction
Steps to follow
This operation allows the declaration of a communication channel in a processor or in a module TSX SCY 21600/21601 through the use of software.
When declaring a communication channel in a module TSX SCY 21600/21601, it is first necessary to delare this communication module in the PLC rack.
The procedure is as follows:
Step
1
Action
To which element does the communication channel belong?
2
3 l l l l l l if the processor: go on to step 2.
if module TSX SCY 21600/21601 : go on to step 3.
select in the processor’s slot the channel COMM.
select the command Services
→
Open the module select the module SCY 2160•.
select the command Services
→
Open the module.
TLX DS COM PL7 xxE
165
Communication configuration
Description of configuration screens for communication
Introduction
Configuration rules
Illustration
1 2
The configuration screen dedicated to communication operations is split into two distinct parts: l the upper part, common to all types of configuration screens, is dedicated to information at module level and at communication channel level. Its contents are l detailed hereafter.
the lower part of the screen is dedicated to configuration data and parameters.
This zone, which is specific to the type of communication chosen, is detailed in the supplements to this document related to the different types of communication.
It is forbidden to modify the communication channel configuration parameters while in connect mode (PLC in RUN mode).
This zone gives access to the visualization and modification of the communication channel parameters in local mode.
3
TSX 57102 [RACK 0 POSITION 0]
Configuration
Désignation : PROCESSOR TSX P 57102
CHANNEL
CHANNEL TSX SCP 114 RS 485 MP PCMCIA BOARD
UNI-TELWAY LINK MAST
4 5 6 7
166
TLX DS COM PL7 xxE
Communication configuration
Description
6
7
3
4
Address
1
2
5
Protocol
Task
The table below presents the different elements of the communication channel and their functions.
Element
Title bar
Choosing the function
Module zone
Communication channel
Communication module
Function
This indicates the commercial reference and the position of the module
This drop-down list allows the choice of mode: l l configuration, debug (only when connected).
This zone displays the designation of the selected module.
This drop-down list allows the choice of the communication channel: l l channel 0 corresponds to the terminal port.
channel 1 corresponds to the PCMCIA card slot.
This drop-down list allows the selection of the communication module assigned to the channel
This drop-down list allows the selection of the communication protocol.
This drop-down list allows the assigning of the communication module to a PLC task.
Note :
The communication modules must always be declared in MAST task.
TLX DS COM PL7 xxE
167
Communication configuration
Description of communication debugging screens
Introduction
How to access the screen
The debugging screen dedicated to communication operations is split into two distinct parts: l the upper part, common to all types of debugging screens, is dedicated to information at module level and at communication channel level. Its contents are l detailed hereafter.
the lower part of the screen is dedicated to debugging data and parameters. This zone, which is specific to the type of communication chosen, is detailed in the supplements to this document related to the different types of communication.
Access to debug mode is only possible when in connected mode.
Step
1
2
Action
Access the configuration screen.
Select the mode Debug in the list of function options.
Illustration
1 2
This zone gives access to the communication channel diagnostics.
3 4
TSX 3722 [ POSITION 00.0..1]
Debug
Designation : PROCESSOR 37222 Version 3.4
CHANNEL 0
CHANNEL Prise terminal
UNI-TELWAY LINK MAST
DIAG...
DIAG...
5 6 7 8 9
168
TLX DS COM PL7 xxE
Communication configuration
Description
Address
1
2
3
4
The table below presents the different elements of the communication channel and their functions.
Element
Title bar
Choosing the function
Module zone
Diagnostic button
Function
This indicates the commercial reference and the position of the module
This drop-down list allows the choice of mode: l l configuration, debug (only when connected).
This zone displays the designation of the selected module.
In addition for certain types of modules, this zone displays indicators which allow you to see the state of the module.
When an error is detected at module level, a button DIAG allows access to status information for this module (this button is disabled or enabled according to the value of the module’s status bit : %I4.0.MOD.ERR).
Module Diagnostics
Internal Errors External Errors Other Errors
Failed channel(s)
5
6
7
8
OK
Communication channel
Communication module
Protocol
Task
This drop-down list allows the choice of the communication channel: l l channel 0 corresponds to the terminal port.
channel 1 corresponds to the PCMCIA card slot.
This drop-down list displays the selection of the communication module assigned to the channel
This drop-down list displays the selection of the communication protocol.
This drop-down list displays the PLC task assigned to the communication module.
Note :
The communication modules must always be declared in MAST task.
TLX DS COM PL7 xxE
169
Communication configuration
Address
9
Element
Diagnostic button
Function
When an error is detected at channel level, a button DIAG allows access to status information for this channel (this button is disabled or enabled according to the value of the channel’s status bit :
%I4.0.MOD.ERR).
Channel Diagnostics
Internal Errors Other Errors External Errors
No device available on the channel
A device in an error condition
OK
170
TLX DS COM PL7 xxE
Remoting of Nano PLCs
II
Introduction
Aim of this part
What's in this part?
This part introduces the principles of configuring and remoting TSX Nano PLCs via
PL7 software.
This Part contains the following Chapters:
Chapter
5
6
7
8
9
10
Chaptername
General
Nano PLC remoting services
Configuring remoting of Nano PLCs
Programming Nano PLC remoting
Debugging Nano PLC remoting
Language objects associated to Nano PLC remoting
Page
171
TLX DS COM PL7 xxE
Remoting Nano PLCs
172
TLX DS COM PL7 xxE
General
5
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter introduces the remoting of TSX Nano PLCs and their services.
This Chapter contains the following Maps:
Topic
Introduction
Compatibility
Performances: Network Cycle Time:
Performance: positioning an output
Operating mode
Page
TLX DS COM PL7 xxE
173
Remoting Nano PLCs: General
Introduction
Introduction
Associated manuals
This type of link is used to connect a TSX Micro PLC to TSX Nano PLCs to use them as input/output buses.
The link offers the following different services: l l input/output data exchange, application data exchange.
If you require further information you should consult the following manuals:
Title
TSX Micro PLCs - Installation manual
Description
Hardware installation
174
TLX DS COM PL7 xxE
Remoting Nano PLCs: General
Compatibility
Hardware l l l
This type of communication is available only with the TSX STZ 10 module for the following PLCs:
TSX 37 10
TSX 37 20
TSX 37 21
Note: TSX 37 05 and TSX 37 08 PLCs cannot accept the TSX STZ 10 module.
Software
Using this module, it is possible to connect up to a maximum of four of the following l l elements: l TSX 07 20•/21•/30•/31• PLCs used as: l l remoted input/output blocks (maximum of 4 PLCs), other PLCs (3 maximum).
TSX AMN 4 •analog input/output modules (maximum of 3 modules).
TSX EX 07 •input/output extension modules (maximum of 1 module).
On a remoted link, address 1 must be either left free or taken up by an I/O block
(TSX 07 EX•or TSX 07 20•/21•/30•/31•used as remoted inputs/outputs).
While configuring the link, TSX AMN 4• analog modules must be declared as slave
PLCs.
It is vital that module TSX STZ 10 is installed and configured in slot 4 of the TSX
Micro PLC.
You are advised, while configuring the module, to associate it with the MAST
(master) task for performance reasons.
DANGER
When the PLC is in STOP, the output value of TSX AMN 4• analog modules is maintained contrary to other input/output which switch to their configured state.
Failure to observe this precaution will result in death or serious injury.
TLX DS COM PL7 xxE
175
Remoting Nano PLCs: General
Performances: Network Cycle Time:
Definition
Example
The network cycle time corresponds to the processing time of all the devices present l l on the link, i.e.: the updating of the inputs / outputs for an input/output type device, the application data processing for an AP slave type device.
l l
The length of the network cycle depends upon: the number and type of the slave devices, the line speed.
The following example deals with a network cycle with 3 devices on the
EET
Slave 1
IDT EET
Slave 2
IDT
Cycle n
EET
Slave 3
ICT EET IDT
Cycle n+1
EET link. The elementary exchange time is the time required for data to be exchanged between a master and a slave.
IDT. Inter-device time is the processing time required between two exchanges with slaves.
ICT. Inter-cycle time is the processing time required between two cycles.
176
TLX DS COM PL7 xxE
Remoting Nano PLCs: General
Performance: positioning an output
Introduction The diagram below shows the time gap between positioning an output in the rack and positioning a remote output (in theory, the network cycle time is less than the
PLC cycle time, and the transmission speed is 38400 bits/s):
Address 1 Address 2 Address 3 Address 4
In rack
Address 1
30 ms
35 ms
Address 2
Address 3
Address 4
40 ms
45 ms
If several devices are present, the one with the lowest address has the shortest positioning time.
The times given here are the maximum values that take into account the link cycle times and the processing times of the remote devices. These times are asynchronous in relation to each other
TLX DS COM PL7 xxE
177
Remoting Nano PLCs: General
For a speed of
38400 bits/s
The following times are given for a transmission speed of 38400 bits/s:
3
4
Number of slaves
1
2
Associated graph
Address 1
15 ms
20 ms
27 ms
30 ms
Address 2
-
25 ms
30 ms
35 ms
Address 3
-
-
36 ms
41 ms
Address 4
-
-
-
46 ms
178
TLX DS COM PL7 xxE
For a speed of
19200 bits/s
Remoting Nano PLCs: General
The following times are given for a transmission speed of 19200 bits/s:
3
4
Number of slaves
1
2
Address 1
20 ms
29 ms
38 ms
48 ms
Address 2
-
38 ms
47 ms
57 ms
Address 3
-
-
57 ms
66 ms
Address 4
-
-
-
75 ms
Associated graph
TLX DS COM PL7 xxE
179
Remoting Nano PLCs: General
For a speed of
9600 bits/s
The following times are given for a transmission speed of 9600 bits/s:
3
4
Number of slaves
1
2
Associated graph
Address 1
32 ms
47 ms
66 ms
84 ms
Address 2
-
64 ms
83 ms
101 ms
Address 3
-
-
100 ms
118 ms
Address 4
-
-
-
136 ms
180
TLX DS COM PL7 xxE
Remoting Nano PLCs: General
Operating mode
Introduction
General graph
The following graph describes operating modes for the TSX STZ 10 module.
The operating mode is as follows:
Power up
Module stopped
Module off
Module configured
Reset counters
Input/output reactivation
Configuration
Module in selftest phase
Self-tests OK
Module in selftest phase
Configuration
Module not configured
TLX DS COM PL7 xxE
181
Remoting Nano PLCs: General
Operation l l l l l l l after power up, the module performs self-testing. It then initializes the application configuration with the configuration physically present (learning phase), and selects the default speed of 19200 bits/s.
if there is no PL7 application in the PLC, the module is loaded with the configuration that is actually present, and then communicates with input/output devices only.
the configuration phase, triggered by the PLC, is used to take into account the application configuration (speed, configured devices, etc.).
if there is a PL7 application in the PLC, the application configuration is sent to the module. In the event of inconsistency or if one of the devices is faulty, the ERR
LED flashes. Inconsistent devices are periodically interrogated by the PLC. This resets th when the PLC is in STOP, the module exchanges data only with consistent input/ output blocks. When the PLC switches to RUN, the module also starts to exchange data with consistent slave PLC devices. Common word exchanges with remote TSX 07 PLCs are inhibited w in case of power outage, the PLC processor performs a warm restart and automatically reconfigures the module.
in case of a communication break with the PLC processor, the module stops all exchanges on the bus.
182
TLX DS COM PL7 xxE
Nano PLC remoting services
6
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter introduces the services supported by TSX Nano PLC remoting and its services.
This Chapter contains the following Maps:
Topic
Exchanging input/output data
Exchanging application data
Exchanging data with an analog module
Contents of %QW words in writing
Contents of %IW words on reading
Conversion of analog values of input channels
Mixed link
Page
183
TLX DS COM PL7 xxE
Remoting Nano PLCs: Services
Exchanging input/output data
Introduction
Exchanged objects
This service provides direct access to inputs/outputs for discrete and analog TSX
Nano PLCs.
This module is used to read and write inputs and outputs:
Addressing
Example
184
Read/write inputs/outputs
Inputs/outputs at link address 1
Inputs/outputs at link address 2
Inputs/outputs at link address 3
Analog inputs/outputs at link address 4
Inputs/outputs can be accessed by using the following addressing: l l inputs: %I\4.0\link address.input position outputs: %Q\4.0\link address.output position
The following table shows the different addressing parameters:
Parameter
%I or %Q
\4.0\
Link address
Input or output position
Description
Type of object to be accessed (input or output).
l l
4: module addresses in TSX Micro PLC.
0: channel address.
Address of connection point for destination PLC (from 1 to 4).
Destination PLC input or output number.
l l
TSX Micro PLC: reads input 2 from PLC at link address 2: %I\4.0\2.2.
writes output 4 from PLC at link address 3: %Q\4.0\3.4.
TLX DS COM PL7 xxE
Remoting Nano PLCs: Services
Exchanging application data
Introduction This service is used to exchange application data between a TSX 37 PLC and up to three Nano PLCs. This data, which is limited to four words (two words being produced and two words being consumed) by the Nano PLC, can be exchanged in both directions.
This module is used to exchange input words and output words: Exchanged objects
Slave 2 reserved zone
One table per
TSX Nano PLC
Slave 4 reserved zone
Slave 2 Slave 3 Slave 4
TLX DS COM PL7 xxE
185
Remoting Nano PLCs: Services
Addressing l l
Input/output words can be accessed by using the following addressing: inputs: %IW\4.0\link address.word number outputs: %QW\4.0\link address.word number
The following table shows the different addressing parameters:
Parameter
%IW or %QW
\4.0\
Link address l l
Description
Type of object to be accessed (input or output word).
4: module address in TSX Micro PLC.
0: channel address.
Address of connection point for destination PLC (from 1 to 4).
Number of the word Destination PLC input or output word number.
Example TSX Micro PLC: l reads 0 and 1 input words from the PLC at link address 2: %IW\4.0\2.0 and
%IW\4.0\2.1.
l writes 0 and 1 output words from the PLC at link address 4: %QW\4.0\3.0 and
%QW\4.0\3.1.
186
TLX DS COM PL7 xxE
Remoting Nano PLCs: Services
Exchanging data with an analog module
Introduction
Exchanged objects
Zone reserved for analog module 2
Analog inputs/outputs addressing is identical to that of Nano PLC extensions.
This module is used to exchange input words and output words:
One table per analog module
Zone reserved for analog module 4
Analog module 2
Analog module 3
Analog module 4
An analog module is made up of 3 input channels and 1 output channel. Words l l l
%QW and %IW exchanged with these modules contain, for each channel: configuration parameters, values, status bits.
For input channel 1, resolution depends on the number of configured channels: 12 bits if channels 0 and 1 are configured, 8 bits if channels 0, 1, and 2 are configured.
TLX DS COM PL7 xxE
187
Remoting Nano PLCs: Services
Contents of %QW words in writing
Introduction Output words %QW\4.0\i.0 and %QW\4.0\i.1 contain configuration parameters for each input channel, and the analog value for the output channel.
Contents of word
%QW\4.0\i.0
This word contains the configuration for analog input.
Channel 2 Channel 0
Channel 1
Channel 1
Channel 2
Conf
Channel 0
Number of input channels used
Choosing type of inputs
Choosing type of channel filter
188
TLX DS COM PL7 xxE
Significance of word bits
%QW\4.0\•.0
Remoting Nano PLCs: Services
Selection of the channels used
1
1 x1
0
0
0
1 x0
0
1
Number of input channels used
None
Channel 0
Channel 0 and channel 1
Channel 0, channel 1 and channel 2
Choice of input type (valid for pairs (x2,x3), (x4,x5), (x6,x7))
0
1
1 x3 x5 x7
0
1
0
1 x2 x4 x6
0
Type of inputs for the channel
10 V voltage input
0 10 V voltage input
10 20 mA current input
4 20 mA current input
Choice of filter type (valid for pairs (x8,x9), (x10,x11), (x12,x13))
Type of filter for the channel
0
0
1 x9 x11 x13
1
0
1
0 x8 x10 x12
1
Hardware filter
150 ms filter
750 ms filter
3 s filter
Contents of word
%QW\4.0\i.1
This word contains the numerical value of the analog output.
Numerical value of the analog output
The numerical value of the output is defined on 15 bits. The last x15 bit is the sign bit.
TLX DS COM PL7 xxE
189
Remoting Nano PLCs: Services
Contents of %IW words on reading
Introduction Input words %IW\4.0\i.0 and %IW\4.0\i.1 contain the status bits and the value of each channel.
Contents of word
%IW\4.0\i.0
This word contains the value of the 0 analog input and the status of the module.
Input value on 12 bits
Autocalibration error
Channel 0 limit overshoot
Channel 1 limit overshoot
Channel 2 limit overshoot
The analog input value is defined on 11 bits, and bit x11 is the sign bit. The other bits from x12 to x15 indicate the state of the module.
190
TLX DS COM PL7 xxE
Remoting Nano PLCs: Services
Contents of word
%IW\4.0\i.1
The contents of the second %IW\4.0\i.1 word depend on the configuration chosen for channels 0 and 1.
Configuration 1: inputs 0 and 1 are configured. The value of analog channel 1 is of the form
Channel 1 input value
In this configuration, the value is defined on 15 bits, and the last x15 bit is the sign bit.
Configuration 2: all 0, 1 and 2 inputs are configured. The word %IW\4.0\i.1 contains the value of channel 1 and channel 2.
Channel 1 input value
Channel 2 input value
In this configuration, the channel values are defined on 7 bits. Bits x7 and x15 are the sign bits.
TLX DS COM PL7 xxE
191
Remoting Nano PLCs: Services
Conversion of analog values of input channels
Introduction The input value read to be processed by PL7 must be defined on 16 bits, with bit x15 being the sign bit.
After being read, channel 0 must always be processed by a software application so that PL7 can use the result.
When channels 0 and 1 are configured, the value read on channel 1 does not need processing. When all channels (0, 1 and 2) are configured, the channel 1 and 2 readings must be processed.
For indication purposes, the following examples are given for an analog module connected to address 2.
Converting channel 0 into
Ladder language
%MW0 contains the value of channel 0 coded on 16 bits.
Converting channel 0 into
List language
%MW0 contains the value of channel 0 coded on 16 bits.
LD %IW\4.0\2.0:X11
[%MW0:=%IW\4.0\2.0 OR 16#F000]
LDN %IW\4.0\2.0:X11
[%MW0:=%IW\4.0\2.0 AND 16#0FFF]
192
TLX DS COM PL7 xxE
Remoting Nano PLCs: Services
Converting channels 1 and 2 into Ladder language
%MW1 contains the value of channel 1 coded on 16 bits.
%MW2 contains the value of channel 2 coded on 16 bits.
Converting channels 1 and 2 into List language
%MW1 contains the value of channel 1 coded on 16 bits.
LD 1
[%MW0:=%IW\4.0\2.1 AND 16#00FF]
LD %IW\4.0\2.1:X7
[%MW1:=%MW0 OR 16#FF00]
LDN %IW\4.0\2.1:X7
[%MW1:=%MW0]
%MW2 contains the value of channel 2 coded on 16 bits.
LD 1
[%MW0:=%IW\4.0\2.1 AND 16#FF00]
LD 1
[%MW1:=ROR(%MW0,8)]
LD %IW\4.0\2.1:X15
[%MW2:=%MW1 OR 16#FF00]
LDN %IW\4.0\2.1:X15
[%MW2:=%MW1]
TLX DS COM PL7 xxE
193
Remoting Nano PLCs: Services
Mixed link
Introduction It is possible to mix the input/output exchanges and the exchanges of application data on the same link.
TSX Micro master
1
2
Inputs/outputs
Inputs/outputs
Analog inputs/outputs
Slave 3 Slave 4
Note: In this case, the first device must always be configured in a block of inputs/ outputs.
194
TLX DS COM PL7 xxE
Configuring remoting of Nano
PLCs
7
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter describes the Configuration process during set-up of TSX Nano PLC remoting.
This Chapter contains the following Maps:
Topic
How to access parameters of module TSX STZ 10
Configuration screen for remoting Nano PLCs
Modbus parameters associated with the application
Page
195
TLX DS COM PL7 xxE
Configuring Nano PLCs
How to access parameters of module TSX STZ 10
Introduction
How to access the link
This operation describes how to access the link configuration parameters for remote
Nano PLCs via module TSX STZ 10 for TSX Micro PLCs.
The following table shows the procedure for accessing the link:
Step
1
Action
Declare module STZ 10 in slot 4
Result
Configuration
TSX 3722 V3.3...
XMWI
XTI..
c o m p t a g e
A n a
0
TSX
3722
1 3 5
DMZ
64DT
2 4
STZ
10
6
7 9
8 10
2 Double click on the module to be configured, or select the module STZ 10 then the command Services
→
Open module
196
TLX DS COM PL7 xxE
Configuring Nano PLCs
Configuration screen for remoting Nano PLCs
Introduction
Illustration
This screen, split into two zones, is used to declare the communication channel and to configure the parameters necessary for a Modbus/Jbus link.
The screen for remoting Nano PLCs looks like this:
1
2
TSX STZ 10 [ POSITION 04]
Debugging
Designation: XL7 COUPLER - TSX 37
CHANNEL 0
CHANNEL 0
LINK EXTENSION TSX07
Link configuration
Slave 1
Slave 2
Slave 3
Slave 4
I/O Block
I/O Block
Slave PLC
Slave PLC
Filter
12 ms
12 ms
12 ms
12 ms
MAST
Transmission Speed
9600 Bits/s
Fallback mode on failure
Fallback to 0
Maintain state
Elements and functions
This table describes the different zones that make up the configuration screen:
Address Zone
1 common
2 specific
Function
See Description of configuration screens for communication,
Is used to select or complete parameters for communication.
It is split into three different types of information: l l l parameters concerning links, transmission speed, fallback mode on failure,
TLX DS COM PL7 xxE
197
Configuring Nano PLCs
Modbus parameters associated with the application
Introduction
Link configuration
After having configured the communication channel, the link parameters must be completed.
l l l
They are split into three windows: the Link configuration window, the Transmission speed window, the Fallback mode on failure window.
The window looks like this:
Link configuration
Slave 1
Slave 2
I/O Block
I/O Block
Filter
12 ms
12 ms
Slave 3
Slave 4
Slave PLC
Slave PLC
12 ms
12 ms
It can be used to select: l the type of function chosen for the n slave selected: l l
Missing: there is no module on this link
I/O block: TSX Nano PLC is being used for input/output l l Slave PLC: TSX Nano PLC is being used as a PLC filtering: associated with each I/O Block type slave, this function assigns 3 or 12 ms filtering to each input (default value) in order to avoid certain disruptions during acquisition of these inputs. The length of filtering time represents the minimum time that input must retain the same value in order to be taken into account.
Example
Signal
3 ms filtering
12 ms filtering
Time base 1 ms
Note: While configuring the TSX 07 extension link, TSX AMN 4000 and TSX AMN
4001 analog modules must be declared as slave PLCs.
198
TLX DS COM PL7 xxE
Transmission speed
Fallback mode
Configuring Nano PLCs
Corresponds to the information transmission speed.
It must take on the value of 9600 or 19200 bits/s in the event that a link is made up only of PLC slaves or a mixed link (e.g. PLC slaves and I/O Block).
Its value can be raised to 38400 bits/s in the event that a link with only I/O Blocks.
This parameter is used to configure the output fallback mode for all I/O blocks on the link (Fallback to 0 or state is maintained).
TLX DS COM PL7 xxE
199
Configuring Nano PLCs
200
TLX DS COM PL7 xxE
Programming Nano PLC remoting
8
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter describes the Programming process during set-up of TSX Nano PLC remoting.
This Chapter contains the following Maps:
Topic
Example of communication with Nano PLCs
Configuring and programming the example
Page
TLX DS COM PL7 xxE
201
Programming Nano PLCs
Example of communication with Nano PLCs
Introduction
Illustration
The aim of this example is to demonstrate the use of two internal words of the TSX
37 (%MW0 and %MW1) as a shift register. Each of these words is transmitted to the
TSX 07 Nano PLCs configured in slave mode.
The program of these Nano PLCs consists solely of copying the input words onto the output words (%QW0.0:= %IW0.0.....).
Configuration of the example is as follows:
TSX Micro
I/O Block I/O Block Slave PLC Slave PLC
Synoptic of operation
Ad0 = 1 Ad0 = 2 Ad0 = 3 Ad0 = 4
The TSX 37 PLC therefore retrieves the output words of the two slave PLCs to transmit them onto the outputs of the two PLCs configured in I/O blocks. The TSX
37 makes a rotate shift of the words %MW0 and %MW1 every second.
The synoptic of operation for the word %MW0 is as follows:
%MW0 %QW\4.0\3.0
%IW0.0
Input word slave PLC Ad0
= 3
TSX 07
%IW\4.0\3.0
Zone reserved for
PLC address 3
%QW0.0
Output word
I/O Block
(7outputs) TSX 07
202
TLX DS COM PL7 xxE
Programming Nano PLCs
Configuring and programming the example
Configuring the
TSX STZ 10 module
Configuration of the TSX STZ 10 module is as follows:
TSX STZ 10 [ POSITION 04]
Configuration
Designation: XL7 COUPLER - TSX 37
CHANNEL 0
CHANNEL 0
LINK EXTENSION TSX07
Link configuration
Slave 1
Slave 2
Slave 3
Slave 4
I/O Block
I/O Block
Slave PLC
Slave PLC
Filter
12 ms
12 ms
12 ms
12 ms
MAST
Transmission Speed
9600 Bits/s
Fallback mode on failure
Fallback to 0
Maintain state
TLX DS COM PL7 xxE
203
Programming Nano PLCs
Programming Management of the change limits for %MW0
COMPARE
%MW0>64
COMPARE
%MW0=0
Management of the change limits for %MW1
COMPARE
%MW0>512
COMPARE
%MW1=0
Time delay of a second
%M0
P
%M0
N
OPERATE
%MW0:=1
OPERATE
%MW1:=1
OPERATE
%MW0:=ROL(%MW0,1)
OPERATE
%MW1:=ROL(%MW1,1)
204
TLX DS COM PL7 xxE
TLX DS COM PL7 xxE
Programming Nano PLCs
The rising or falling edge of %M0 generates the rotate shift of one bit to the left of
%MW0 and %MW1.
OPERATE
%Q\4.0\3.0:16 :=%MW0
The internal word %MW0 is put in the output word %Q\4.0\3.0:16 assigned to the
PLC at address 3. This output word will correspond to the input word %IW0.0.
OPERATE
%Q\4.0\4.0:16 :=%MW1
The internal word %MW1 is put in the output word %Q\4.0\4.0:16 assigned to the
PLC at address 4. This output word will correspond to the input word %IW0.0.
OPERATE
%MW0:=ROL(%MW0,1)
Copy to the input/output blocks
OPERATE
%MW0:=ROL(%MW0,1)
OPERATE
%MW1:=ROL(%MW1,1)
205
Programming Nano PLCs
206
TLX DS COM PL7 xxE
Debugging Nano PLC remoting
9
Introduction
Aim of this
Chapter
What's in this
Chapter?
This chapter describes the Debugging process during set-up of TSX Nano PLC remoting.
This Chapter contains the following Maps:
Topic
Debugging screen for remoting Nano PLCs
Nano PLC Offset Debugging Screen
Page
TLX DS COM PL7 xxE
207
Debugging Nano PLCs
Debugging screen for remoting Nano PLCs
Introduction
Illustration
This screen, split into two zones, is used to declare the communication channel and to configure the necessary parameters for communication with Nano PLCs.
The screen dedicated to communication looks like this:
TSX STZ 10 [ POSITION 04]
Debugging
Designation: COUPLER XL7 - TSX 37 Version: 1.0
1
CHANNEL 0
CHANNEL 0
LINK EXTENSION TSX07
2
Character Errors
Transmitting
Receiving
0
0
Reset counters
DIAG...
DIAG...
Link configuration
Configured Present Err. Value: Data
Slave 1 Missing Missing
Slave 2
Slave 3
Slave 4
I/O Blocks I/O Blocks
Slave PLC Missing
Missing Missing
Elements and functions
This table describes the different zones that make up the debugging screen:
Address Zone
1 common
2 specific
Function
See
Description of communication debugging screens, p. 168 .
Is used to access link debugging parameters.
208
TLX DS COM PL7 xxE
Debugging Nano PLCs
Nano PLC Offset Debugging Screen
At a Glance l l
This dedicated part is split into two windows: the Character Errorswindow, the Link Configurationwindow.
Character Errors
Window
This window looks like this:
Character errors
In Transmission
In Reception
0
0
Reset Counters
This window shows the number of communication errors counted by the TSX STZ
10 module.
The In Transmission field corresponds to the number of transmission errors
(%MW4.0.7 word image).
The In Receive field corresponds to the number of reception errors (%MW4.0.8
word image).
The Zero Counters button resets these counters to zero (bit %MW4.0.9:x0 is set to
1 and causes explicit exchange for updating).
Note: To carry out the same operations from the application, you must: l activate the READ_STS %CH4.0
function (updating words %MW4.0.7 and
%MW4.0.8), l set bit %MW4.0.9:x0 to 1 and then execute the WRITE_CMD %CH4.0
function.
NB: setting bit %MW4.0.9:X0 to 1 does not set the default counters to zero (it does not start an explicit exchange).
TLX DS COM PL7 xxE
209
Debugging Nano PLCs
Link configuration window
This window looks like this:
Link Configuration
Configured Present Err. Diag.Data
Slave 1 Absent Absent
Slave 2
Slave 3
Slave 4
I/O Blocks I/O Blocks
Slave AP
Absent
Absent
Absent
This window allows you to test communication with the PLCs present on the link.
l l
The different fields are: l l
Configured: this shows the type of slave configured at the link address.
Present: this shows whether the configured slave is physically present at the link address. The Absent value shows that the slave is not connected.
Err.: if the slave is faulty, the LED is lit (in Reverse Video).
Diag.: when a slave is faulty, this button allows you to access the diagnostics screen, showing the causes of the errors.
l Data: pushing this button displays the inputs/outputs image of the slave concerned.
Note: Where a slave has a physical address greater than 4, all the Err.LEDs are lit (Reverse Video).
Data Example Data example of an AP slave device:
3 - AP SLAVE Application Data
%IW\4.0\3.x
MOT 0 16#2FCE
%QW\4.0\3.x
MOT 0 16#0016
MOT1 16#0240 MOT1 16#0000
Close
Data example of an input/output Bloc device:
2 - I/O SLAVE Application Data
%IW\4.0\2.x
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
0 0 0 0 0 F1 0 0 0 0 0 0 0 0 0 0
%QW\4.0\2.x
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
F0= bit forced to 0
F1= bit forced to 1 Close
210
TLX DS COM PL7 xxE
Language objects associated to
Nano PLC remoting
10
Introduction
Aim of this section
What's in this
Chapter?
This chapter introduces the language objects associated with the TSX Nano PLC remoting.
This Chapter contains the following Maps:
Topic
Language object for implicit exchange
Explicit exchange language objects
Explicit exchange management and reports
Language objects associated with configuration
Page
211
TLX DS COM PL7 xxE
Nano PLC language objects
Language object for implicit exchange
Introduction
Bit objects
This page describes all the language objects in implicit exchange for the remoting of
TSX Nano PLCs that can be displayed or modified by the application program.
The table below shows the different bit objects for implicit exchange.
Object (1)
%I4.MOD.E
RR
Function
Module error bit
%I4.0.ERR
Status of link
%I\4.0\i.n
%Q\4.0\i.n
Meaning
This bit set to 1, indicates a module error (at least one of the channels is faulty,…)
= 1: if there is a configuration error or faulty devices
Values of remote inputs/ outputs
Value of the inputs
Value of the outputs
Key
(1) Address i.n
l l i: corresponds to the slave number n: corresponds to the word number
Word objects The table below shows the different word objects for implicit exchange.
Object (1)
%IW4.0.0
Function
Device status
%IW\4.0\i.n
%QW\4.0\i.n
Value of the application data
Meaning l l l x0 = 1: if configuration error xn = 1: if the device is faulty (if = 0 if not) x5 = 1: if at least one of the devices is faulty
Words consumed by master
Words produced by master
Key
(1) Address i.n
l l i: corresponds to the slave number n: corresponds to the word number
212
TLX DS COM PL7 xxE
Nano PLC language objects
Explicit exchange language objects
Introduction
Word objects
This page describes all the language objects in explicit exchange for deporting Nano
TSX PLCs that can be displayed or modified by the application program.
Specified
exchanges : General points, p. 155
The table below shows the different word objects for explicit exchange.
Object (1)
%MW4.MO
D.2
Function
Module status
%MW4.0.2
Standard channel status l l l l l l l l l l l l l l
Meaning l l x0 = 1: defective module x1 = 1: functional error (error between the processor and the module, adjustment or configuration error, …) x2 = 1: terminal block fault (not connected) x3 = 1: self-tests running x4 = 1: reserved x5 = 1: error in hardware or software configuration (the module present is not that declared in the configuration, the sub-modules are not compatible) x6 = 1: missing module x7 = 1: error in one of the sub-modules x0 = 1: single station on the network x1 = 1: not used x2 = 1: transmission line error x3 = 1: not used x4 = 1: internal software fault x5 = 1: error in hard- or software configuration, or configuration missing x6 = 1: communication error with the processor x7 = 1: application fault (double address station)
TLX DS COM PL7 xxE
213
Nano PLC language objects
Object (1)
%MW4.0.7
Function
Error counter
Meaning
%MW4.0.3
%MW4.0.4
Specific channel status One byte per device (byte 0 belongs with device 1,
…, byte 3 with device 4)
If an octet is worth l l l l l l l l l l l
16#00: correct exchange
16#02: character send error
16#03: character receive error
16#04: Protocol Data Unit ERROR
16#05: type inconsistency (I/O and PLC)
16#06: Protocol Data Unit incorrect
16#07: Binary Check Character error
16#08: timeout error
16#09: time between characters error
16#81: protected outputs fault
16#82: supply fault
%MW4.0.5
Physical configuration of slaves 1 and 2
Byte 0: Slave 1 value
Byte 1: Slave 2 value
For each byte, bits x0 and x1 give: l l l x10 = 00: slave missing x10 = 01: PLC slave x10 = 10: input/output slave
For each byte, bits x2 and x3 correspond to the input/output block: l l l l x3x2 = 00: 6 inputs, 4 outputs x3x2 = 01: 9 inputs, 7 outputs x3x2 = 10: 14 inputs, 10 outputs x3x2 = 11: alternating, 9 inputs, 7 outputs
%MW4.0.6
Physical configuration of slaves 3 and 4
Byte 0: Slave 3 value
Byte 1: Slave 4 value
For each byte, bits x0 and x1 give: l l l x10 = 00: slave missing x10 = 01: PLC slave x10 = 10: input/output slave
For each byte, bits x2 and x3 correspond to the input/output block: l l l l x3x2 = 00: 6 inputs, 4 outputs x3x2 = 01: 9 inputs, 7 outputs x3x2 = 10: 14 inputs, 10 outputs x3x2 = 11: alternating, 9 inputs, 7 outputs
Send error
%MW4.0.8
Error counter Receive error
214
TLX DS COM PL7 xxE
Object (1) Function
%MW4.0.9
Commands
Nano PLC language objects
Meaning l l l l l x0 = 1: Reset counters x1 = 1: reactivation of slave 1 outputs x2 = 1: reactivation of slave 2 outputs x3 = 1: reactivation of slave 3 outputs x4 = 1: reactivation of slave 4 outputs
TLX DS COM PL7 xxE
215
Nano PLC language objects
Explicit exchange management and reports
Introduction
Word objects
This page describes all the language objects that manage explicit exchanges.
Exchange and report management, p. 157
The table below shows the different word objects for the management of explicit exchanges.
Object
%MW4.MO
D.0
%MW4.MO
D.1
Function
Module exchanges in progress
Module report
%MW4.0.0
Channel exchanges in progress
%MW4.0.1
Channel report
Meaning l l l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication module x2 = 1: sending of adjustment parameters to the communication module l l x1 = 0: command parameters received and accepted by the module x2 = 0: adjustment parameters received and accepted by the module l l l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication channel x2 = 1: sending of adjustment parameters to the communication channel l l x1 = 0: command parameters received and accepted by the communication channel x2 = 0: adjustment parameters received and accepted by the communication channel
216
TLX DS COM PL7 xxE
Nano PLC language objects
Language objects associated with configuration
Introduction
Internal constants
This page describes all the configuration language objects for remoting Nano TSX
PLCs that can be displayed by the application program.
The following table describes the internal constants:
Object Function
%KW4.0.1
Speed / Format
%KW4.0.2
%KW4.0.3
Logic configuration
%KW4.0.4
Filter
Fallback
Meaning l l l
= 16#03: if speed is 9600 bit/s
= 16#04: if speed is 19200 bit/s
= 16#05: if speed is 38400 bit/s
One byte per device (byte 0 corresponding to device
1, …, byte 3 to device 4) l l l
= 16#00: Missing
= 16#01: slave PLC
= 16#00: Input/output block
Byte 0: corresponds to filtering (2 bits per device) l l
= 01: 3 ms filter
= 11: 12 ms filter
Byte 1: corresponds to fallback mode (2 bits per device) l l x0 = 0: outputs fallback to 0 x0 = 1: outputs maintained
TLX DS COM PL7 xxE
217
Nano PLC language objects
218
TLX DS COM PL7 xxE
Communication using character mode
III
Introduction
Aim of this part
What's in this part?
This part introduces the principles of configuring and using communication by character mode via PL7 software.
This Part contains the following Chapters:
Chapter
11
12
13
14
15
Chaptername
General
Configuring character mode communication
Programming communication in character mode
Debugging communication using character mode
Language objects associated with character mode communication
Page
TLX DS COM PL7 xxE
219
Communication using character mode
220
TLX DS COM PL7 xxE
General
11
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter introduces communication via character mode and its services.
This Chapter contains the following Sections:
Section
11.1
11.2
Topic
Introduction to communication via character mode
Characteristics
Page
TLX DS COM PL7 xxE
221
Communication via character mode: General
11.1
Introduction to communication via character mode
Introduction
Aim of this
Section
What's in this
Section?
This Section provides a summary description of communication via character mode and its associated services.
This Section contains the following Maps:
Topic
About character mode
Flow control
Page
222
TLX DS COM PL7 xxE
Communication via character mode: General
About character mode
Introduction
Associated manuals
Communication via character mode is used to perform dialog and communication functions between PLCs and their environment: l l l l l standard peripherals: printers, screen with keypad, workshop terminal, specialized peripherals: barcode scanners, link to a production control or management computer, data transmission between mixed devices (digital commands, speed controllers etc.), link to an external modem.
If you require further information you should consult the following manuals:
Title
TSX Micro PLCs - Installation manual
Premium TSX PLCs - Installation manual
Description
Hardware installation
Hardware installation
TLX DS COM PL7 xxE
223
Communication via character mode: General
Flow control
Introduction Flow control is used to manage exchanges on a serial link (in this case a character mode link) between two devices.
Data is sent from the transmitter Tx1 to the receiver Rx2. Data transmission is controlled by the flow control signals Scf1 and Scf2.
Transmitter
Tx1
Scf1
Receiver
Rx2
Scf2
1 2 3 4
Scf1
Scf2
Tx1
1 The transmitter activates its Scf1 signal to show that it is ready to send.
2 The receiver activates its Scf2 signal to allow data to be sent.
3 Data is sent
4 Once data transmission has finished, Scf1 and Scf2 control signals are deactivated.
There are two ways to control flow: l l either with hardware using: l RTS/CTS l RTS/DCD or with software via Xon/Xoff.
Note: Flow is most commonly controlled using software. Should software control not be available, the operation will be carried out using hardware.
224
TLX DS COM PL7 xxE
RTS/CTS
RTS/DCD
Xon/Xoff
Communication via character mode: General
In this case, the control signals are RTS/CTS signals. This flow control mode is the most commonly used type of hardware flow control.
The output Tx of the transmitter is linked to the Rx input of the receiver, and vice versa. The CTS signal from the transmitter is linked to the RTS receiver signal, and vice versa.
The transmitter is allowed to send data when it receives the RTS signal from the transmitter on its CTS input.
In this case, the control signals are RTS/DCD signals. This flow control mode is not widely used. It is there for communication with, for example, a bottom-of-the-range printer.
The output Tx of the transmitter is linked to the Rx input of the receiver, and vice versa. The DCD signal from the transmitter is linked to the DTR signal from the receiver. The RTS signal from the transmitter is linked to the CTS signal from the receiver.
The transmitter is allowed to send data when it receives the RTS signal from the receiver on its CTS input.
In this case, this flow control is carried out by software with Xon/Xoff characters. In this instance, devices are linked by two lines only.
The output Tx of the transmitter is linked to the Rx input of the receiver, and vice versa.
The transmitter is allowed to send data when it receives the Xon character on its Rx input. When its Rx input receives the Xoff character, it must halt transmission.
TLX DS COM PL7 xxE
225
Communication via character mode: General
11.2
Characteristics
Introduction
Aim of this
Section
What's in this
Section?
This Section introduces the characteristics of using communication via character mode.
This Section contains the following Maps:
Topic
Compatibility
Performance
Operating mode
Page
226
TLX DS COM PL7 xxE
Communication via character mode: General
Compatibility
Hardware
Software
This type of communication is available for: l l l
TSX Micro and TSX Premium PLCs via the terminal port associated with the
RS485 physical layer, l l l
TSX Premium via: the PCMCIA TSX SCP11 card associated with the RS232 physical layer, the PCMCIA TSX SCP 112 card associated with 20 mA current loops, the PCMCIA TSX SCP 114 card associated with RS422 and RS485 physical l layers, the built-in link on the TSX SCY 21600 / 21601 module associated with the physical layer RS485,
TSX Micro accepts the PCMCIA cards described below.
The terminal port of TSX Premium and TSX Micro processors can only process one communication function type: l l l
INPUT_CHAR,
PRINT_CHAR,
OUT_IN_CHAR.
For each terminal port communication, the maximum frame size is 120 bytes per communication function.
PCMCIA cards can process: l l
4 communication functions simultaneously for TSX Micro PLCs,
8 communication functions simultaneously for TSX Premium PLCs.
The built-in link on TSX SCY 21600/21601 modules can process 8 communication functions at the same time.
For each PCMCIA card or built-in link communication, the maximum frame size is
4Kbytes per communication function.
TLX DS COM PL7 xxE
227
Communication via character mode: General
Performance
Introduction
Time with
PCMCIA card
The following tables are used to assess the typical exchange time in character mode for: l l
PCMCIA cards and the built-in link on TSX SCY 21600/21601 modules, the terminal port.
The results shown correspond to the average time (in ms) for the PRINT_CHAR function to be executed.
Average time according to programmed cycle time and number of characters sent:
Length of message 80 characters
Speed in bits/ s
T cycle in ms Average time
4800
4800
4800
9600
10
25
50
10
PCMCIA
190
200
200
9600
9600
19200
19200
19200
25
50
10
25
50
108
118
137
62
75
100
125
135
157
90
SCY 21600
210
220
230
105
120
960 characters
Average time
PCMCIA
2100
2166
2300
1120
1147
1148
604
696
698
SCY 21600
2200
2300
2400
1200
1230
1240
700
800
810
228
TLX DS COM PL7 xxE
Time with terminal port
Communication via character mode: General
Average time according to programmed cycle time and with 80 characters sent:
9600
9600
9600
9600
9600
19200
19200
19200
19200
19200
1200
4800
4800
4800
4800
4800
Speed in bits/s
1200
1200
1200
1200
20
50
100
255
10
20
50
100
255
10
255
10
20
50
100
255
T cycle in ms
10
20
50
100
-
-
-
-
129
139
149
199
355
-
1018
242
242
249
299
455
TSX 37
Average time
939
945
948
1000
75
105
155
285
129
139
149
199
355
65
1018
242
242
249
299
455
TSX 57
Average time
939
945
948
1000
TLX DS COM PL7 xxE
229
Communication via character mode: General
Operating mode
Introduction
General graph
The following graph describes the operating modes in character mode for PCMCIA cards, for the built-in link on TSX SCY 21600/21601 modules and the terminal port.
The operating mode is as follows:
Module stopped
Power up
Module off
Operation
Module configured
Communication function
Module in self-test phase
Reset
Module not configured Self-tests OK
Configuration l l l l after power-up the module self-tests. During this phase the warning indicators flash.
if there is no PL7 application in the PLC, the module remains in await configuration mode.
if there is a PL7 application in the PLC, the application configuration is sent to the module, which then starts.
in case of power outage, the PLC processor performs a warm restart. The module then re-launches its self-test procedure.
230
TLX DS COM PL7 xxE
Configuring character mode communication
12
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter describes the Configuration process during set-up of character mode communication.
This Chapter contains the following Maps:
Topic
How to access PCMCIA card parameters in character mode
How to access terminal port parameters
How to access TSX SCY 21600 / 21601 module parameters
Configuration screen in character mode
Functions accessible in character mode
Parameters in character mode linked to transmission
Parameters in character mode linked to message ends
Parameters in character mode linked to flow control
Additional parameters
Page
231
TLX DS COM PL7 xxE
Character mode configuration
How to access PCMCIA card parameters in character mode
Introduction
How to access the link
This operation describes how to access configuration parameters for the character mode link via PCMCIA cards.
The following table shows the procedure for accessing the character mode link:
Step
1
2
Action
Access the communication channel configuration screen.
Select the communication channel from the drop-down menu CHANNEL 1
Example
CHANNEL 1:
CHANNEL 1
CHANNEL 0
CHANNEL 1
Duration
(No PCMCIA submodule)
MAST
3
4
Select one of the following PCMCIA cards from the drop-down menu: l l l
TSX SCP 111 PCMCIA CARD RS232 MP
TSX SCP 112 PCMCIA CARD BC MP
TSX SCP 114 PCMCIA CARD RS485 MP
Example
CHANNEL 1:
CHANNEL 1 TSX SCP 111 PCMCIA CARD RS 232 MP
(Link not configured)
TSX FPP 200 PCMCIA FIPWAY CARD
TSX FPP 10 PCMCIA FIPIO CARD
TSX MBP 100 PCMCIA MODBUS* CARD
TSX MDP 10 PCMCIA MODEM CARD
Select the link from the drop-down menu CHARACTER MODE LINK:
Example
CHANNEL 1:
CHANNEL 1
(Link not configured)
(Link not configured)
UNI-TELWAY LINK
TSX SCP 111 PCMCIA CARD RS 232 MP
MAST
MODBUS/JBUS LINK
232
TLX DS COM PL7 xxE
Character mode configuration
How to access terminal port parameters
Introduction
How to access the link
This operation describes how to access configuration parameters for the character mode link via the terminal port.
The following table shows the procedure for accessing the character mode link:
Step
1
2
Action
Access the communication channel configuration screen.
Select the link from the drop-down menu CHARACTER MODE LINK.
Example
CHANNEL 0:
CHANNEL 0
UNI-TELWAY LINK
UNI-TELWAY LINK
Terminal Port
MAST
TLX DS COM PL7 xxE
233
Character mode configuration
How to access TSX SCY 21600 / 21601 module parameters
Introduction
How to access the link
This operation describes how to access configuration parameters for the character mode link via TSX SCY 21600 / 21601 modules for TSX Premium.
The following table shows the procedure for accessing the character mode link:
Step
1
2
Action
Access the communication channel configuration screen of the chosen module
Select the communication channel from the drop-down menu CHANNEL 0
Example
CHANNEL 1:
CHANNEL 1
CHANNEL 0
CHANNEL 1
(No PCMCIA submodule)
Duration MAST
3 Select the link from the drop-down menu CHARACTER MODE LINK.
Example
CHANNEL 1:
CHANNEL 1 TSX SCP 111 PCMCIA CARD RS 232 MP
(Link not configured)
(Link not configured)
UNI-TELWAY LINK
MAST
MODBUS/JBUS LINK
234
TLX DS COM PL7 xxE
Character mode configuration
Configuration screen in character mode
Introduction
Illustration
This screen, split into two zones, is used to declare the communication channel and to configure the parameters necessary for a character mode link.
The screen dedicated to character mode communication looks like this:
1
2
TSX 3722 [POSITION 00.0..1]
Configuration
Designation: 3721 PROCESSOR
CHANNEL 1:
CHANNEL 1 TSX SCP 111 PCMCIA CARD RS 232 MP
CHARACTER MODE LINK MAST
Flow control
RTS/CTS hardware
Stop on reception
Character 1
RTS/DCD Hardware
Xon/Xoff None
Stop
Echo
Receiving
CR LF 0
Characters included
Restart from 1st. char.
CR -> CR LF
Beep Management
Backspace management
Current Loop (PSR)
Character 2
Multidrop Point to point
Stop
CR LF 0
Characters included
Full Duplex
(RS 422)
Transmission Speed
9600 Bits/
Stop on silence
Stop
Data
7 bits
8 bits
Parity
Even Odd
RTS/CTS delay
0 x 100ms
1 ms
Stop
1 bit
2 bits
Without
Data carrier (DCD)
Elements and functions
This table describes the different zones that make up the configuration screen:
Address Zone
1 common
2 specific
Function
See Description of configuration screens for communication,
Is used to select or complete the parameters of a character mode link.
It is split into four different types of information: l l l l the transmission parameters.
parameters concerning end of message detection, parameters concerning flow control, additional parameters.
TLX DS COM PL7 xxE
235
Character mode configuration
Functions accessible in character mode
Introduction
Accessible functions
Functions
Flow control
Echo
Current Loop (PSR)
Stop on reception
Full duplex
Transmission speed
Stop on silence
Data / Stop
Parity
RTS/CTS delay
Data carrier (DCD)
Depending on the chosen communication supports, some parameters cannot be modified. They appear grayed out.
The summary table below shows the various choices possible:
No
Yes
Yes
Yes
Yes
Yes
SCP 111 SCP 112 SCP 114 l l l l l l
RTS/CTS
RTS/DCD
Xon/Xoff
None l
No
On reception
Restart from
1st. char.
CR->CRLF
Yes
No
Yes l l l
Yes
On reception
Restart from
1st. char.
CR->CRLF
No
No
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
SCY 21600/
21601
No
No
No
Yes
No
Yes
Yes
Yes
Yes
No
Terminal Port
No
On reception
No
Yes
Yes
No
No l l
CR/LF with 1
Micro
No with 1
Premium
No
Yes
Beep and Back-space management can be accessed whatever the type of support.
236
TLX DS COM PL7 xxE
Character mode configuration
Parameters in character mode linked to transmission
Introduction
Transmission speed
Data
Once the communication channel has been configured, complete the parameters dedicated to transmission.
They are split into four windows: l l l l the Transmission speed window, the windows specific to Data and Stop, the Parity window, the RTS/CTS delay window,
The window looks like this:
Transmission Speed
9600 Bits/s
It is used to select the transmission speed for the character mode protocol used by l l l the module: the default speed is 9600 bits/s.
the available speeds are 1200, 2400, 9600 and 19200 bits/s.
speeds of 300 and 600 bits/s are only available with a PCMCIA TSX SCP 111 card.
l you are advised to adjust transmission speed according to the remote device.
The window looks like this:
Data
7 bits
8 bits
The Data fields specify the size of data that can be exchanged on the line. 7 and 8 bit values are available. You are advised to adjust the number of data bits according to the remote devices.
Note: The default value is 8 bits.
TLX DS COM PL7 xxE
237
Character mode configuration
Stop The window looks like this:
stop
1 bit
2 bits
The Stop field is used to complete the number of stop bits employed for communicating in character mode. Possible values are 1 or 2 stop bits. You are advised to adjust the number of stop bits according to the remote devices.
Note: The default value is 1 stop bit.
Parity
RTS/CTS delay
The window looks like this:
Parity
Even Odd Without
This field is used to define the addition or non-addition of a parity bit, and its type.
Possible values are Even, Odd, or none (Odd by default).
It is advisable to adjust the parity according to the remote stations.
The window looks like this:
RTS/CTS delay
0 x 100ms Data carrier (DCD)
Before each transmission of a character string, the module activates the RTS signal
(Request To Send) and awaits the activation of the CTS signal (Clear To Send).
It is used to complete: l the maximum waiting time between the two signals. If this time has elapsed, the request is not sent onto the bus.
l l l the value is expressed in hundreds of milliseconds,
The default value is 0 ms.
l l the value is between 0 and 10 s, the value 0 specifies the absence of delay management between the two signals.
the carrier management (DCD signal, Data Carrier Detected) is only used in the event of communication with a modem with a controlled carrier: l If the option is selected, character reception is only enabled if the DCD carrier l signal is detected,
If the option is not selected, all the characters received are taken into account.
238
TLX DS COM PL7 xxE
Character mode configuration
Parameters in character mode linked to message ends
Introduction
Usage conditions
Stop on reception
After having configured the communication channel, the end of message detection parameters must be completed.
l l
They are split into two windows: the Stop on reception window: a stop condition triggered by a special character, the Stop on silence window: a stop condition triggered by a silence.
Activating one of these conditions leads to the following events: l the INPUT_CHAR communication function is not able to read of a defined number of characters. The Number of characters to be read parameter must be equal to 0.
l the OUT_IN_CHAR communication function may be used on reception.
Selection of stop on silence results in deselection of stop by character. Inversely, selection of stop by character will deselect stop on silence.
The window looks like this:
Stop on reception
Character 1
Stop
CR LF 10
Characters included
Character 2
Stop
CR LF 0
Characters included
A receive request can be discontinued on receiving a particular character.
l l l l
The following parameters are used to define up to two end of message characters:
Stop: is used to activate stop on reception by an end character,
CR: is used to detect the end of a message by a carriage return,
LF: is used to detect the end of a message by a line feed, an entry field: is used to identify an end character which is different from a CR or
LF character, using a decimal value.
l
The possible values are: l 0 to 255 if the data is coded onto 8 bits, l 0 to 127 if the data is coded onto 7 bits,
Character included: check the box if you wish the end character(s) to be included in the receive table for the PL7 PLC application.
TLX DS COM PL7 xxE
239
Character mode configuration
Stop on silence The window looks like this:
Stop on silence
Stop 1 ms
This parameter is used to detect the end of a message on reception by the absence of an end character for a given time period.
Stop on silence is enabled when the Stop box is checked. The duration of the silence (in milliseconds) is set in the entry field.
Note: Available values are between 1 ms and 10000ms.
240
TLX DS COM PL7 xxE
Character mode configuration
Parameters in character mode linked to flow control
Introduction
Flow control window
Once the communication channel has been configured, the flow control parameters must be entered. See
The window looks like this:
Flow control
RTS/CTS hardware
RTS/DCD Hardware
Xon/Xoff None
Selection of flow control depends on the remote device: l l l l
RTS/CTS hardware: if the device manages this flow control.
RTS/DCD hardware: if the device manages this flow control.
Xon/Xoff: if the device manages this flow control.
None: if the device does not manage flow control.
TLX DS COM PL7 xxE
241
Character mode configuration
Additional parameters
Introduction
Echo
Beep management l l l l
Configuring a link using character mode requires the following four parameters to be configured: the Echo window, the Beep management parameter, the Back-space management parameter, the Full Duplex (RS 422) parameter,
This window is used to select and configure reception echo management.
Echo
On reception
Restart from 1st. char.
CR -> CR LF
Any character received by the PLC is immediately resent as an echo on the line
(which allows the remote device to carry out a control procedure).
To enable echo management, check the On reception box.
If, during reception, a write request is sent by the PLC, echo on reception is interrupted. When the write request has finished, the echo is restarted in two distinct ways: l either from the first character received, in which case check the Restart from 1st
char. box, l or from the last interrupted character , in which case uncheck the Restart from
1st char. box,
Selecting the CR --> CR LF box is used to send as part of an echo the carriage return character followed automatically by the line feed character (LF = 16#0A) after reception of any carriage return character (CR = 16#0D).
Checking the Beep management box causes a beep to be heard when the module receive buffer is empty or full.
Beep Management
Backspace management
Uncheck the box if the card is connected to a MMI terminal.
242
TLX DS COM PL7 xxE
Backspace management
Full Duplex
(RS 422)
Character mode configuration l l l
Checking the Backspace management box ensures that each backspace character received is not stored and that the previous character is canceled.
In addition, if the echo on reception is active, the PLC transmits three characters in the following order:
Backspace (= 16#08) space (= 16#20)
Backspace (= 16#08)
If the box is deselected, any Backspace character received is stored like any other character.
Checking this box enables Full Duplex communication. Otherwise communication is
Half Duplex. Activating this function depends on the remote device.
Full Duplex
(RS 422)
TLX DS COM PL7 xxE
243
Character mode configuration
244
TLX DS COM PL7 xxE
Programming communication in character mode
13
Available communication functions
Introduction
Available functions
This page describes the communication functions available in character mode, and presents an example of communication between two stations (TSX Micro and TSX
Premium).
Three specific communication functions are defined to send and receive data on a communication channel in character mode: l l l
PRINT_CHAR : sends a character string. See Writing a string of characters.
INPUT_CHAR : character string read request. See Reading a character string:
OUT_IN_CHAR : sends a character string followed by a read request. See
Sending/receiving a string of characters : OUT_IN_CHAR, p. 125.
Note: Usage of these functions must be consistent with the configuration.
245
TLX DS COM PL7 xxE
Character mode programming
Example A station at the address {20.1} on a FIPWAY network wants to send a character string to then receive a character string from a video terminal connected via the builtin link of a TSX SCY 21601 module at station address {20.3}.
FIPWAY
246
{20.1} {20.3}
Programming the communication function:
%I3.8
%MW170:x0 OPERATE
(1)
(1) OUT_IN_CHAR(ADR#{20.3}0.0.SYS, 1, %MB300:10, %MB310:10, %MW170:4)
The following table describes the different parameters of the function:
Parameter
ADR#{20.3}0.0.SYS
1
%MB300:10
%MB310:10
%MW170:4
Description
Address of destination device for the message
Send / Receive
Contents of message to be sent
Contents of the message received
Exchange report, length of string sent, then length of string received
Note: Before each function starts, the number of characters to be sent must be given in the length parameter (in bytes). In this example: %MW173 = 10. At the end of the exchange, it will contain the number of characters received (in bytes). The value 0 is used to send the entire character string.
TLX DS COM PL7 xxE
Debugging communication using character mode
14
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter describes the Debugging process during set-up of character mode communication.
This Chapter contains the following Maps:
Topic
Debugging screen in character mode
Debugging parameters in character mode
How to test a communication channel
Page
247
TLX DS COM PL7 xxE
Character mode debugging
Debugging screen in character mode
Introduction
Illustration
This screen, split into two zones, is used to declare the communication channel and to configure the parameters required for a character mode link.
The screen dedicated to character mode communication looks like this:
1
2
TSX 3721 [POSITION 00.0..1]
Debugging
Designation: TSX 3721 Version: 0.4
CHANNEL 0:
CHANNEL 0 Terminal Port
CHARACTER MODE Link
Errors
Sending 0
Receiving 0
Reset Counters
Message Sent
Send Request
IO RUN
Send
Receive
Send / Receive
ERR DIAG.
Message Received
Number of characters received 0
ASCII
Hex.
Elements and functions
This table describes the different zones that make up the debugging screen:
Address Zone
1 common
2 specific
Function
Description of communication debugging screens, p. 168
Is used to access the debugging parameters of a character mode link.
248
TLX DS COM PL7 xxE
Character mode debugging
Debugging parameters in character mode
Introduction
Errors Window
Request
Transmission window l l l l
The specific part is split into four windows: the Errors window, the Request transmission window, the Message sent window, the Message received window,
The window looks like this:
Errors
Sending
Receiving
Reset Counters
0
0
This window indicates the number of communication errors counted by the communication module.
l On transmission: corresponds to the number of errors on transmission
(image of %MWxy.i.4 word) l On reception: corresponds to the number of errors on reception
(image of %MWxy.i.5 word)
The button Reset Counters resets these counters to zero.
The window looks like this:
Send request
Send
Receive
Send / Receive l l l
This window is used to test a communication channel by transmission and/or reception of a character string.
the Send button transmits a character string.
the Receive button is used to receive a character string.
the Send/Receive button is used to send a character string and wait for a reply.
Note: Reception can be stopped by pressing the Escape button, or if a message is received.
TLX DS COM PL7 xxE
249
Character mode debugging
Message Sent window
The window looks like this:
Message Sent
Test for sending a character string I
Message
Received window
This window is used to enter a message to be sent during a communication test using the Send and Send/Receive buttons.
The window looks like this:
Message
Number of characters received 0
ASCI
Hex.
This window is used to read a received message as a result of a communication test by using the Receive and Send/Receive buttons.
The ASCII and Hexa buttons are used to display text in hexadecimal or in ASCII format.
250
TLX DS COM PL7 xxE
Character mode debugging
How to test a communication channel
Introduction
How to send a character string
This page describes the procedure for testing a communication channel from the debugging screen.
The following procedure is used to send a character string with a remote device.
Step
1
Actions
Enter the character string to be sent in the Message sent window.
2
Note: Special characters can also be sent. They must begin with the $ character (example using carriage return character: $0D).
Click on the Send button.
Result
If the exchange is correct, a window specifying that the exchange is correct appears. On the remote device display, check whether the string has been transmitted.
How to receive a character string
The following procedure is used to receive a character string with a remote device.
For efficient operation, you must remember that this test requires stop on reception to be configured either via a special character, or via a silence.
Step
1
2
Action
Click on the Receive button.
Send the character string with the frame end character from the remote device.
3
Note: In this example, stop on reception is performed after a carriage return character (16#0D).
Display the number of characters and the character string received in the
Message received window.
TLX DS COM PL7 xxE
251
Character mode debugging
252
TLX DS COM PL7 xxE
Language objects associated with character mode communication
15
Introduction
Aim of this
Section
What's in this
Chapter?
This Chapter introduces language objects associated with character mode communication.
This Chapter contains the following Maps:
Topic
Language objects in implicit exchange
Explicit exchange language objects
Explicit exchange management and reports
Language objects associated with configuration
Page
TLX DS COM PL7 xxE
253
Character mode language objects
Language objects in implicit exchange
Introduction
Bit objects
This page describes all the language objects for implicit exchange in character mode communication that can be displayed or modified by the application program. See
The table below shows the different bit objects for implicit exchange.
Object (1) Function
%Ixy.MOD.ERR
Module error bit
%Ixy.i.ERR
Channel error bit
Meaning
This bit set to 1, indicates a module error
(at least one of the channels is faulty, …)
This bit set at 1 indicates a faulty channel.
Key
(1) Address xy.i
l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
Word objects The table below shows the different word objects for implicit exchange.
Object (1)
%IWxy.i.0
%QWxy.i.0
Function
Signals on input
Signal on output
Meaning
Common signals (byte 0) l l l l x0 = 1: DCD signal x1 = 1: RI signal x2 = 1: CTS signal x3 = 1: DSR signal l x0 = rising edge at 1: stops all exchanges in progress
Key
(1) Address xy.i
l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
254
TLX DS COM PL7 xxE
Character mode language objects
Explicit exchange language objects
Introduction This page describes all the language objects for explicit exchange in character mode communication that can be displayed or modified by the application program. See
Specified exchanges : General points, p. 155.
Word objects for
PCMCIA cards
The table below shows the different word objects for explicit exchange.
Object (1) Function
%MWxy.MOD.2 Module status
%MWxy.i.2
%MWxy.i.3
Standard channel status l l l l l l l l l l l l l l
Meaning l l x0 = 1: defective module x1 = 1: functional error (error between the processor and the module, adjustment or configuration error, …) x2 = 1: terminal block fault (not connected) x3 = 1: self-tests running x4 = 1: reserved x5 = 1: error in hardware or software configuration (the module present is not that declared in the configuration, the sub-modules are not compatible) x6 = 1: missing module x7 = 1: error in one of the sub-modules x0 = 1: single station on the network x1 = 1: not used x2 = 1: transmission line error x3 = 1: not used x4 = 1: internal software fault x5 = 1: error in hard- or software configuration, or configuration missing x6 = 1: communication error with the processor x7 = 1: application fault (double address station)
Character mode type = 16#03
%MWxy.i.4
%MWxy.i.5
%MWxy.i.15
Specific channel status
Error counter
Error counter
Command
Characters sent in error
Characters received in error l l l x0 = 1: RAZ counter x8 = 1: DTR ON signal x9 = 1: DTR OFF signal
Key
TLX DS COM PL7 xxE
255
Character mode language objects
Object (1)
(1)
Function Meaning
Address xy.i
l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
Word objects for terminal port
The table below shows the different word objects for explicit exchange.
Object (1) Function
%MW0.MOD.2
Module status
%MW0.i.2
%MW0.0.3
Standard channel status
Specific channel status l l l l l l l l l l l l l l
Meaning l l x0 = 1: defective module x1 = 1: functional error (error between the processor and the module, adjustment or configuration error, …) x2 = 1: terminal block fault (not connected) x3 = 1: self-tests running x4 = 1: reserved x5 = 1: error in hardware or software configuration (the module present is not that declared in the configuration, the sub-modules are not compatible) x6 = 1: missing module x7 = 1: error in one of the sub-modules x0 = 1: single station on the network x1 = 1: not used x2 = 1: transmission line error x3 = 1: not used x4 = 1: internal software fault x5 = 1: error in hardware or software configuration, or no configuration x6 = 1: communication error with the processor x7 = 1: application fault (double address station)
Character mode type = 16#03
256
TLX DS COM PL7 xxE
Character mode language objects
Explicit exchange management and reports
Introduction
Word objects
This page describes all the language objects that manage explicit exchanges.
Exchange and report management, p. 157
The table below shows the different word objects for the management of explicit exchanges.
Object (1) Function
%MWxy.MOD.0 Module exchanges in progress
%MWxy.MOD.1 Module report
%MWxy.i.0
%MWxy.i.1
Channel exchanges in progress
Channel report l l
Meaning l l l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication module x2 = 1: sending of adjustment parameters to the communication module l l x1 = 0: command parameters received and accepted by the module x2 = 0: adjustment parameters received and accepted by the module l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication channel x2 = 1: sending of adjustment parameters to the communication channel l l x1 = 0: command parameters received and accepted by the communication channel x2 = 0: adjustment parameters received and accepted by the communication channel
Key
(1) Address xy.i
l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
TLX DS COM PL7 xxE
257
Character mode language objects
Language objects associated with configuration
Introduction
Internal constants
This page describes all the configuration language objects for character mode communication that can be displayed by the application program.
The following table describes the internal constants:
Object Function
%KWxy.i.0
Type
%KWxy.i.1
Speed / Format
%KWxy.i.2
Stop on silence
%KWxy.i.3
Various
%KWxy.i.4
Signal management
%KWxy.i.5
RTS/CTS delay
%KWxy.i.6
Stop on reception character 1
%KWxy.i.7
Stop on reception character 2
Meaning
Character mode function = 16#03
Byte 0: speed l 00 = 1200 bits/s, ..., 04 = 19200 bits/s
Byte 1: format l l l l x8: bit number (1 = 8 bits, 0 = 7 bits) x9 = 1: parity management x10: Parity type (1 = odd, 0 = even) x11: stop bit (1 = 1 bit, 0 = 2 bits)
Value in ms (0 = not active) l l l l l l l l l l l l x0 = 1: echo on reception x1 = 1: restart echo on 1st character x2 = 1: automatic transmission of L x3 = 1: backspace management x4 = 1: Xon-Xoff flow control active x5 = 1: RTS/DCD flow control active x6 = 1: beep management x7 = 1: RTS/CTS flow control active x0...x7: reserved x8 = 1 if PSR signal management (TSX SCP 112 x9 = 1 if Full Duplex management x10 = 1 if DCD data carrier management
(TSX SCP 111)
Value of delay in hundreds of ms (default value =
0ms) l l x0 = 1: end character 1enabled x1 = 1: end character 1 included
Byte 1: value of end character in decimal l l x0 = 1: end character 2 enabled x1 = 1: end character 2 included
Byte 1: value of end character in decimal
258
TLX DS COM PL7 xxE
Character mode language objects
Internal constants for the terminal port
The following table describes internal constants for the terminal port configured in character mode:
Object Function
%KW0.0.0
Type
%KWxy.i.1
Speed / Format
Meaning
Character mode function = 16#03 l l l l l l l
Byte 0: speed l 00 = 1200 bits/s, ..., 04 = 19200 bits/s
Byte 1: format x8: bit number (1 = 8 bits, 0 = 7 bits) x9 = 1: parity management x10: Parity type (1 = odd, 0 = even) x11: stop bit (1 = 1 bit, 0 = 2 bits) x12 = 1: echo on reception x13 = 1: beep management x14 = 1: backspace management
TLX DS COM PL7 xxE
259
Character mode language objects
260
TLX DS COM PL7 xxE
Communication via Uni-telway bus
IV
Introduction
Aim of this part
What's in this part?
This part introduces the principles of configuring and using Uni-telway communication via PL7 software.
This Part contains the following Chapters:
Chapter
16
17
18
19
20
Chaptername
General
Configuring a Uni-telway communication
Programming a Uni-telway communication
Debugging a Uni-telway communication
Language objects associated with Uni-telway communication
Page
TLX DS COM PL7 xxE
261
Uni-telway Communication
262
TLX DS COM PL7 xxE
General
16
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter introduces communication via the Uni-telway bus and its services.
This Chapter contains the following Maps:
Topic
Introduction
Compatibility
Performance
Operating mode
Addresses of a slave PLC
Page
263
TLX DS COM PL7 xxE
Uni-telway Communication: General
Introduction
Introduction
Associated manuals
Communication via Uni-telway is used to exchange data between all the devices connected to the bus. The Uni-telway standard is a UNI-TE protocol which creates a hierarchical structure ( i.e. a master and several slaves). The master device is the bus manager
Uni-telway allows devices to communicate on an equal footing, and authorizes messages to be sent from: l l l master to slave, slave to master, slave to slave.
If you require further information you should consult the following manuals:
Title Description
Uni-telway Bus Communication – User Guide Detailed description of communication using Uni-telway.
X-WAY Communication – Reference Manual Detailed description of UNI-TE messaging
TSX Micro PLCs - Installation manual Hardware installation
Premium TSX PLCs - Installation manual Hardware installation
264
TLX DS COM PL7 xxE
Uni-telway Communication: General
Compatibility
Hardware
Software
This type of communication is available for: l l l
TSX Micro and TSX Premium PLCs via the Terminal port associated with the
RS485 physical layer,
TSX Premium via: l a PCMCIA TSX SCP 111 card associated with the RS232 physical layer, l l a PCMCIA TSX SCP 112 card associated to 20 mA current loops, a PCMCIA TSX SCP 114 card associated with physical layers RS422 and l
RS485, a Built-in Link with TSX SCY 21600 / 21601 modules, associated with physical layer RS485,
TSX Micro PLCs supporting the PCMCIA cards mentioned above.
The Terminal port on TSX Premium and TSX Micro processors allows: l processing in Uni-Telway mode, mastering: l 4 messages transmitted to the bus, l 4 received messages, processing in Uni-Telway mode, as a slave of: l l l
4 transactions at server address Ad0,
4 transactions at server address Ad1, l 4 receptions at application address Ad2.
For communication via a Terminal port, the maximum frame size is 128 bytes per communication function.
PCMCIA cards and the link built into TSX SCY 21600/21601 modules authorizes: l processing in Uni-Telway mode, mastering: l l 8 messages transmitted to the bus, l 8 received messages, processing in Uni-Telway mode, as a slave of: l 6 transactions at server address Ad0, l l
1 transactions at server address Ad1,
8 receptions at application address Ad2.
For communication via a PCMCIA card or built in link, the maximum frame size is
240 bytes per communication function.
The READ_VAR communication function can read up to 1000 consecutive bits in any remote device. To read in excess of 1000 bits, the SEND_REQ communication function must be used.
Note: TSX Nano, TSX Micro and TSX Premium PLCs cannot send more than
1000 bits after a read request.
TLX DS COM PL7 xxE
265
Uni-telway Communication: General
Performance
Introduction
Time with
PCMCIA cards
The following tables are used to assess the typical exchange time in Uni-telway mode for: l l
PCMCIA cards and the built-in link on TSX SCY 21600/21601 modules, the terminal port.
The results shown correspond to the average time (in ms) for the READ_VAR function to be executed.
Number of objects read: 1 word
Speed in bits/s T cycle in ms
4800
4800
4800
9600
9600
9600
19200
19200
19200 cyclic
10
50 cyclic
10
50 cyclic
10
50
180
95
107
167
Average time
TSX SCP 114
131
160
64
67
107
Number of objects read: 100 words
Speed in bits/s T cycle in ms
4800
4800
4800
9600
9600
9600
19200
19200
19200 cyclic
10
50 cyclic
10
50 cyclic
10
50
710
363
373
402
Average time
TSX SCP 114
620
640
213
214
249
200
110
120
190
Average time
TSX SCY 21600/21601
152
172
84
87
130
730
387
395
428
Average time
TSX SCY 21600/21601
638
660
230
240
272
266
TLX DS COM PL7 xxE
Time with terminal port
Uni-telway Communication: General
Exchange times for TSX Micro PLCs
Transmission speed = 9600 bits/s, number of objects read = 40 words
T cycle in ms
10
20
50
100
255
Average time
205
213
258
299
457
Exchange times for TSX Premium PLCs
Transmission speed = 19200 bits/s, number of objects read = 40 words
T cycle in ms
10
20
50
100
255
Average time
135
150
185
210
340
Recommendations for use
To improve the performance of a slave device connection phase on Uni-telway, you are recommended to configure the number of slaves in relation to the number of slaves present, and to choose addresses starting from 1.
TLX DS COM PL7 xxE
267
Uni-telway Communication: General
Operating mode
Introduction
General graph
The following graph describes the operating modes for Uni-Telway PCMCIA cards, for the built-in link on TSX SCY 21600/21601 modules and the terminal port.
The operating mode is as follows:
Module stopped
Power up
Module off
Operation
Module configured
Communication function
Module in self-test phase
Reset
Module not configured Self-tests OK
Configuration l l l l after power-up the module self-tests. During this phase the warning indicators flash.
if there is no PL7 application in the PLC, the module remains in await configuration mode.
if there is a PL7 application in the PLC, the application configuration is sent to the module, which then starts.
in case of power outage, the PLC processor performs a warm restart. The module then re-launches its self-test procedure.
268
TLX DS COM PL7 xxE
Uni-telway Communication: General
Addresses of a slave PLC
At a Glance
Address Ad0
Address Ad1
Address Ad2
Usage constraints l l l
A slave PLC can have up to three Uni-telway addresses: a server address Ad0, a client application address Ad1, a listening application address Ad2.
A server address, called Ad0, is obligatory and coded in the configuration. It enables
'access to the PLC system' for adjustment, diagnostic or reading functions or ' writing variables, program loading and unloading,..)
A client application address, called Ad1, is supplied optionally by the slave coupler configuration. This enables ' requests or messages requiring a response or not to be sent to another device connected on the Uni-telway bus.
A listening application address, called Ad2, is supplied optionally by the slave coupler configuration. This enables Unsolicited Data (16#FC) requests to be received from 'another device connected on the Uni-telway bus.
Addresses Ad1 and Ad2 are consecutive to the address Ad0 (Ad1 = Ad0 + 1 and
Ad2 = Ad0+2).
Example
Uni-telway liaison address
Ad0 = 6
Ad1 = 7
Ad2 = 8
Logical entities
System responds to questions
Client application sends questions to a Uni-telway server device
Listening application receives the request "Unsolicited
Data" made to the application
Note: when the Uni-telway master is an SCM (series 7 PLCs), the application contained in the master must use the destination slave address (TSX Micro,
Premium) increased by 100 (16#0064).
TLX DS COM PL7 xxE
269
Uni-telway Communication: General
270
TLX DS COM PL7 xxE
Configuring a Uni-telway communication
17
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter describes the Configuration process for setting up a Uni-telway communication.
This Chapter contains the following Maps:
Topic
How to access Uni-telway PCMCIA card parameters
How to access terminal port parameters
How to access TSX SCY 21600/21601 module parameters
Uni-telway link configuration screen
Functions accessible using Uni-telway
Uni-telway parameters linked to the application
Uni-telway parameters linked to transmission
Page
TLX DS COM PL7 xxE
271
Uni-telway Configuration
How to access Uni-telway PCMCIA card parameters
Introduction
How to access the link
This operation describes how to access configuration parameters of the Uni-telway link via PCMCIA cards for TSX Premium PLCs.
The following table shows the procedure for accessing the Uni-telway link:
Step
1
2
Action
Access the communication channel configuration screen.
Select the communication channel from the drop-down menu CHANNEL 1
Example
CHANNEL 1:
CHANNEL 1
(Link not configured)
CHANNEL 1
(No PCMCIA submodule)
MAST
3
4
Select one of the following PCMCIA cards from the drop-down menu: l l l
TSX SCP 111 PCMCIA CARD RS232 MP
TSX SCP 112 PCMCIA CARD BC MP
TSX SCP 114 PCMCIA CARD RS485 MP
Example
CHANNEL 1
CHANNEL 1 TSX SCP 114 PCMCIA CARD RS485 MP
MAST
TSX FPP 20 PCMCIA FIPWAY CARD
TSX FPP 200 PCMCIA FIPWAY CARD
TSX FPP 10 PCMCIA FIPIO CARD
TSX MBP 100 PCMCIA MODBUS+ CARD
TSX MDM 10 PCMCIA MODEM CARD
FCS SCP 112 PCMCIA CARD BC MP
FCS SCP 114 PCMCIA CARD RS485 MP
Select the link from the drop-down menu UNI-TELWAY LINK:
Example
CHANNEL 1 TSX SCP 114 PCMCIA CARD RS485 MP
(Link not configured)
(Link not configured)
UNI-TELWAY LINK
MAST
MODBUS/JBUS LINK
272
TLX DS COM PL7 xxE
Uni-telway Configuration
How to access terminal port parameters
Introduction
How to access the link
This operation describes how to access the configuration parameters of the Unitelway link via the TSX Micro PLC terminal port.
The following table shows the procedure for accessing the Uni-telway link:
Step
1
2
Action
Access the communication channel configuration screen.
Select the link from the drop-down menu UNI-TELWAY LINK:
Example
CHANNEL 0:
CHANNEL 0 Terminal Port
UNI-TELWAY LINK
UNI-TELWAY LINK
CHARACTER MODE LINK
MAST
TLX DS COM PL7 xxE
273
Uni-telway Configuration
How to access TSX SCY 21600/21601 module parameters
Introduction
How to access the link
This operation describes how to access the configuration parameters of the Unitelway link via TSX SCY 21600 / 21601 modules for TSX Premium.
The following table shows the procedure for accessing the Uni-telway link:
Step
1
2
Action
Access the communication channel configuration screen of the chosen module
Select the communication channel from the drop-down menu CHANNEL 0
Example
CHANNEL 0:
CHANNEL 0
(Link not configured)
CHANNEL 1
(No PCMCIA submodule)
MAST
3 Select the link from the drop-down menu UNI-TELWAY LINK:
Example
CHANNEL 0:
CHANNEL 0
(Link not configured)
(Link not configured)
UNI-TELWAY LINK
Built-in link
MAST
274
TLX DS COM PL7 xxE
Uni-telway Configuration
Uni-telway link configuration screen
Introduction
Illustration
This screen, split into two zones, is used to declare the communication channel and to configure the necessary parameters for a Uni-telway link.
The screen dedicated to Uni-telway communication looks like this:
TSX 3721 [POSITION 00.0..1]
Configuration
Designation: 3721 PROCESSOR
1
2
CHANNEL 1:
CHANNEL 1
UNI-TELWAY LINK
TSX SCP 114 PCMIA CARD RS485 MP
MAST
Type
Master
Master
Event data
Number of slaves
0 Byte
31
Slave
Server Address (AD0)
Number of addresses
Current Loop (PSR)
Multidrop Point to point
31
1
Transmission Speed
9600 Bits/s
Wait timeout
Default 30 ms
Data
7 bits
8 bits
Stop
1 bit
2 bits
Parity
Even Odd Without
RTS/CTS delay
0 X100 ms Data carrier (DCD)
Elements and functions
This table describes the different zones that make up the configuration screen:
Address Zone
1 common
2 specific
Function
See Description of configuration screens for communication,
Is used to select or complete the parameters of a Modbus link.
It is split into two types of information: l l the application parameters, the transmission parameters.
TLX DS COM PL7 xxE
275
Uni-telway Configuration
Functions accessible using Uni-telway
Introduction Depending on the chosen communication supports, some parameters cannot be modified. They appear grayed out.
Accessible functions
The summary table below shows the various choices possible:
Functions
Master - Event data
Master - Number of slaves
Slave
Current Loop (PSR)
Transmission speed
Wait timeout
Data / Stop
Parity
RTS/CTS delay
Carrier management (DCD)
SCP 111
Yes
Yes
Yes
No
Yes
Yes
Stop
Yes
Yes
Yes
SCP 112
Yes
Yes
Yes
Yes
Yes
Yes
Stop
Yes
No
No
SCP 114
Yes
Yes
Yes
No
Yes
Yes
Stop
Yes
No
No
SCY 21600/21601 Terminal Port
No No
Yes
Yes
Yes
Yes
No
Yes
Yes
Stop
No
Yes
Yes
No
Yes
No
No
Yes
No
No
276
TLX DS COM PL7 xxE
Uni-telway Configuration
Uni-telway parameters linked to the application
Introduction
Parameter type
Master function
Once the communication channel has been configured, complete the parameters dedicated to the application.
They are split into four windows: l l l l theType window, the Master window, the Slave window, the Current loop (PSR) window.
The window looks like this:
Type
Master
It is used to select the type of Uni-telway protocol used by the module: l l
Master: selects the choice of Uni-telway master,
Slave: selects the choice of Uni-telway slave.
The window can only be accessed by selecting Master as the type:
Master
Event data
Number of slaves
0 Byte
31
It can be used to enter: l l
Event data: is used to choose the number of bytes for Event data: l the default value is 0 bytes, l values are 0, 4 or 8 bytes.
the Slave Number: is used to select the number of slaves to be scanned by the master PLC: l values are between 0 and 98, l the default value depends on the communication channel: 31 for a PCMCIA card and built-in link, and 8 for the terminal port.
TLX DS COM PL7 xxE
277
Uni-telway Configuration
Slave function
Current loop function
The window can only be accessed by selecting Slave as the type:
Slave
Server Address (AD0)
Number of addresses
1
1
It can be used to enter: l the Server Address (Ad0): is used to choose the device's server address Ad0, l values are between 1 and 98 (for a PCMCIA card and built-in link), or between
1 and 8 (for the terminal port), l l the default value is 1.
the Address Number: is used to assign up to three slave addresses to one device. This option is available, for example, to programmable controllers which can use Server addresses (Ad0), Client addresses (Ad1), and Listen application addresses (Ad2), l values are between 1 and 3 (1 for Ad0 only, 2 for Ad0 and Ad1, 3 for Ad0, Ad1 l and Ad2), the default value is 1.
The window looks like this:
Current Loop (PSR)
Multidrop Point to point
It is used to select a type of communication: l l
Multidrop (in current loop),
Point to point (in current loop).
278
TLX DS COM PL7 xxE
Uni-telway Configuration
Uni-telway parameters linked to transmission
Introduction
Transmission speed
Wait timeout
Data
Once the communication channel has been configured, complete the parameters dedicated to transmission.
They are split into six windows: l l l l l the Transmission speed window, the Wait timeout window, the windows specific to Data and Stop, the Parity window, the RTS/CTS delay window.
The window looks like this:
Transmission Speed
9600 Bits/s
It is used to select the transmission speed for the Uni-telway protocol used by the l l l module: the default speed is 9600 bits/s, the available speeds are 1200, 2400, 9600 and 19200 bits/s, speeds of 300 and 600 bits/s are only available with the TSX SCP 111 PCMCIA card.
The window looks like this:
Wait timeout (ms)
Default 30
This parameter can be used to set the timeout in milliseconds, at the end of which the destination station will be considered missing if there is no response.
l values are between 1 and 255 (for the terminal port), or between 1 and 65000 ms
(for a PCMCIA card and built-in link), l the default value is 30 ms.
The window looks like this:
Data
7 bits
8 bits
The Data field sets the type of coding used to communicate on Uni-telway. All characters are coded on 8 bits.
TLX DS COM PL7 xxE
279
Uni-telway Configuration
Stop The window looks like this:
Stop
1 bit
2 bits
The Stop field is used to set the number of stop bits employed for communicating on Uni-telway. Possible values are 1 or 2 stop bits
Note: The default value is 1 stop bit.
Parity
RTS/CTS delay
The window looks like this:
Parity
Even Odd Without
This field is used to define the addition or non-addition of a parity bit, and its type.
The possible values are Even, Odd or none (Even by default).
The window looks like this:
RTS/CTS delay
1 X100 ms Data carrier (DCD)
Before each character string transmission, the module activates the RTS signal, and waits for the CTS signal to be activated.
It can be used to enter: l the maximum waiting time between the two signals. If this time has elapsed, the request is not sent onto the bus.
l l l l l the value is expressed in milliseconds, the default value is 0 ms, the value is between 0s and 10 s, the value 0 specifies the absence of delay management between the two signals.
data carrier management (DCD signal) in the event of communication with a controlled carrier modem. .
l if the option is selected, character reception is only enabled if the DCD carrier signal is detected, l if the option is not selected, all the characters received are taken into account.
280
TLX DS COM PL7 xxE
Programming a Uni-telway communication
18
Introduction
Aim of this
Chapter
What's in this
Chapter?
This Chapter describes the Programming process for setting up a Uni-telway communication.
This Chapter contains the following Sections:
Section
18.1
18.2
18.3
18.4
18.5
Topic
Communication function
Master to slave exchange
Slave to master exchange
Slave to slave exchange
Event data
Page
TLX DS COM PL7 xxE
281
Uni-telway programming
18.1
Communication function
Introduction
Aim of this section
What's in this
Section?
This section introduces the communication functions in Uni-telway mode.
This Section contains the following Maps:
Topic
Available communication functions
Writing command words
Page
282
TLX DS COM PL7 xxE
Uni-telway programming
Available communication functions
Introduction
Available functions
This page describes the communication functions available in Uni-telway mode.
Five specific communication functions have been defined to send and receive data to/from a master or slave Uni-telway device: l READ_VAR : reads a basic language object (e.g. words, bits, double words, floating points, constant words, system words and bits, timer, monostable, drum l l l l etc.) See
Reading standard objects: READ_VAR, p. 74.
WRITE_VAR : writes a basic language object (e.g. words, bits, double words, floating points, constant words, system words and bits etc.) See Writing standard
SEND_REQ : exchanges a UNI-TE request. See Transmitting UNI-TE Requests:
DATA_EXCH : sends and/or receives text type data. See Exchange of text data :
MMI functions: exchanges the different communication functions which are specific to the MMI (Send_Msg, Send_alarm, Ask_Msg, Ini_Buttons,
Control_Leds, Command).
Note: The availability of these functions varies with the type of exchange and the hardware version (refer to the different exchange types).
TLX DS COM PL7 xxE
283
Uni-telway programming
Writing command words
Introduction
Syntax
Recommendations for use
The WRITE_CMD instruction is used to explicitly write associated command words in the module, the communication channel, or in the integrated interface.
If there is a Uni-telway link, this instruction will mainly be used while communicating with an external modem.
Example: switching of Uni-telway to character mode for the dialing phase.
The syntax of the instruction is as follows:
WRITE_CMD %CHx.i
where x: module address and i: channel.
Before performing a WRITE_CMD , you must test whether an exchange is in progress by using a %MWxy.i.0 language object. To do this, a READ_STS operation must be performed to read the word.
Then, the value of the command language object must be modified to carry out the command required. For a Uni-telway link, the language object is the internal word
%MWxy.i.15.
Example: For Uni-telway to switch to character mode, %MWxy.i.15 is equal to
16#4000 (%MWxy.i.15:x6 = 1).
Note: A command bit must be switched once from 0 to 1 before sending a
WRITE_CMD .
Finally, a WRITE_CMD operation must be executed to acknowledge the command.
284
TLX DS COM PL7 xxE
Uni-telway programming
18.2
Master to slave exchange
Master to Slave exchanges
Introduction
Master
The master station makes exchanges with the slave station:
Slave
Processor Link Link Processor
System System
Application
1
Ad0
Ad1
Ad2
Application
2
Exchange with address Ad0
The master exchange with Ad0, identified by address mark 1, allows the master application program to communicate with the slave system (access to different objects, etc.).
READ_VAR , WRITE_VAR and SEND_REQ functions can be used to communicate with
Ad0.
The function address is of the type ADR#xy.i.x
where:
Parameters xy.i
x
Description
Rack and module number. Channel number
Slave address Ad0
Example
ADR#0.1.Ad0
for a slave connected to a PCMCIA card on the master PLC.
TLX DS COM PL7 xxE
285
Uni-telway programming
Exchange with address Ad2
Master exchange with Ad2, identified by the address mark 2, is used to send master application program messages to the slave application program.
SEND_REQ and DATA_EXCH functions can be used to communicate with Ad2.
The function address is of the type ADR#xy.i.x
where:
Parameter xy.i
x
Description
Rack and module number. Channel number
Slave address Ad2
Example
SEND_REQ(ADR#0.1.Ad2, 16#FC, %MW..........)
In this case: use request code, 16#FC, unprompted data.
286
TLX DS COM PL7 xxE
Uni-telway programming
18.3
Slave to master exchange
Introduction
Aim of this section
What's in this
Section?
This section introduces slave station to master station exchanges.
This Section contains the following Maps:
Topic
Slave to Master exchanges
Example of a slave exchange with the master system
Example of a direct slave exchange with the master system
Page
TLX DS COM PL7 xxE
287
Uni-telway programming
Slave to Master exchanges
Introduction
Master
Processor Link
The slave station makes exchanges with the master station:
Link
Slave
Processor
System System
Application
1
2
Ad0
Ad1
Ad2
Application
Exchange with the master system
Exchange with the application
The exchange of slave Ad1 with the master, identified by address mark 1, allows the slave application program to communicate with the master system (access to different objects, etc.).
The exchange of slave Ad1 with the master, identified by the address mark 2, is used to send slave application program messages to the master application program.
Communication function
Use of the SEND_REQ function by the slave requires a 6 byte table to be placed at the start of the transmission buffer which corresponds to the destination address.
The first six bytes of the transmission buffer are coded as follows:
Word 1
Word 2
Word 3
Byte 1 (most significant) station module or selector number reference if gate 8
Byte 0 (least significant) network gate number channel number
To transmit to master system identified by gate 0:
Word 1
Word 2
Word 3
Byte 1 (most significant)
16#FE
16#00
16#00
Byte 0 (least significant)
16#00
16#00
16#00
288
TLX DS COM PL7 xxE
Addressing
Uni-telway programming
To transmit to master application identified by gate 16:
Word 1
Word 2
Word 3
Byte 1 (most significant)
16#FE
16#00
16#00
Byte 0 (least significant)
16#00
16#10
16#00
Note: In the case of a master TSX 47-10, the gate number is 16 + no. of text block
To transmit to a remote PLC system (network 2, station 3):
Word 1
Word 2
Word 3
Byte 1 (most significant)
16#03
16#00
16#00
Byte 0 (least significant)
16#02
16#00
16#00
When a slave uses the SEND_REQ function, the syntax is as follows:
SEND_REQ(ADR#xy.i.x, request number, %MW1:size, ...)
The function address is of the type ADR#xy.i.x
where:
Parameter xy.i
x
Description
Rack and module number. Channel number
Client address AD1 of sender
%MW1:size is a word table containing the destination address structured as follows:
If access to the master system
%MW1 = FE 00
%MW2 = 00 00
%MW3 = 00 00
%MW4 = request parameters:
%MW ... = ...
If access to the master application
%MW1 = FE 00
%MW2 = 00 10
%MW3 = 00 00
%MW4 = request parameters:
%MW ... = ...
TLX DS COM PL7 xxE
289
Uni-telway programming
Example of a slave exchange with the master system
Introduction The slave sends a communication to the master system:
TSX 57 master
UNI-TELWAY
TSX 37
Slave
Ad0 = 6
Ad1 = 7
TSX 37
Slave
Ad0 = 8
Transmission Identification request is sent:
SEND_REQ(ADR#0.1.7, 15, %MW0:3, %MW10:30, %MW40:4)
Parameters of request:
Parameters
ADR#0.1.7
15 or 16 #0F
%MW0 = 16#FE 00
%MW1 = 16#00 00
%MW2 = 16#00 00
%MW43 = 6
Description l l l
0: module
1: channel 1
7: Sender address Ad1 identification request access to the master system gateway
3 words sent (= 6 bytes)
290
TLX DS COM PL7 xxE
Reception
Uni-telway programming
After the exchange:
Parameters
%MW40 = 16# 11 00
%MW41 = 16# 3F 00
%MW42 = 16# 00 00
%MW43 = 16# 00 14
Description
16#3F = report >0 (request code + 16#30)
14 bytes received from %MW10
TLX DS COM PL7 xxE
291
Uni-telway programming
Example of a direct slave exchange with the master system
Introduction The reception channels of TSX 37 V2.0 processors, and of modules TSX SCY
21600 or TSX SCY 21601 with PCMCIA cards (TSX SCP111, 112, 114 version 1.5) enable READ_VAR and WRITE_VAR communication functions to be used to communicate with the master server:
TSX 57 master
UNI-TELWAY
TSX 57 slave
Ad0 = 6
TSX 37 slave
Ad0 = 8
Transmission Access to the master server from module SCY 21600 / 21601 in slave rack position
0 and via the built-in link:
READ_VAR(ADR#2.0.0, ‘%MW’, 0, 5, %MW20:5, %MW50:4)
292
TLX DS COM PL7 xxE
Uni-telway programming
18.4
Slave to slave exchange
Introduction
Aim of this section
What's in this
Section?
This section introduces exchanges from one slave station to another.
This Section contains the following Maps:
Topic
Slave to Slave exchanges
Example of a slave exchange with the slave server
Example of a slave exchange with the slave application
Example 2 of a slave exchange with the slave system
Example of a right shift of 1 byte in a byte table
Example of a direct slave exchange with a slave system
Example of a slave stopping another slave
Page
TLX DS COM PL7 xxE
293
Uni-telway programming
Slave to Slave exchanges
Introduction The slave station makes exchanges with another slave station:
Transmitting slave
Processor Link
Destination slave
Link Processor
System
Application
Ad0
Ad1
Ad2
1
2
Ad0
Ad1
Ad2
System
Application
Link
Processor System Application
Master
Ad1 to Ad0 exchange
Exchange of slave Ad1 with slave Ad0, identified by address mark 1, allows the sender slave application program to communicate with the destination slave system
(access to different objects, etc.).
Note: In all cases, the requests transit via the master in total transparency.
Exchange with the application
Exchange of slave Ad1 with slave Ad2, identified by the address mark 2, is used to send messages from the sender slave application program to the destination slave application program.
294
TLX DS COM PL7 xxE
Uni-telway programming
Communication function
Use of the SEND_REQ function by the slave requires a 6 byte table to be placed at the start of the transmission buffer which corresponds to the destination address.
The first six bytes of the transmission buffer are coded as follows:
Word 1
Word 2
Word 3
Byte 1 (most significant)
16#FE
16#FE
16#00
Byte 0 (least significant)
16#00
16#05 number of destination slave (Ad0 or
Ad2)
TLX DS COM PL7 xxE
295
Uni-telway programming
Example of a slave exchange with the slave server
Introduction The slave sends a communication function to the slave server:
TSX 57 master
UNI-TELWAY
TSX 37 slave
Ad0 = 6
Ad1 = 7
Ad2 = 8
TSX 37 slave
Ad0 = 9
Ad1 = 10
Ad2 = 11
296
TLX DS COM PL7 xxE
Transmission
Uni-telway programming
Writing a 5 word table into slave 9 by slave 6/7/8 from word %MW50:
SEND_REQ(ADR#0.1.7, 16#0037, %MW100:11, %MW120:1, %MW130:4)
Parameters of request:
Parameters
ADR#0.1.7
Description l l l
0: module
1: channel 1
7: Sender address Ad1 write objects request address of destination slave (Ad0 = 9)
16 #0037
%MW100 = 16#FE 00
%MW101 = 16#FE 05
%MW102 = 16#00 09
%MW103 = 16#07 68
%MW104 = 50
%MW105 = 05 l l type of object = 07 (16 bit integer) segment = 68 (internal words) in decimal, origin of table of words to be written number of words to be written, in decimal
%MW106 to %MW110 content of words to be written in the destination devices
%MW120:1
%MW133 = 22 no response: length: 1 byte length of data to be sent = 11 words (%MW100 to %MW110) and thus 22 octets
TLX DS COM PL7 xxE
297
Uni-telway programming
Example of a slave exchange with the slave application
Introduction
Transmission
The slave sends a communication function to the slave application (Ad2).
The sender PLC generates an unprompted data request:
SEND_REQ(ADR#0.1.7, 16#00FC, %MW100:10, %MW120:1, %MW130:4)
Parameters of request:
Parameters
ADR#0.1.7
16 #0037
%MW100 = 16#FE 00
%MW101 = 16#FE 05
%MW102 = 16#00 0B
Description l l l
0: module
1: channel 1
7: Sender address Ad1 unprompted data request address of destination slave (Ad2 = 12)
%MW103 to %MW109 application data to be sent
Reception The data receiver PLC:
DATA_EXCH(ADR#0.1.11, 3, %MW10:1, %MW20:10, %MW100:4)
Parameters of request:
Parameters
ADR#0.1.7
3
%MW20 = 16#FE 00
%MW21 = 16#FE xx
%MW102 = 16#00 00
%MW23 to %MW29
Description l l l
0: module
1: channel 1
11: address Ad2 reception request xx: exchange number of sender function application data received
298
TLX DS COM PL7 xxE
Uni-telway programming
Example 2 of a slave exchange with the slave system
Introduction
Transmission
The slave at address Ad1 = 7 reads a 5 word table, using the SEND_REQ function, in the PLC slave at address Ad0 = 9.
The sender PLC generates a request whose code is 16#0036 (read objects):
SEND_REQ(ADR#0.1.7, 16#0036, %MW200:6, %MW210:6, %MW220:4)
Parameters of request:
Parameters
ADR#0.1.7
16 #0036
%MW200 = 16#FE 00
%MW201 = 16#FE 05
%MW202 = 16#00 09
%MW203 = 16#07 68
Description l l l
0: module
1: channel 1
7: Sender address Ad1 unprompted data request address of destination slave (Ad0 = 9)
%MW204 = 50
%MW223 = 12 l l type of object = 07 (16 bit integer) segment = 68 (internal words) in decimal, origin of table of words to be read
6 words sent (= 12 bytes)
Note: At the end of function execution the word length in the report is:
%MW223 = 11 (reception of 11 bytes = 10 (5 words) + 1 (object type)).
TLX DS COM PL7 xxE
299
Uni-telway programming
Reception table Table of words read:
%MW210 =
%MW211 =
%MW212 =
%MW213 =
%MW214 =
%MW215 =
Byte 1 Byte 0
Least significant bit of first word 07: type of objects read
Least significant bit of second word Most significant bit of first word
Least significant bit of third word
Least significant bit of fourth word
Least significant bit of fifth word not significant
Most significant bit of second word
Most significant bit of third word
Most significant bit of fourth word
Most significant bit of fifth word
The least significant byte of the first word read contains the type of objects read. As a result, the reception table is thus shifted by 1 byte.
An additional word must therefore be provided for in the reception table. Processing the data requires a processing algorithm for this shift, which is to be provided by the user for TSX 37 PLCs (see example below). For TSX 57 PLCs, this algorithm is provided by the ROR_ARBI function.
300
TLX DS COM PL7 xxE
Uni-telway programming
Example of a right shift of 1 byte in a byte table
Introduction
Program l l l
Table to be shifted: l number of bytes in %MW99, l starting at %MW100.
Working variables:
%MW0,
%MW1,
%MW2.
Initialization of index %MW0 and saving of first word of table in %MW1, %MW2 = length of table –1:
COMPARE
%MW99 REM 2 = 0
OPERATE
%MW0:=0
OPERATE
%MW1:=%MW100[%MW0]
OPERATE
%MW2:=%MW99/2
OPERATE
%MW2:=%MW99/2
TLX DS COM PL7 xxE
301
Uni-telway programming
As long as the index is < the length of the table, carry out the shifts:
COMPARE
%MW0 < %MW2
OPERATE
(1)
OPERATE
INC %MW0
(1) %MW100[%MW0]:=SHR(%MW100[%MW0],8) OR SHL(%MW101[%MW0],8)
%L1
COMPARE
%MW99 REM 2 = 0
COMPARE
%MW99 REM 2 <> 0
OPERATE
(1)
OPERATE
(2)
(1) %MW100[%MW0] := SHR(%MW100[%MW0],8) OR SHL(%MW1,8)
(2) %MW100[%MW0] :=(%MW100[%MW0] AND 16#FF00) OR (%MW1 AND 16#00FF)
Result After shifting, the table of words read has the values:
%MW210 =
%MW211 =
%MW212 =
%MW213 =
%MW214 =
%MW215 =
Most significant bit of first word Least significant bit of first word
Most significant bit of second word Least significant bit of second word
Most significant bit of third word
Most significant bit of fourth word
Least significant bit of third word
Least significant bit of fourth word
Most significant bit of fifth word not significant
Least significant bit of fifth word
07: type of objects read
302
TLX DS COM PL7 xxE
Uni-telway programming
Example of a direct slave exchange with a slave system
Introduction The reception channels for TSX 37 V2.0 processors, and for modules TSX SCY
21600 or TSX SCY 21601 with PCMCIA cards (TSX SCP111, 112, 114 version 1.5) enable READ_VAR and WRITE_VAR communication functions to be used to communicate with a slave on the same Uni-telway link:
TSX 57 master
UNI-TELWAY
TSX 57 slave
Ad0 = 6
TSX 37 slave
Ad0 = 8
Transmission Access to slave server 8 from module SCY 21600 / 21601 in slave rack position 0 and via the built-in link:
READ_VAR(ADR#2.0.8, ‘%MW’, 0, 5, %MW20:5, %MW50:4)
TLX DS COM PL7 xxE
303
Uni-telway programming
Example of a slave stopping another slave
Introduction PLC at address Ad0 = 8 STOPPED by PLC at address Ad1 = 7:
Master
Slave
Ad0 = 6
Ad1 = 7
Transmission
Slave
Ad0 = 8
SEND_REQ(ADR#0.1.7, 16#0025, %MW0:3, %MW10:1, %MW40:4)
Parameters of request:
Parameters
ADR#0.1.7
16 #0025
%MW0 = 16#FE 00
%MW1 = 16#FE 05
%MW2 = 16#08 00
%MW43 = 6
Description l l l
0: module
1: channel 1
7: Sender address Ad1
STOP request code address of destination slave (Ad0 = 8) length of data to be sent = 3 words, so 6 bytes
304
TLX DS COM PL7 xxE
Uni-telway programming
18.5
Event data
Event data managed by the master
Event data
Operating principles
Event data is information sent to the master at the initiative of a server slave station.
The following table describes the processing phases for communication by event data:
Phases
1
2
3
Description
The slave station sends event data to the master station PCMCIA card.
The actual reception of data by the card initializes a %IW0.1.2 or %IW0.1.3
word bit. Each input word bit is associated with a link address.
When one of these bits has been detected, the application sends a SEND_REQ communication function with the code 16#32 to the master station PCMCIA card to read the data.
Communication function
Uni-telway request: 16#82 is used to read event data by accessing the Uni-telway
PCMCIA server:
SEND_REQ(ADR#0.1.SYS, 16#0082, %MW20:10, %MW50:30, %MW100:4)
The transmission buffer contains the following data:
%MW21
%MW22
%MW23
%MW24
%MW25
Byte 1 (most significant)
16#31
16#01
Slave number
16#FF
16#00
Byte 0 (least significant)
16#06
16#00
16#00
16#00
Number of slaves
The buffer corresponds to the following coding:
Parameters
Segment number
Family number
Number of type
Address
Access type
Quantity
Size
1 byte
2 bytes
2 bytes
1 byte
2 bytes
2 bytes
Value
16#06
16#0031
16#0001
Slave number
16#00FF
16#00 No. of slaves
TLX DS COM PL7 xxE
305
Uni-telway programming
306
TLX DS COM PL7 xxE
Debugging a Uni-telway communication
19
Introduction
Aim of this
Chapter
What's in this
Chapter?
This chapter describes the Debugging process during set-up of Uni-telway communication.
This Chapter contains the following Maps:
Topic
Uni-telway debugging screen
Uni-telway debugging screen
Requests available for the communication channel test
How to test a channel with Identification and Mirror requests
How to test a channel with requests
Page
TLX DS COM PL7 xxE
307
Uni-telway debugging
Uni-telway debugging screen
Introduction
Type window
Elements and functions
This screen, split into two zones, is used to declare the communication channel and to configure the necessary parameters for communication with nano-PLCs.
The window looks like this:
T
Deb
This table describes the different zones that make up the debugging screen:
Address Zone
1 common
2 specific
Function
See
Description of communication debugging screens, p. 168 .
Is used to access link debugging parameters.
308
TLX DS COM PL7 xxE
Uni-telway debugging
Uni-telway debugging screen
Introduction
Type window
Counters window
Channel test window l l l
The specific part is split into three windows: the Type window, the Counters window, the Channel test window.
The window looks like this:
Type
Master
It shows the type of Uni-telway function which is configured (master or slave).
The window looks like this:
Local Error Counters
Messages sent and not acknowledged
Received and not acknowledged
0
0
Sent and refused
Received and refused
Reset Counters
0
0
This window displays the communication module's different error counters.
The button Reset Counters resets these counters to zero.
The window looks like this:
Channel Test
Identification
3
4
1
2
5
Counters
Reset Counters
Enter Request
Slave
Mirror
Request Response
42 0D 22 0A 43 43 58 31 37 5F 33 30 4C 57
ASCII Hex.
This window is used to test a communication channel by sending a UNI-TE request to one of the stations on the bus.
TLX DS COM PL7 xxE
309
Uni-telway debugging
Requests available for the communication channel test
Introduction
Test conditions
Available requests
This page describes the different possibilities for testing a communication channel from the debugging screen.
Sending a request to an non-server or unconnected slave address results in an error message.
When the module has been configured in Uni-telway master mode, the debugging window can be used to send a UNI-TE request to one of the slaves on the bus.
When the module has been configured Uni-telway slave mode, the channel test is limited to the master device.
The Channel Test window allows the following requests: l Identification: prompts the Identification request to be sent to the designated slave, l Counters: prompts the Read error counters request to be sent to the designated l slave,
Reset Counters: prompts the designated station’s error counters to be reset to l zero,
Enter request: allows a UNI-TE request, other than those provided by the command buttons, to be sent to the designated slave. Selecting this function gives access to a screen that allows you to select the parameters that are specific l to the request (request code must be coded in hexadecimal),
Mirror: allows a mirror request to be sent to the designated slave. Selecting this function gives access to a screen that allows you to select the length of the character string to be sent (a maximum of 80 characters ). The PLC then sends this character string (ABCD….) to the destination device. The latter automatically sends the character string that was received back to the sender.
310
TLX DS COM PL7 xxE
Uni-telway debugging
How to test a channel with Identification and Mirror requests
Introduction This page indicates the procedure for testing a communication channel by means of
Identification and Mirror requests.
How to identify a station
The following procedure is used to identify a designated station.
Step
1
2
Actions
Select the server address (Ad0)of the slave to be interrogated using the Slave field.
Click on the Identification button.
Result
The response appears in the Receive Response window:
Request Response
B.”.CCX17_30LW
ASCII Hex.
How to send the
Mirror request
The following procedure is used to send the Mirror request and thus to test the routing of information between two devices.
Step
1
2
Action
Select the server address (Ad0)of the slave to be interrogated using the Slave field.
Click on the Mirror button.
Result
The following window appears:
Mirror Request
Length of data to be sent 8
Send Cancel
3
4
Enter the length of data to be sent (maximum 80 characters).
Click on the Send button.
Result
The response appears in the Receive Response window:
Request Response
ABCDEFGH
ASCII Hex.
The response contains: l the character string ABCDEFGH that corresponds to the length of data sent 8.
TLX DS COM PL7 xxE
311
Uni-telway debugging
How to test a channel with requests
Introduction
How to send a request
This page indicates the procedure for testing a communication channel from the debugging screen using different requests.
The following procedure is used to send a request, other than those provided by the command buttons, to a designated station.
Step
1
2
Action
Select the address of the slave to be interrogated using the Slave field.
Click on the Enter Request button.
Result
The following window appears:
Enter Request
Request Code (Hexadecimal)
fa
Data (Hexadecimal)
1234db
3
4
5
Send Cancel
The data sent in this example is coded on 3 bytes.
Enter the function code (coded in hexadecimal on one byte), corresponding to the request that you want to send.
Enter the data to be sent by coding all the data in hexadecimal. Enter the data continuously without any intervening spaces.
Click on the Send button.
Result
The response appears in the Receive Response window:
Request Response
12 43 DB
ASCII Hex.
The response from the example has data on 3 bytes (12 43 DB).
312
TLX DS COM PL7 xxE
Language objects associated with
Uni-telway communication
20
Introduction
Aim of this section
What's in this
Chapter?
This chapter introduces language objects associated with Uni-telway communication.
This Chapter contains the following Sections:
Section
20.1
20.2
Topic
Language objects associated with master Uni-telway mode
Language objects associated with slave Uni-telway mode
Page
TLX DS COM PL7 xxE
313
Uni-telway language objects
20.1
Language objects associated with master Unitelway mode
Introduction
Aim of this section
What's in this
Section?
This section introduces the language objects associated with operation in master
Uni-telway mode.
This Section contains the following Maps:
Topic
Language object for implicit exchange in master Uni-telway mode
Language object for explicit exchange in master Uni-telway mode
Exchange management and report
Language objects associated with configuration in master Uni-telway mode
Page
314
TLX DS COM PL7 xxE
Uni-telway language objects
Language object for implicit exchange in master Uni-telway mode
Introduction
Bit objects
This page describes all the language objects for implicit exchange in a master Unitelway communication that can be displayed or modified by the application program.
The table below shows the different bit objects for implicit exchange.
Object (1)
%Ixy.MOD.E
RR
Function
Module error bit
%Ixy.i.ERR
Channel error bit
Meaning
This bit set to 1, indicates a module error (at least one of the channels is faulty,…)
This bit set to 1, indicates a line fault.
Key
(1) xy.i Address l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
Word objects for
PCMCIA cards
The table below shows the different word objects for implicit exchange.
Object (1)
%IWxy.i.0
%IWxy.i.1
%IWxy.i.2
%IWxy.i.3
Function Meaning
Signals on input Byte 0: common signals l l l l x0 = 1: DCD signal x1 = 1: RI signal x2 = 1: CTS signal x3 = 1: DSR signal
General state of slaves x0 = 1: if at least one slave does not respond
State of the event data 1 bit is dedicated to each slave If xi = 1 then the slave at address i has sent data
Key
(1) xy.i Address l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
TLX DS COM PL7 xxE
315
Uni-telway language objects
Language object for explicit exchange in master Uni-telway mode
Introduction This page describes all the language objects for explicit exchange in a master Unitelway communication that can be displayed or modified by the application program.
Specified exchanges : General points, p. 155
Word objects for
PCMCIA cards
The table below shows the different word objects for explicit exchange.
Object (1) Function
%MWxy.MOD.2 Module status
%MWxy.i.2
%MWxy.i.3
Standard channel status l l l l l l l l l l l l l l
Meaning l l x0 = 1: defective module x1 = 1: functional error (error between the processor and the module, adjustment or configuration error, …) x2 = 1: terminal block fault (not connected) x3 = 1: self-tests running x4 = 1: reserved x5 = 1: error in hardware or software configuration (the module present is not the one declared in the configuration, the submodules are not compatible) x6 = 1: module missing x7 = 1: error in one of the sub-modules x0 = 1: no device operating on the channel x1 = 1: one of the devices on the channel is faulty x2 = 1: terminal block fault (not connected) x3 = 1: timeout error (break in cabling, …) x4 = 1: self-test running x5 = 1: hardware or software error or no configuration x6 = 1: processor communication error x7 = 1: application fault (configuration error, adjustment error, etc.)
Byte 0 = 0 for the master Uni-telway function
%MWxy.i.4
%MWxy.i.5
%MWxy.i.6
%MWxy.i.7
%MWxy.i.8
to %MWxy.i.14
Specific channel status
Error counter
Error counter
Error counter
Error counter
State of the slaves
Number of messages sent and not acknowledged
Number of messages sent and refused
Number of messages received and not acknowledged
Number of messages received and refused
1 bit dedicated to each slave. If xi = 1 then the slave at address i is responding
316
TLX DS COM PL7 xxE
Object (1)
%MWxy.i.15
Function
Command
Uni-telway language objects
Meaning l l l l l x0 = 1: Reset counter x8 = 1: DTR ON signal x9 = 1: DTR OFF signal x14 = 1: changing from Uni-telway mode to character mode (modem) x15 = 1: changing from character mode
(modem) to Uni-telway mode
Key
(1) xy.i Address l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
Word objects for the terminal port
The table below shows the different word objects for explicit exchange.
Object (1)
%MWxy.MO
D.2
%MWxy.0.2
Function
Module status
Standard channel status l l l l l l l l l l l l l l
Meaning l l x0 = 1: defective module x1 = 1: functional error (error between the processor and the module, adjustment or configuration error, …) x2 = 1: terminal block fault (not connected) x3 = 1: self-tests running x4 = 1: reserved x5 = 1: error in hardware or software configuration (the module present is not the one declared in the configuration, the sub-modules are not compatible) x6 = 1: module missing x7 = 1: error in one of the sub-modules x0 = 1: no device operating on the channel x1 = 1: one of the devices on the channel is faulty x2 = 1: terminal block fault (not connected) x3 = 1: timeout error (break in cabling, …) x4 = 1: self-test running x5 = 1: hardware or software error or no configuration x6 = 1: processor communication error x7 = 1: application fault (configuration error, adjustment error, etc.)
%MWxy.0.3
Specific channel status Byte 0 = 0 for the master Uni-telway function
TLX DS COM PL7 xxE
317
Uni-telway language objects
Object (1) Function
%MWxy.0.4
State of the slaves
Meaning
1 bit dedicated to each slave. If xi = 1 then the slave at address i is responding
Key
(1) xy Address l l x: corresponds to the rack number y: corresponds to the module number
318
TLX DS COM PL7 xxE
Uni-telway language objects
Exchange management and report
Introduction
Word objects
This page describes all the language objects that manage explicit exchanges.
Exchange and report management, p. 157
The table below shows the different word objects for the management of explicit exchanges.
Object (1)
%MWxy.MOD.1
%MWxy.i.0
%MWxy.i.1
Function
%MWxy.MOD.0
Module exchanges in progress
Module report
Channel exchanges in progress
Channel report
Meaning l l l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication module x2 = 1: sending of adjustment parameters to the communication module l l x1 = 0: command parameters received and accepted by the module x2 = 0: adjustment parameters received and accepted by the module l l l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication channel x2 = 1: sending of adjustment parameters to the communication channel l l x1 = 0: command parameters received and accepted by the communication channel x2 = 0: adjustment parameters received and accepted by the communication channel
Key
(1) xy.i Address l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
TLX DS COM PL7 xxE
319
Uni-telway language objects
Language objects associated with configuration in master Uni-telway mode
Introduction
Internal constants for
PCMIA cards
This page describes all the configuration language objects for a master Uni-telway communication that can be displayed by the application program.
The following table describes the internal constants:
Object Function
%KWxy.i.0
Type
%KWxy.i.1
Speed / Format
%KWxy.i.2
Wait Timeout
%KWxy.i.3
Number of slaves
%KWxy.i.4
Event data size and signal management
%KWxy.i.5
RTS/CTS delay
Meaning
Byte 0 = 0 for the master Uni-telway function
Byte 0: speed l 16#50 = 300 bits/s, 16#51 = 600 bits/s only for
TSX SCP 111 l l l l l 16#00 = 1200 bits/s, ..., 16#04 = 19200 bits/s
Byte 1: format x8: bit number (1 = 8 bits, 0 = 7 bits) x9 = 1: parity management x10: Parity type (1 = odd, 0 = even) x11: stop bit (1 = 1 bit, 0 = 2 bits)
Wait timeout in ms from 5ms to 10,000ms (30ms is the default value)
Value from 1 to 98 (31 is the default value)
Byte 0: event data bytes with a value of 0, 4, or 8 (0 by default)
Byte 1 l l x8 = 1 if PSR signal management (TSX SCP 112 x10 = 1 if DCD data carrier management (TSX
SCP 111)
Value of delay in hundreds of ms (default value =
0ms)
Internal constants for the terminal port
The following table describes the internal constants:
Object Function
%KWxy.0.0
Type / Speed
%KWxy.0.1
Wait Timeout
%KWxy.0.2
Number of slaves
Meaning
Byte 0 = 0 for the master Uni-telway function
Byte 1: speed l 16#00 = 1200 bits/s, ..., 16#04 = 19200 bits/s
Wait timeout in ms from 5ms to 10,000ms (value per
30ms)
Value from 1 to 98 (31 is the default value)
320
TLX DS COM PL7 xxE
20.2
Uni-telway language objects
Language objects associated with slave Unitelway mode
Introduction
Aim of this section
What's in this
Section?
This section introduces the language objects associated with operation in slave Unitelway mode.
This Section contains the following Maps:
Topic
Language objects for implicit exchange in Uni-telway slave mode
Language object for explicit exchange in Uni-telway slave mode
Exchange management and report
Language objects associated with configuration in slave Uni-telway mode
Page
TLX DS COM PL7 xxE
321
Uni-telway language objects
Language objects for implicit exchange in Uni-telway slave mode
Introduction
Bit objects
This page describes all the language objects for implicit exchange in a slave Unitelway communication that can be displayed or modified by the application program.
The table below shows the different bit objects for implicit exchange.
Object (1) Function
%Ixy.MOD.ERR
Module error bit
%Ixy.i.ERR
Channel error bit
Meaning
This bit set to 1, indicates a module error (at least one of the channels is faulty, …)
This bit set to 1, indicates a line fault.
Key
(1) Address xy.i
l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
Word objects for
PCMCIA cards
The table below shows the different word objects for implicit exchange.
Object (1)
%IWxy.i.1
%IWxy.i.2
%IWxy.i.3
Function
Address state
Not significant
Meaning
No master interrogation l l l x0 = 1: on Ad0 x1 = 1: on Ad1 x2 = 1: on Ad2
-
Key
(1) Address xy.i
l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
322
TLX DS COM PL7 xxE
Uni-telway language objects
Language object for explicit exchange in Uni-telway slave mode
Introduction This page describes all the language objects for explicit exchange in a Uni-telway slave communication that can be displayed or modified by the application program.
Specified exchanges : General points, p. 155
Word objects for
PCMCIA cards
The table below shows the different word objects for explicit exchange.
Object (1) Function
%MWxy.MOD.2 Module status
%MWxy.i.2
%MWxy.i.3
Standard channel status
Specific channel status l l l l l l l l l l l l l l
Meaning l l x0 = 1: defective module x1 = 1: functional error (error between the processor and the module, adjustment or configuration error, …) x2 = 1: terminal block fault (not connected) x3 = 1: self-tests running x4 = 1: reserved x5 = 1: error in hardware or software configuration (the module present is not that declared in the configuration, the sub-modules are not compatible) x6 = 1: missing module x7 = 1: error in one of the sub-modules x0 = 1: no device functioning on the channel x1 = 1: a device on the channel is faulty x2 = 1: terminal block fault (not connected) x3 = 1: timeout error (break in cabling, …) x4 = 1: self-test running x5 = 1: error in hardware or software configuration, or no configuration x6 = 1: communication error with the processor x7 = 1: application fault (configuration error, adjustment error, etc.)
Byte 0 = 1 for the slave Uni-telway function
Key
(1) Address xy.i
l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
TLX DS COM PL7 xxE
323
Uni-telway language objects
Word objects for the terminal port
The table below shows the different word objects for explicit exchange.
Object (1) Function
%MWxy.MOD.2
Module status
%MWxy.0.2
%MWxy.0.3
Standard channel status
Specific channel status l l l l l l l l l l l l l l
Meaning l l x0 = 1: defective module x1 = 1: functional error (error between the processor and the module, adjustment or configuration error, …) x2 = 1: terminal block fault (not connected) x3 = 1: self-tests running x4 = 1: reserved x5 = 1: error in hardware or software configuration (the module present is not that declared in the configuration, the sub-modules are not compatible) x6 = 1: missing module x7 = 1: error in one of the sub-modules x0 = 1: no device functioning on the channel x1 = 1: a device on the channel is faulty x2 = 1: terminal block fault (not connected) x3 = 1: timeout error (break in cabling, …) x4 = 1: self-test running x5 = 1: error in hardware or software configuration, or no configuration x6 = 1: communication error with the processor x7 = 1: application fault (configuration error, adjustment error, etc.)
Byte 1 = 0 for the slave Uni-telway function
Key
(1) xy Address l l x: corresponds to the rack number y: corresponds to the module number
324
TLX DS COM PL7 xxE
Uni-telway language objects
Exchange management and report
Introduction
Word objects
This page describes all the language objects that manage explicit exchanges.
Exchange and report management, p. 157
The table below shows the different word objects for the management of explicit exchanges.
Object (1) Function
%MWxy.MOD.0 Module exchanges in progress
%MWxy.MOD.1 Module report
%MWxy.i.0
%MWxy.i.1
Channel exchanges in progress
Channel report
Meaning l l l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication module x2 = 1: sending of adjustment parameters to the communication module l l x1 = 0: command parameters received and accepted by the module x2 = 0: adjustment parameters received and accepted by the module l l l x0 = 1: reading status in progress x1 = 1: sending of command parameters to the communication channel x2 = 1: sending of adjustment parameters to the communication channel l l x1 = 0: command parameters received and accepted by the communication channel x2 = 0: adjustment parameters received and accepted by the communication channel
Key
(1) xy.i address l l l x: corresponds to the rack number y: corresponds to the module number i: corresponds to the channel number
TLX DS COM PL7 xxE
325
Uni-telway language objects
Language objects associated with configuration in slave Uni-telway mode
Introduction
Internal constants for
PCMIA cards
This page describes all the configuration language objects for a slave Uni-telway communication that can be displayed by the application program.
The following table describes the internal constants:
Object Function
%KWxy.i.0
Type
%KWxy.i.3
Slave addresses
%KWxy.i.4
Signal management
Meaning
Byte 0 = 1 for the slave Uni-telway function
Byte 0: value of slave address Ad0
Byte 1: number of consecutive addresses from 1 to
3
Byte 0: reserved
Byte 1 l x8 = 1 if PSR signal management (TSX SCP 112
Internal constants for the terminal port
The following table describes the internal constants:
Object Function
%KWxy.0.0
Type / Speed
%KWxy.0.1
Wait timeout
%KWxy.0.2
Slave addresses
Meaning
Byte 0 = 0 for the slave Uni-telway function
Byte 1: speed l 16#00 = 1200 bits/s, ..., 16#04 = 19200 bits/s
Byte 0: reserved
Byte 1: Wait timeout in ms from 5ms to 10,000ms
(value per 30ms)
Byte 0: value of slave address Ad0
Byte 1: number of consecutive addresses from 1 to
3
326
TLX DS COM PL7 xxE
Index
A C
Symbols
A
Accessible functions
Accessing configuration
Accessing the configuration editor, 163
Address
Configuration
Configuration parameters
Character mode, 237, 239, 241, 242
Conversion of analog values of input channels, 192
C
Communication channel test
Communication functions, 47, 72
Compatibility
compatibility
D
Debugging
Debugging parameters
debugging parameters
TLX DS COM PL7 xx E
327
Index
E
Explicit exchange
L
M
Mirror
F
I
G
General
H
How to access configuration
Identification
Implicit exchange
Introduction
O
Operating mode
P
Performance
performances
Presentation of addressing, 22
Programming
R
328
TLX DS COMPL7 xx E
Index
Requests
S
Services
Structure
T
Testing a communication channel
Type
U
W
TLX DS COM PL7 xx E
329
Index
330
TLX DS COMPL7 xx E
பதிவிறக்கு
விளம்பரம்