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

TSX T317 Terminal

Contents
Section
X
1. PL7-1 Language
Part 1.
PL7-1 programming for the
TSX 17-10/17-20 micro-PLCs

Sub-section
1.1 Presentation
Page
3
1.2 I/O Addressing 4
1.3 Operands 5
1.4 Operation Codes 7
1.5 PLC Scan Cycles 9
2. PL7-1 Language : 2.1 Characteristics 11
Structure and Functions 2.2 Timer 12
2.3 Counter 13
2.4 Shift Register 14
2.5 Step Counter 15
2.6 Fast Counter/Timer (TSX 17-20 only) 16
3. PL7-1 Language : Grafcet 3.1 Characteristics 17
3.2 Program Structure 18
4. Program Utilities 4.1 Mains Power Break/Return 19
4.2 Initialization of the PLC 20
4.3 Program and Data Back-up Storage 20
4.4 RUN/STOP Input and SECU Output 20
4.5 Diagnostic Aids 21
4.6 Application Operating Modes 22
4.7 Programming Guidelines 23
4.8 Programming Examples and Rules 24
5. TSX T317 Operating Modes 5.1 Presentation of the TSX T317 Terminal 25
5.2 Power-up 28
5.3 Presentation of the Operating Modes 29
5.4 Configuration Mode 30
5.5 Program Mode 32
5.6 Control Mode 34
5.7 Transfer Mode 35
5.8 Adjust Mode 37
5.9 Diagnostic Mode 38
5.10 Terminal Mode 39

2
1 PL7-1 Language 1

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 O0,01 Boolean programming sheet


Address Code Operand Description
S0000 L I0,01 Stop PB
S0001 A I0,02 Sensor S1
I0,03 O0,02 S0002 = O0,01 Alarm light A2
S0003 L I0,03 Limit switch L3
S0004 ON I0,04 Detector D2
S0005 = O0,02 Klaxon
- - –
I0,04 - - –
- - –

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 S0015 -*- 03 Step 3
S0016 L B012 Filling
B012 S0017 # 04
S0018 # 05
4 5 S0019 -*- 04 Hopper 8
S0020 L I0,07 Level reached
S0021 # 06
I0,07 B015
S0022 -*- 05 Hopper 9
S0023 L B015 Level reached
6 7 S0024 # 07
S0025 -*- 06 Hopper 10
=1 - - - –

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.

3
1 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 Event
Type of I/O Inputs Outputs Inputs
TSX 17-10/20 basic 20 from I0,00 from O0,00 I0,24 (*)
PLC with 20 I/O (12I + 8O) to I0,11 to O0,07 I0,25 (*)

TSX 17-20 basic 34 from I0,00 from O0,00 I0,24


PLC with 34 I/O (22I + 12O) to I0,21 to O0,11 I0,25

TSX 17-10/20 basic 40 from I0,00 from O0,00 I0,24 (*)


PLC with 40 I/O (24I + 16O) to I0,23 to O0,15 I0,25 (*)

Extension block 34 from Ix,00 from Ox,00


for TSX 17-10/20 (22I + 12O) to Ix,21 to Ox,11

Extension block 40 from Ix,00 from Ox,00


for TSX 17-10/20 (24O + 16O) to Ix,23 to Ox,15

Extension module 8 from Ix,00


for TSX 17-10/20 Inputs to Ix,07

Extension module 6 from Ox,00


for TSX 17-10/20 Outputs 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 Normal input "RUN/STOP" input controlling the
I0,00 running or stopping of the PLC

Output Normal output "SECU" safety output for use in


O0,00 external safety circuits

4
1 PL7-1 Language 1

1.3 Operands
List of bit operands

Maximum number Can be


Type Address TSX 17-10 TSX 17-20 written Section
Input bits Ix,j 72 72 yes 1.2
Output bits Ox,j 48 48 yes 1.2

Event-triggered I0,24 -- 1 no 1.5


input bits I0,25 -- 1 no 1.5

Internal bits* Bi 256 256 yes --

System bits SYi 24 24 some 1.3

Grafcet Xi 62 62 yes 3.1


step bits

Intermediate IM 1 1 no 2.1
memory bits

Fault bits Sx,j 3x5 3x5 no 4.5

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

List of function operands

Maximum number Can be


Type Address TSX 17-10 TSX 17-20 written Section

Timers Ti 32 32 yes 2.2

Counters Ci 15 15 yes 2.3

Fast counter C15 -- 1 yes 2.6

Shift registers SRi 8 8 no 2.4

Step counters SCi 8 8 no 2.5

List of bit operands extracted from functions

Maximum number Can be


Type Address TSX 17-10 TSX 17-20 written Section

Shift register SRi,j 8 x 16 8 x 16 yes 2.4


bits

Step counter SCi,j 8 x 256 8 x 256 yes 2.5


bits

5
1 PL7-1 Language

Operands (Cont’d.)
List of system bit operands

Initial Set/
Bit Function state Reset (*) Section

SY00 1 = cold restart (power return with loss 0 S or 4.1


of data). Resets the data to zero. U→S
SY01 1 = hot restart (power return without loss 0 S or 4.1
of data) U→S
SY05 Time base : 100ms S
SY06 Time base : 1sec S
SY07 Time base : 1min S
SY08 0 = outputs saved when PLC stops 1 U
SY09 1 = outputs reset with PLC running 0 U
SY10 0 = I/O fault or configuration fault 1 S 4.5
SY13 1 = battery absent or defective S
SY14 1 = the output LEDs show the state 0 U 4.5
of internal bits B255 to B240 for
TSX 17-20, or B255 to B248 for
TSX 17-10 with 20 I/O
SY15 1 = the rapid counter C15 (**) is 0 S→U 2.6
equal to its preset value
SY16 1 = requests the reconnection every 0 U→S
10 seconds of the static outputs
disconnected by overvoltage or
short-circuit
SY17 1 = the value of a counter 0 S 2.3
(CO to C15) < K (constant)
SY19 0 = validation of the fast task 1 U 1.5
SY21 1 (by the operation code SET in the 0 U→S 3.2
Pre-processing section) = initia- 4.6
lization of the Grafcet, i.e. active
steps reset to 0 and initial steps
set to 1
SY22 1 (by the operation code SET in the 0 U→S 3.2
the Pre-processing section) = reset- 4.6
ting of the Grafcet, i.e. deactivation
of all the steps
SY23 1 (by the operation code SET in the 0 U→S 1.4
Pre-processing section) = valida- 3.2
tion of the Grafcet, i.e. validates 4.6
a presetting of the Grafcet (SET Xi,
RESET Xi), and freezes the Grafcet
if held at 1
(*) 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.

