Вы находитесь на странице: 1из 64

TSX T317 Terminal

Contents
Section

Part 1.
PL7-1 programming for the
TSX 17-10/17-20 micro-PLCs
Sub-section
1.1
1.2
1.3
1.4
1.5

2. PL7-1 Language :
Structure and Functions

2.1 Characteristics
2.2 Timer
2.3 Counter

11
12
13

2.4
2.5
2.6
3.1
3.2
4.1
4.2
4.3

Shift Register
Step Counter
Fast Counter/Timer (TSX 17-20 only)
Characteristics
Program Structure
Mains Power Break/Return
Initialization of the PLC
Program and Data Back-up Storage

14
15
16
17
18
19
20
20

4.4
4.5
4.6
4.7
4.8

RUN/STOP Input and SECU Output


Diagnostic Aids
Application Operating Modes
Programming Guidelines
Programming Examples and Rules

20
21
22
23
24

5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9

Presentation of the TSX T317 Terminal


Power-up
Presentation of the Operating Modes
Configuration Mode
Program Mode
Control Mode
Transfer Mode
Adjust Mode
Diagnostic Mode

25
28
29
30
32
34
35
37
38

3. PL7-1 Language : Grafcet


4. Program Utilities

5. TSX T317 Operating Modes

Presentation
I/O Addressing
Operands
Operation Codes
PLC Scan Cycles

Page

1. PL7-1 Language

5.10 Terminal Mode

3
4
5
7
9

39

PL7-1 Language

1.1

Presentation

PL7-1 is the name given to the Boolean or Instruction List language that can be
used to program the TSX 17-10 and TSX 17-20 micro-PLCs.
This language can transcribe both the most frequently used graphic systems of
representation :
. Ladder diagram,
. Grafcet.
Ladder diagram
The transcription of a Ladder diagram in PL7-1 language consists in assigning the
contacts to the inputs of the PLC, and the coils to the outputs or internal bits of the
PLC.
I0,01

I0,02

I0,03

O0,01

O0,02

Boolean programming sheet


Address Code

Operand

S0000
S0001
S0002
S0003
S0004
S0005

I0,01
I0,02
O0,01
I0,03
I0,04
O0,02
-

I0,04

L
A
=
L
ON
=
-

Description

Stop PB
Sensor S1
Alarm light A2
Limit switch L3
Detector D2
Klaxon

Grafcet
Grafcet is a graphic method of analysis which represents the functions of a
sequential automated system as a sequence of steps and transitions, associated
respectively with actions and conditions.
The PL7-1 language includes specific Grafcet instructions.
3
B012
4

5
I0,07

B015
7

=1

S0015
S0016
S0017
S0018
S0019
S0020
S0021
S0022
S0023
S0024
S0025
-

-*L
#
#
-*L
#
-*L
#
-*-

03
B012
04
05
04
I0,07
06
05
B015
07
06
-

Step 3
Filling

Hopper 8
Level reached
Hopper 9
Level reached
Hopper 10

Program utilities
The PL7-1 language also includes a range of program utilities (system bits,
diagnostics, etc.) which facilitate the integration and control of the operating
modes of the application.

PL7-1 Language

1.2

I/O Addressing
The address of an input or output is defined as follows :
. I for an input, or O for an output,
. the number of the module :
- 0 for the basic PLC,
- 1 for the 1st extension module,
- 2 for the 2nd extension module,
. a comma,
. the number of the I/O point (see the table below).
Examples :
. I0,04 signifies : Input N 4 of module 0 (basic module),
. O1,07 signifies : Output N 7 of module 1 (1st extension module).

TSX 17 micro-PLCs
Number
of I/O

Type

Inputs

Outputs

Event
Inputs

TSX 17-10/20 basic


PLC with 20 I/O

20
(12I + 8O)

from I0,00
to I0,11

from O0,00
to O0,07

I0,24 (*)
I0,25 (*)

TSX 17-20 basic


PLC with 34 I/O

34
(22I + 12O)

from I0,00
to I0,21

from O0,00
to O0,11

I0,24
I0,25

TSX 17-10/20 basic


PLC with 40 I/O

40
(24I + 16O)

from I0,00
to I0,23

from O0,00
to O0,15

I0,24 (*)
I0,25 (*)

Extension block
for TSX 17-10/20

34
(22I + 12O)

from Ix,00
to Ix,21

from Ox,00
to Ox,11

Extension block
for TSX 17-10/20

40
from Ix,00
(24O + 16O)
to Ix,23

from Ox,00
to Ox,15

Extension module
for TSX 17-10/20

8
Inputs

Extension module
for TSX 17-10/20

6
Outputs

from Ix,00
to Ix,07
from Ox,00
to Ox,05

(*) For TSX 17-20 basic PLC only


Input I0,00 and output O0,00
These two I/O points can have different uses :

I/O point

Use by default

Use after configuration

Input
I0,00

Normal input

"RUN/STOP" input controlling the


running or stopping of the PLC

Output
O0,00

Normal output

"SECU" safety output for use in


external safety circuits

PL7-1 Language

1.3

Operands

List of bit operands


Type

Maximum number
Address TSX 17-10 TSX 17-20

Can be
written

Section

Input bits
Output bits

Ix,j
Ox,j

72
48

72
48

yes
yes

1.2
1.2

Event-triggered
input bits

I0,24
I0,25

---

1
1

no
no

1.5
1.5

Internal bits*

Bi

256

256

System bits

SYi

24

24

some

1.3

Grafcet
step bits

Xi

62

62

yes

3.1

Intermediate
memory bits

IM

no

2.1

Fault bits

Sx,j

3x5

3x5

no

4.5

yes

--

* The first 128 internal bits (from B0 to B127) are saved after a mains power break
(hot restart).
List of function operands

Type

Maximum number
Address TSX 17-10 TSX 17-20

Can be
written

Section

Timers

Ti

32

32

yes

2.2

Counters

Ci

15

15

yes

2.3

Fast counter

C15

--

yes

2.6

Shift registers

SRi

no

2.4

Step counters

SCi

no

2.5

List of bit operands extracted from functions

Type

Maximum number
Address TSX 17-10 TSX 17-20

Can be
written

Section

Shift register
bits

SRi,j

8 x 16

8 x 16

yes

2.4

Step counter
bits

SCi,j

8 x 256

8 x 256

yes

2.5

PL7-1 Language
Operands (Contd.)

List of system bit operands


Bit

Function

Initial
state

Set/
Reset (*)

Section

SY00

1 = cold restart (power return with loss


of data). Resets the data to zero.

S or
US

4.1

SY01

1 = hot restart (power return without loss


of data)

S or
US

4.1

SY05
SY06
SY07

Time base : 100ms


Time base : 1sec
Time base : 1min

SY08

0 = outputs saved when PLC stops

SY09

1 = outputs reset with PLC running

SY10

0 = I/O fault or configuration fault

SY13

1 = battery absent or defective

SY14

1 = the output LEDs show the state


of internal bits B255 to B240 for
TSX 17-20, or B255 to B248 for
TSX 17-10 with 20 I/O

4.5

SY15

1 = the rapid counter C15 (**) is


equal to its preset value

SU

2.6

SY16

1 = requests the reconnection every


10 seconds of the static outputs
disconnected by overvoltage or
short-circuit

US

SY17

1 = the value of a counter


(CO to C15) < K (constant)

2.3

SY19

0 = validation of the fast task

1.5

SY21

(by the operation code SET in the


Pre-processing section) = initialization of the Grafcet, i.e. active
steps reset to 0 and initial steps
set to 1

US

3.2
4.6

SY22

(by the operation code SET in the


the Pre-processing section) = resetting of the Grafcet, i.e. deactivation
of all the steps

US

3.2
4.6

SY23

(by the operation code SET in the


Pre-processing section) = validation of the Grafcet, i.e. validates
a presetting of the Grafcet (SET Xi,
RESET Xi), and freezes the Grafcet
if held at 1

US

1.4
3.2
4.6

S
S
S

4.5

(*)

Abbreviations used :
S
= set to 1 or 0 by the system,
U
= set to 1 or 0 by the user,
S U = set to 1 by the system, reset to 0 by the user,
U S = set to 1 by the user, reset to 0 by the system.

(**)

With TSX 17-20 only.

PL7-1 Language

1.4

Operation codes

Operation
code

Significance

L
LN

Read the state of


Read the inverse state of

..................
..................

I,O,B,SY,T,C
SC,SR,X,S

A
AN

AND the state of


AND the inverse state of

..................
..................

I,O,B,SY,T
SC,SR,IM,X,S

O
ON

OR the state of
OR the inverse state of

..................
..................

I,O,B,SY,T
SC,SR,IM,X,S

XO

Exclusive OR : the result is equal to "1" when


one of the two operands concerned is equal
to "1"

I,O,B,SY,T
SC,SR,IM,X,S

Inverses the logic result of the processor.


Can be written anywhere in the list of
instructions

None

- Assign the result to : .............................


- Starts a timer if state 1 : ............................

I,O,B,SY,SR,X (*)
T

=N

- Assign the inverse result to : ....................


- Starts a timer if state 0 : ............................

I,O,B,SY,SR,X (*)
T

Detects an edge on any operand


(duration, 1 scan cycle), must be used with
an internal bit Bi :
- rising edge
L.... PBi
- falling edge
LN.. PBi

S
(Set)

Sets an operand to 1 : .............................


To reset it to 0 use code R (except for
certain SY bits that are reset by the system)
- Starts a timer :
.............................
- Sets a counter to a value K : ....................
- Sets a step counter step to 1 : ..................
- Sets a register bit to 1 : .............................
- Sets a Grafcet step to 1 : ..........................

I,O,B,SY,S

R
(Reset)

Associated
operands

Sets an operand to 0 : .............................


To reset it to 1 use code S
- Initializes a timer :
.............................
- Sets a counter to 0 :
.............................
- Sets the 16 bits of a register to 0 : ............
- Sets a register bit to 0 : .............................
- Sets a Grafcet step to 0 : ..........................

T
C
SC
SR
X (*)
I,O,B,SY,S
T
C
SR
SR
X (*)

(*) The setting of Grafcet steps to 1 or 0 is effective only after validation by system
bit SY23.
The instructions = Xi, = NXi, S Xi and R Xi must be used only in the Preprocessing section.

PL7-1 Language
Operation codes (Contd.)
Operation
code

Significance

Associated
operands

SET *
RST *
=
*

These 3 operation codes have the


same functions as the codes S, R
and =, but affect a bit string of 8 bits
maximum.
The length of the string is determined by :
- the first bit, i.e. the address of the bit
string,
- the last bit, which is the first subsequent
bit that is a multiple of 8 minus 1.
= * B018 is equivalent to :
Ex :
= of B018 to B023
B018 = the first bit,
B023 = the last bit (3 x 8) - 1

I,O,B,X

CU

Increments (on a rising edge) a counter,


a step counter, or a register.

C (except C15 in a
TSX 17-20),SC,SR

CD

Decrements (on a rising edge) a counter,


a step counter, or a register.

C (except C15 in a
TSX 17-20),SC,SR

At state "1", freezes the value of a timer

JMPi
LABi

Program jump to LABi. JMPi and LABi


must have the same number (i = 1 to 127).
This number is not related to the line
number.

None, See Section 2.1

NOP
EP

Non-operative instruction
End of program

None
None

Grafcet instructions :
Instruction

Significance

Processing section in
which it can be used

=*=i

Represents the initial step i (*)


(i = 1 to 62)

Sequential

_*_i

Represents the step i (*)


(i = 1 to 62)

Sequential

#i

Activates step i and deactivates the


current (upstream) step

Sequential

Deactivates the current step without


activating a new step

Sequential

= * = POST

