Characteristics. Schneider Electric PL7 Micro/Junior/Pro - Communication applications, volume 1
Advertisement
Advertisement
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
Download
Advertisement