6
1 PL7-1 Language 1

1.4 Operation codes


Operation Associated
code Significance operands
L Read the state of .................. I,O,B,SY,T,C
LN Read the inverse state of .................. SC,SR,X,S
A AND the state of .................. I,O,B,SY,T
AN AND the inverse state of .................. SC,SR,IM,X,S
O OR the state of .................. I,O,B,SY,T
ON OR the inverse state of .................. SC,SR,IM,X,S
XO Exclusive OR : the result is equal to "1" when I,O,B,SY,T
one of the two operands concerned is equal SC,SR,IM,X,S
to "1"
N Inverses the logic result of the processor. None
Can be written anywhere in the list of
instructions
= - Assign the result to : ............................. I,O,B,SY,SR,X (*)
- Starts a timer if state 1 : ............................ T
=N - Assign the inverse result to : .................... I,O,B,SY,SR,X (*)
- Starts a timer if state 0 : ............................ T
P Detects an edge on any operand B
(duration, 1 scan cycle), must be used with
an internal bit Bi :
- rising edge L.... PBi
- falling edge LN.. PBi
S Sets an operand to 1 : ............................. I,O,B,SY,S
(Set) To reset it to 0 use code R (except for
certain SY bits that are reset by the system)
- Starts a timer : ............................. T
- Sets a counter to a value K : .................... C
- Sets a step counter step to 1 : .................. SC
- Sets a register bit to 1 : ............................. SR
- Sets a Grafcet step to 1 : .......................... X (*)
R Sets an operand to 0 : ............................. I,O,B,SY,S
(Reset) To reset it to 1 use code S
- Initializes a timer : ............................. T
- Sets a counter to 0 : ............................. C
- Sets the 16 bits of a register to 0 : ............ SR
- Sets a register bit to 0 : ............................. SR
- Sets a Grafcet step to 0 : .......................... 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 Pre-
processing section.

7
1 PL7-1 Language

Operation codes (Cont’d.)


Operation Associated
code Significance operands
SET * These 3 operation codes have the I,O,B,X
RST * 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.
Ex : = * B018 is equivalent to :
= of B018 to B023
B018 = the first bit,
B023 = the last bit (3 x 8) - 1
CU Increments (on a rising edge) a counter, C (except C15 in a
a step counter, or a register. TSX 17-20),SC,SR
CD Decrements (on a rising edge) a counter, C (except C15 in a
a step counter, or a register. TSX 17-20),SC,SR
H At state "1", freezes the value of a timer T
JMPi Program jump to LABi. JMPi and LABi None, See Section 2.1
LABi must have the same number (i = 1 to 127).
This number is not related to the line
number.
NOP Non-operative instruction None
EP End of program None

Grafcet instructions :
Processing section in
Instruction Significance which it can be used
=*=i Represents the initial step i (*) Sequential
(i = 1 to 62)
_*_i Represents the step i (*) Sequential
(i = 1 to 62)
#i Activates step i and deactivates the Sequential
current (upstream) step
# Deactivates the current step without Sequential
activating a new step
= * = POST Indicates the start of the Post-processing Post-processing
section
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.

8
1 PL7-1 Language 1

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 L I0,01
S0001 A I0,02 Program
..... . .... Scanning
EP

Updating of the outputs

Instruction List (or Boolean) language with Grafcet

Terminal dialog

Reading of the inputs

S0000 L SY00
S0001 A SY01 Pre-processing
..... . ....

S0052 =*= 01
S0053 L B0004
Sequential processing
S0054 A I0,03
(Grafcet)
S0055 # 02

S0000 L SY00
S0001 A SY01
Post-processing
..... . ....
EP

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.

9
1 PL7-1 Language

PLC Scan Cycles (Cont’d)


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 L I0,24
Scanning of the Fast
F0001 A B108
..... . .... task program
EP

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
2 PL7-1 Language : Structure and Functions 2

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

A memory address An operation code + An operand


Example : S 0004 A I0,03

A list of instructions is divided into 2 parts : L I 0,04 1


. 1 One part for the test instructions, A B 012
. 2 One part for the action instructions. =
=N
O
B
0,01
025
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 925 (from S0000 to S0924) ——


TSX 17-20 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 Equivalent program (without the use of "IM")
L I0,01 L I0,01 I0,01 I0,02 O0,06
A I0,02 A I0,02
LN I0,03 = B117
A I0,04 LN I0,03
O IM A I0,04
= O0,06 O B117 I0,03 I0,04
... ..... = O0,06
... .....

11
2 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 32 (from T00 to T31)
Time bases (Ti,B) 4 (10ms, 100ms, 1s, 1mn)
Preset value (Ti,P) 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
I0,01 :
= T00
L T00
T00 :
= O0,01
.........
O0,01 :

Time delay

Use of the operation codes S and R


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

Remarks : . 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 adjust-
ment value is lost).

12
2 PL7-1 Language : Structure and Functions 2

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 15 (from C00 to C14)
Preset value (Ci,P) 0000 to 9999

Test operation codes


L CiK tests of the state of counter i in relation to constant K
LN CiK (from 0000 to 9999).

Action operation codes


S CiK set counter i to constant K (from 0000 to 9999)
R Ci reset the counter to 0
CU Ci incrementation on a rising edge
CD Ci 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 L C00 K00123
A SY 17

Counter C00 equal to 123 Counter C00 less than 123

L C00 K00123 L C00 K00123


ON SY 17

Counter C00 different from 123 Counter C00 more than or equal to 123

LN C00 K00123 L C00 K00123


AN SY17 O SY 17

Counter C00 more than 123 Counter C00 less than or equal to 123

Remarks . 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
2 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 8 (from SR0 to SR7)
Number of bits in a register 16 (from SRi,00 to SRi,15)

Test operation codes


L, LN, A, AN tests of a register bit,
O, ON, XO

Action operation codes


= SRi,j assignment of a state (or its inverse) to a register bit,
= N SRi,j
S SRi,j sets a register bit to 1,
R SRi,j resets a register bit to 0,
R SRi resets the 16 bits of a register to 0,
CU SRi on a rising edge, shifts the bits one place to the left,
CD SRi on a rising edge, shifts the bits one place to the right.