Indicates the start of the Post-processing


section

Post-processing

Xi

Bit associated with step i

Pre-processing,
Sequential and
Post-processing
sections

(*) The maximum number of steps that can be used, including initial steps, is 62.

PL7-1 Language

1.5

PLC Scan Cycles

Mono-task cycle
- The TSX 17-10 has a mono-task cycle only (no Fast task).
- The TSX 17-20 can be given a mono-task cycle by setting SY19 to 1.
The task is non-periodic and has a scan time of < 150 ms (watchdog).
Instruction List (or Boolean) language without Grafcet
Terminal dialog

Reading of the inputs

S0000
S0001
.....

L
A
.
EP

I0,01
I0,02
....

Program
Scanning

Updating of the outputs

Instruction List (or Boolean) language with Grafcet


Terminal dialog

Reading of the inputs

SY00
SY01
....

S0000
S0001
.....

L
A
.

S0052
S0053
S0054
S0055

=*=
L
A
#

01
B0004
I0,03
02

S0000
S0001
.....

L
A
.
EP

SY00
SY01
....

Pre-processing

Sequential processing
(Grafcet)

Post-processing

Updating of the outputs


Note :
When the PLC is stopped, the scan cycle is as follows :
. Terminal dialog, reading of inputs, updating of outputs
. And, if SY08 = 1, the outputs are reset to 0,
SY08 = 0, the outputs retain their states.

PL7-1 Language
PLC Scan Cycles (Contd)

Two-task cycle
The TSX 17-20 can be given a two-task cycle by setting SY19 to 0.
The two tasks are :
. The Master task (non-periodic, the same as the mono-task),
. The Fast task (non-periodic).
Purpose of the Fast task : The Fast task guarantees short response times for
short routines that recur frequently. The number of instructions in the Fast task
should be kept to the minimum.
Principle : The Fast task interrupts the Master task when one of the following
instructions is encountered L.., LN.., _*_.., NOP or EP, and when one of the
following events occurs :
. the physical change of state of one of the event-triggered inputs (configured as
such) I0,24 and/or I0,25,
. the fast timer C15 reaches its preset value.
Scan cycle of the Fast task
Master task
Reading of the input byte
configured in the Fast task
F0000
F0001
.....

L
A
.
EP

I0,24
B108
....

Scanning of the Fast


task program

Updating of the output byte


configured in the Fast task
Master task

Remarks :

Do not use Grafcet instructions, nor the instructions JMP and LAB in the
Fast task.
When the Fast task is :
- active, the input and output bytes configured in this task are processed by
both the Fast task and the Master task.
- inactive, the input and output bytes configured in this task are processed
by the Master task only.
Only one input byte (I0,00 to I0,07 or I0,08 to I0,15 or I0,16 to I0,21) and
one output byte (O0,00 to O0,07 or O0,08 to O0,11) of the basic PLC
module can be configured in the Fast task.
A change of state of the "event" inputs I0,24 or I0,25 that is generated by the
terminal or the program, and not by an outside event, will not initiate the
execution of the Fast task.

10

PL7-1 Language : Structure and Functions

2.1

Characteristics

Instructions
A PL7-1 language instruction occupies one memory address and is composed of :

Example :

A memory address
S 0004

An operation code
A

+ An operand
I0,03

A list of instructions is divided into 2 parts :


.
.

L
A
=
=N

1 One part for the test instructions,


2 One part for the action instructions.

I
B
O
B

0,04
012
0,01
025

1
2

The number of test or action instructions is not limited.


Program memory
The number of lines (i.e. instructions) that can be used is limited by the size of the
memory, as follows :
Micro-PLC

8K Memory

24K Memory

TSX 17-10
TSX 17-20

925 (from S0000 to S0924)


925 (*)

2973 (*)

(*) If the Fast task is used, the number of lines of the Master task is reduced by the number
of lines of the Fast task.

Example : With an 8K memory :

Master task = from S0000 to S0918


Fast Task
= from F0000 to F0006

Program scan
The processor reads and executes the instructions in the ascending order of their
addresses, up to the instruction EP (end of program).
Program jump : JMPi and LABi
The execution of the operation code JMPi immediately jumps the program scan
to the line containing the operation code LABi and the part of the program between
JMPi and LABi is not executed. JMPi and LABi must have the same number ;
this number has no relation to the line number.
"IM" function
This function simplifies the logic operations A, AN, O, ON, XO between two series
of instructions.
Principle : Before the execution of each L or LN instruction, the logical result is
memorized in IM until the next L or LN instruction.
Example

Program
L
A
LN
A
O
=
...

I0,01
I0,02
I0,03
I0,04
IM
O0,06
.....

Equivalent program (without the use of "IM")


L
A
=
LN
A
O
=
...

I0,01
I0,02
B117
I0,03
I0,04
B117
O0,06
.....

I0,01

I0,02

I0,03

I0,04

O0,06

11

PL7-1 Language : Structure and Functions

2.2

Timer
The Timer function permits the time-delayed control of specific actions. The value
of the time-delay is programmable and can be modified by the TSX T317 terminal
in the ADJUST mode (ADJ).

Characteristics
Number
Time bases (Ti,B)
Preset value (Ti,P)

32 (from T00 to T31)


4 (10ms, 100ms, 1s, 1mn)
0000 to 9999

Test operation codes


L, LN, A, AN tests of the state of the timer (running 0, or done 1).
O, ON, XO
Action operation codes
= Ti start on state 1 and run while the condition = 1
= NTi start on state 0 and run while the condition = 0
S Ti start on state 1 and run till timed out
R Ti initialization of the timer
H Ti halts the timer while the condition = 1
Example

On-delay timer
Use of the operation code =
L I0,01
=
T00
L
T00
= O0,01
.........

I0,01

T00

O0,01

:
Time delay

Use of the operation codes S and R


L I0,01
S
T00
L I0,02
R
T00
L
T00
= O0,01
...........

I0,01

I0,02

T00

O0,01 :

Remarks :

12

. A program jump over a timer, or the stopping of the PLC, does not halt the
running of a timer.
. In the ADJUST mode, the current value Ti,V is at 0 if the timer has timed
out, has not been started, or has been initialized by the operation code R.
. On a cold restart, the current value is reset to 0 and the preset value Ti,P
is the value that was defined in the CONFIGURATION mode (the adjustment value is lost).

PL7-1 Language : Structure and Functions

2.3

Counter

The counter function permits the upcounting or downcounting of external or


internal events. The preset value can be modified by the TSX T317 terminal in the
ADJUST mode.
Characteristics
Number
Preset value (Ci,P)

15 (from C00 to C14)


0000 to 9999

Test operation codes


L CiK
LN CiK

tests of the state of counter i in relation to constant K


(from 0000 to 9999).

Action operation codes


S CiK
R Ci
CU Ci
CD Ci

set counter i to constant K (from 0000 to 9999)


reset the counter to 0
incrementation on a rising edge
decrementation on a rising edge

System bit SY 17
Since equality is not always the desired condition, the system positions system
bit SY17 as follows :
. SY 17 = 0 if the counter value constant K,
. SY 17 = 1 if the counter value < constant K.
Thus providing 4 additional functions (>, <, , ).
Example
L

C00

K00123

Counter C00 equal to 123

C00

K00123

Counter C00 different from 123

LN
AN

C00 K00123
SY17

Counter C00 more than 123

Remarks

L
A

C00 K00123
SY 17

Counter C00 less than 123

L C00 K00123
ON SY 17
Counter C00 more than or equal to 123

L
O

C00 K00123
SY 17

Counter C00 less than or equal to 123

. The system bit SY17 can be used several times in the program for one or
more counters. It always affects the counter Ci immediately upstream of
the operand SY17.
. When the counter reaches its preset value (Ci,P) it is automatically reset
to 0000.
. On a cold restart, the current value is reset to 0000 and the preset value
(Ci,P) is the value that was defined in the CONFIGURATION mode (the
adjustment value is lost).

13

PL7-1 Language : Structure and Functions

2.4

Shift Register
The shift register is a register which enables binary data bits to be moved as a
contiguous group a prescribed number of positions to the left or right.

Characteristics
Number of registers
Number of bits in a register
Test operation codes
L, LN, A, AN
O, ON, XO
Action operation codes
= SRi,j
= N SRi,j
S SRi,j
R SRi,j
R SRi
CU SRi
CD SRi

8 (from SR0 to SR7)


16 (from SRi,00 to SRi,15)

tests of a register bit,

assignment of a state (or its inverse) to a register bit,


sets a register bit to 1,
resets a register bit to 0,
resets the 16 bits of a register to 0,
on a rising edge, shifts the bits one place to the left,
on a rising edge, shifts the bits one place to the right.

Operation
Initial State
CU SRi shifts the
bits one place to
the left
The bit shifted out
(bit 15) is lost

Bit 15

Bit 00

Bit 15

Bit 00

Similarly, CD SRi shifts all the bits of the register one place to the right, in this case
the bit shifted out is bit 00.
If more than 16 bits have to be shifted, several registers can be cascaded in the
program.
Example

Shift the register one place to the left every second.


Bit 00 must take the inverse state of bit 15.
Program

LN
=
L
CU

SR
SR
SY
SR

Remark :

14

0,15
0,00
06
0
. On a cold restart, the bits of each register are reset to 0.

PL7-1 Language : Structure and Functions

2.5

Step counter

A step counter is a series of steps which can be associated with actions. The
progress from one step to another can be controlled by internal or external events.
Only one step of a step counter can be at state 1.

Characteristics
Number of step counters
Number of steps of a step counter
Test operation codes
L, LN, A, AN
O, ON, XO

8
(from SC0 to SC7)
256 (from SCi,000 to SCi,255)

tests of the state of a step of a step counter

Action operation codes


S SCi,j sets step j of step counter i to 1
CU SCi on a rising edge, increments a step (from 000 to 255)
CD SCi on a rising edge, decrements a step (from 255 to 000)
Operation
Input CU

Output CD
Nr. of step at 1

Example

Program step counter 0 to be incremented by input I0,02 and to be reset to 0 by


input I0,03 or when it reaches step 3.
Step 0 controls output O0,01, step 1 controls output O0,02 and step 2 controls
output O0,03.
Program
L
O
S
L
CU
L
=
L
=
L
=

I
SC
SC
I
SC
SC
O
SC
O
SC
O

Remark :

0,03
0,003
0,000
0,02
0
0,000
0,01
0,001
0,02
0,002
0,03

setting to step 000


incrementation

activation of the outputs

On a cold restart, the active step is reset to 0 and step 0 of each step
counter is set to 1.

15

PL7-1 Language : Structure and Functions

2.6

Fast counter/timer (TSX 17-20 only)


The TSX 17-20 micro-PLC is equipped with a fast counter C15 which, depending
on the way it is configured, can be used as a fast counter or a fast timer. The preset
value is defined in the CONFIGURATION mode and can modified by the terminal
in the ADJUST mode, or by the program with the operation code S.

Characteristics
- Fast counter (configuration by default) :
The maximum frequency of the counter is 2 KHz. It has two physical inputs (a
counting input and a reset input) permitting the connection of 5VDC and 24VDC
sensors. Counting : 10 000 points.
- Fast timer :
In the fast timer, an internal time base of 0.555ms replaces the physical counting
input. A rising edge on the reset input resets the current value of the timer to 0.
Test and action operation codes
L C15K tests of the state of the counter in relation to constant K
LN C15K (from 0000 to 9999),
SY 17
see Section 2.3.
S C15K modification request of the the preset value K. This new value is
acquired after the counter has reached the preset value that it had
when the modification request was made.
R C15
resets the counter to 0 and resets the preset value to the value that
was defined in the ADJUST or CONFIGURATION modes.
System bit SY 15
When the fast counter C15 reaches its preset value :
. system bit SY15 is set to 1,
. the Fast task is executed if system bit SY19 has been reset to 0 in the Master
task,
. the counter is reset to 0.
Connecting the fast counter
The 9-pin D-type connector in the top left corner of the TSX 17-20 has two
independent, isolated inputs :
. Fast counting input :
0V = pin 1;