Operation
Initial State : 1 1 0 0 0 0 0 0 1 1 0 1 1 1 0 0
CU SRi shifts the
Bit 15 Bit 00
bits one place to
the left
The bit shifted out : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(bit 15) is lost 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 SR 0,15
= SR 0,00
L SY 06
CU SR 0

Remark : . On a cold restart, the bits of each register are reset to 0.

14
2 PL7-1 Language : Structure and Functions 2

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 8 (from SC0 to SC7)
Number of steps of a step counter 256 (from SCi,000 to SCi,255)

Test operation codes


L, LN, A, AN tests of the state of a step of a step counter
O, ON, XO

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 0 1 2 3 2 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 I 0,03
O SC 0,003 setting to step 000
S SC 0,000
L I 0,02 incrementation
CU SC 0
L SC 0,000
= O 0,01
L SC 0,001 activation of the outputs
= O 0,02
L SC 0,002
= O 0,03
Remark : On a cold restart, the active step is reset to 0 and step 0 of each step
counter is set to 1.

15
2 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 . 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.

16
3 PL7-1 Language : Grafcet 3

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 initial step i (*),
-*-i step i (*),
# deactivation of the current step without activation of any other step,
#i activation of step i after deactivation of the current step,
= * = POST start of Post-processing and end of Sequential processing,
xi 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 Sequence selection


=*= 01 -*- 04
L I0,01 1
L I0,03 4
# 02 # 05
-*- 02 L I0,04
I0,01 I0,03 I0,04
L I0,02 # 06
# 03 -*- 05
2 5 6
-*- 03 L I0,05
........
# 07
I0,02 -*- 06 I0,05 I0,06
L I0,06
3 # 07 7
........

Simultaneous sequences
-*- 08 -*- 14
L I0,07 L I0,10 14
8
# 09 # 15
# 10 # 16
I0,07 I0,10
-*- 09 -*- 15
L I0,08 L I0,11
# 11 9 10 15 16
# 17
-*- 10 -*- 17
L I0,09 I0,08 I0,09 L X16 I0,11
# 12 A I0,12
-*- 11 11 12 A I0,13 17
L X12 # 18
# 13 -*- 16
-*- 12 =1 L X18 I0,12 I0,13
L X11 #
13 18
# 13 -*- 18
........ L I0,14 I0,04
........

17
3 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
Pre-processing :
= a series of instuctions
S000 L.... Role
.... Processing of :
.... - mains break/return,
- failures,
Pre-processing - application operating modes :
Sn ....
. 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 :
Sn+1 =*= i = a series of instructions
....
Role
Sequential processing - Sequential processing of the application :
steps and transitions and their associated
Sj .... actions and conditions.

Post-processing :
Sj+1 =*= POST
.... = a series of instructions.
Role
Post-processing The processing of :
- the commands from the Sequential proces-
Sk EP sing 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
4 Program utilities 4

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 back-
up 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
4 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 L SY01 If SY01 = 1 (hot restart) then set SY00 to 1 to initialize the PLC.
S SY00 These two bits are reset to 0 by the system at the end of the next cycle.

4.3 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
4 Program utilities 4

4.5 Diagnostic aids


The operands described below can be used in the program to facilitate trouble-
shooting 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 17-
10 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
4 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 possibi-
lities 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 Pre-
processing section, which is divided into three sub-assemblies as follows :

. Power up, Power-up YES


Initialization
Processing
NO

. Change of mode Change of mode YES


request, request

NO Processing

. Combinational Input logic


input logic

Grafcet system bits


The Grafcet system bits SY21, SY22 and SY23 must be used only in the Pre-
processing 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
4 Program utilities 4

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
4 Program utilities

4.8 Programming examples and rules

L I0,02 I0,02 I0,05 X22 O0,02 O0,01


O I1,00
AN IO,05
O B017
A X22 I1,00
AN O0,02
= O0,01

B017

LN I0,02 X5 I0,02 I0,05 O0,02 O0,01


A IO,05
L I0,02
AN B017
O IM I0,02 B017 I1,00
LN O0,02
O I1,00
A IM
A 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
5 TSX T317 Operating modes

Presentation of the TSX T317 Terminal (Cont’d.)


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 Tsx1720_V10 STOP
CNF©ADJ¢ ©PRG©CTL% TRF©TER©DGN© %
CNF : Configuration mode TRF : Transfer mode
ADJ : Adjust mode TER : Terminal mode
PRG : Program mode DGN : Diagnostic mode
CTL : Control mode
% : Go to next screen % : 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, R S NOP
=
3rd action : 2nd external marking,if it
=*= CU CD H
exists. %
Note : - 3 actions on key L equal the code L A O N
= * = POST. JMP / #
- Simultaneous actions on keys
XO
Shift and N equal the code H.
Lab /-*-

P
Operand and numeric keys
After selecting the operation code, select the operand and its number :
1st action : 1st external marking (ope- I O B
rand). For the 2nd external 7 8 9
marking, if it exists, press
Shift + the key. TMR SY/S X/IM

2nd action : Internal marking 4 5 6


(number) CNT SC/ [SC] SR/ [SR]
.
FUN 1 2 3
Special keys
CB
Enter : Validates the entry, or confirms a
function, and goes to the next 0
line. Shift Quit Clear Enter

Clear : Abandons the function and Quit : Abandons the mode.


goes to the previous line.
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
5 TSX T317 Operating modes 5

Presentation of the TSX T317 Terminal (Cont’d.)


Representation of keys in this manual
Soft keys :
In the margin : CNF
In the introduction to each mode or function, the soft keys are R
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 CU and X : ................................... < CU > <X>
. Keys IM and [SC] : ................................... < IM > < SC >
. Keys Enter and Quit : ................................... < ENTER > < QUIT >

Examples : Entry of a list of instructions


On the mode selection display, press :
L I 0,01
[PRG] [SEQ] [INS] A I 1,03
O B 220
< L > < 7 > < 1 > < ENTER > = O 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


-*- 1
< P > < P > < P > < 1 > < ENTER > L B 024
< L > <9 > < 2 > < 4 > < ENTER > #
< XO > < XO > < XO > < ENTER >

27
5 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 SELFTEST
sequence of keys except < CLEAR > keyboard test?
and check for the corresponding dis-
play.

< CLEAR > abandons the function.


Language selection
The terminal proposes 5 languages
(4 directly and the 5th by [%]). English
To select a language press the corres- ENG©FRA©DEU©ITA%
ponding soft key.
< 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 *TSX T317 V1.0*
the software version of the terminal. ´Å´ <--> 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, Tsx1720_V10 STOP
CNF©ADJ©PRG©CTL%
STOP/RUN : its status (**).
The 2nd line indicates the significance
of the 5 soft keys. Tsx1720_V10 STOP
TRF©TER©DGN© %
Note : If there is a memory fault on power-
up, the display opposite appears.
Clear the memory by selecting its
size [8K] or [24K].
([8K] only with the TSX 17-10). Prog.mem. fail.
CLM: © 8k©24k©
(*) 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
5 TSX T317 Operating modes 5

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 modifica-
tion of the language selection.
DGN : DIAGNOSTIC mode
Permits the diagnosis of faults of the PLC or the application.

CNF©ADJ©PRG©CTL% TRF©TER©DGN© %
Action on a soft key

SELECTED MODE
CLEAR or < SHIFT > < CLEAR >
© © ©
Action on a soft key
CLEAR or < SHIFT > < CLEAR >

SELECTED FUNCTION (*)

0 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
5 TSX T317 Operating Modes

5.4 Configuration Mode


General
CNF 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
R preset values, the I/0, and the fast counter C15.

CONFIGUR. STOP CONFIGUR. STOP