5V = pin 7;

24V = pin 6

. Reset input :
0V = pin 5;

5V = pin 8;

24V = pin 9

Remarks

16

. Resetting of the counter to 0 by the physical input resets the current value
only (the preset value is retained).
. By associating the fast counter with a step counter (in which each step is
loaded with a value K), a fast counter with multiple preselections can be
obtained.
. On a cold restart, the current value is reset to 0 and the preset value is the
value that was defined in the CONFIGURATION mode.

PL7-1 Language : Grafcet

3.1

Characteristics

The PL7-1 language comprises 62 Grafcet steps maximum, including the initial
steps.
Within this limitation, the number of simultaneously active steps is unlimited.
Instructions
=*=i
-*-i
#
#i
= * = POST
xi

initial step i (*),


step i (*),
deactivation of the current step without activation of any other step,
activation of step i after deactivation of the current step,
start of Post-processing and end of Sequential processing,
read/write bit associated with step i.
(*) The first step = * = i or - * - i that is written indicates the start of Sequential
processing and therefore the end of Pre-processing.

Examples

Linear sequence
01
=*=
L I0,01
02
#
02
-*L I0,02
03
#
03
-*........

Sequence selection
04
-*L I0,03
05
#
L I0,04
06
#
05
-*L I0,05
07
#
06
-*L I0,06
07
#
........

I0,01
2

I0,02
3

I0,03
5

I0,04
6

I0,05

I0,06

Simultaneous sequences
08
-*L I0,07
09
#
10
#
09
-*L I0,08
11
#
10
-*L I0,09
12
#
11
-*X12
L
13
#
12
-*X11
L
13
#
........

I0,07
9

10

I0,08
11

12

=1
13

I0,09

14
-*L I0,10
15
#
16
#
15
-*L I0,11
17
#
17
-*X16
L
A I0,12
A I0,13
18
#
16
-*X18
L
#
18
-*L I0,14
........

14

I0,10
16

15

I0,11
17

I0,12

I0,13

18

I0,04

17

PL7-1 Language : Grafcet

3.2

PL7-1 Program structure

PL7-1 Grafcet Program


A PL7-1 Grafcet program is structured in 3 parts, each of which has a specific role.
Master task

S000
....

L....
....

Pre-processing
Sn

....

Sn+1
....

=*=

Sequential processing
Sj

Sj+1
....

....

=*=

POST

Post-processing
Sk

EP

Pre-processing :
= a series of instuctions
Role
Processing of :
- mains break/return,
- failures,
- application operating modes :
. init : by system bit SY21,
. reset : by system bit SY22,
. prepositioning of the Grafcet by system
bits SY22 and SY23,
. freezing of the Grafcet by system bit SY 23,
- input logic

Sequential processing :
= a series of instructions
Role
- Sequential processing of the application :
steps and transitions and their associated
actions and conditions.

Post-processing :
= a series of instructions.
Role
The processing of :
- the commands from the Sequential processing section concerning the control of the
outputs,
- the output safety interlocks.

The scan cycle is defined in Section 1.5. Only the steps that are active (or to be
activated or deactivated) and their associated instructions are executed in the
Sequential processing section.
Reminder : Grafcet instructions must not be used in the Fast task.

Conditions and actions


The transition conditions associated with step i are written after the step
instructions - * - i or = * = i.
The actions associated with the steps can be written either :
. In the Sequential processing section, after the step instruction and before the
transition conditions, by using the instructions S and R (scanned when the step
is active).
. In the Post-processing section, after the instruction Xi (scanned on each cycle).
This solution is recommended in the case of outputs linked to safety interlocks.

18

Program utilities

4.1

Mains power break/return

Characteristics of mains power breaks


. < the autonomy of the power supply : normal execution of the program,
. > the autonomy of the power supply : processor de-energized, with :
- saving of the context (program, data, I/O) if the PLC is equipped with a backup battery,
- without a battery, the context is saved for a minimum of 1 hour.

Hot restart : the context is coherent (program and data)


Possible causes :
. mains return after a break of > autonomy of the power supply,
. system bit SY01 set to 1 by the terminal or the program.
Consequences :
. system bit SY01 set to 1,
. all outputs reset to 0 (*),
. unsaved internal bits (B128 to B255) reset to 0,
. saved internal bits (B000 to B127) and Grafcet steps retain their states, and
timers, counters, shift registers and step counters retain their values,
. the scan restarts from where it stopped but without updating of outputs at the end
of the cycle, the next cycle is executed normally (inputs, program, outputs) and
SY01 is reset to 0 by the system.
(*) with PLC software versions earlier than V1.2, all output states are saved.

Cold restart : loss of context (data or program)


Possible causes :
. back-up battery defective or absent,
. change of user program back-up cartridge,
. system bit SY00 set to 1 by the terminal or the program,
. initialization of the PLC by the terminal.
Consequences :
. system bit SY00 set to 1,
. all internal bits, I/O bits and current values of functions are reset to 0 (registers
at 0, step counters at step 0, etc.),
. loss of the adjustment values modified by the terminal and resetting to the values
defined in the Configuration mode,
. cancellation of forcings,
. acknowledgement of an I/O Fault,
. reinitialization of the Grafcet,
. the scan restarts at the start of the cycle (inputs, program, outputs) and system
bit SY00 is reset to 0 by the system.
Remark

The Fast task cannot be executed until system bits SY00 and SY01 have been
reset to 0, i.e. not until after the execution of the first complete cycle.

19

Program utilities

4.2

Initialization of the PLC


The PLC can be initialized by program by setting system bit SY00 to 1 which
corresponds to a cold restart (see Section 4.1). During a hot restart, it may be
necessary to initialize the PLC, the example below shows how this can be
programmed. The PLC can also be initialized by the terminal.

Example

4.3

L SY01
S SY00

If SY01 = 1 (hot restart) then set SY00 to 1 to initialize the PLC.


These two bits are reset to 0 by the system at the end of the next cycle.

Program and data back-up storage


The program and data are stored in the RAM memory of the PLC. This memory
has an autonomy of 1 hour. The autonomy of the RAM can be increased to 2 years
by installing a TSX 17 ACC1 lithium back-up battery (refer to the installation
manual).
For permanent back-up storage, the user program can also be transferred to a
TSX MC70 E38 or E324 EEPROM memory cartridge.

EEPROM memory module


Copying the program to an EEPROM memory cartridge is not mandatory, but is
recommended since it prevents the risk of alterations to the user program due to
mains breaks or battery defects.
On power up, the PLC compares the RAM and EEPROM programs. If they are
not identical, the program in the EEPROM is automatically transferred to the RAM
memory.

4.4

RUN/STOP input and SECU output


The input I0,00 and the output O0,00 of the basic PLC module can each be
configured either as normal I/O or for special functions :

Input I0,00
Can be set in the Configuration mode to either :
Normal :
Normal operation as for any other input,
RUN/STOP : State 1 = PLC running, program being executed,
State 0 = PLC stopped, program halted.
Output O0,00
Can be set in the Configuration mode to either :
Normal :
Normal operation as for any other output,
SECU :
State 1 = PLC running,
State 0 = PLC stopped or failed.
This output can be used in external safety circuits.
Remarks . I0,00 and O0,00 must be used in the program only for the function that was
selected in the CONFIGURATION mode.
. The RUN/STOP input has priority over a RUN/STOP command from the
terminal.

20

Program utilities

4.5

Diagnostic aids

The operands described below can be used in the program to facilitate troubleshooting of the PLC or the application.

System bits
SY10 = 0 : I/O module fault or configuration fault,
SY13 = 1 : Back-up battery absent or defective.

Fault bits Sx,j


Value of x : 0 : Basic PLC module,
1 : 1st extension module,
2 : 2nd extension module.
Sx,0 = 1 : I/O fault or exchange fault in module x.
Sx,1 = 1 : Sensor voltage fault in module x,
Sx,2 = 1 : Input circuit fault in module x,
Sx,3 = 1 : Short-circuit on the static outputs of module x.
Reminder :

System bit SY16 at 1 requests the reconnection every 10


seconds of the static outputs disconnected by overvoltage or
short-circuit.

Sx,4 = 1 : Internal power supply fault of the coils of the relay outputs of module x.

Remarks :

. State 1 of any of these fault bits causes :


. resetting to 0 of system bit SY10,
. illumination of the I/O fault light.
. If the I/O light stays on and SY10 stays at 0 after the fault has been
corrected, use the terminal to initialize the PLC.

Display of internal bits B240 to B255


The significance of the status lights on the front panel of the basic PLC varies
according to the state of system bit SY14 :
SY14 = 0 : MD light out
display of outputs O0,00 to O0,15 (or O0,00 to O0,07 for the TSX 1710 with 20 I/O),
SY14 = 1 : MD light on
display of internal bits B255 to B240 (or B255 to B248 for the TSX
17-10 with 20 I/O).

21

Program utilities

4.6

Application operating modes


The PL7-1 software enables the operating modes of the application to be
organized in three main groups :
. Checking,
. Operation or production,
. Stopping.
These different operating modes can be obtained by using the following possibilities of the Grafcet language :
.
.
.
.

Initialization of the Grafcet,


Resetting of the Grafcet,
Presetting of the Grafcet,
Freezing of the Grafcet.

Use of the Pre-processing section and the system bits facilitates control of the
application operating modes without complicating the program.

Structure of the Pre-processing section


The flowchart below shows the structure that should be given to the Preprocessing section, which is divided into three sub-assemblies as follows :
. Power up,

Power-up
Initialization

YES
Processing

NO

. Change of mode
request,

Change of mode
request
NO

. Combinational
input logic

YES

Processing

Input logic

Grafcet system bits


The Grafcet system bits SY21, SY22 and SY23 must be used only in the Preprocessing section. Bits SY21 and SY22 are automatically reset to 0 by the
system and must be written by using operating code S only.
Initialization of the Grafcet, SY21
Causes :
. a hot restart (see Section 4.1),
. SY21 set to 1 by the program or the terminal.
Consequences :
. deactivation of all the active steps and activation of all the initial steps.

22

Program utilities