MEM©TiB©TiP©CiP% I/0©C/T© %
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
MEM Gives access to 3 possibilities :
[SIZ]* choice of the size of the RAM SIZE: 8k -->24k
R
memory : 8 or 24 K. SIZ©CNV© ©CLM
[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


TiB Choice of time bases : 10ms, 100ms, 1s or 1mn.
[MOD] permits selection of the requi-
S
red value T.Base T00 1mn
Validation by < ENTER >. ©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 va-
PRESET T00 9999
lue of a timer.
=
Validation by < ENTER >.
©MOD

CiP [MOD] permits entry of the preset va-


lue of a counter. PRESET C00 9999
©MOD
NOP
Validation by < ENTER >.
The keys < ↓ > and < ↑ > give access to the next or previous timer or
counter.

30
5 TSX T317 Operating Modes 5

Configuration Mode (Cont’d.)


I/O configuration function
I/O Gives access to 4 possibilities. I/O Config.
R
[IO0] configuration of the normal, 100©F.I©CNF©FIO
RUN/STOP and SECU I/O :
[I00] I0,00 : RUN/STOP or normal
input. 100:R/S 000:nor
[O00] O0,00 : SECU or normal out- 100©000©
put.
Validation by < ENTER >.
[F.I]* configuration of the event-trig- 1024:EV 1025:NO
gered inputs by keys [124] or 124©125©
[125] (display of EV or NO).
Validation by < ENTER >.
[CNF] configuration of the extension
modules by keys [M1] or [M2] M1:LOC - M2:NO
with display of : M1 ©M2 ©CLC©
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 ex-
changed in the Fast task.
[I] for the input byte :
FAST I/O
[0..] from I0,00 to I0,07, I © O ©
[8..] from I0,08 to I0,15,
[16.] from I0,16 to I0,23.
[O] for the output byte : FAST: 10,00..7
[0..] from O0,00 to O0,07, 0..©8..©16..© NO
[8..] from O0,08 to O0,15.
[NO] for a byte that is not exchanged
in the Fast task but in the Master FAST: NO OUTP^UT
task. 0..©8..©© NO
Validation by < ENTER >.

Fast counter/timer C15 configuration function


C/T By default, C15 is configured as a fast counter.
[MOD]* changes C15 to a fast timer.
S C15:fast timer
Validation by < ENTER >.
©MOD
Function available only on TSX
17-20.
C15:fast counter
©MOD
(*) The functions and sub-functions marked by an asterisk are available with the TSX 17-
20 only.

31
5 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 PROGRAM STOP


FST©SEQ©SCH©CLP% RUN©STO©INI© %
Fast task and Master task functions
FST Reading, writing and modification of the
S0000 NOP
Fast task (TSX 17-20 only).
R ADR© ©INS%
SEQ Reading, writing and modification of the
Master task.
S
The terminal is then in the read mode on S0000 NOP
the first line of the selected task. The MOD©DEL©VIS©END%
following keys are then available (the
first 2 directly and the others by pressing
[%]) : S0000 NOP
Direct access to an address SEL©RST©CPY©CUT%
[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
5 TSX T317 Operating Modes 5

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
SEL©RST©CPY©CUT%
first and last lines have been
specified by [ADR]. Example :
[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.
[RST] cancels the selection. [%] [ADR] < 1 > < 0 >
< 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
SCH This function permits the search for all or part of an instruction.

=
Enter the instruction and press < ENTER >
Under each character a cross appears,
SCH: L I0,01
corresponding to a numerical key from 0 SEL: xxxxxxxxxx
to 9. 0123456789
When a cross is present, the correspon- Example :
ding character is searched for. To search for 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
address. < 0 > < 1 > < 2 > < 3> < 4 > < ENTER >
to delete the crosses under the unwanted charac-
< ENTER > then continues the search.
ters, thus leaving the crosses 5, 6, 7, 8, 9 under the
< CLEAR > halts the search, another characters of the searched for operand I0,01.
instruction can then be entered.

Clear program function


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

NOP To confirm the deletion of the program,


PROGRAM STOP
press < ENTER >.
confirm CPL

"RUN STOP INIT" function see Section 5.6.

33
5 TSX T317 Operating Modes

Program Mode (Cont’d.)


Program mode flowchart

Tsx1720_V10 STOP
CNF©ADJ©PRG©CTL%

PROGRAM STOP PROGRAM STOP


CLEAR
FST©SEQ©SCH©CLP% RUN©STO©INI© %

0
S0000 L SY01 S0000 L SY01
QUIT
ADR© ©INS% MOD©DEL©VIS©END%

S0000 L SY01
SEL©RST©CPY©CUT%

5.6 Control Mode


General
CTL This mode gives direct access to the
Tsx1720_V10 STOP
RUN, STOP and INIT functions (these
NOP functions are also accessible in the RUN©STO©INI©
Program mode).

[RUN] requests the execution of the Tsx1720_V10 STOP


program. confirm RUN?
Confirmation by < ENTER >.
[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 CONFIG-
URATION mode. Any values modified in the ADJUST mode are lost.
. Cancellation of forced bits.
. Acknowledgement of I/O faults.
Note : 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.

34
5 TSX T317 Operating Modes 5

5.7 Transfer Mode


General
TRF This mode offers 3 functions : TRANSF.MODE STOP
R
[PRT] print,
[TR] transfer <=> audio tape recorder,
PRT©TR ©EPR©
[EPR] transfer <=> EEPROM.

Print function
PRT The screen shows the configuration of the data link (which is configured by default
to 600 baud with no parity after each power up).
R The format is fixed : 1 start bit, 7 data bits, 2 stop bits.

PRT: 600 NO
[GO] starts the printout,
[BAU] permits selection of 300, 600
or 1200 baud, GO ©BAU© ©PAR%
[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, LISTING: ALL
[PRG] pro gra m onl y (Fas t t as k + ALL©CNF©PRG©SEQ%
Master task),
[SEQ] Master task only.
During printing it is possible to :
[ABO] abort printing,
[W/R] halt printing (Wait) if the key is
*** CONFIG. ***
hit once, and restart printing if it
is hit twice.
ABO© ©W/R
"Audio tape recorder" function
TR [CMP] compares a program in an audio
TRF: TSX TR
S
TR cassette with the program in
the PLC. CMP©=≤ > © <=© GO
[⇒] copies the program in the PLC Example :
to a TR cassette. To copy the program in the PLC to a TR cassette,
press :
[⇐] copies the program in a TR
cassette to the PLC. [ ⇒ ] [GO]
then start the TR in the record mode and confirm
[GO] starts the selected function. 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
5 TSX T317 Operating Modes

Transfer Mode (Cont’d.)


"EEPROM transfer" function
EPR 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").

MASTER (Read Only)


EEPROM RAM
The switch on the EEPROM cartridge WORK
must be positioned as shown opposite RAM EEPROM

(to the right : WORK RAM).

[CMP] compares the program in the


TRF: TSX TR
RAM with the program in the
EEPROM.
CMP©=≤ > © <=© GO
[⇒] copies the program in the RAM
to the EEPROM (without pro- TRF:RAM =≤=>EPROM
tecting the program in the EE- no protect.©PRO
PROM).
[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 Tsx1720_V10 STOP


TRF©TER©DGN© % CNF©ADJ©PRG©CTL%

TRANSF.MODE STOP
PRT©TR ©EPR©

PRT: 600NO LISTING: ALL


CLEAR
GO ©BAU© ©PAR% ALL©CNF©PRG©SEQ%

TRF: TSX TR TRF:RAM EPROM


CLEAR
CMP©=≤ > © <=© GO CMP©=≤ > © <=© GO

36
5 TSX T317 Operating Modes 5

5.8 Adjust Mode


General
ADJ 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
S given in Section 6.2.
To display the state or value of an oper-
and, enter the operand on the screen ADJUST MODE
opposite and validate by < ENTER >. Variable:
The following soft keys are then proposed :
[MOD] to modify its state,
[F:0] to force to 0, O0,01
[F:1] to force to 1, MOD©F:0©F:1©UNF
[UNF] to unforce.
< SHIFT > < CLEAR > permit the entry of another operand.

Examples . To display the state of output O0,01


O0,01=0 F F *
press :
< 0 > < 1 > < ENTER >
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.

T00 P=0015x 1 s
. To display and modify the current va-
lue of timer T00 press :
< TMR > < 0 > < ENTER > MoP©V=0007 R©MoV
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
5 TSX T317 Operating Modes

5.9 Diagnostic Mode


General
DGN This mode permits :
. Display of the status of the PLC, DIAGN.MODE STOP
= . Rapid search for an I/O fault,
. Testing of the terminal.
TSX©I/O©TER©
The screen opposite proposes the 3 soft keys for these functions.

"PLC status" function

TSX The display shows the state of the 4


indicator lights on the front of the basic 1 0 0 1
R PLC module : R/S CPU IO/M BAT
0 = light out 1 = light on
The screen above shows that the PLC is running and that there is a battery fault.

Light Out On (steady) Flashing

R/S PLC not powered PLC running PLC stopped


CPU ------- Processor fault Watchdog overrun
IO/M ------- I/O fault Memory fault
BAT ------- Battery fault -------

"I/O status" function

I/O The screen opposite shows :


. ! cnf
M0 ©M1 ©M2 ©
M0 basic module,
S M1 1st extension module,
M2 2nd extension module,
On the top line :
© module present and OK,
cnf configuration fault
(2nd extension module),
! module fault
(1st extension module). 0 0 0 0 0
Press the soft key concerned to S4 S3 S2 S1 S0
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.

"Terminal test" function


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

38
5 TSX T317 Operating Modes 5

5.10 Terminal Mode


General
TER This mode permits :
. language selection,
$*TSX T317 V1.0*
S
. configuration of the printer link,
. entry of the code which authorizes
programming with the PLC running.
LGE©PRT©COD©

"Language selection" function


LGE 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.

"Printer link" function


PRT 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.

"Code entry" function


COD 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).
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

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

Contents
Section Sub-section Page
1 Introduction 1.1 Presentation of the terminal 41
1.2 Connection 42
1.3 Power-up 42
1.4 Operating modes 43
2. Choice of Language 2.1 Choice of language 44
and Control Mode 2.2 Control Mode 44
3. Adjust Mode 3.1 Accessible PL7-2 Data Objects 45
3.2 Presentation of the Mode and 46
Associated Functions
3.3 Display, Modification and Forcing of Bits 48
3.4 Display and Modification of Words 49
3.5 Display and Modification of Function Blocks 50
3.6 Display of Grafcet Steps 51
3.7 Display and Modification 52
of the Real-Time Clock
4. Text Mode 4.1 Presentation of the Mode 53

40
1 Introduction 1

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] TEXT mode,


TSX17 PL72 STOP
[ADJ]
[LGE]
ADJUST mode,
Language selection, TXT©ADJ©LGE©CTL
[CTL] CONTROL mode,
[%] Go to next screen or return to
previous screen. R S =
NOP

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

Operand and numeric keys


Only the numeric keys are used with I O B
PL7-2 language.
7 8 9
They permit the entry of addresses and TMR SY/S X/IM
the modification of data objects.
4 5 6

CNT SC/ [SC] SR/ [SR]

FUN 1 2 3

Special keys
Enter : Validates the entry or confirms CB
a function and goes to the next
0
line,
Shift Quit Clear Enter
Clear : Abandons the function and goes
to the previous line,
Quit : Abandons the mode. 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 ADJ
are shown as represented opposite : S

In the text :
The same key is represented between square brackets : [ADJ]
Other keys : The other keys are represented between the symbols < > as shown
in the examples below :
. Enter key ........................................................................ < ENTER >
. Cursor control key ↑ ........................................................................ < ↑ >

41
1 Introduction

1.2 Connection
The terminal must be connected by its
TSX 17-20 PL7-2
cable to a TSX 17-20 micro-PLC equip-
ped 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).
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 SELFTEST
test the keyboard, press any key or
sequence of keys except < CLEAR >
keyboard test?
and check for the corresponding dis-
play.
< 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 *TSX T317 V2.1*
software version of the terminal. copyright TE 88
If the connection is OK, the terminal
automatically enters the Text mode
(operator dialogue mode).
TEXT MODE
Mode selection display
To call up the Mode Selection Display
press < CLEAR >.
< CLEAR >

TSX17 PL72 STOP


The 1st line indicates : TXT©ADJ©LGE©CTL
. 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
1 Introduction 1

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


TXT©ADJ©LGE©CTL
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


0 ACCES TO MODIFICATION
QUIT

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

43
2 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.
Françcais
=
. Select one of the 5 soft keys :
[ENG] [FRA] [DEU] [ITA] [ESP]
ENG©FRA©DEU©ITA%
. Validation by < ENTER >.
Françcais
ESP© %

2.2 Control Mode

CTL 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
NOP TSX 17-20, e.g. V1.0.
Function "RUN"
requests execution of the program. Tsx1720_V10 STOP
Confirmation by < ENTER >. RUN©STO©INI©
Function "STOP"
requests stopping of the program.
Confirmation by < ENTER >.
Tsx1720_V10 STOP
The program stops at the end of its scan
confirm RUN?
cycle after updating of the outputs.
Function "INIT"
requests initialization of the program, whether it is running or stopped. Confirma-
tion 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
3 Adjust Mode 3

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 Max. Designation Operation


number available
Input bits 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 R

Word objects
Internal words 1024 Wi R/W

Constant words 1024 CWi R

System words 64 SWi R/W

Register words 8 IWx,i R/W

8 OWx,i R/W

Function block objects


Ti,P (preset ≤ 9999) R/W (1)
Timers 32
Ti,V (current value) R/W

Mi,P (preset ≤ 9999) R/W (1)


Monostables 8
Mi,V (current value) R/W
Ci,P (preset ≤ 9999) R/W (1)
Counters 31
Ci,V (current value) R/W

Fast C31,P (preset ≤ 9999) R/W (1)


1
counter C31,V (current value) R/W
Ri,I (input word) R
Registers 4
Ri,O (output word) R
Di,V (active tim e of R
Drum current step)
8
controllers Di,S (n° of current R
step 0-15)

Time/date DTP (date, time and R


blocks (or cause of last stop)
"H" blocks) DT (current date and time) R/W

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

45
3 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 Accesses the Adjust mode and displays the associated functions that are
available as follows :
S

REGLAGE PL72STOP REGLAGE PL72STOP


BIT©WRD©[?]) © X % [( H]) © %

[BIT] permits the display, modification and forcing of bits,


[WRD] permits the display and modification of words,
[[?]] 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.

46
3 Adjust Mode 3

Presentation of the Mode and Associated Functions


Principle of access to the associated functions

Selection of modes : MODE SELECTION DISPLAY


Example
Adjust mode [ADJ]
TXT©ADJ©LGE©CTL
CLEAR
or
< QUIT >
Selection of functions :
Bits [BIT] ADJUST MODE SCREEN

Words [WRD] BIT©WRD©( [?]) © X % [( H]) ©


Function blocks [?]
Grafcet steps [X]
Real-time clock [H]

Selection of sub-functions :
Bits (I,O,B,SY) SUB-FUNCTION SELECTION SCREEN
Words (W,COM,SW, © © ©
CLEAR
CW,IW,OW)
Function blocks (T,M,C,D,R)
Real-time clock (DTP,DT)

THE SCREEN FLASHES :


Entry on the numerical keypad
. Display by default of the variable
of the required address. with the address 0

Validation
of the entry
ENTER

Display of the next


variable <↓> . DISPLAY OF THE VARIABLE
. ACCES TO MODIFICATION
Q
Display of the previous
QUIT
variable <↑>

47
3 Adjust Mode

3.3 Display, Modification and Forcing of Bits


BIT Permits access to the following bits :
[I] input bits,
REGLAGE PL72STOP
R
[O] output bits,
[B] internal bits, I ©O ©B ©SY
[SY] system bits.
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


I00,02=0 *
is an output bit or internal bit,
MOD© 01010000
. gives access to the keys per-
mitting the forcing or unfor-
cing of the bit. I00,02=0
[F:0] Forces the bit to 0 and it stays in
MOD©F:0©F:1©UNF
this state until it is unforced.
[F:1] Forces the bit to 1 and it stays in I00,02=1 F
this state until it is unforced. MOD© 01010100
[UNF] Unforces the bit.

System bits
[MOD] Modifies the state of the bit.
SY08 =1 *
MOD© 00100101

SY08 =0 *
MOD© 00100100

Note : . 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
3 Adjust Mode 3

3.4 Display and Modification of Words


WRD Permits access to the following words :

S
REGLAGE PL72STOP REGLAGE PL72STOP
W ©COM©SW ©CW % IW ©OW © %

[W] 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 W0010=+ 56 D


word (in codes D and B only, MOD©CNV©
see below).

Note : - 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 letter D
(code by default)
Hexadecimal letter H
BCD letter B
Message letter M
Binary no letter

49
3 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 REGLAGE PL72STOP


([T ]) ©[
( M ]) ©[
( C ]) ©[
( D ]) % [( 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 pre- T00 P=9999X 1mn


set value of the function block.
MOP©V=9999 ©MOV
Timer

[MOV] permits modification of the cur- M01 P=0010X 1mn


rent value of the function block. MOP©V=0007 ©MOV
Monostable

P = preset value (0 to 9999) C02 P=0500


V = current value (0 to 9999)
MOP©V=0300 ©MOV
Counter
Time base : 1mn, 1s, 100ms, 10ms.

50
3 Adjust Mode 3

Display and Modification of Function Blocks (Cont’d.)


Drum controller (display only)

S : number of current step


(0 to 15), D02 t=0064X 1mn
L : number of steps (1 to 16), WRD© S=000 L=016
t : active time of current step
(in the time base dis-
played).

< ↓> displays the next drum,


<↑> displays the previous drum,
< WRD > displays the word defining the D02 STEP=00
bit states of the current step, 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
R02 15 I=+32767
with the length of the register -1. FIFO 0=-32768

3.6 Display of Grafcet Steps


X Permits the display of the activity of a step and its active time value.
NOP
Pressing this key permits entry of the number of the step required, which must
then be validated by < ENTER >.
1 = the step is active, X015=1 B
0 = the step is inactive, t=0010X 1s
t = the active time value of the step in
the time base displayed,

B = 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
3 Adjust Mode

3.7 Display and Modification of the Real-Time Clock


( H) Permits access to the main functions REGLAGE PL72STOP
R
of the real-time clock (available only in
the TSX 17-20 with the TSX P17 20FB
DTP© DT©
software cartridge). 1

[DTP] permits the display of the date, DOP YEAR=1988


time and code number of the YEA©M& D©H& M©S& N
last stop.
[DT] permits the display or modifica- 2
tion of the current date and time.
DAT YEAR=1988
MOD© %
3

DAT YEAR=1988
Display of the date and time
YEA©M& D©H& M©S& N
1 3
• 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 minu- DOP YEAR=1988
tes, YEA©M& D©H& M©S& N
[S&N] displays the seconds and :
. code of the last stop (*) if [DTP]
was selected, DOP M&DAY=0705
. N° of the day of the week if YEA©M& D©H& M©S& N
[DT] was selected (**).
• 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 pa- DAT YEAR=1988
rameter displayed. After modi- MOD© %
fication, validate by < EN-
Year
TER > and display the next pa-
rameter by < ↓ >. DAT M&DAY=0711
(*) Reminder of stop codes : MOD© %
1 = stopped by the operator, Month, day
4 = stopped by a power break.
DAT H&MN=1127
(**)
1
Reminder of N° of weekdays :
= Monday,
MOD© %
2 = Tuesday, Hour, minute
3 = Wednesday,
4 = Thursday, DAT S&N =3601
5 = Friday, MOD© %
6 = Saturday,
Seconds and N° of the day of the week.
7 = Sunday.
(The 0 is not significant).

52
4 Text Mode 4

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 17-
20 (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


TXT The TEXT mode is selected either : TEXT MODE
. 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.

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).

VALVE 1 OPEN
On reception, the message is displayed

VALVE 2 CLOSED
from left to right on the two lines of the
LCD display.

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.
< ENTER > validates and transmits the message.
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) : clears the screen and positions the cursor top left,
BS (08H) : →
HT (09H) : ←
used to position the cursor on the screen,
VT (0BH) : ↑
LF (1AH) : ↓
CR (0DH) : positions the cursor bottom left.

53
TSX T317 Terminal

X Appendices

Contents
Section Sub-section Page
Appendices A.1 TSX T317 Technical Specifications 55
A.2 TSX17 I/O Addressing 56
A.3 PL7-1 Summary of Modes and Functions 57
A.4 PL7-1 Operation Code and Operand 59
Entry Guide
A.5 PL7-1 Operation Code and Operand 60
Associations
A.6 PL7-1 Instruction Execution Times 61
A.7 PL7-2 System Bits and Words 62
A.8 TSX T317 Error Messages 63

54
Appendices

A.1 TSX T317 Technical Specifications


General
Dimensions : ....................................... 154 x 91 x 32 mm,
Weight : ............................................... 0.430kg
Storage temperature : ......................... -20° to +70°C without condensation,
Operating temperature : ...................... 0 to + 40°C without condensation,
Power supply : .................................... +5V supplied by the PLC,
Power consumption : .......................... 80mA,
PLC link : ............................................. RS485,
Printer link : ......................................... 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,
Tape recorder link : ............................. Audio,
LCD display : ....................................... 2 lines of 16 characters,
Keyboard : ........................................... 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 Printer with BUSY TSX T317 terminal

Connect 7 (gray) Microline 9-point Sub-D


and 9 (orange) 82 A connector

SSD gray BUSY


2 11 7
SG yellow 0V
SG 3 7 3
RD black TD
RD 4 3 6
white DSR
DTR 8
orange
9

Cable reference : TSX T317 CB1 020

Audio tape recorder connections

Tape recorder TSX T317 terminal

5-pin circular 9-point Sub-D


connector connector
Audio output
1 and 4 1
1
4 0V
2 2 3
5
3
Audio input
3 and 5 2

Cable reference : TSX CB3 015

55
Appendices

A.2 TSX 17 I/O Addressing


Addressing of discrete I/O
Ix,i : Input bit,
Ox,i : Output bit,
x = the number of the module, which can be :
•0 to 2 for the TSX 17-10/20 with PL7-1 language,
•0 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.
i = 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 = the number of the module (1 to 3),
i = the number of the word (0 to 7).

Note : The intelligent modules also have I/O bits which are addressed in the same way as
for the discrete I/O extensions.

56
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 Variable Read Modify Force


Input Ix,i yes no yes
Output Ox,i yes yes yes
Step bit Xi yes no no
internal bit Bi yes yes no
System bit SYi yes yes no
Fault bit Sx,j yes yes yes
Timer Ti TiB,V,P V,P no
Counter Ci CiV,P V,P no
Step counter SCi SCi,j SCi,j no
CU/CD
Register SRi SRi,j SRi,j no
Fast counter C15 V,P V,P no
Event-triggered
inputs I0,24/I0,25 yes 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 (Cont’d.)


PRG : Program mode (cont’d)
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 :
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.

58
Appendices

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

Operation Keystrokes Operands Keystrokes


codes

%
L / LN .. L L N Ii,j ..... 7

%
A / AN .. A A N
Oi,j ..... 8

%
O / ON .. O O N
Bi ...... 9

XO ..... XO SYi ..... 5

P ...... P Sx,i ..... 5


Shift

S ...... S Ti ...... 4

R ...... R Ci ...... 1

S* ..... S S SCi [SC] .. 2


Shift

R* ..... R R SCi,j ..... 2

%
=/=N .. = = N
SRi [SR] .. 3
Shift

=* ..... = =
SRi,j ..... 3

CU ..... A A
IM ...... 6
Shift

CD ..... O O
Xi ...... 6

%
H ...... N
Shift

JMP .... XO XO

LAB .... P P

EP ..... NOP NOP

NOP .... NOP Remarks :

= * = "i" .. L L . The comma is inserted


automatically,
– * – "i" .. P P P . 2 keystrokes on the same key
can be replaced by :
# ....... XO XO XO

and
= * = POST L L L
Shift key

59
Appendices

A.5 PL7-1 Operation Code and Operand Associations

Operands I/Oi,j Bi SYi Ti Ci SCi SCi,j SRi SRi,j IM Xi S


Operations [SC] [SR]
L, LN X X X X X(k) - X - X - X X

A, AN X X X X - - X - X X X X

O, ON X X X X - - X - X X X X

XO X X X X - - X - X X X X

P - X - - - - - - - - - -

S X X X X X(k) - X - X - X -

S* X X - - - - - - - - X -

R* X X - - - - - - - - X -

=,=N X X X X - - - - X - X -

=* X X - - - - - - X - X -

CU - - - - X X - X - - - -
except
C15
CD - - - - X X - X - - - -

H - - - X - - - - - - - -
JMP
LAB from 1 to 127

=*= "i" initial steps

- * - "i" Grafcet steps and transitions


# "i" 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 Operand Minimum Maximum
(µsec) (µsec)
L,LN I; O; B; SY; Xi; T; S 6 (*) 6 (*)
C (kxxxx) 40 51
SCi,j; SRi,j 18 18
A,AN,O,ON I; O; B; SY; X; IM; T; S 2 6
SCi,j; SRi,j 5 6
XO I; O; B; SY; X; IM; T; S 4 6
SCi,j; SRi,j 6 6
P B 19 21
S I; O; B; SY; X 2 6
T 2 50
C 2 35
SCi,j; Sri,j 2 5
R I; O; B; SY; X 2 6
T 2 31
C 2 35
SCi,j; SRi,j 2 18
S* I; O; B; X 2 19
R* I; O; B; X 2 20
=* I; O; B; X 21 21
=,=N I; O; B; X 6 6
T; SRi,j 32 50
CU,CD C 14 40
SCi 14 19
SRi 14 27
H T 26 28
N 3 3
JMPI 2 23
LAbi 11 14
= * =, - * -
# 2 14
NOP 2 2
EP 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 Initial
(*) state
SY00 1 = cold restart S or U → S 0
SY01 1 = hot restart S or U → S 0
SY02 1 = freezing of real-time clock U 0
SYO5 100ms time base S
1s time base S
1mn time base S
SY08 0 = outputs saved when program stops U 1
SY09 1 =
outputs forced to 0 U 0
SY10 0 =
I/O fault S 1
SY13 1 =
battery absent or defective S 0
SY14 1 =
display of the contents of SW16 U 0
SY15 1 =
C31, V = C31, P S→U 0
SY16 1 =
requests reactivation of transistor
outputs U→S 0
SY17 1 = overflow of unsigned arithmetic or
circular shift S→U 0
SY18 1 = arithmetic overflow (16 bits) S→U 0
SY19 1 = inhibition of fast task U 1
SY20 1 = index overflow S→U 0
SY21 1 = initialization of Grafcet U→S 0
SY22 1 = resetting of Grafcet U→S 0
SY23 1 = freezing Grafcet U→S 0
(*) Abbrevations used :
S = set to 1 or 0 by the system,
A = set to 1 or 0 by the user,
S→U = set to 1 by the system and reset to 0 by the user,
U→S = set to 1 by the user and reset to 0 by the system.

System words
Written or read by
Word Function System Program
SW16 word displayable in BCD on the optional - W/R
digital display module TSX 17 ACC2
SW17 checksum of the internal RAM of the PLC W R
SW18 checksum of the memory cartridge W R
SW24 address of the PLC on the UNI-TELWAY bus - W/R
SW41 length of the longest scan cycle (base 10ms) W R
SW50 century, year, month, day, hour, minute,
to seconds, tenths of seconds and stop code W R/W
SW53 of RT clock (current date and time in BCD)
SW54 century, year, month, day, hour, minute,
to seconds, tenths of seconds and day of the W R
SW57 week of RT clock (date and time of last stop
in BCD)
SW58 current time of the day in m inutes (0 to 1439)
W R
SW59 current day of the year (0 to 366)

W = written
R = read

62
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

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


Adjust mode (with PL7-2 language) .................................................................... 45 to 52
B Battery .............................................................................................................. 19, 20, 38
C Clearing the memory .............................................................................................. 28, 30
Clearing the program ................................................................................................... 33
Configuration .......................................................................................................... 30, 31
Copying or deleting part of the program ...................................................................... 33
D Diagnostics .................................................................................................................. 38
Display of internal bits B240 to B255 ..................................................................... 6, 21
Display of variables ................................................................................ 37, 42, 48 to 51
E Event-triggered inputs ................................................................................... 4, 10, 31, 56
F Fast task ........................................................................................................... 6, 10, 32
Faults ............................................................................................................. 6, 20, 21, 38
Fault bits ........................................................................................................... 5, 12, 38
Forcing .............................................................................................................. 37, 42, 48
G Grafcet ............................................................................................ 6, 8, 9, 17, 19, 22, 51
I 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
M 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
O On-line programming (code 7533) ................................................................... 39, 43, 46
P 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
R Real-time clock ............................................................................................................ 52
RUN/STOP input ........................................................................................... 4, 20, 31, 56
S Scan cycles ............................................................................................................ 9, 10
Search function ............................................................................................................ 33
SECU (safety) output ............................................................................................. 31, 56
System bits ............................................................................................................. 6, 62
System words (PL7-2) ................................................................................................. 62
T Text mode (PL7-2) ....................................................................................................... 53
Transfers to/from EEPROM memory ..................................................................... 20, 36
Transfers to/from tape recorder ........................................................................ 35, 41, 55
W Watchdog ............................................................................................................... 9, 38

64

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