Application operating modes (Cont'd.)


Resetting to 0 of the Grafcet, SY22
Cause :
. SY22 set to 1 by the program or the terminal.
Consequences :
. deactivation of all the active steps,
. stopping of the scan of the Sequential processing section.
Presetting of the Grafcet, SY22 and SY23
Procedure :
. reset the Grafcet to 0 by setting SY22 to 1,
. preset the steps to be activated by S Xi,
. validate the presetting by setting SY23 to 1.
Freezing of the Grafcet
. in its initial state, by holding SY21 at 1 by the program,
. in an "empty" state, by holding SY22 at 1 by the program,
. in a predetermined state, by holding SY23 to 1.

4.7 Programming guidelines


Use of jump instructions
Jump instructions should be used with caution. Avoid upstream jumps and avoid
long loops in the program which could increase the scan time. Do not make jumps
from one task to another.

Programming of outputs
Each output bit or internal bit must be turned on or off only once in the program,
since only the last state that is scanned is taken into account when the outputs are
updated at the end of the scan cycle.

Field safety sensors


Sensors that are used in direct safety circuits must not be processed by the PLC,
but must be free to act directly on the corresponding actuators.

Power return programming


An automatic restart of the application after a mains power return could be highly
dangerous. Users are therefore strongly recommended to make the restarting of
the application after a mains power return conditional on a manual operation.

23

Program utilities

4.8

Programming examples and rules


L

I0,02

I1,00

I0,02

I0,05

X22

O0,02

O0,01

I0,02

I0,05

O0,02

O0,01

I0,02

B017

I1,00

AN IO,05
O

B017

X22

I1,00

AN O0,02
=

O0,01
B017

LN I0,02
A

IO,05

I0,02

X5

AN B017
O

IM

LN O0,02
O

I1,00

IM

X5

O0,01

Rules of association of the operation codes


The operation requested by the code A, AN, O, ON or XO is always effected with
the logical result of the previous line.
The operation code L or LN always stores the logical result of the previous line
in the IM memory until the next operation code L or LN is encountered.

24

TSX T317 Operating modes


Presentation of the TSX T317 Terminal (Contd.)
The 5 blue keys have several functions and can be soft keys or operation code
keys depending on the contents of the lower line of the screen.

Soft keys
When the lower line of the screen displays the following operating mode
mnemonics, the 5 blue keys are soft keys.

Tsx1720_V10 STOP
TRFTERDGN
%

Tsx1720_V10 STOP
CNFADJ PRGCTL%
CNF
ADJ
PRG
CTL
%

:
:
:
:
:

Configuration mode
Adjust mode
Program mode
Control mode
Go to next screen

TRF : Transfer mode


TER : Terminal mode
DGN : Diagnostic mode
%

: Return to previous screen

Operation code keys


When the lower line of the screen does not display operating mode mnemonics,
the 5 blue keys are operating code keys used as follows :
1st action : Internal marking,
RST * SET *
=*
EP
2nd action : 1st external marking,
3rd action : 2nd external marking,if it
exists.
Note : - 3 actions on key L equal the code
= * = POST.
- Simultaneous actions on keys
Shift and N equal the code H.

=*=

CU

CD

%
N

NOP

JMP / #
XO
Lab /-*-

Operand and numeric keys


After selecting the operation code, select the operand and its number :
1st action : 1st external marking (operand). For the 2nd external
marking, if it exists, press
Shift + the key.
2nd action : Internal marking
(number)
.

TMR

SY/S

X/IM

CNT
FUN

SC/ [SC]

SR/ [SR]

Clear

Enter

Special keys
Enter : Validates the entry, or confirms a
function, and goes to the next
line.
Clear : Abandons the function and
goes to the previous line.

CB

0
Shift

Quit

Quit : Abandons the mode.

As the Clear and Quit keys have several functions, it may be necessary to use
them with Shift key. The keys FUN and CB are not used.

26

TSX T317 Operating modes

Presentation of the TSX T317 Terminal (Contd.)


Representation of keys in this manual
Soft keys :

CNF

In the margin :
In the introduction to each mode or function, the soft keys are
represented as shown opposite :

In the text :
The same key is represented between square brackets :

[CNF]

Other keys :
The other keys (operation codes, operands, numbers) are represented between
the symbols < and > as follows :
. Keys
. Keys
. Keys

CU

and

IM

and [SC]

Enter and Quit

: ...................................

< CU >

<X>

: ...................................

< IM >

< SC >

: ................................... < ENTER > < QUIT >

Examples : Entry of a list of instructions


On the mode selection display, press :
[PRG] [SEQ] [INS]
< L > < 7 > < 1 > < ENTER >

L
A
O
=

I
I
B
O

0,01
1,03
220
1,05

< A > < 7 > < 1 > < 0 > < ENTER >
< 0 > < 9 > < 2 > < 2 > < ENTER >
< = > < 8 > < 1 > < 0 > < ENTER >
< CLEAR >
Read the program up or down by < > or < >
< QUIT > returns to the mode selection display.

Entry of another list of instructions

-*-

< P > < P > < P > < 1 > < ENTER >

024

< L > <9 > < 2 > < 4 > < ENTER >

< XO > < XO > < XO > < ENTER >

27

TSX T317 Operating modes

5.2

Power-up

Presentation
On power-up, the terminal performs a series of self-tests, checks its RAM
memory, performs the checksum of its EEPROM memory and then displays the
following screens.
Keyboard test
This test is proposed for 3 seconds. To
test the keyboard, press any key or
sequence of keys except < CLEAR >
and check for the corresponding display.

SELFTEST
keyboard test?

< CLEAR > abandons the function.


Language selection
The terminal proposes 5 languages
(4 directly and the 5th by [%]).
To select a language press the corresponding soft key.

English
ENGFRADEUITA%

< ENTER > validates the selection.

Connection to the PLC


During 3 seconds the terminal then tests
its connection to the PLC for correct
operation (*) and the screen displays
the software version of the terminal.

*TSX T317 V1.0*


<--> TSX ?

Mode selection display


If the connection is OK (*), the first screen of the mode selection display appears,
the second screen can be accessed by pressing [%].
The 1st line indicates :
TSX 17-20 : the type of PLC,
V1.0 : its software version,
STOP/RUN : its status (**).
The 2nd line indicates the significance
of the 5 soft keys.
Note : If there is a memory fault on powerup, the display opposite appears.
Clear the memory by selecting its
size [8K] or [24K].
([8K] only with the TSX 17-10).

Tsx1720_V10 STOP
CNFADJPRGCTL%
Tsx1720_V10 STOP
TRFTERDGN
%
Prog.mem. fail.
CLM:
8k24k

(*) If the connection is not OK, see Section 6.5.


(**) If a forced bit is present, STOP and RUN are replaced by S.F and R.F.

28

TSX T317 Operating modes

5.3

Presentation of the Operating Modes

The various functions and sub-functions of the terminal are grouped in 7 operating
modes :
CNF : CONFIGURATION mode
Permits the writing in the PLC memory of the information necessary to the
processor (preset values, time bases, I/O addresses, etc.).
ADJ : ADJUST mode
Permits the display and modification of all the variables.
PRG : PROGRAM mode
Permits the creation and modification of the program, search for an
instruction, etc.
CTL : CONTROL mode
Permits the starting, stopping or initialization of the program.
TRF : TRANSFER mode
Permits the printing of the program and the back-up storage of the
program on audio cassette or EEPROM.
TER : TERMINAL mode
Permits the configuration of the printer link, the entry of the code 7533
which authorizes programming with the PLC running, and the modification of the language selection.
DGN : DIAGNOSTIC mode
Permits the diagnosis of faults of the PLC or the application.

CNFADJPRGCTL%

TRFTERDGN

Action on a soft key

CLEAR or < SHIFT > < CLEAR >

SELECTED MODE

Action on a soft key


CLEAR or < SHIFT > < CLEAR >

SELECTED FUNCTION (*)

Keyboard entry : flashing screen

QUIT or < SHIFT > < QUIT >

Validation
of the entry
ENTER

(*) Depending on the function selected, sub-functions may be proposed by the soft keys.

29

TSX T317 Operating Modes

5.4

Configuration Mode

General

CNF
R

Gives access to the Configuration mode. When the PLC is stopped (see Section
5.6), this mode permits the configuration of the memory, the time bases, the
preset values, the I/0, and the fast counter C15.

CONFIGUR.
STOP
MEMTiBTiPCiP%

CONFIGUR.
I/0C/T

STOP
%

Note : Unless certain special functions are required (special I/O, fast task I/O, fast counter,
etc.), it is not necessary to configure any of these except for the time bases (TiB) and
preset values (TiP) which are set by default to 1 mn and 9999 respectively.

Memory function
Gives access to 3 possibilities :

MEM
R

SIZE: 8k -->24k
SIZCNV
CLM

[SIZ]*

choice of the size of the RAM


memory : 8 or 24 K.

[CNV]*

converts the memory size from 8 to 24K, or from 24 to 8K, if the program
size is compatible (conversion time 2 minutes).
Confirmation by < ENTER >.

[CLM]*

clears the entire memory (configuration, program and data).


Confirmation by < ENTER >.

Time base function


Choice of time bases : 10ms, 100ms, 1s or 1mn.
TiB
S

[MOD]

permits selection of the required value


Validation by < ENTER >.

T.Base T00

1mn
MOD

The keys < > and < > give access to the next or previous timer.
Preset value function
Permits entry of the preset values of timers or counters (0000 to 9999).

TiP

[MOD]

permits entry of the preset value of a timer.


Validation by < ENTER >.

PRESET T00

[MOD]

permits entry of the preset value of a counter.


Validation by < ENTER >.

PRESET

CiP
NOP

9999
MOD

C00 9999
MOD

The keys < > and < > give access to the next or previous timer or
counter.

30

TSX T317 Operating Modes

Configuration Mode (Contd.)


I/O configuration function
Gives access to 4 possibilities.

I/O
R

[IO0]
[I00]
[O00]

configuration of the normal,


RUN/STOP and SECU I/O :
I0,00 : RUN/STOP or normal
input.
O0,00 : SECU or normal output.
Validation by < ENTER >.

[F.I]*

configuration of the event-triggered inputs by keys [124] or


[125] (display of EV or NO).
Validation by < ENTER >.

[CNF]

configuration of the extension


modules by keys [M1] or [M2]
with display of :
NO no extension,
LOC local extension,
NET not used.
Validation by < ENTER >.
[CLC] clears the configuration
of the extension modules.

[FIO]*

selection of the I/O bytes exchanged in the Fast task.


for the input byte :
[0..] from I0,00 to I0,07,
[8..] from I0,08 to I0,15,
[16.] from I0,16 to I0,23.
for the output byte :
[0..] from O0,00 to O0,07,
[8..] from O0,08 to O0,15.
for a byte that is not exchanged
in the Fast task but in the Master
task.
Validation by < ENTER >.

[I]

[O]

[NO]

I/O Config.
100F.ICNFFIO
100:R/S 000:nor
100000
1024:EV 1025:NO
124125
M1:LOC - M2:NO
M1 M2 CLC

FAST I/O
I O
FAST: 10,00..7
0..8..16.. NO
FAST: NO OUTP^UT
0..8.. NO

Fast counter/timer C15 configuration function


By default, C15 is configured as a fast counter.

C/T
S

[MOD]* changes C15 to a fast timer.


Validation by < ENTER >.
Function available only on TSX
17-20.

C15:fast timer
MOD
C15:fast counter
MOD

(*) The functions and sub-functions marked by an asterisk are available with the TSX 1720 only.

31

TSX T317 Operating Modes

5.5

Program Mode

General

PRG
=

For safety reasons, the PLC must be stopped before creating or modifying the
program.
The Program mode gives access to the following 7 functions :

PROGRAM
STOP
FSTSEQSCHCLP%
Fast task and Master task functions
Reading, writing and modification of the
FST
Fast task (TSX 17-20 only).
R

SEQ
S

Reading, writing and modification of the


Master task.
The terminal is then in the read mode on
the first line of the selected task. The
following keys are then available (the
first 2 directly and the others by pressing
[%]) :

PROGRAM
STOP
RUNSTOINI
%
S0000 NOP
ADR

INS%

S0000 NOP
MODDELVISEND%
S0000 NOP

Direct access to an address


SELRSTCPYCUT%
[ADR] followed by the number.
Validation by < ENTER >.
< > and < > permit reading of the upstream and downstream addresses.
Writing the program (by insertion)
[INS] followed by the instruction(s) to be entered.
Validation of each instruction by < ENTER >
< CLEAR > returns the terminal to the read mode.
The instructions are inserted upstream of the line displayed and the
addresses of those downstream are incremented accordingly.
When a program in the Fast task is validated (by < QUIT >), the message
"WORKING" flashes for 1 minute. Do not power down the PLC while this
message is displayed, or the program will be lost.
Modification
[MOD] then modify the instructions as required.
Validation of each instruction by < ENTER >.
< CLEAR > < CLEAR > returns to the read mode.
Deletion
Call up the instruction to be deleted.
[DEL] requests deletion of the instruction, confirmed by < ENTER >. The
addresses of the following instructions are decremented accordingly and
the terminal returns to the read mode.
Display
[VIS] indicates the state or the value of the instruction displayed (for use during
debugging with the PLC running).
[PRG] returns to the read mode.

32

TSX T317 Operating Modes

Program Mode (Cont'd)


Last memory address
[END] displays the last memory address (not the end of the program).
Copying or deleting part of the program
[SEL] selects the section of program to
S0004 NOP
be copied or deleted, after the
SELRSTCPYCUT%
first and last lines have been
Example :
specified by [ADR].
[CPY] copies (by insertion) the select- To copy the section of program from line S0010 to
line S0020 and insert it at line S0060, press the
ed section of the program.
[CUT] deletes the selected section of following keys :
the program.
[%] [ADR] < 1 > < 0 >
[RST] cancels the selection.
< ENTER > [%] [%] [SEL]
[%] [ADR] < 2 > < 0 >
< ENTER > [%] [%] [SEL]
[%] [ADR] < 6 > < 0 >
< ENTER >
[%] [%] [CPY] < ENTER >

A section of program containing Grafcet or JUMP and LAB instructions cannot


be copied.

Search function
This function permits the search for all or part of an instruction.
SCH
=

Enter the instruction and press < ENTER >


SCH:
Under each character a cross appears,
SEL:
corresponding to a numerical key from 0
to 9.
When a cross is present, the corresponExample :
ding character is searched for.
To search for

L
I0,01
xxxxxxxxxx
0123456789

the lines containing the operand

< ENTER > starts the search. The first I0,01, enter an instruction containing this operand
instruction found is displayed with its and then press
< 0 > < 1 > < 2 > < 3> < 4 > < ENTER >
address.
< ENTER > then continues the search.
< CLEAR > halts the search, another
instruction can then be entered.

to delete the crosses under the unwanted characters, thus leaving the crosses 5, 6, 7, 8, 9 under the
characters of the searched for operand I0,01.

Clear program function


This function deletes the program (the configuration is saved).
CLP
NOP

To confirm the deletion of the program,


press < ENTER >.

PROGRAM
STOP
confirm CPL

"RUN STOP INIT" function see Section 5.6.


33

TSX T317 Operating Modes


Program Mode (Contd.)

Program mode flowchart

Tsx1720_V10 STOP
CNFADJPRGCTL%

CLEAR

0
QUIT

PROGRAM
STOP
FSTSEQSCHCLP%

PROGRAM
STOP
RUNSTOINI
%

S0000 L
ADR

S0000 L
SY01
MODDELVISEND%

SY01
INS%

S0000 L
SY01
SELRSTCPYCUT%
5.6

Control Mode

General

CTL
NOP

This mode gives direct access to the


RUN, STOP and INIT functions (these
functions are also accessible in the
Program mode).
[RUN]

requests the execution of the


program.
Confirmation by < ENTER >.

Tsx1720_V10 STOP
RUNSTOINI
Tsx1720_V10 STOP
confirm
RUN?

[STOP] requests the stopping of the program.


Confirmation by < ENTER >. The program stops at the end of its scan
cycle after updating of the outputs.
[INI]
requests the initialization of the PLC (which should be stopped).
Confirmation by < ENTER >.
Initialization of the PLC causes :
. Setting to 1 of system bit SY00,
. Resetting to 0 of internal bits, I/O bits and current values,
. Initialization of the Grafcet and step counters,
. Return to the preset values of counters and timers as defined in the CONFIGURATION mode. Any values modified in the ADJUST mode are lost.
. Cancellation of forced bits.
. Acknowledgement of I/O faults.
Note :

34

If there are any forced bits in the program, STOP and RUN on the top line of the
display are replaced by S.F and R.F.

TSX T317 Operating Modes

5.7

Transfer Mode

General

TRF
R

This mode offers 3 functions :


[PRT] print,
[TR]
transfer <=> audio tape recorder,
[EPR] transfer <=> EEPROM.

TRANSF.MODE STOP
PRTTR EPR

Print function

PRT
R

The screen shows the configuration of the data link (which is configured by default
to 600 baud with no parity after each power up).
The format is fixed : 1 start bit, 7 data bits, 2 stop bits.
[GO] starts the printout,
[BAU] permits selection of 300, 600
or 1200 baud,
[PAR] permits selection of EVEN,
ODD or NO parity,
[%]
selects the next screen which
permits the printing of :
[ALL] whole program (CNF + PRG),
[CNF] configuration only,
[PRG] pro gra m onl y (Fas t t as k +
Master task),
[SEQ] Master task only.

PRT: 600
GO BAU

NO
PAR%

LISTING:
ALL
ALLCNFPRGSEQ%

During printing it is possible to :


[ABO] abort printing,
[W/R] halt printing (Wait) if the key is
hit once, and restart printing if it
is hit twice.

*** CONFIG. ***


ABO
W/R

"Audio tape recorder" function


[CMP] compares a program in an audio
TR cassette with the program in
S
the PLC.

TRF: TSX
TR
CMP= > <= GO

TR

[]

copies the program in the PLC


to a TR cassette.

Example :

[]

copies the program in a TR


cassette to the PLC.

press :

[GO]

starts the selected function.

To copy the program in the PLC to a TR cassette,

[ ] [GO]
then start the TR in the record mode and confirm
by < ENTER >.
After a few seconds the terminal displays the
addresses being recorded and proposes [ABO]
to abort (cancel) the transfer.
When the transfer is ended, the message "Func.
finished" appears.

Confirmation by < ENTER >. For transfers to the PLC, wait for the audio signal
from the tape recorder before pressing < ENTER >.
Note :

[ABO] cancels the entire transfer. If this key is pressed before the message Func.
finished appears, the addresses that have been displayed are not transferred.

35

TSX T317 Operating Modes


Transfer Mode (Contd.)

"EEPROM transfer" function


This function permits transfers between the RAM memory in the PLC and a TSX
MC70 EEPROM memory cartridge of the same size (8 or 24 K, see Section 5.4 "Memory function").
=

EPR

The switch on the EEPROM cartridge


must be positioned as shown opposite
(to the right : WORK RAM).

MASTER
EEPROM
WORK
RAM

(Read Only)
RAM
EEPROM

[CMP] compares the program in the


RAM with the program in the
EEPROM.

TRF: TSX
TR
CMP= > <= GO

[]

TRF:RAM ==>EPROM
no protect.PRO

copies the program in the RAM


to the EEPROM (without protecting the program in the EEPROM).

[PRO] protects the program copied to the EEPROM. The program cannot then
be read or printed. To re-use the EEPROM, make a new transfer from the
RAM (blank or unprotected).
[]

copies the program in the EEPROM (protected or not) to the RAM. If the
EEPROM was protected, the RAM will also be protected.

[GO]

starts the selected transfer, after confirmation by < ENTER >.

Transfer mode flowchart

Tsx1720_V10 STOP
TRFTERDGN %

Tsx1720_V10 STOP
CNFADJPRGCTL%

TRANSF.MODE STOP
PRTTR EPR

CLEAR

CLEAR

36

PRT: 600NO
GO BAU PAR%

LISTING:
ALL
ALLCNFPRGSEQ%

TRF: TSX TR
CMP= > <= GO

TRF:RAM
EPROM
CMP= > <= GO

TSX T317 Operating Modes

5.8

Adjust Mode

General

ADJ
S

This mode permits the display, modification and forcing of the state or value of an
operand, with the the PLC running or stopped. The list of accessible operands is
given in Section 6.2.
To display the state or value of an operand, enter the operand on the screen
opposite and validate by < ENTER >.

ADJUST MODE
Variable:

The following soft keys are then proposed :


[MOD]
[F:0]
[F:1]
[UNF]

to modify its state,


to force to 0,
to force to 1,
to unforce.

O0,01
MODF:0F:1UNF

< SHIFT > < CLEAR > permit the entry of another operand.

Examples

. To display the state of output O0,01


press :
< 0 > < 1 > < ENTER >

O0,01=0 F F *
MOD
00100000

The 8 outputs from O0,00 to O0,07 are then displayed. Outputs O0,00 to O0,04
are at 0, O0,05 is at 1 and O0,06 and O0,07 are at 0. The letter F indicates that
O0,03 is forced to 0 and O0,05 to 1.
. To display and modify the current value of timer T00 press :
< TMR > < 0 > < ENTER >

T00 P=0015x 1 s
MoPV=0007 RMoV

The display comprises :


P preset value (Ti,P),
1s time base (Ti,B),
V current value (Ti,V),
[MOP] to modify the preset value,
[MOV] to modify the current value,
validation by < ENTER >
R timer running, or
D timer done, or
_ timer initialized (after a cold restart, INIT by terminal, or RESET by program).
Note :

. In the case of initialization by the program (SY00 set to 1) or by the terminal (INIT),
all the modifications made in the ADJUST mode are lost and the timer returns to
the values declared in the CONFIGURATION mode.
. When the PLC is running, the program has priority over the states of bits that have
been forced or modified.
. If a forced bit is present, STOP and RUN are replaced by R.F and S.F.
. With the PLC stopped, if SY08 = 1 (outputs reset) and an output is forced or
modified to 1, it remains physically at 0.

37

TSX T317 Operating Modes

5.9

Diagnostic Mode

General

DGN
=

This mode permits :


. Display of the status of the PLC,
. Rapid search for an I/O fault,
. Testing of the terminal.
The screen opposite proposes the 3 soft keys for these functions.

DIAGN.MODE STOP
TSXI/OTER

"PLC status" function


The display shows the state of the 4
indicator lights on the front of the basic
R
PLC module :
0 = light out 1 = light on

TSX

1 0 0 1
R/S CPU IO/M BAT

The screen above shows that the PLC is running and that there is a battery fault.
Light
R/S
CPU
IO/M
BAT

Out
PLC not powered
-------------------

On (steady)

Flashing

PLC running
Processor fault
I/O fault
Battery fault

PLC stopped
Watchdog overrun
Memory fault
-------

"I/O status" function


The screen opposite shows :
M0 basic module,
S
M1 1st extension module,
M2 2nd extension module,
On the top line :

I/O

. ! cnf
M0 M1 M2

module present and OK,


cnf configuration fault
(2nd extension module),
!
module fault
(1st extension module).
Press the soft key concerned to
display the states of the 5 fault
bits :
S0 = 1 exchange fault or the "OR" of all faults,
S1 = 1 sensor voltage fault,
S2 = 1 input circuit fault,
S3 = 1 short-circuit on the static outputs,
S4 = 1 internal supply fault of the relay output coils.

0 0 0 0 0
S4 S3 S2 S1 S0

"Terminal test" function


Terminal self-tests and keyboard test.
This function is the same as on power
=
up (see Section 5.2).

TER

38

SELFEST
keyboard test?

TSX T317 Operating Modes

5.10 Terminal Mode


General

TER
S

This mode permits :


. language selection,
. configuration of the printer link,
. entry of the code which authorizes
programming with the PLC running.

$*TSX T317 V1.0*


LGEPRTCOD

"Language selection" function


The required language can be selected by pressing :
. [ENG]
[FRA]
[DEU]
[ITA]
[ESP]
R
Validation by < ENTER >
This function is also available when the terminal is powered up.

LGE

"Printer link" function


On power up, the printer link is configured by default as follows :
. Speed : 600 Baud,
S
. Parity
: none
. Format : 1 start bit, 7 data bits, 2 stop bits.
The speed and parity can be modified by using the two soft keys :
[BAU] 300, 600 or 1 200 baud,
[PAR] EVEN, ODD, NO.
This printer link function is also available in the TRANSFER mode.

PRT

"Code entry" function


To authorize programming with the PLC running, the code 7533 must be entered
as follows :
=
< 7 > < 5 > < 3 > < 3 > < ENTER >
The code is then displayed on the screen.
Check that the code is correct (errors are not indicated).

COD

If it is not correct, press < CLEAR > and repeat the operation.
If it is correct, press < QUIT > and then select the Program mode.
The code is cancelled when the terminal is powered down.
Warning :

For obvious safety reasons, it is strongly recommended to stop the PLC


before making any modifications to the program. However, it is possible to
modify the program while the PLC is running in order to make modifications
that do not require the stopping of the application. All such modifications
should be made by authorized personnel only and remain the entire
responsibility of the user.
Before making any modification to the program it is essential to be fully
aware of its consequences on the application and to ensure that all the
necessary measures and precautions have been taken.

39

TSX T317 Terminal

Part 2
PL7-2 adjustement and operator
and operator dialogue
with the TSX 17-20 micro-PLC

Contents
Section

Sub-section

1 Introduction

1.1
1.2
1.3
1.4
2.1
2.2
3.1

2. Choice of Language
and Control Mode
3. Adjust Mode

4. Text Mode

40

Presentation of the terminal


Connection
Power-up
Operating modes
Choice of language
Control Mode
Accessible PL7-2 Data Objects

Page
41
42
42
43
44
44
45

3.2 Presentation of the Mode and


Associated Functions

46

3.3
3.4
3.5
3.6

48
49
50
51

Display, Modification and Forcing of Bits


Display and Modification of Words
Display and Modification of Function Blocks
Display of Grafcet Steps

3.7 Display and Modification


of the Real-Time Clock
4.1 Presentation of the Mode

52
53

Introduction

1.1

Presentation of the TSX T317 terminal

Presentation (see the description on page 25).


Soft keys
When the lower line of the screen displays the following operating mode
mnemonics, the 5 blue keys act as soft keys. With PL7-2 language, the internal
and external markings of these keys have no significance.
[TXT]
[ADJ]
[LGE]
[CTL]
[%]

TEXT mode,
ADJUST mode,
Language selection,
CONTROL mode,
Go to next screen or return to
previous screen.

TSX17 PL72 STOP


TXTADJLGECTL
R

NOP
%
N

Operation code keys : Not used with PL7-2 language.


Operand and numeric keys
Only the numeric keys are used with
PL7-2 language.
They permit the entry of addresses and
the modification of data objects.

TMR

SY/S

X/IM

CNT
FUN

SC/ [SC]

SR/ [SR]

Clear

Enter

Special keys
Enter : Validates the entry or confirms
a function and goes to the next
line,
Clear : Abandons the function and goes
to the previous line,
Quit : Abandons the mode.

CB

0
Shift

Quit

Shift, FUN and CB are not used.

Representation of keys used in this manual


Soft keys :
In the margin :
In the introduction to each mode or function, the soft keys
are shown as represented opposite :
In the text :
The same key is represented between square brackets :

ADJ

[ADJ]

Other keys : The other keys are represented between the symbols < > as shown
in the examples below :
. Enter key
........................................................................ < ENTER >
. Cursor control key ........................................................................ < >

41

Introduction

1.2

Connection
The terminal must be connected by its
cable to a TSX 17-20 micro-PLC equipped with one of the following optional
software cartridges :
. TS X P 17 20FA ( with out r eal-ti me
clock),
. TSX P17 20FB (with real-time clock).

TSX 17-20 PL7-2

The terminal is energized by the power


supply of the micro-PLC.
TSX P17 20 FA/FB

1.3

Power-up
On power-up, the terminal performs a series of self-tests, checks its RAM
memory, performs the checksum of its EPROM memory and then displays the
following screens.

Keyboard test
This test is proposed for 3 seconds. To
test the keyboard, press any key or
sequence of keys except < CLEAR >
and check for the corresponding display.
< CLEAR > abandons the function.
Connection to the PLC
During 3 seconds the terminal then tests
its connection to the PLC for correct
operation while the screen displays the
software version of the terminal.
If the connection is OK, the terminal
automatically enters the Text mode
(operator dialogue mode).
Mode selection display
To call up the Mode Selection Display
press < CLEAR >.

SELFTEST
keyboard test?

*TSX T317 V2.1*


copyright TE 88
TEXT MODE
< CLEAR >

The 1st line indicates :

TSX17 PL72 STOP


TXTADJLGECTL

. TSX 17 PL7-2 : the type of PLC and language,


. STOP/RUN : the status of the PLC, running or stopped.
If a forced bit is present,
STOP and RUN are replaced by S.F. and R.F.
. The 2nd line indicates the significance of the 4 soft keys available.
42

Introduction

1.4

Operating modes

Presentation
The operating modes available are :
TXT : TEXT mode
Permits operator dialogue by the exchange of text messages between
the PLC and the terminal (transmission/reception).
ADJ : ADJUST mode
Permits access to all the data variables in order to display or modify their
states or contents.
LGE : Language selection
Permits selection of the language in which messages are displayed by
the terminal (English, French, German, Italian or Spanish).
CTL : CONTROL mode
Permits the running, stopping or initialization of the user program.

TSX17 PL72 STOP


TXTADJLGECTL
Action on a soft key

MODE SELECTED

CLEAR
or
< QUIT >

Action on a soft key

FUNCTION SELECTED (*)

Keyboard entry : screen flashing


Validation
of the entry
ENTER

DISPLAY OF THE FUNCTION AND


ACCES TO MODIFICATION

QUIT

(*) Depending on the function selected, sub-functions may be proposed by the soft keys.

43

Choice of Language and Control Mode

2.1

Choice of Language

LGE

This mode permits selection of the language in which messages are displayed by
the terminal.

. Select one of the 5 soft keys :


[ENG] [FRA] [DEU] [ITA] [ESP]
. Validation by < ENTER >.

2.2

CTL
NOP

Francais
ENGFRADEUITA%
Francais
ESP

Control Mode
This mode enables the operator to run, stop or initialize the program. The top line
of the screen displays the version of the PL7-2 software cartridge installed on the
TSX 17-20, e.g. V1.0.
Function "RUN"
requests execution of the program.
Confirmation by < ENTER >.
Function "STOP"
requests stopping of the program.
Confirmation by < ENTER >.
The program stops at the end of its scan
cycle after updating of the outputs.

Tsx1720_V10 STOP
RUNSTOINI
Tsx1720_V10 STOP
confirm
RUN?

Function "INIT"
requests initialization of the program, whether it is running or stopped. Confirmation by < ENTER >.
Initialization of the program has the same consequences as a cold restart (see the
PL7-2 Language Summary manual) :
. Setting to 1 of system bit SY0,
. Resetting to 0 of I/Ox,I; Bi; Wi; Xi,V; Di,V,
. Resetting to 0 of Mi,V; Ci,V; Ri,I; Ri,O,
. Resetting to their preset values of Ti,V; TXTi,j,
. Resetting of function blocks to their preset values as defined in the Program
mode, any values modified in the Adjust mode are lost,
. Initialization of the Grafcet and the Drum controllers,
. Cancellation of forcings and breakpoints,
. Acknowledgement of I/O faults,
. Positioning of the execution pointer at the start of the cycle (before updating of
the inputs),
. The real-time clock/calendar is unaffected and retains its values.
If initialization is requested while the program is running, the program is initialized
as described above and the scan then restarts at the beginning of its cycle.
44

Adjust Mode

3.1

Accessible PL7-2 Data Objects


The table below gives the PL7-2 language data objects that can be accessed in
the ADJUST mode and the lists the operations that can be performed on them.
The notation used is as follows :
R for read, W for write, F for force.

Bit objects
Type

Designation

Operation
available

96

Ix,i

R/F

Output bits

64

Ox,i

R/F/W

internal Bits

256

Bi

R/F/W

System bits

24

Si

R/W (some)

Grafcet bits

96

Xi

Input bits

Max.
number

Word objects
Internal words

1024

Wi

R/W

Constant words

1024

CWi

System words

64

SWi

R/W

Register words

IWx,i

R/W

OWx,i

R/W

Function block objects


Timers

Monostables

Counters
Fast
counter
Registers

Drum
controllers
Time/date
blocks (or
"H" blocks)

32

31

Ti,P

(preset 9999)

R/W

Ti,V

(current value)

R/W

Mi,P

(preset 9999)

R/W

Mi,V

(current value)

R/W

Ci,P

(preset 9999)

R/W

Ci,V

(current value)

R/W

C31,P (preset 9999)

R/W

C31,V (current value)

R/W

Ri,I
Ri,O

(input word)
(output word)

R
R

Di,V

(active tim e of
current step)

Di,S

(n of current
step 0-15)

DTP

(date, time and


cause of last stop)

DT

(current date and time) R/W

(1)

(1)

(1)
(1)

(1) W if modification was authorized when the block was configured (option
YES).
45

Adjust Mode

3.2

Presentation of the Mode and Associated Functions

General
This mode enables the operator to modify the data according to the requirements
of the application. It does not permit any modification of the program itself.
The Adjust mode permits the following operations :
. Display, modification and forcing of I/O bits and internal bits,
. Display and modification of certain system bits,
. Display and modification of the contents of internal words, function block
parameters, and register words of intelligent modules,
. Display of constant words,
. Display of the activity and active time values of Grafcet steps.
If the PL7-2 software cartridge TSX P17 20FB containing the real-time clock is
installed on the TSX 17-20 micro-PLC, the Adjust mode also permits :
. Display and adjustment of the current time and date,
. Display of the time, date and cause of the last stop.
Accessing the mode

ADJ
S

Accesses the Adjust mode and displays the associated functions that are
available as follows :

REGLAGE PL72STOP
BITWRD[?]) X %
[BIT]

REGLAGE PL72STOP
[( H])
%

permits the display, modification and forcing of bits,

[WRD] permits the display and modification of words,

46

[[?]]

permits the display and modification of function block parameters,

[X]

permits the display of the states (active or inactive) and the active time
values of Grafcet steps,

[%]

calls up the next screen (or returns to the first one),

[[H]]

permits access to the real-time clock.

Adjust Mode

Presentation of the Mode and Associated Functions


Principle of access to the associated functions

Selection of modes :

MODE SELECTION DISPLAY

Example
Adjust mode

[ADJ]

TXTADJLGECTL
CLEAR
or
< QUIT >

Selection of functions :
Bits

[BIT]

Words

[WRD]

Function blocks

[?]

Grafcet steps

[X]

Real-time clock

[H]

ADJUST MODE SCREEN

BITWRD( [?]) X %

[( H])

Selection of sub-functions :
Bits

(I,O,B,SY)

Words

(W,COM,SW,

SUB-FUNCTION SELECTION SCREEN

CW,IW,OW)
Function blocks

(T,M,C,D,R)

Real-time clock

(DTP,DT)

Entry on the numerical keypad


of the required address.

CLEAR

THE SCREEN FLASHES :


. Display by default of the variable
with the address 0

Validation
of the entry
ENTER

Display of the next


variable

<>

Display of the previous


variable

<>

. DISPLAY OF THE VARIABLE


. ACCES TO MODIFICATION

Q
QUIT

47

Adjust Mode

3.3

Display, Modification and Forcing of Bits

BIT
R

Permits access to the following bits :


[I]
[O]
[B]
[SY]

input bits,
output bits,
internal bits,
system bits.

REGLAGE PL72STOP
I O B SY

After pressing one of these 4 soft keys, the address of the bit required can be
entered and must then be validated by < ENTER >.
The bit is displayed in the byte to which it belongs and is indicated by an asterisk *
(or by F if it is forced).

I/O bits and internal bits


[MOD] . modifies the state of the bit if it
is an output bit or internal bit,
. gives access to the keys permitting the forcing or unforcing of the bit.
[F:0]

Forces the bit to 0 and it stays in


this state until it is unforced.

[F:1]

Forces the bit to 1 and it stays in


this state until it is unforced.

I00,02=0
*
MOD
01010000
I00,02=0
MODF:0F:1UNF
I00,02=1
F
MOD
01010100

[UNF] Unforces the bit.

System bits
[MOD] Modifies the state of the bit.

Note :

SY08
MOD

=1
*
00100101

SY08
MOD

=0
*
00100100

. In the case of initialization by the program (SY0 set to 1) or by the terminal (by [INI]
in the Control mode), all the modifications m ade in the Adjust m ode are lost.
. The states of bits that have been forced have priority over the states that are
defined by the program.
. The states of output bits, internal bits and system bits that have been modified do
not have have priority over the states that are defined by the program.
. If a forced bit is present, the display of the status of the PLC, indicated by RUN or
STOP, is replaced by R.F or S.F.
. The forcing of output bits has no effect unless the PLC is running, or unless the
PLC is stopped and SY8 = 0. If the PLC is stopped and SY8 = 1, all the outputs
are reset to 0.

48

Adjust Mode

3.4

Display and Modification of Words

WRD
S

Permits access to the following words :

REGLAGE PL72STOP
W COMSW CW %

[W]

REGLAGE PL72STOP
IW OW
%

internal words,

[COM] common words (not used with the TSX 17-20),


[SW]

system words

[CW]

constant words (display only),

[IW]

input register words of intelligent modules,

[OW]

output register words of intelligent modules.

After pressing one of these 4 soft keys, the address of the word required can be
entered and must then be validated by < ENTER >.

[MOD] permits the modification of the


word (in codes D and B only,
see below).
Note :

W0010=+
56
MODCNV

- The + sign is entered by pressing < O >


- The - sign is entered by pressing < A >

[CNV] converts the value of the word into the following codes :

Code

Identification

Decimal
(code by default)

letter D

Hexadecimal

letter H

BCD

letter B

Message

letter M

Binary

no letter

49

Adjust Mode

3.5

Display and Modification of Function Blocks

[( ?]
)
=

Permits access to the following function blocks.


Modification is not possible unless the function blocks were declared modifiable
(YES) when the program was entered.

REGLAGE PL72STOP
( M ]) [
( C ]) [
( D ]) %
([T ]) [

REGLAGE PL72STOP
%

[( R])

[T]

timer

: 0 to 31

[M]

monostable

: 0 to 7

[C]

counter
: 0 to 31
(counter C31 is the fast counter/timer (FC)

[D]

drum controller : 0 to 7

[C]

register

: 0 to 3

After pressing one of these soft keys, the number of the function block required
can be entered and must then be validated by < ENTER >.

[MOP] permits modification of the preset value of the function block.

T00 P=9999X 1mn


MOPV=9999 MOV
Timer

[MOV] permits modification of the current value of the function block.

M01 P=0010X 1mn


MOPV=0007 MOV
Monostable

P = preset value (0 to 9999)


V = current value (0 to 9999)

C02 P=0500
MOPV=0300
Counter

Time base : 1mn, 1s, 100ms, 10ms.

50

MOV

Adjust Mode

Display and Modification of Function Blocks (Contd.)


Drum controller (display only)
S

: number of current step


(0 to 15),
: number of steps (1 to 16),

L
t

D02 t=0064X 1mn


WRD S=000 L=016

: active time of current step


(in the time base displayed).

displays the next drum,


< >
<>
displays the previous drum,
< WRD > displays the word defining the
bit states of the current step,
<>
<>

D02
STEP=00
0001101001000101

displays the bit states of the


previous step,
displays the bit states of next
step.

Registers (display only)


The input word I and the output word O
are displayed in decimal code together
with the length of the register -1.

3.6

X
NOP

R02 15 I=+32767
FIFO
0=-32768

Display of Grafcet Steps


Permits the display of the activity of a step and its active time value.
Pressing this key permits entry of the number of the step required, which must
then be validated by < ENTER >.
1
0
t

= the step is active,


= the step is inactive,
= the active time value of the step in
the time base displayed,

X015=1
B
t=0010X

1s

= the step is blocked, i.e. a breakpoint has been defined on this step by a
programming terminal. To delete the breakpoint, initialize the PLC as
described on page 44.
< > displays the previous step, < > displays the next step.

51

Adjust Mode

3.7

Display and Modification of the Real-Time Clock

( H)
R

Permits access to the main functions


of the real-time clock (available only in
the TSX 17-20 with the TSX P17 20FB
software cartridge).
[DTP] permits the display of the date,
time and code number of the
last stop.
[DT]
permits the display or modification of the current date and time.

REGLAGE PL72STOP
DTP DT
1

DOP
YEAR=1988
YEAM& DH& MS& N
2

DAT
MOD

YEAR=1988
%
3

DAT
YEAR=1988
YEAM& DH& MS& N

Display of the date and time


On screens and above, by using the following keys :

[YEA] displays the year,


[M&D] displays the month and day,
[H&M] displays the hours and minutes,

DOP
YEAR=1988
YEAM& DH& MS& N

[S&N] displays the seconds and :


. code of the last stop (*) if [DTP]
was selected,
. N of the day of the week if
[DT] was selected (**).

DOP
M&DAY=0705
YEAM& DH& MS& N

Or on screens 1 or 2 above, by using the keys < > < >.


Modification of the date and time

On screen 2 above :

[MOD] permits modification of the parameter displayed. After modification, validate by < ENTER > and display the next parameter by < >.
(*) Reminder of stop codes :
1 = stopped by the operator,
4 = stopped by a power break.
(**)
1
2
3
4
5
6
7

52

Reminder of N of weekdays :
= Monday,
= Tuesday,
= Wednesday,
= Thursday,
= Friday,
= Saturday,
= Sunday.

DAT
MOD

YEAR=1988
%

Year

DAT
MOD

M&DAY=0711

Month, day

DAT
MOD

H&MN=1127

Hour, minute

DAT
MOD

S&N =3601

Seconds and N of the day of the week.


(The 0 is not significant).

Text Mode

4.1

Presentation of the Mode

Purpose
The TEXT mode (which is selected by default) allows the TSX T317 to be used
as an operator dialogue terminal for the exchange of messages with the TSX 1720 (display of alphanumeric messages from the TSX 17-20 and entry of numeric
messages on the keyboard of the TSX T317).
Accessing the Text mode
The TEXT mode is selected either :
. Automatically on connection to the
R
TSX 17-20 micro-PLC,
. Or by pressing the [TXT] soft key on
the Mode Selection display.
< ENTER > clears the screen,
< CLEAR > abandons the the Text mode and returns to the Mode Selection
Display.

TXT

TEXT MODE

Reception of a message
The user program can send a message (limited to 30 characters) to the terminal
by a using a TER type Text function block programmed in the transmission mode
(inputs S and O set to 1).
On reception, the message is displayed
from left to right on the two lines of the
LCD display.

VALVE 1 OPEN
VALVE 2 CLOSED

Transmission of a message
The message to be sent to the TSX 17-20 (limited to 30 characters) is entered by
using the numerical keypad of the terminal (0 to 9) and the keys < A > for the plus
sign (+) and < O > for the minus sign (-).
< CLEAR >

pressed once, deletes the last character entered,


pressed twice, deletes all the characters entered,
pressed 3 times, returns to the Mode Selection Display.
validates and transmits the message.

< ENTER >

For the message to be received by the PLC, the user program must contain the
necessary TER type Text function block set to the reception mode (inputs S and
I set to 1).
Control characters
These characters can be transmitted by the Text block of the PLC in order to
position the cursor on the screen for the entry of a reply.
DEL (7FH)
BS (08H)
HT (09H)
VT (0BH)
LF (1AH)
CR (0DH)

:
:
:
:
:
:

clears the screen and positions the cursor top left,

used to position the cursor on the screen,


positions the cursor bottom left.

53

TSX T317 Terminal

Appendices

Contents
Section

Sub-section

Appendices

A.1 TSX T317 Technical Specifications

55

A.2 TSX17 I/O Addressing

56

A.3 PL7-1 Summary of Modes and Functions


A.4 PL7-1 Operation Code and Operand
Entry Guide
A.5 PL7-1 Operation Code and Operand
Associations
A.6 PL7-1 Instruction Execution Times

57
59

61

A.7 PL7-2 System Bits and Words

62

A.8 TSX T317 Error Messages

63

54

Page

60

Appendices
A.1 TSX T317 Technical Specifications
General
Dimensions : .......................................
Weight : ...............................................
Storage temperature : .........................
Operating temperature : ......................
Power supply : ....................................
Power consumption : ..........................
PLC link : .............................................
Printer link : .........................................

Tape recorder link : .............................


LCD display : .......................................
Keyboard : ...........................................

154 x 91 x 32 mm,
0.430kg
-20 to +70C without condensation,
0 to + 40C without condensation,
+5V supplied by the PLC,
80mA,
RS485,
RS232,
Protocol : transmission by monitoring the BUSY or
DTR signals.
Format :
1 start bit,
7 data bits,
2 stop bits.
Speed : 300, 600 or 1 200 baud,
Parity : odd, even or none,
Audio,
2 lines of 16 characters,
24 keys.

The back of the terminal is equipped with a magnet so that it can be attached to
any metallic surface.
Printer connections
Printer with DTR
Connect
and

Printer with BUSY

TSX T317 terminal

Microline
82 A

9-point Sub-D
connector

7 (gray)
9 (orange)
2
SG
RD

11

gray

SSD

BUSY

SG

yellow

0V

RD

black

TD

white

DSR

DTR

orange

7
3
6
8
9

Cable reference : TSX T317 CB1 020

Audio tape recorder connections


Tape recorder

TSX T317 terminal

5-pin circular
connector

9-point Sub-D
connector

1 and 4
1

2
3

Audio output
0V

1
3

3 and 5

Audio input

Cable reference : TSX CB3 015

55

Appendices
A.2 TSX 17 I/O Addressing
Addressing of discrete I/O
Ix,i
Ox,i

: Input bit,
: Output bit,

= the
0
0
.
.
.
.

number of the module, which can be :


to 2 for the TSX 17-10/20 with PL7-1 language,
to 3 for the TSX 17-20 with PL7-2 language :
0 for the basic micro-PLC,
1 for the 1st extension,
2 for the 2nd extension,
3 for the 3rd extension.

= the number of the I/O point, which can be :


00 to 23 for the inputs,
00 to 15 for the outputs.

Use of Input I0,00 and Output O0,00


These 2 I/O points can be configured for 2 different uses, as follows :
I/O point

Use by default

Use after configuration

Input I0,00

Normal input

"RUN/STOP" input controlling the


running or stopping of the PLC

Output O0,00

Normal output

"SECU" safety output for use in


external safety circuits

Use of event-triggered inputs I0,24 and I0,25 (TSX 17-20 only)


These 2 inputs can be configured for 2 different uses, as follows :
Input

Use by default

Use after configuration

Input I0,24

Normal input

Event-triggered input

Output O0,25

Normal input

Event-triggered input

Note :

Due to the reduced filtering of these inputs, it is necessary to use shielded cables
and to connect the shielding to the screw-terminal provided on the front of the PLC.

Addressing of the I/O register words of intelligent modules


Wx,i : Input word,
OWx,i : Output word,
x
i
Note :

56

= the number of the module (1 to 3),


= the number of the word (0 to 7).
The intelligent modules also have I/O bits which are addressed in the same way as
for the discrete I/O extensions.

Appendices
A.3 PL7-1 Summary of Modes and functions
CNF : Configuration mode
Permits the configuration of the memory, the time bases, the preset values, the
I/0, and the fast counter/timer C15.
MEM/CLM = clears the memory (configuration, program and data),
SIZ/CNV

= converts the size of the program memory,

Ti,B

= selection of the time bases of timers,

ti,P/Ci,P

= selection of the preset values of timers and counters,

I/O

= configuration of the I/O extensions and special I/O,

C/T

= configuration of C15 as a fast counter or timer.

ADJ : Adjust mode


Permits the reading, writing and modification of the variables and the forcing of
bits.
Table of variables and functions available
Type
Input
Output
Step bit
internal bit
System bit
Fault bit
Timer
Counter
Step counter
Register
Fast counter
Event-triggered
inputs

Variable
Ix,i
Ox,i
Xi
Bi
SYi
Sx,j
Ti
Ci
SCi

Read
yes
yes
yes
yes
yes
yes
TiB,V,P
CiV,P
SCi,j

SRi
C15

SRi,j
V,P

I0,24/I0,25

yes

Modify
no
yes
no
yes
yes
yes
V,P
V,P
SCi,j
CU/CD
SRi,j
V,P
no

Force
yes
yes
no
no
no
yes
no
no
no
no
no
no

PRG : Program mode


Permits the reading, writing and modification of the user program, which may be
composed of :
FST
= fast task (TSX 17-20 only)
SEQ

= master task (sequential)

57

Appendices
PL7-1 Summary of Modes and Functions (Contd.)
PRG : Program mode (contd)
In both these tasks (FST and SEQ) the operator can :
MOD

= modify one or more lines of program,

INS

= insert (write) one or more lines of program,

DEL

= delete one or more lines of program,

END

= display the last memory address,

SEL/RST/CPY/CUT
= select, cancel the selection, copy or delete a section of the program,
ADR

= access a memory address,

VIS

= display the state of an operand,

RUN/STO/INI
= run, stop or initialize the program,
SCH
= search for all or part of an instruction,
CLP
= clear (delete) the program (the configuration is retained).

TRF : Transfer mode


This mode permits :
PRT

= printing of the program and/or the configuration,

TR/EPR = transfer of the program to an audio tape recorder cassette or


EEPROM memory cartridge, and comparison and protection of the
stored program.

TER : Terminal mode


This mode permits :
LGE

= selection of the display language (ENG, FRA, DEU, ITA, ESP),

PRT

= configuration of the printer link,

COD

= entry of the code 7533 which permits on-line programming.

DGN : Diagnostic mode


This mode permits :

58

TSX

= display of the PLC status lights,

I/O

= display of the I/O status lights and fault bits,

TER

= terminal self-test and keyboard test.

Appendices
A.4 PL7-1 Operation Code and Operand Entry Guide
Operation
codes

Keystrokes

Operands

Keystrokes

L / LN

..

%
N

Ii,j

.....

A / AN

..

%
N

Oi,j .....

O / ON

..

%
N

Bi ......

XO

SYi .....

Sx,i .....

XO
P

.....
......

5
Shift

......

Ti

......

......

Ci ......

.....

S*

SCi [SC] ..
Shift

R*

.....

=/=N

..

SCi,j .....
%
N

2
3

SRi [SR] ..
Shift

=*

.....

SRi,j .....

CU

.....

IM ......

3
6
Shift

CD
H

.....

Xi

......

%
N

......
Shift

JMP

....

XO

XO

LAB

....

.....

NOP

NOP

....

NOP

EP
NOP

Remarks :

= * = "i" ..

* "i" ..

# .......

XO

XO

XO

. The comma is inserted


automatically,
. 2 keystrokes on the same key
can be replaced by :

and
= * = POST

Shift

key

59

Appendices
A.5 PL7-1 Operation Code and Operand Associations
Operands
Operations

I/Oi,j Bi SYi Ti

Ci

SCi SCi,j SRi SRi,j IM


[SC] [SR]

Xi

L, LN

X X(k)

A, AN

O, ON

XO

X X(k)

S*

R*

=,=N

=*

CU

except
C15

CD

JMP
LAB

from 1 to 127

=*= "i"

initial steps

- * - "i"
# "i"

Grafcet steps and transitions


from 1 to 62

=*=

Post-processing

EP
NOP
X = Possible associations
- = Impossible associations

60

Appendices
A.6 PL7-1 Instruction Execution Times
General
The difference between the minimum and maximum execution times depends on
the state of the operand scanned by the processor, the appearance or not of a
rising or falling edge, and whether or not compilation or interpretation are
necessary.
Table of execution times
Operation code
L,LN

A,AN,O,ON
XO
P
S

S*
R*
=*
=,=N
CU,CD

H
N
JMPI
LAbi
= * =, - * #
NOP
EP

Operand

Minimum
(sec)
I; O; B; SY; Xi; T; S
6 (*)
C (kxxxx)
40
SCi,j; SRi,j
18
I; O; B; SY; X; IM; T; S
2
SCi,j; SRi,j
5
I; O; B; SY; X; IM; T; S
4
SCi,j; SRi,j
6
B
19
I; O; B; SY; X
2
T
2
C
2
SCi,j; Sri,j
2
I; O; B; SY; X
2
T
2
C
2
SCi,j; SRi,j
2
I; O; B; X
2
I; O; B; X
2
I; O; B; X
21
I; O; B; X
6
T; SRi,j
32
C
14
SCi
14
SRi
14
T
26
3
2
11
2
2
2

Maximum
(sec)
6 (*)
51
18
6
6
6
6
21
6
50
35
5
6
31
35
18
19
20
21
6
50
40
19
27
28
3
23
14
14
2
2

(*) If a program is written in the Fast task, add 8 microseconds to the above execution times
for the operation codes L and LN assigned to the operands I, O, B, SY, X, T and S.

61

Appendices
A.7 PL7-2 System Bits and Words
System bits
Bit

Function

Set/Reset
(*)
S or U S
S or U S

Initial
state
0
0

U
S
S
S
U

outputs forced to 0
I/O fault
battery absent or defective
display of the contents of SW16
C31, V = C31, P
requests reactivation of transistor
outputs
1 = overflow of unsigned arithmetic or
circular shift

U
S
S
U
SU

0
1
0
0
0

US

SU

SY18
SY19
SY20

1 = arithmetic overflow (16 bits)


1 = inhibition of fast task
1 = index overflow

SU
U
SU

0
1
0

SY21
SY22
SY23

1 = initialization of Grafcet
1 = resetting of Grafcet
1 = freezing Grafcet

US
US
US

0
0
0

SY00
SY01

1 = cold restart
1 = hot restart

SY02
SYO5

SY08

1 = freezing of real-time clock


100ms time base
1s time base
1mn time base
0 = outputs saved when program stops

SY09
SY10
SY13
SY14
SY15
SY16

1
0
1
1
1
1

SY17

=
=
=
=
=
=

(*) Abbrevations used :


S
= set to 1 or 0 by the system,
A
= set to 1 or 0 by the user,
SU
= set to 1 by the system and reset to 0 by the user,
US
= set to 1 by the user and reset to 0 by the system.

System words
Word
SW16
SW17
SW18
SW24
SW41
SW50
SW53
SW54
SW57
SW58
SW59

Function
word displayable in BCD on the optional
digital display module TSX 17 ACC2
checksum of the internal RAM of the PLC
checksum of the memory cartridge
address of the PLC on the UNI-TELWAY bus
length of the longest scan cycle (base 10ms)
century, year, month, day, hour, minute,
to seconds, tenths of seconds and stop code
of RT clock (current date and time in BCD)
century, year, month, day, hour, minute,
to seconds, tenths of seconds and day of the
week of RT clock (date and time of last stop
in BCD)
current time of the day in m inutes (0 to 1439)
current day of the year (0 to 366)

W = written
R = read
62

Written or read by
System
Program
W/R
W
W

R
R

W/R
R

R/W

Appendices
A.8 TSX T317 Error Messages
Message

Explanation

CNV impossible

Conversion of a 24K memory to 8K is impossible because


the program occupies more than 8K.

Tape Rec fault X

X = 0 audio signal
X = 1 checksum
X = 2 number of bytes
X = 3 comparison
X = 4 recognition (header)

EPROM fault

Fault in the EPROM memory of the terminal.

RAM fault

Fault in the RAM memory of the terminal.

Prog. mem. fail

Memory not initialized. Clear the memory.

Imposs. in RUN

Stop the PLC and repeat the operation.

Full memory !

The memory is full. If possible (with TSX 17-20 only) convert


the memory size from 8K to 24K.

Prog. protected

The program cannot be read because it has been protected


by a transfer in the "PRO" mode to or from an EEPROM
memory module (see Part 1, Section 5.7 "EEPROM Transfer
Function").

Not auth. -code?

Programming in RUN is not authorized. Stop the PLC and


enter code 7533 in the Terminal mode (see Part 1, Section
5.10 "Code Entry Function").

TSX refuses

The terminal request is refused by the PLC.


Example : If input I0,00 has been configured as a RUN/
STOP input and is in the STOP position, a RUN
request from the terminal will be refused by the
PLC.

No reply from TSX The terminal is not compatible with the PLC to which it is
connected.

63

Index

Pages

64

Adjust mode (with PL7-1 language) .............................................................................


37
Adjust mode (with PL7-2 language) .................................................................... 45 to 52

Battery ..............................................................................................................

Clearing the memory .............................................................................................. 28, 30


Clearing the program ...................................................................................................
33
Configuration .......................................................................................................... 30, 31
Copying or deleting part of the program ......................................................................
33

Diagnostics .................................................................................................................. 38
Display of internal bits B240 to B255 .....................................................................
6, 21
Display of variables ................................................................................
37, 42, 48 to 51

Event-triggered inputs ................................................................................... 4, 10, 31, 56

Fast task ...........................................................................................................


6, 10, 32
Faults ............................................................................................................. 6, 20, 21, 38
Fault bits ...........................................................................................................
5, 12, 38
Forcing .............................................................................................................. 37, 42, 48

Grafcet ............................................................................................

Initialization of the Grafcet ................................................................................... 22, 37, 44


Initialization of the PLC .................................................................................. 20, 34, 37, 44
Insertion ....................................................................................................................... 32
Internal bits ..........................................................................................................
5, 7, 21
I/O addressing ........................................................................................................
4, 56

Master task .......................................................................................................


9, 10 ,32
Mains power break/return ...............................................................
6, 19, 20, 22, 23, 39
Memory size conversion ..............................................................................................
30
Modification of variables ......................................................................... 37, 42, 48, to 51

On-line programming (code 7533) ...................................................................

Printing ...........................................................................................................
3, 5, 39, 55
Program and data storage ...........................................................................................
20
Program jumps .............................................................................................. 8, 10, 11, 23
Program memory ........................................................................................... 11, 28, 30, 32
Program modification ...................................................................................................
32
Protection of the program ............................................................................................
36

Real-time clock ............................................................................................................ 52


RUN/STOP input ........................................................................................... 4, 20, 31, 56

Scan cycles ............................................................................................................


9, 10
Search function ............................................................................................................ 33
SECU (safety) output ............................................................................................. 31, 56
System bits .............................................................................................................
6, 62
System words (PL7-2) .................................................................................................
62

Text mode (PL7-2) ....................................................................................................... 53


Transfers to/from EEPROM memory ..................................................................... 20, 36
Transfers to/from tape recorder ........................................................................ 35, 41, 55

Watchdog ...............................................................................................................

19, 20, 38

6, 8, 9, 17, 19, 22, 51

39, 43, 46

9, 38

Вам также может понравиться