PL7 Junior/Pro
Premium PLC Application-
Specific Functions
Counting
eng May 2007 www.telemecanique.com
2
Document Set
At a glance This manual consists of 8 volumes: z z z z z z z z
Volume 1 z z
Shared task functions
Discrete task z z
AS-i implementation
Dialog operator task
Volume 2 z Upcounting Task
Volume 3 z Axes command task
Volume 4 z Step by step axes Command task
Volume 5 z Electronic Cam task
Volume 6 z SERCOS Task
Volume 7 z Analog Task z z
PID Control Task
Weighing Task
Volume 8 z Regulation Task
Document Set
35015371 00 May 2007 3
Document Set
4
35015371 00 May 2007
Table of Contents
Chapter 1
General introduction to the counting function . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 2 Introduction to operation of data modules TSX CTY2A,
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1
General on the TSX CTY2A/4A and TSX CTY 2C modules . . . . . . . . . . . . . . . . 14
Introduction to the TSX CTY2A, TSX CTY4A and TSX CTY2C modules . . . . . . 14
2.2
Principle functions of the TSX CTY2A and TSX CTY4A modules . . . . . . . . . . . 15
At a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Introduction to the TSX CTY 2A and 4A modules . . . . . . . . . . . . . . . . . . . . . . . . 16
Introduction to an up counting or down counting channel . . . . . . . . . . . . . . . . . 18
Operating in up counting or down counting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Introduction to an up counting/down counting channel (TSX CTY 2A/4A) . . . . . 20
Operating in up counting/down counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3
Main functions of the TSX CTY2C module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Introduction to the TSX CTY2C module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Introduction to an up counting/down counting and measurement channel . . . . 27
Operating in up counting/down counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Operating in speed measurement mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Chapter 3 Description of the standard functions of the TSX CTY•• counting
At a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.1
Introduction to functions associated with counting modules . . . . . . . . . . . . . . . . 34
Introduction to input configurations and functions associated with counting. . . . 34
3.2
Description of counting module input interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 37
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Description of counting input interfaces (TSX CTY 2A / 4A / 2C) . . . . . . . . . . . . 38
Specialized interface for an absolute encoder (TSX CTY 2C) . . . . . . . . . . . . . . 42
3.3
Description of the capture function in counting modules. . . . . . . . . . . . . . . . . . . 43
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
35015371 00 May 2007 5
6
Capture function for data module counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Capture, TSX CTY 2C module specific features . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4
Description of the preset and reset function in counting modules . . . . . . . . . . . . 47
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Introduction to the preset/reset function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Preset in downcounting mode (TSX CTY 2A/4A) . . . . . . . . . . . . . . . . . . . . . . . . 49
Resetting when counting (TSX CTY 2A/4A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Preset in up/down counting (TSX CTY 2A/4A/2C). . . . . . . . . . . . . . . . . . . . . . . . 55
3.5
Description of the comparison function for counting modules . . . . . . . . . . . . . . . 61
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Introduction to the comparison function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Comparison in counting or down counting (TSX CTY2A/4A) . . . . . . . . . . . . . . . 63
Comparison in up counting/down counting mode (TSX CTY2A/4A) . . . . . . . . . . 65
Comparison in up/down counting and measurement mode (TSX CTY2C) . . . . . 66
3.6
Description of switches associated with counting modules . . . . . . . . . . . . . . . . . 67
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Introduction to storing switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Switches in down counting mode (TSX CTY2A/4A) . . . . . . . . . . . . . . . . . . . . . . 69
Switches in counting mode (TSX CTY2A/4A) . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Switches in up/down counting mode (TSX CTY 2A, 4A, 2C). . . . . . . . . . . . . . . . 74
3.7
Description of physical outputs associated with counting modules . . . . . . . . . . . 78
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Counting modules physical outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Introduction to modules TSX CTY 2A/4A physical outputs . . . . . . . . . . . . . . . . . 80
Outputs fallback mode for TSX CTY2A/4A modules in the event of a fault . . . . . 83
Introduction to TSX CTY2C module outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Outputs fallback mode for TSX CTY2C modules in the event of a fault . . . . . . . 87
Reactivating outputs after a trip (TSX CTY2A/4A/2C) . . . . . . . . . . . . . . . . . . . . . 89
3.8
Description of the speed measuring function for the TSX CTY 2C module . . . . . 92
Speed Monitoring Function (TSX CTY2C). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
3.9
Description of the special functions of the TSX CTY 2C counting module . . . . . 94
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Special function number 1 (TSX CTY2C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Special function number 2 (TSX CTY2C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Special function number 3 (TSX CTY2C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
3.10
Description of how counting modules deal with faults . . . . . . . . . . . . . . . . . . . . . 98
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Introduction to dealing with channel and module faults . . . . . . . . . . . . . . . . . . . . 99
How to deal with an invalid measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Dealing with faults (TSX CTY2C). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Chapter 4 Configuration of the TSX CTY2A, TSX CTY4A and TSX CTY 2C
At a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Description of the configuration screen for a counting module . . . . . . . . . . . . . 104
35015371 00 May 2007
How to configure the counting inputs (TSX CTY 2A/4A). . . . . . . . . . . . . . . . . . 106
How to configure the counting and measurement inputs (TSX CTY 2C) . . . . . 107
How to configure an absolute encoder interface (TSX CTY 2C). . . . . . . . . . . . 110
How to configure the capture of a counting register . . . . . . . . . . . . . . . . . . . . . 112
How to configure preset or reset in a counting function . . . . . . . . . . . . . . . . . . 113
How to configure event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
How to configure the combined input IEna/Q2 (TSX CTY 2C) . . . . . . . . . . . . . 115
How to program multiplexing of absolute encoders with parallel outputs . . . . . 116
How to configure operation on switch to zero or setpoint crossing . . . . . . . . . . 118
How to configure the behavior of faulty outputs . . . . . . . . . . . . . . . . . . . . . . . . 119
How to configure a special function (TSX CTY2C) . . . . . . . . . . . . . . . . . . . . . . 121
Chapter 5 Adjustment of the data modules TSX CTY2A, TSX CTY4A and
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Description of the adjustment screen of a counting module . . . . . . . . . . . . . . . 124
How to adjust the offset value of an absolute encoder . . . . . . . . . . . . . . . . . . . 126
How to adjust the preset value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
How to adjust channel fault processing (TSX CTY2C) . . . . . . . . . . . . . . . . . . . 128
How to adjust threshold and set point values . . . . . . . . . . . . . . . . . . . . . . . . . . 129
How to adjust the speed measurement and monitoring function . . . . . . . . . . . 130
How to adjust the frequency output period (TSX CTY2C). . . . . . . . . . . . . . . . . 131
How to adjust the switch change of status conditions . . . . . . . . . . . . . . . . . . . . 132
Chapter 6 Debugging the data modules TSX CTY2A, TSX CTY4A and
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Introducing the debugging screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Description of the maximized debugging screen. . . . . . . . . . . . . . . . . . . . . . . . 137
Description of the minimized debugging screen . . . . . . . . . . . . . . . . . . . . . . . . 139
How to use value or parameter windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
How to use the LEDs and buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Chapter 7 Diagnostics of the data modules TSX CTY2A, TSX CTY4A and
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Displaying fault diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Lists of fault diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Chapter 8
At a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
8.1
Counting module operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
How counting modules behave in the different operating modes . . . . . . . . . . . 152
8.2
Event processing installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Introduction to event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
35015371 00 May 2007 7
8
How to program event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Chapter 9
At a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Introducing language objects for application-specific counting . . . . . . . . . . . . . 160
Implicit exchange language objects associated with the application-specific counting
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Details of implicit exchange objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Explicit exchange language objects associated with the application-specific
counting function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Breakdown of objects for user defined exchange . . . . . . . . . . . . . . . . . . . . . . . 172
Explicit object exchange and report management . . . . . . . . . . . . . . . . . . . . . . . 178
Chapter 10
At a glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
10.1
Introducing and configuring the example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Introduction to an example of an application . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Configuration of the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
10.2
Programming details for the example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
At a Glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
The application structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Program: preliminary processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Program: sequential processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Program: step 0 of the sequential processing . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Program: step 2 of the sequential processing . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Program: subsequent processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Program: event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Index
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
35015371 00 May 2007
About the Book
At a Glance
Document Scope This manual deals with implementation of tasks (except for communication tasks) on the Premium/Atrium via the PL7 software.
Validity Note The update of this publication takes into account the standard functions of the PL7
V4.5; nevertheless, it supports implementation of previous PL7 versions.
Related
Documents
Title of Documentation
Hardware implementation manual
Reference Number
TSX DM 57 xxE
User Comments We welcome your comments about this document. You can reach us by e-mail at [email protected]
35015371 00 May 2007 9
About the Book
10
35015371 00 May 2007
Introduction to the applicationspecific Counting function
1
General introduction to the counting function
At a Glance The counting function is used to carry out fast counting using data modules, PL7 screens and specialized language objects. General operation of the data modules is described in the Introduction to operation of data modules TSX CTY 2A,
TSX CTY 4A and TSX CTY 2C, p. 13
section and their functions are described in detail in the Description of the standard functions of the TSX CTY •• counting
modules, p. 33
section.
The physical context in which the counting will be carried out must be defined (rack, power supply, processor, modules or devices,...) during installation, then the software must be installed.
z z
The latter is carried out by various PL7 editors: either offline, or on-line.
11 35015371 00 May 2007
General introduction
Set up principle The table below shows the different installation phases for the application specific
Counting function.
Mode
Offline
Offline or online
Online
Offline or online
Phase
Module declaration
Description
Choice: z of geographical position: number and slot where rack-based modules are concerned, z module type.
Entering the configuration parameters.
Confirming configuration parameters (See:
PL7 Junior, Pro;
Application-specific functions volume 1)
Confirmation at module level.
Global application confirmation (See: PL7
Junior, Pro; Applicationspecific functions volume 1)
Confirmation at application level.
Symbolization (See: PL7
Junior, Pro; Applicationspecific functions volume 1)
Symbolizing the variables associated with the application specific function.
Programming the functions that the specific function must carry out using: word and bit objects associated with the module and event processing.
Transfer and
Documentation
Transferring the application to the PLC.
Debugging the application using: z debugging help screens to control inputs and z outputs, to modify the thresholds and set point values, to trigger events and carry out initializations, diagnostic screens are used to identify faults.
Printing different information relating to the application.
Note: the order defined above is given as an indication. The PL7 software can use editors interactively in any order you wish (however you cannot use the data or program editors without configuring the counting module first).
12
35015371 00 May 2007
Introduction to operation of data modules TSX CTY 2A,
TSX CTY 4A and TSX CTY 2C
2
At a Glance
Subject of this chapter
What's in this
Chapter?
This chapter describes the operating principles of the TSX CTY 2A, TSX CTY 4A and TSX CTY 2C data modules.
This chapter contains the following sections:
Section
2.1
2.2
2.3
Topic
General on the TSX CTY 2A/4A and TSX CTY 2C modules
Principle functions of the TSX CTY 2A and TSX CTY 4A modules
Main functions of the TSX CTY 2C module
Page
14
15
23
13 35015371 00 May 2007
CTY 2A/4A/2C data module operation
2.1
General on the TSX CTY 2A/4A and TSX CTY 2C modules
Introduction to the TSX CTY 2A, TSX CTY 4A and TSX CTY 2C modules
At a glance
Main characteristics
The TSX CTY 2A, 4A and 2C modules are counting modules made for the whole range of Premium modular PLCs. As such, they support all the operations of the PL7 software.
These modules have available: z functions for offloading tasks directly linked to the counting (comparisons, captures, presetting or resetting to zero, error detection, etc.) from the processor, z z functions for generating events for the application program, configurable discrete outputs in reflex outputs, adapted to rapid actions.
These modules constitute a range to the varied characteristics, adapted to the different situations met in the industrial monitoring.
The main characteristics are as follows:
Type Functions
TSX CTY 2A Upcounting, downcounting, upcounting/downcounting.
TSX CTY 4A Upcounting, downcounting, upcounting/downcounting.
4
Number of channels per module
2
TSX CTY 2C Upcounting/ downcounting, speed measurement/monitoring.
2
Number of physical outputs per channel
Maximum frequency
(kHz)
40 1 or 2
(according to the function)
1 or 2
(according to the function)
4
40
1000
The TSX CTY 2A and 4A modules are functionally identical. Only their number of channels is different.
14
35015371 00 May 2007
2.2
CTY 2A/4A/2C data module operation
Principle functions of the TSX CTY 2A and
TSX CTY 4A modules
At a glance
The subject of this section
What's in this
Section?
This section describes the principle operations of the TSX CTY 2A and TSX CTY 4A modules.
This section contains the following topics:
Topic
Introduction to the TSX CTY 2A and 4A modules
Introduction to an up counting or down counting channel
Operating in up counting or down counting
Introduction to an up counting/down counting channel (TSX CTY 2A/4A)
Operating in up counting/down counting
Page
16
18
19
20
22
35015371 00 May 2007 15
CTY 2A/4A/2C data module operation
Introduction to the TSX CTY 2A and 4A modules
Description The TSX CTY 2A and 4A modules support upcounting, downcounting, or upcounting/downcounting pulses. They have the following functions available: z confirmation (See
p. 18
),
Introduction to an up counting or down counting channel, z z capture (See
Description of the capture function in counting modules, p. 43
) (in upcounting/downcounting), preset or reset (See Description of the preset and reset function in counting
modules, p. 47 ),
z z z z comparisons (See Description of the comparison function for counting modules,
p. 61
), storing transient events using two counter outputs (See Description of switches
associated with counting modules, p. 67 ),
z two physical outputs (See Description of physical outputs associated with
counting modules, p. 78 ),
z event processing (See
Event processing installation, p. 154
).
These modules are the same , except for the number of channels:
TSX CTY 2A: 2 channels,
TSX CTY 4A: 4 channels.
16
35015371 00 May 2007
Illustration
35015371 00 May 2007
CTY 2A/4A/2C data module operation
The diagram below introduces the global structure of a channel. According to the selected function (upcounting, downcounting or upcounting/downcounting), some operations cannot be active.
Preset value
EVT processing & Preset /reset event
IPres/IReset physical input
Configuration & >1 Preset/reset register SET
Q
RESET
Preset /reset done Enabling preset/ reset
Direct preset/ reset
EVT proces
-sing
&
IEna physical input
Enabling
Direct
enabling
Counting physical input
IA, IB, IZ
Counting input configuration
& >1
DOWNCOUNTER
/UPCOUNTER
EVT processing
Enabling event
Measurement over-run
Current measurement
Invalid measurement
Threshold values, setpoints
COMPARISON
SET
EVT
Events crossing thresholds, setpoints
Comparing current measurement to thresholds, setpoints
Switch status 0
SET
Switch status 1
ICapt physical input
Configuring
Confirmation
Direct capture
& >1 Capture register
&
SET
Q
RESET
Capture event
Captured value
Capture done
Commands and confirmation of modes, output Q0
Output configuration Q0
Reactivating outputs
Fallback mode configuration
Detecting errors
& &
Output Q0
Monitoring short-circuits and tripping of physical output
Commands and confirmation of modes, output Q1
Output Q1 configuration
& &
Output Q1
Physical output 0
Short-circuit error
Physical output 1
17
CTY 2A/4A/2C data module operation
Introduction to an up counting or down counting channel
At a glance
Illustration
This section introduces the functional kernel of a channel, namely the following z z blocks: up counting or down counting, confirmation.
The up counting or down counting functional kernel of the TSX CTY 2A or 4A modules is shown below.
Event processing &
Enabling event
Physical input enabling IEna
Enabling
& >1
Counter enable active
Measurement overrun
Direct enabling
Up counter or down counter
Current value
Invalid measurement
IA counting physical input
Configuring counting inputs
Note
Physical input
Confirmation (hardware or software) is a special auxiliary function, linked intrinsically to the up counting or down counting. In fact, without confirmation, there can be no up counting or down counting. Because of this, contrary to other auxiliary functions, confirmation is introduced in this section. The associated language objects are described in the default objects (See Details of implicit exchange
objects, p. 163
) part.
The up counting or down counting functions alone admit only one physical counting input, as shown above (the signal is on the IA input).
Input characteristics
This table summarizes the input characteristics of the up counting or down counting functions, for each channel.
Modules involved
Main physical input
Confirmation of up counting or down counting
TSX CTY 2A/4A
IA z z hardware: IVal input, conditioned by the Confirm software command, direct, via the software ( Direct confirmation command).
18
35015371 00 May 2007
CTY 2A/4A/2C data module operation
Operating in up counting or down counting
At a glance
Standard principles
Operation
The standard operation of the TSX CTY 2A and 4A modules in up counting or down counting only is summarized below.
Up counting and down counting are developments that happen in the same register of the module, only the direction of the development is different. This is set by the software configuration (up counting or down counting functions alone).
The counting register’s developments are only possible when the function is confirmed : z either via a physical input ( command),
IVal ) with a software prepositioning ( Confirm z z z or directly, via the software: Direct confirmation command.
The counting values develop between:
0 and +16 777 215 in up counting (24 unsigned bits),
-16 777 216 and +16 777 215 in down counting (24 + signed bits).
This timing diagram illustrates the up counting process. Down counting is similar, only the measurement’s current development direction is the opposite. The associated language objects are described in the default objects (See Details of
implicit exchange objects, p. 163 ) part.
IA physical input
IEna physical input
Enabling
Direct enabling
Current value
35015371 00 May 2007 19
CTY 2A/4A/2C data module operation
Introduction to an up counting/down counting channel (TSX CTY 2A/4A)
At a glance
Illustration z z
This section introduces the functional kernel of a channel, namely the following blocks: up counting/down counting, confirmation.
The up counting/down counting functional kernel of the TSX CTY 2A or 4A modules is shown below.
IEna physical input
Enabling
Direct enabling
Changing direction
IA physical input
IB physical input
IZ physical input
&
Configuring counting input
>1
Event processing
Up counter/ down counter
& Enabling event
Enabling active
Measurement overrun
Direction
Current value
Invalid measurement
Note: this illustration is very similar to the one showing the up counting or down counting function individually. The main differences are to do with the physical inputs. The associated language objects are described in the default objects (See
Details of implicit exchange objects, p. 163 ) part.
Important note
Physical inputs
Confirmation (hardware or software) is a special function, linked intrinsically to the main up counting or down counting function. In fact, without confirmation, there can be no up counting or down counting. Because of this, contrary to other functions, confirmation is introduced in this section.
The up counting/down counting function takes four configurations of counting physical inputs, as described in the table below.
20
35015371 00 May 2007
Input characteristics
CTY 2A/4A/2C data module operation
This table summarizes the input characteristics of the up counting or down counting functions (for each channel).
Modules involved
Input configuration
Confirmation
TSX CTY 2A/4A z z z z
An IA physical input and a software input (counting direction).
Two physical inputs: IA (main) and IB (counting direction).
Two physical inputs: IA (up counting) and IB (down counting).
Three physical inputs: IA and IB to the incremental encoder, and IZ when there is a pulse to the encoder tower.
z z hardware: IVal physical input, software.
35015371 00 May 2007 21
CTY 2A/4A/2C data module operation
Operating in up counting/down counting
At a glance
Standard principles
Operation
Operating the TSX CTY 2A and 4A in combined up counting/down counting is introduced below.
Up counting or down counting are developments that happen in the same register of the module, only the direction of the development is different. This is set via the software configuration, a physical input or applying the counting signal to a particular input.
The counting register’s developments are only possible when the function is z z confirmed : either via a physical input IVal with software prepositioning ( confirm command), or directly, via the software: direct confirmation command.
The counting values develop between: z -16 777 216 and +16 777 215 (24 + signed bits).
The timing diagram below shows the up counting/down counting process when the counting signal is applied to the IA input, with the IB input defining the counting direction. As shown earlier, there are several other ways of defining the counting direction, but the principle of up counting/down counting remains the same. The associated language objects are described in the default objects (See Details of
implicit exchange objects, p. 163
) part.
IA physical input
IB physical input
IEna physical input
Enabling
Direct enabling
Current value t
22
35015371 00 May 2007
2.3
CTY 2A/4A/2C data module operation
Main functions of the TSX CTY 2C module
At a Glance
Contents of this section
This section describes the main functions of the TSX CTY 2C fast counting module.
What's in this
Section?
This section contains the following topics:
Topic
Introduction to the TSX CTY 2C module
Introduction to an up counting/down counting and measurement channel
Operating in up counting/down counting
Operating in speed measurement mode
Page
24
27
29
30
35015371 00 May 2007 23
CTY 2A/4A/2C data module operation
Introduction to the TSX CTY 2C module
Description The TSX CTY 2C is a counting module for the TSX/PMX/PCX 57 PLCs.
This module has two identical channels with the following main functions: z up counting/down counting pulses (See Introduction to an up counting/down
counting and measurement channel , p. 27
), z z placing an absolute encoder (See Specialized interface for an absolute encoder
(TSX CTY 2C), p. 42 ),
measuring and monitoring speed (pulse frequency) (See Speed Monitoring
Function (TSX CTY 2C), p. 92
).
z z z z
It also has the following functions: z confirmation (See Introduction to an up counting/down counting and
measurement channel , p. 27
), capture (See
Description of the capture function in counting modules, p. 43
), z preset (See
Preset in up/down counting (TSX CTY 2A/4A/2C), p. 55
), comparisons (See Comparison in up/down counting and measurement mode z
(TSX CTY 2C), p. 66 ),
storing (See
Switches in up/down counting mode (TSX CTY 2A, 4A, 2C), p. 74
) transient events using two switching circuits, four physical outputs (See
Introduction to TSX CTY 2C module outputs, p. 84 ),
event processing (See
Event processing installation, p. 154
).
24
35015371 00 May 2007
Illustration
CTY 2A/4A/2C data module operation
The diagram below introduces a channel’s functional kernel structure (main up counting/down counting functions and speed, confirmation, preset and capture measurement). To find out the associated language objects, see the default objects
(See
Details of implicit exchange objects, p. 163
).
35015371 00 May 2007 25
CTY 2A/4A/2C data module operation
ICapt physical input
Configuration & >1
EVT
Unmask
Capture register
&
EVT Capture
Captured value
Capture edge
Capture done Enabling
Software capture
Capture
reset
EVT
Unmask
SET
RESET
Q
&
Preset
EVT
IZ physical input
IPres physical input
Configuration & >1
Preset register
Enabling
Software preset
Reset
Preset
SET
RESET
Q
&
IEna physical input
Enabling
Direct enabling
Physical
IA input
Physical
IB input
Physical
IZ input
Software direction
SSI Data physical input
SSICLK physical output
&
Input configuration
>1
UP COUNTER /
DOWN COUNTER
SPEED
Series output absolute encoder offset
OFFSET
Reset modulo crossing Modulo mode
MODULO
Preset done
&
EVT
Enabling
Enabling active
Current value
Measurement overrun
Direction
Invalid measurement
Current speed
Measurement period
Overspeed threshold
Address absolute encoder with parallel outputs
EVT modulo crossing
+ direction modulo crossing
- direction modulo crossing
26
35015371 00 May 2007
CTY 2A/4A/2C data module operation
Introduction to an up counting/down counting and measurement channel
Introduction
Note
Illustration
This section introduces the functional kernel of a channel in the TSX CTY 2C z z module, namely the following blocks: up counting/down counting and speed measurement, confirmation.
Confirmation (hardware or software) is a special function, linked intrinsically to the up counting/down counting. It is introduced here because of this, as opposed to other functions.
The diagram below introduces the main functions of a channel in the TSX CTY 2C module. The associated language objects are described in the default objects (See
Details of implicit exchange objects, p. 163 ) part.
Processing
EVT
&
EVT
Enabling
Active enabling
IEna physical input
Enabling
Direct enabling
& >1
UP COUNTER /
DOWN
COUNTER
IA physical input
IB physical input
IZ physical input
Software direction
SSI Data physical input
SSICLK physical output
Input configuration
SPEED
MEASUREMENT
Current value
Measurement overrun
Direction
Invalid measurement
Address of absolute encoder with parallel outputs
Current speed
Measurement period
Overspeed threshold
Overspeed error
35015371 00 May 2007 27
CTY 2A/4A/2C data module operation
Input characteristics
The TSX CTY 2C takes five physical input configurations, as described in the table below (for each channel).
Module involved
Input configuration
Confirmation of up counting/ down counting
TSX CTY 2C z z z z z
An IA physical input and a software input (counting direction).
Two physical inputs: IA (main) and IB (counting direction).
Two physical inputs: IA (up counting) and IB (down counting).
Three physical inputs: IA and IB to the incremental encoder, and IZ when there is a pulse to the encoder tower.
An absolute SSI series encoder input/output interface, with: z z an SSI Data physical input, an SSICLK transmission timer output. z z hardware: IVal input (combined with the Q2 output, to be configured), conditioned by the Confirm software command, direct, via the software ( Direct confirmation command).
28
35015371 00 May 2007
CTY 2A/4A/2C data module operation
Operating in up counting/down counting
At a glance
Standard principles
Operation
Operating the TSX CTY 2C module in up counting/down counting mode is introduced below.
Up counting or down counting are developments that happen in the same register of the module, only the direction of the development is different. This is set via the software configuration, a physical input or applying the counting signal to a particular input.
The counting register’s developments are only possible when the function is z z confirmed : z either via a physical input ( IVal ) with a software prepositioning ( Confirm z command), or directly, via the software: Direct confirmation
The counting values develop between:
command.
-16 777 216 and +16 777 215 in normal mode (24 + signed bits),
0 and +33 554 431 in modulo mode (25 unsigned bits).
The timing diagram below shows the up counting/down counting process when the counting signal is applied to the IA input, with the IB input defining the counting direction. As shown earlier, there are several other ways of defining the counting direction, but the principle of up counting/down counting remains the same. The associated language objects are described in the default objects (See Details of
implicit exchange objects, p. 163 ) part.
IA physical input
IB physical input
IEna physical input
Enabling
Direct enabling
Current value
35015371 00 May 2007 29
CTY 2A/4A/2C data module operation
Operating in speed measurement mode
At a glance
Note
Principle of the measurement
Apart from the up counting/down counting function, the TSX CTY 2C module also has the speed measurement function.
This function can be used with counting sensors (generating pulses) or with absolute encoders (generating a word describing a position).
Getting a position is not an up counting or down counting of pulses as such, but it has the same result, that is to say successive writes of the counting register.
The principle of calculating the speed is the same as that of the frequency meter: with a measurement period (sampling) that can be adjusted by the user, the speed is calculated and updated, in number of pulses per second. By default, the measurement period’s value is 1 second.
The following diagram shows the principle of the measurement:
End of n-1 cycle, the speed of cycle n-1 is calculated
End of n cycle, the speed of cycle n is calculated
Measurement period 10 ms to 30 s
Counting pulses
Cycle n-1 calculation
Cycle n calculation
Cycle n+1 calculation
The sampling period must be chosen according to the required precision and the low limit of the speed (frequency) of the signal to be measured. This is done using the following formula:
Sampling period
1
precision x speed
where the precision is shown in decimal value (for example: 0.1% = 0.001) and the speed (pulse frequency) in thousands of pulses per second (kHz). The sampling period is acquired in milliseconds.
Example: for a pulse frequency of 40 000 to 250 000 pulses per second and a precision established at 0.1%, the minimum sampling period is 25 ms.
Note: the minimum sampling period is 10 ms.
30
35015371 00 May 2007
Principle of monitoring the speed
CTY 2A/4A/2C data module operation
Monitoring the speed supports setting the reflex outputs to 0 when there is an overshoot of a configurable speed threshold, and directly commanding a security device (for example).
For more details on the speed measurement function, see Description of the speed
measuring function for the TSX CTY 2C module, p. 92 .
35015371 00 May 2007 31
CTY 2A/4A/2C data module operation
32
35015371 00 May 2007
Description of the standard functions of the TSX CTY •• counting modules
3
At a glance
Subject of this chapter
What's in this
Chapter?
This chapter comprehensively describes all the standard functions of the
TSX CTY 2A, TSX CTY 4A and TSX CTY 2C counting modules.
This chapter contains the following sections:
Section
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10
Topic
Introduction to functions associated with counting modules
Description of counting module input interfaces
Description of the capture function in counting modules
Description of the preset and reset function in counting modules
Description of the comparison function for counting modules
Description of switches associated with counting modules
Description of physical outputs associated with counting modules
Description of the speed measuring function for the
TSX CTY 2C module
Description of the special functions of the TSX CTY 2C counting module
Description of how counting modules deal with faults
Page
34
37
43
47
92
94
98
61
67
78
35015371 00 May 2007 33
Standard functions of the TSX CTY ••
3.1
Introduction to functions associated with counting modules
Introduction to input configurations and functions associated with counting
At a Glance
Input configurations
Advantages of associated functions
TSX CTY 2A, 4A and 2C modules offer several possibilities for processing unprocessed results in offline mode, according to the type of module, the type of sensor and the mode (counting function) selected. This chapter describes input configurations and the associated functions which are available.
Modules TSX CTY 2A, 4A and 2C have three counting inputs (See Description of
counting input interfaces (TSX CTY 2A / 4A / 2C), p. 38
) for each channel: IA , IB and
IZ . These inputs cannot be changed round.
The TSX CTY 2C module also has an SSI series interface (See Specialized
interface for an absolute encoder (TSX CTY 2C), p. 42 ) for each channel.
Associated functions are used to adapt modules to the application. As long as the main counting function for one module is similar enough to another, selecting the latter may depend on these other functions.
34
35015371 00 May 2007
Standard functions of the TSX CTY ••
Common functions
The table below summarizes the main characteristics of the functions common to the three module types, and their availability according to the operating mode.
Function
Invalid measurement
Preset or reset
Capture
Comparison
Switches
Description
Detecting a loss of pulse caused by defective operating conditions, or when capacity has been exceeded.
Pre-setting a counting register to a defined value
(zero for a reset).
Availability
All modes.
Resetting to zero in counting, presetting in down counting or up/down counting combined.
Only in combined up/down counting.
Storing an immediate up/down counting register value.
Comparing a current value with a preset value
(zero in down counting only).
Comparing the captured value with a preset value.
All modes.
Only in up/down counting.
Storing a preset temporary event.
All modes.
Number of switches (one or two) varies according to the module and the mode.
Outputs According to configuration: physical outputs linked to switches (reflexive outputs), or positioned by software (discrete "manual" outputs).
Number of outputs (one to four) variable according to the module and the mode.
Event processing Several events can trigger a processing operation z z z z and a reflex action: enabling up or down counting, presetting or resetting, crossing the threshold or setpoint, capture (when up/down counting).
All modes
Specific function Speed monitoring (See Description of the speed measuring function for the
TSX CTY 2C module, p. 92
) is only available with the TSX CTY 2C module.
One or two physical outputs can be linked to the comparators, and can then translate the result of the comparison between the immediate speed and a preset value.
35015371 00 May 2007 35
Standard functions of the TSX CTY ••
Special functions
(TSX CTY 2C)
The TSX CTY 2C module can also configure three special functions (See
Description of the special functions of the TSX CTY 2C counting module , p. 94
These functions are derived from the previous standard functions, and they respond to the specific requirements of certain counting applications. These are: z z z
Special Function Number 1: time elapsed since the last pulse and a capture.
).
Special Function Number 2: triggering a capture and a direct (software) preset synchronized with the programmable frequency output.
Special Function Number 3: monitoring the correct speed and stationary moving part . Tolerance values for the correct speed and stop speed can be configured.
36
35015371 00 May 2007
3.2
Standard functions of the TSX CTY ••
Description of counting module input interfaces
At a Glance
Subject of this section
What's in this
Section?
This section deals with the input interfaces for counting modules.
This section contains the following topics:
Topic
Description of counting input interfaces (TSX CTY 2A / 4A / 2C)
Specialized interface for an absolute encoder (TSX CTY 2C)
Page
38
42
35015371 00 May 2007 37
Standard functions of the TSX CTY ••
Description of counting input interfaces (TSX CTY 2A / 4A / 2C)
At a Glance This section describes the operation of counting input interfaces which are common to modules TSX CTY 2A, 4A and 2C.
Configuration: IA up/down counts, direction according to application
The figure below represents the counting signal applied to IA input.
IA
0 1 2 3 2 1
Direction change up counting down counting
In this configuration, the change of direction bit managed by the application determines direction of the up or down counting on the rising edges of the signal.
Configuration: IA up/down counts, direction according to IB
The following figure represents the counting signal applied to IA and IB inputs which determine the direction of the counting.
IA
IB
-1 0 1 up counting
2 1 0 down counting
25 µs mini 25 µs mini
Up/down counting is done on the rising edges of pulses received on IA input.
38
35015371 00 May 2007
Standard functions of the TSX CTY ••
Configuration: IA up counts, IB down counts
The figure below represents the counting signal applied to IA input (in up counting) or to IB input (in down counting).
IA
1 2 3
IB up counting
2 1 down counting
0
Pulses are taken into account by the up/down counter on the rising edges of the physical input in progress. IA input increments the up/down counter (upcounting) and IB input decrements it (downcounting). If pulses on the two inputs are simultaneous, the up/down counter does not change.
35015371 00 May 2007 39
Standard functions of the TSX CTY ••
Configuration: incremental encoder
In this operating mode, physical inputs IA and IB are connected to an incremental encoder which supplies two out-of-phase signals of 90°. The extent to which inputs
IA and IB are out of phase determines the direction of up/down counting.
The figure below represents counting ( IA ahead of IB ).
IA
IB
Increments
IZ
90° phase shift
+1 +1 +1 +1 +1 +1
Note: the incremental encoder also provides marker information on the IZ input.
This pulse on IZ input enables an up/down counter to be preset.
The figure below represents down counting ( IA behind IB ).
IA
IB
Decrements
-1
90° phase shift
-1 -1 -1 -1 -1
40
35015371 00 May 2007
Standard functions of the TSX CTY ••
Incremental encoder interface options
Several options are available on the configuration screen when an incremental encoder is connected:
If… the line check is configured (encoder with
RS 422 / 485 output), multiplication by 1 is configured,
Then… the PLC indicates a fault when it detects a break in the encoder cable on one of the IA, IB or IZ physical inputs. It is then possible to start the application procedure which corresponds to the fault.
up/down counting is done on rising edges of IB physical input
(case shown: counting).
IA multiplication by 4 is configured,
IB
90°
0 1 2 3 4 5 up/down counting is done on all the rising and falling edges of IA and IB physical inputs (case shown: down counting).
IA
-1 -3 -5 -7 -9 -11 -13 -15 -17 -19 -21 -23
IB
90°
0 -2 -4 -6 -8 -10 -12 -14 -16 -18 -20 -22
35015371 00 May 2007 41
Standard functions of the TSX CTY ••
Specialized interface for an absolute encoder (TSX CTY 2C)
At a Glance
Inputs
Module TSX CTY 2C also has a specialized interface for a series absolute encoder, for applications that measure and monitor speed.
This section describes the operation of this specific input interface.
In this configuration, SSI Data physical input and SSICLK physical output are connected to the series output absolute encoder.
It is also possible to connect up one to four parallel output absolute encoders by using the adaptation bases (see the Installation Manual).
Description of the SSI interface
Note
The figure below represents an SSI frame.
Encoder selection
SSICLK
SSIData
Initialization
HEADER
MSB
DATA
LSB
PARITY
Reload time
(10 to 40 µs, depending on the encoder)
STATUS
The main other frame and interface features are as follows:
Parameters
Code
Values or observations
Binary or Gray
SSICLK transmission speed
150 kHz, 200 kHz, 375 kHz, 500 kHz, 750 kHz or 1 MHz
Header bits
Data bits
Ignored
Status bits z z z
8 active data bits minimum.
17 masked most significant bits maximum (rollover counting).
17 masked least significant bits maximum (resolution reduction).
An error bit specific to the encoder. Its frame position and significance can be configured.
Parity Even, odd (not monitored by the module) or without parity.
With an absolute encoder, the up/down counting is carried out implicitly in rollover mode. The number of unmasked bits directly gives the rollover value. The counting register changes in the [0, rollover] interval. The minimum rollover value is 1 and its maximum value is +33 554 432 (25 data bits without masked bit).
42
35015371 00 May 2007
3.3
Standard functions of the TSX CTY ••
Description of the capture function in counting modules
At a Glance
Subject of this section
What's in this
Section?
This section describes the capture function for counting modules.
This section contains the following topics:
Topic
Capture function for data module counters
Capture, TSX CTY 2C module specific features
Page
44
46
35015371 00 May 2007 43
Standard functions of the TSX CTY ••
Capture function for data module counters
Description
Triggering a capture
Capture is used to copy the current value of the up/down counting register to a capture register. It therefore fixes the immediate value at the precise moment the operation started.
Capture is only possible in combined up/down counting mode (all modules).
Module TSX CTY 2C also has a combined captured mode in the hardware preset
(see:
Capture, TSX CTY 2C module specific features, p. 46
.
Capture done information is an event which can undergo an event processing operation.
z z
The operation is triggered: either directly, via the software: Direct capture command, or by the hardware: when the ICapt physical input status has changed, with preenabled software ( Capture enable command). This signal can be: z the rising edge of ICapt input, z z the falling edge of ICapt input, the rising edges and the falling edges of ICapt input (TSX CTY 2C only).
Note: time performances are at a maximum when ICapt input is configured on the rising or falling edge.
Function hardware structure
The figure below shows the hardware structure of the capture function. The associated language objects are described in the implicit objects (See Details of
implicit exchange objects, p. 163
) section.
Capture event processing
&
Current value
Capture event
ICapt physical input
Capture
Configuration & >1
SET
RESET
Q
Capture enabling
Direct capture
Register for capture
Capture done
Captured value
Capture reset done
44
35015371 00 May 2007
Operation
Standard functions of the TSX CTY ••
The time diagram below shows the capture mode on the rising edge of ICapt . The other modes (capture on falling edge, on rising and falling edges) are similar.
IA physical input
ICapt physical input
Capture enabling
Direct capture
Direct enabling
Current value
Captured values
35015371 00 May 2007 45
Standard functions of the TSX CTY ••
Capture, TSX CTY 2C module specific features
Specific modes
Capture mode on rising and falling edges
The capture mode on rising edges and falling edges of the ICapt physical input can be used, for example, to measure the lengths of parts. This depends on an exterior pulse for two successive captures to be carried out.
The allowable interval between the two capture fronts must be a minimum of
0.5 ms . This is therefore the minimum size of the capture pulse.
Respecting this condition guarantees the correct running of the function, i.e. taking into account of all the edges present on the physical capture input.
Examples
Except for the single capture modes, described in the previous paragraph, module
TSX CTY 2C has two specific modes: z capture of rising edges and falling edges of the input ICapt . This is an extension to the single capture principle, described in the previous Section, z capture combined at hardware preset ( capture before preset mode).
The table below gives as an example this interval according to counting input frequency.
Counting input frequency
125 kHz
250 kHz
500 kHz
1 MHz
Minimum interval between capture edges
(in number of counting pulses)
63
125
250
500
Capture before preset mode
This capture mode, specific to module TSX CTY 2C, applies to the up/down counting of pulses (proximity detector, incremental encoder), but not to the acquisition of data from the absolute encoder z z
The preset IPres physical input triggers successively: a capture, followed by the preset.
46
35015371 00 May 2007
3.4
Standard functions of the TSX CTY ••
Description of the preset and reset function in counting modules
At a Glance
Subject of this section
What's in this
Section?
This section describes the preset and reset functions for counting modules.
This section contains the following topics:
Topic
Introduction to the preset/reset function
Preset in downcounting mode (TSX CTY 2A/4A)
Resetting when counting (TSX CTY 2A/4A)
Preset in up/down counting (TSX CTY 2A/4A/2C)
Page
48
49
52
55
35015371 00 May 2007 47
Standard functions of the TSX CTY ••
Introduction to the preset/reset function
General
Notes
The preset initializes the up/down counting register to a predefined value (by software). Reset initializes to zero the same register.
The preset concerns the down counting mode and the combined up/down counting mode. Resetting only involves the counting mode (TSX CTY2A/4A).
The operation can be triggered or automatic .
The following sections detail the conditions for preset/resetting to zero, according to the counting method and module used.
z z
Preset (or reset) acts on the object (see How to deal with an invalid
measurement, p. 100 ).
Preset (or reset) done is an event which can undergo an event processing operation.
48
35015371 00 May 2007
Standard functions of the TSX CTY ••
Preset in downcounting mode (TSX CTY 2A/4A)
At a Glance Presetting initializes the down counting register to a value preset by the software.
Preset is: z triggered z by the hardware: on the rising or falling edge of the IPres physical input with z z pre-enabled software, Preset enable command, directly by the software: Direct preset command.
automatic , it will be done when the zero value is crossed.
Note: the two types of preset (triggered and automatic) are independent and can co-exist.
Illustration The figure below represents the preset function triggered by the hardware. The associated language objects are described in the section on implicit objects (See
Details of implicit exchange objects, p. 163 ).
Preset event processing
& Event preset
Physical input
IPres
Configuration preset
&
Value of preset
Enable preset
SET
RESET
Q
Preset done
Direct preset
>1
Preset reset
Up/Down counter
35015371 00 May 2007 49
Standard functions of the TSX CTY ••
Time diagrams The following time diagrams show the different cases for preset with or without automatic reloading when crossing the zero value threshold.
The time diagram below shows a preset triggered by IPres , then a direct (software) preset. Zero value is crossed without automatic preset.
IA physical input
Physical input
IPres
Enable preset
Direct preset
Direct enabling
Preset value
Current value t
50
35015371 00 May 2007
35015371 00 May 2007
Standard functions of the TSX CTY ••
The time diagram below shows a preset triggered by IPres , a direct preset, and an automatic preset when crossing the zero value.
IA physical input
Physical input
IPres
Enable preset
Direct preset
Direct enabling
Preset value
Current value t
51
Standard functions of the TSX CTY ••
Resetting when counting (TSX CTY 2A/4A)
At a Glance Resetting initializes the counting register at zero value. Resetting is: z triggered z by the hardware: on the rising or falling edge of the IReset physical input with the software being pre-enabled, Reset enable command, z z directly by the software: Direct reset command.
automatic , will be done when the zero value is crossed.
Note: IReset input is physically the same as the IPres input used for presetting in down counting mode.
The diagram block of the Reset function is the same as that of the function for
Preset (See
Preset in downcounting mode (TSX CTY 2A/4A), p. 49
).
Note: the two types of Reset (triggered and automatic) are independent and can co-exist.
52
35015371 00 May 2007
Time diagrams
Standard functions of the TSX CTY ••
The following figures show examples of triggered and automatic resetting to zero:
The time diagram below shows both a triggered reset on the rising edge of the
IReset input, and a direct (software) reset. The high setpoint is crossed without automatic reset. The associated language objects are described in the section on implicit objects (See
Details of implicit exchange objects, p. 163
).
IA input
Input IReset
Enabling reset
Direct reset
Input IVal
Enable
Direct enabling
High set point
Current value t
Current value
> high setpoint
35015371 00 May 2007 53
Standard functions of the TSX CTY ••
The time diagram below shows a triggered reset on the rising edge of IReset input, a direct (software) reset and an automatic reset when crossing the high setpoint.
IA input
Input IReset
Enabling reset
Direct reset
Input IVal
Enabling
Direct enabling
High
setpoint
Current value
Current value
> threshold 0
Current value
> threshold 1
0
Threshold 0 t
Threshold 1
54
35015371 00 May 2007
Standard functions of the TSX CTY ••
Preset in up/down counting (TSX CTY 2A/4A/2C)
Presetting modes
Notes
In the combined up/down counting modes there are 7 hardware preset modes which are combinations relating to states and/or edges of Ipres and IZ physical z z inputs:
IPres rising edge,
IPres falling edge, z z rising edge of IPres + direction / falling edge of IPres - direction, z z rising edge of IPres - direction / falling edge of IPres + direction, status of IPres , z reference point short cam (with incremental encoder), reference point long cam (with incremental encoder).
Direct preset (by software) exists alongside the hardware presetting modes mentioned above.
z z
There is no automatic preset in combined up/down counting (on crossing a value as there is for up or down counting alone).
There is no preset in conjunction with absolute encoders (TSX CTY 2C).
35015371 00 May 2007 55
Standard functions of the TSX CTY ••
Presetting on
IPres edge
The first two presetting modes (on described for down counting only.
IPres rising or falling edge) are the same as those
The figure below shows an example of preset on the IPres rising edge, as well as direct (software) preset. Preset on the IPres falling edge is similar. The associated language objects are described in the section on implicit objects (See Details of
implicit exchange objects, p. 163
).
Physical input
IB
Physical input
IA
Physical input
IPres
Enable preset
Direct preset
Direct enabling
Current value down counting
Preset value counting t
56
35015371 00 May 2007
Preset on IPres edge combined with counting direction
Standard functions of the TSX CTY ••
The figure below shows an example of preset on the rising edge of IPres in up counting (+ direction), and on the falling edge of IPres in down counting (- direction).
The reverse case is similar.
Physical input
IB
Physical input
IA
Physical input
IPres
Enable preset down counting counting
Direct enabling
Preset value
Current value t
35015371 00 May 2007 57
Standard functions of the TSX CTY ••
Preset on IPres state
The figure below shows an example of preset on IPres state (high level). The counting value is fixed at the preset value for the duration of the active state of IPres .
Physical input
IB
Physical input
IA
Physical input
IPres
Enable preset
Direct enabling counting
Current value t
Preset value
58
35015371 00 May 2007
Standard functions of the TSX CTY ••
Preset on reference point short cam
This mode and the one that follows (reference point long cam) are to be used with an incremental encoder.
The time diagrams below show preset mode on a reference point short cam .
+ Direction: counting
Physical input
IPres (short cam)
Physical input
IZ (zero marker)
(1)
- Direction: down counting
Physical input
IPres (short cam)
Physical input
IZ (zero marker)
(1)
Note: (1) preset is taken into account: z in + direction (up counting): IPres input at state 1, rising edge of marker input at z
IZ revolution and software enabling, in direction - (down): IPres input in state 1, falling edge of marker input at IZ revolution and software enabling.
Note: in principle, as the short cam is less than an incremental encoder revolution, the revolution marker is only produced once in the cam. If, however, there are several incremental revolutions in the cam, the last active edge of the revolution marker signal triggers the preset.
35015371 00 May 2007 59
Standard functions of the TSX CTY ••
Preset on long cam reference point
The time diagrams below show preset mode on a
Physical input
IPres (long cam) reference point long cam
Counting direction
.
Physical input
IZ (zero marker)
Preset
Down counting direction
Physical input
IPres (long cam)
Physical input
IZ (zero marker)
Preset
Note: preset is taken into account on the first rising edge of the IZ revolution marker input, which follows the change of Ipres input to status 0, both in the counting and the down counting directions and software enabling.
60
35015371 00 May 2007
3.5
Standard functions of the TSX CTY ••
Description of the comparison function for counting modules
At a Glance
Subject of this section
What's in this
Section?
This section describes the comparison function for counting modules.
This section contains the following topics:
Topic
Introduction to the comparison function
Comparison in counting or down counting (TSX CTY2A/4A)
Comparison in up counting/down counting mode (TSX CTY2A/4A)
Comparison in up/down counting and measurement mode (TSX CTY2C)
Page
62
63
65
66
35015371 00 May 2007 61
Standard functions of the TSX CTY ••
Introduction to the comparison function
General Modules TSX CTY 2A, 4A and 2C have a comparison function which compares the current value and the captured value with: z z z zero value, threshold 0, z z threshold 1, the high setpoint, z the low setpoint, the rollover crossing.
The table below summarizes the various possibilities:
Element for comparison
Zero value
Threshold 0
The comparison in relation to the current value is possible for:
The comparison in relation to the captured value is possible for:
No module CTY 2A/4A (down counting only)
CTY 2A/4A (up counting only)
CTY 2A/4A (up/down counting)
CTY 2C (up/down counting)
CTY 2A/4A (up/down counting)
CTY 2C (up/down counting)
Threshold 1 CTY 2A/4A (up counting only)
CTY 2A/4A (up/down counting)
CTY 2C (up/down counting)
High setpoint CTY 2A/4A (up counting only)
CTY 2A/4A (up/down counting)
CTY 2A/4A (up/down counting)
CTY 2C (up/down counting)
CTY 2A/4A (up/down counting)
Low setpoint CTY 2A/4A (up/down counting)
Rollover crossing
CTY 2C (up/down counting)
CTY 2A/4A (up/down counting)
CTY 2C (up/down counting)
Note Crossing thresholds, setpoints and rollover can be subjects of an event process operation.
62
35015371 00 May 2007
Standard functions of the TSX CTY ••
Comparison in counting or down counting (TSX CTY2 A/4A)
Comparisons in down counting
In down counting only mode, a single possibility is autorized: z comparison of the current value to the zero value.
Comparisons in up counting z z z
In up counting only mode, three possibilities are offered: comparison of the current value to the 0 threshold, comparison of the current value to the 1 threshold, comparison of the current value to the high setpoint.
35015371 00 May 2007 63
Standard functions of the TSX CTY ••
Operation The diagram below illustrates the operation of the comparisons available in up counting only and down counting only modes in the TSX CTY 2A/4A modules. The associated language objects are described in the section default objects (See
Details of implicit exchange objects, p. 163
).
Current value
Value 0 (down counting) or
Threshold 0 (coun t ing)
Threshold 1
(counting)
EVT
Processing &
Crossing EVT value 0 (down counting) or threshold 0 (counting)
Current value < 0 (down counting) or threshold 0
(counting)
EVT
Processing
&
Crossing EVT threshold 1 (counting)
Current reading > threshold 1
High set point
(counting)
COMPARISON
EVT
Processing &
Crossing EVT high set point (counting)
Current value > high set point
64
35015371 00 May 2007
Standard functions of the TSX CTY ••
Comparison in up counting/down counting mode (TSX CTY 2A/4A)
Possible comparisons
Operation z z
In combined up counting/down counting mode, comparisons are possible with: two thresholds (0 and 1 threshold), and two setpoint values (high and low).
There are therefore 8 possible comparisons.
The figure below illustrates the operation of comparisons available in up counting / down counting mode in TSX CTY 2A /4A modules. The associated language objects are described in the section default objects (See Details of implicit exchange
objects, p. 163
).
Current value
Captured value
EVT processing
&
Value of threshold 0
Crossing EVT threshold 0
Current value > threshold 0
Captured value > threshold 0
Value of threshold 1
EVT processing
&
Crossing EVT threshold 1
Current value > threshold 1
Captured value > threshold 1
Value of high set point
EVT processing
&
Value of low setpoint
EVT processing
&
Crossing EVT high set point
Current value > high set point
Value captured > high set point
Crossing EVT low set point
Current reading > low setpoint
Value captured > low setpoint
COMPARISON
35015371 00 May 2007 65
Standard functions of the TSX CTY ••
Comparison in up/down counting and measurement mode (TSX CTY 2C)
At a Glance
Operation
In up/down counting and measurement mode, comparison can be used with: z z threshold 0, threshold 1.
There are four ways of comparing: current value and captured value in relation to the thresholds.
The figure below illustrates the operation of comparisons available in up/down counting mode in TSX CTY 2C modules. The associated language objects are described in the implicit objects (See
Details of implicit exchange objects, p. 163 )
section.
Modulo
Current value
Capture value
Value of threshold 0
Value of threshold 1
COMPARISON
Processing
EVT
&
Processing
EVT
&
Processing
EVT
&
Processing
EVT
&
SET
RESET
Q
Crossing EVT modulo + direction
Crossing modulo + direction
Crossing EVT modulo - direction
Crossing modulo - direction
Crossing EVT threshold 0
Current reading > threshold 0
Captured value > threshold 0
Crossing EVT threshold 1
Current reading > threshold 1
Captured value > threshold 1
Switch status 0
SET
RESET
Q Switch status 1
66
35015371 00 May 2007
3.6
Standard functions of the TSX CTY ••
Description of switches associated with counting modules
At a Glance
Subject of this section
What's in this
Section?
This section describes how switches associated with counting modules operate.
This section contains the following topics:
Topic
Introduction to storing switches
Switches in down counting mode (TSX CTY 2A/4A)
Switches in counting mode (TSX CTY 2A/4A)
Switches in up/down counting mode (TSX CTY 2A, 4A, 2C)
Page
68
69
70
74
35015371 00 May 2007 67
Standard functions of the TSX CTY ••
Introduction to storing switches
General Some temporary circumstances that occur during up or down counting are stored in switches. The number of these switches (one or two) depends on the operating mode.
Switch outputs can be tested by the software and in some cases sent to physical outputs (reflex outputs).
Switches have automatic adjustable setting to 1 conditions (SET) and resetting to zero conditions (RESET) and direct setting to 1 or 0 conditions by the software. The latter always have the highest priority. Priority rules are set out in the sections
Switches in counting mode (TSX CTY 2A/4A), p. 70
and Switches in up/down
counting mode (TSX CTY 2A, 4A, 2C), p. 74
.
This section describes SET and RESET conditions according to the modules and their operating modes.
Adjusting switch conditions is described in the section Adjustment of the data
modules TSX CTY 2A, TSX CTY 4A and TSX CTY 2C, p. 123 .
68
35015371 00 May 2007
Standard functions of the TSX CTY ••
Switches in down counting mode (TSX CTY 2A/4A)
General
Inputs for switch 0 z z
In counting down mode alone, TSX CTY 2A/4A modules only have one switch setting (0) with pre-defined automatic SET and RESET conditions:
SET: current value less than or equal to 0,
RESET: direct (software) preset or hardware preset done.
The following figure shows inputs for switch 0 in down counting mode. You will also see manual inputs for setting to 0 or 1.
Current value < 0
Operating example
Physical input IPres
Configuration
&
>1
SET
Q
RESET
Set to 0
Set to 1
Switch status 0
Confirm preset
Direct preset
The following time diagram shows how switch 0 operates.
Physical input
IPres
Preset confirmation
Direct preset
Preset value
Current value
Switch status 0
Manual setting to 1
Manual setting to 0
35015371 00 May 2007 69
Standard functions of the TSX CTY ••
Switches in counting mode (TSX CTY 2A/4A)
General
Inputs for switch 0 z z
In counting mode alone, TSX CTY 2A/4A modules have two switch settings: switch 0 where automatic SET and RESET conditions are predefined, switch 1 where automatic SET and RESET conditions can be adjusted using 5 combinations.
The following figure shows inputs for switch 0 in counting mode alone. You will also see manual inputs for setting to 0 or 1.
Current value > high set point
Physical input IReset
Configuration
&
>1
Enabling reset
Direct reset
SET
Q
RESET
Switch status 0
Set to 0
Set to 1
70
35015371 00 May 2007
Inputs for switch 1
Standard functions of the TSX CTY ••
The following figure shows inputs for switch 1 in counting mode alone, as well as direct inputs for setting to 0 or to 1.
BASIC CONDITIONS
Threshold 0 crossing
Threshold 1 crossing
Set point crossing
Enabling event
Reset event
Setting parameters for changing switch status 1
Setting parameters for changing switch status 1
>1
SET
Q
RESET
>1
Set to 1
Set to 0
Switch status 1
Switch setting conditions and priorities
The following tables shows the conditions for switches 0 and 1 with their related priorities.
Priority
Greater priority
Lesser priority
Switch 0
Manual setting to 0.
Manual setting to 1.
RESET: Reset to zero (direct or done).
SET: current value greater than or equal to the setpoint value
Switch 1
Manual setting to 0.
Manual setting to 1.
RESET
SET
Enabling event
Resetting to zero event
Setpoint crossing
Crossing threshold 1
Crossing threshold 0
Notes
Note: switches 0 and 1 have the same basic SET and RESET conditions. If these happen at the same time the global RESET combination takes priority over the
SET combination.
z z
Adjustable conditions (events, crossing thresholds or set points) are the same for switch 1 SET and RESET conditions.
The RESET input takes priority over the SET input.
35015371 00 May 2007 71
Standard functions of the TSX CTY ••
Operating example
(switch 0)
The following time diagram shows how switch 0 operates.
Physical input IReset
Enabling reset
Direct reset
Current value threshold 0
Switch status 0
Manual setting to 1
Manual setting to 0
72
35015371 00 May 2007
Operating example
(switch 1)
Standard functions of the TSX CTY ••
The following time diagram shows how switch 1 operates, with the adjustments shown below:
If…
Enabling event
Resetting event
Setpoint crossing
Crossing threshold 1
Crossing threshold 0
R
S
R
-
Then: final state…
-
Time diagram showing how switch works:
Physical input IReset
Enabling reset
Threshold 1
Threshold 0
Current value
Switch status 1
Manual setting to 1
Manual setting to 0
35015371 00 May 2007 73
Standard functions of the TSX CTY ••
Switches in up/down counting mode (TSX CTY 2A, 4A, 2C)
General These modules offer two storing switches in up/down counting mode (and also measurement mode where applicable for the TSX CTY 2C module).
Switch SET (setting to 1) and RESET (setting to 0) conditions can be adjusted using combinations of: z z
17 basic conditions for TSX CTY 2A/4A modules,
13 basic conditions for TSX CTY 2C modules.
These basic conditions are relative to:
Module Overshooting by the current value of:
TSX CTY 2A/4A thresholds and setpoints
TSX CTY 2C
Captured value settings in relation to: thresholds and setpoints thresholds and rollover thresholds
Events: enabling, preset and capture enabling, preset and capture
74
35015371 00 May 2007
Switch inputs
Standard functions of the TSX CTY ••
The following figure shows switch inputs in up/down counting mode. Also note manual inputs for setting to 0 and 1.
Standard conditions for switch SET and RESET
Threshold 0 or 1 crossing, direction + or -
High or low set point crossing, direction + or -
Rollover crossing, direction + or -
Value captured > or < threshold 0 or threshold 1
Value captured > or < high or low setpoint
Enabling event
Preset event
Capture event
Setting parameters for changing switch status 0
Setting parameters for changing switch status 0
Setting parameters for changing switch status 1
Setting parameters for changing switch status 1
>1
SET
Q
RESET
>1
Set to 1
Set to 0
Switch 0 status
>1
>1
SET
Q
RESET
Switch status 1
Set to 1
Set to 0
Note: switches 0 and 1 have the same basic SET and RESET conditions. If these happen at the same time the global RESET combination takes priority over the
SET combination.
According to the type of module, some conditions cannot be set. Conditions and their priority status are listed later on.
35015371 00 May 2007 75
Standard functions of the TSX CTY ••
Operating example
The time diagram below shows how switch 0 operates with the following adjustments:
If…
Crossing threshold 0 in + direction
Captured value > threshold 0
Other conditions
R
-
Then: final state…
S
Time diagram showing how switch 1 operates.
IPreset
Preset confirmation
Direct capture
Current value
Switch 0
Set to 1 manual
Set to 0 manual
Threshold 0
Preset value
76
35015371 00 May 2007
Standard functions of the TSX CTY ••
Basic conditions and priorities
The following table shows the basic conditions for setting switches 0 and 1 with their related priorities.
Priority
Greater priority
Lesser priority
TSX CTY 2A/4A TSX CTY 2C
Manual setting to 0
Manual setting to 1
RESET
SET
Enabling event
Captured value position in relation to low setpoint
Captured value position in relation to high setpoint
Captured value position in relation to threshold 1
Captured value position in relation to threshold 0
Capture event
Low setpoint crossing
High setpoint crossing
Crossing threshold 1
Crossing threshold 0
Preset event
Manual setting to 0
Manual setting to 1
RESET
SET
Enabling event
Crossing threshold 1
Crossing threshold 0
Rollover crossing
Captured value position in relation to threshold 1
Captured value position in relation to threshold 0
Capture event
Preset event
Note: in reality, crossing setpoints, thresholds and rollovers group two conditions each time, according to the direction (+ or -) of the crossing.
35015371 00 May 2007 77
Standard functions of the TSX CTY ••
3.7
Description of physical outputs associated with counting modules
At a Glance
Subject of this section
What's in this
Section?
This section describes how physical outputs associated with counting modules operate.
This section contains the following topics:
Topic
Counting modules physical outputs
Introduction to modules TSX CTY 2A/4A physical outputs
Outputs fallback mode for TSX CTY2A/4A modules in the event of a fault
Introduction to TSX CTY2C module outputs
Outputs fallback mode for TSX CTY2C modules in the event of a fault
Reactivating outputs after a trip (TSX CTY2A/4A/2C)
Page
79
80
83
84
87
89
78
35015371 00 May 2007
Standard functions of the TSX CTY ••
Counting modules physical outputs
General Each counting module channel offers one to four physical outputs, Q0 to Q3 , according to the module.
Q0 and Q1 outputs, available in all modules, can be configured using two modes: z manual mode: the state of the output is monitored by the software as for a z discrete output, automatic mode: the output copies the associated switch state (switch 0 or 1), and therefore the latches defined for these switches.
This mode is used to set up reflex actions in the module.
Q2 and Q3 outputs (only available in TSX CTY 2C modules), have more limited configuration options (see:
Introduction to TSX CTY 2C module outputs, p. 84
.
The behavior of outputs in the event of a fault (ie. in fallback mode) varies according to whether the module is a TSX CTY 2A / 4A (See Outputs fallback mode for
TSX CTY 2A/4A modules in the event of a fault, p. 83
) or a TSX CTY 2C (See
Outputs fallback mode for TSX CTY 2C modules in the event of a fault, p. 87
).
In the event of a trip (ie. through a voltage surge or short-circuit), outputs must be reset manually using the application, or automatically when the voltage surge disappears.
35015371 00 May 2007 79
Standard functions of the TSX CTY ••
Introduction to modules TSX CTY 2A/4A physical outputs
Description Each channel in TSX CTY 2A and 4A modules has two physical outputs: Q0 and Q1 .
These outputs can be used in manual mode (discrete). The state of these outputs is then set by commands sent by the software.
Q0 and Q1 physical outputs can also be configured automatically. Automatic mode is used to install reflex actions in the module by copying the state of the storing switches respectively. z Counting: two switches are available. The two outputs can be configured automatically.
z Down counting: only switch 0 is available. Only one output ( Q0 ) can be configured automatically.
80
35015371 00 May 2007
Structure of outputs
Standard functions of the TSX CTY ••
The figure below shows the structure of physical outputs from a TSX CTY 2A/4A channel. The associated language objects are described in the implicit objects (See
Details of implicit exchange objects, p. 163 ) section.
SET
RESET
Q Switch status 0
Enabling Automatic mode Q0
Manual / automatic mode Q0
Manual mode status command
& &
&
>1 &
&
Output Q0
Monitoring shortcircuits and physical outputs
MODULE
AND
CHANNEL
FAULTS
>1
Q0 Physical output
Short-circuit fault
Fallback mode configuration
Reactivation of outputs Q0 and Q1
& SET
RESET
Q
Enabling automatic mode Q1
Manual / automatic mode Q1
Manual mode status command
& &
&
>1 &
&
Output Q1
Switch state 1
(not available in down counting mode)
Q1 Physical output
35015371 00 May 2007 81
Standard functions of the TSX CTY ••
How outputs operate
The time diagram below shows how outputs operate (using example).
Q0 output as an
Switch status 0
Manual / automatic mode
Manual mode status command
Enabling automatic mode
Physical output Q0 status
82
35015371 00 May 2007
Standard functions of the TSX CTY ••
Outputs fallback mode for TSX CTY 2A/4A modules in the event of a fault
Why have a fallback mode?
Fallback mode
The physical outputs from TSX CTY 2A/4A modules can directly control certain parts of the process. It is therefore necessary for the safety of the operation to have a fallback mode in the event of a fault in the outputs themselves, the module or the application.
The state of Q0 and Q1 physical outputs is forced to 0 when one of the following z z z z z z z z faults occurs: tripped output (short-circuit or voltage surge), module failure, self-testing in progress, auxiliary input/output fault, counting input fault, fault in the counting application, application fault, stop in communication with the PLC: special fault for which the fallback mode can also be configured following the table below.
All these faults are indicated by the software. The associated language objects are described in the default objects (See
Details of implicit exchange objects, p. 163
) section.
Communication stop – special case
If communication with the PLC stops:
If the fallback mode is configured to… Then outputs are…
Reset, maintain forced to 0, maintained in the state they were in before the fault appeared.
Indicating a trip z z
In the event of a voltage surge or short-circuit of an output, a trip is indicated: by software via language objects, and by LEDs: z the module I/O LED is always lit, z the CH LED associated with the channel with voltage overload flashes.
In addition, a current limit of 625 mA is put in place.
35015371 00 May 2007 83
Standard functions of the TSX CTY ••
Introduction to TSX CTY2C module outputs
Description
Q2 output – special case
Q3 output – special case
Each TSX CTY 2C module channel has four physical outputs: Q0, Q1, Q2 and Q3 .
All outputs can be used in manual (discrete) mode. The state of these outputs is then set with commands sent by software. The associated language objects are described in the implicit objects (See
Details of implicit exchange objects, p. 163 )
section.
Q0 or Q1 physical outputs can also be configured automatically. The state of Q0 and
Q1 outputs is thus that of counter output 0 and 1 outputs respectively. Automatic mode is used to implement reflex actions in the module, according to the state of the up/down counter.
z z
Q2 is actually an input/output which can be configured: either as an enabling physical input IEna , or as a physical output Q2 (in manual mode only).
z z
Q3 output can be used: either in manual mode, or in frequency mode which can be programmed from 1 ms to 4000 s by increments of 1 ms.
Programmable frequency output enables an external synchronization marker to be used on several channels of modules.
84
35015371 00 May 2007
Structure of outputs
Standard functions of the TSX CTY ••
The figure below shows the structure of module TSX CTY 2C physical outputs. The associated language objects are described in the default objects (See Details of
implicit exchange objects, p. 163 ) section.
SET
Q
RESET
Switch 0 status
Automatic mode
Q0 enabling
Manual/automatic mode Q0
Manual mode Q0 command status
& &
&
>1 & &
Output Q0
Monitoring short-circuit and physical outputs
ERRORS
MODULE
& CHANNEL
>1
Physical output Q0
35015371 00 May 2007
Fallback mode configuration
& SET
Q
RESET
Switch 1 status
Automatic mode Q1 enabling
Manual/automatic mode Q1
Manual mode Q1 command status
Manual mode Q2 command status
&
Frequency value program.
Automatic mode
Q3 enabling
Manual/automatic mode Q3
Manual mode Q3 command status
&
&
&
&
&
>1 &
&
>1 &
&
Output Q1
&
Output Q2
&
Output Q3
Physical output Q1
Physical output Q2
Physical output Q3
85
Standard functions of the TSX CTY ••
How outputs operate
The time diagram below shows how outputs operate (using Q0 output as an example).
Switch status 0
Manual/ automatic mode
Manual mode status command
Enabling automatic mode
Physical output
Q0 status
MANUAL AUTO
86
35015371 00 May 2007
Standard functions of the TSX CTY ••
Outputs fallback mode for TSX CTY 2C modules in the event of a fault
Why have a fallback mode?
The physical outputs from TSX CTY 2C modules can directly control certain parts of the process. It is therefore necessary for the safety of the operation to have a fallback mode in the event of a fault in the outputs themselves, the module or the application. z z
For a TSX CTY 2C modules, the fallback modes vary according to: the nature of the fault, the operating mode (manual or automatic) of the faulty output.
Fallback conditions in manual mode
In the event of one of the following faults…: Q0 to Q3 outputs in manual mode…: z z z z z z z z z z z z z module failure, self-testing in progress, counting application fault (invalid software configuration or channel reconfiguration), auxiliary inputs/outputs fault, auxiliary input power supply fault, tripping of any output (short circuit or voltage surge), measurement overrun or overspeed.
counting input fault, counting application fault (adjustment fault), fault in the encoder power supply or sensor, encoder line break or short-circuit,
SSI series frame fault, specific absolute encoder fault.
are reset to zero.
are not reset to zero.
All these faults are indicated by the software via language objects. To find out the associated language objects, see CH_FLT word for explicit language objects (See
Channel standard fault, %MWxy.i.2, p. 173
).
Fallback conditions in automatic mode
When outputs are in automatic mode, they are reset to zero whatever the fault. In this way the module ensures the safety of the operation, even if the fault is masked.
These faults are also indicated by the software.
35015371 00 May 2007 87
Standard functions of the TSX CTY ••
Communication fault – special case
In the event of PLC communication stopping, independently of manual or automatic output mode:
If the fallback mode is configured to… Then outputs are…
Reset, forced to 0, maintain.
maintained in the state they were before the fault appeared.
Indicating a trip In the event of a voltage surge or short-circuit of an output, a trip is indicated: z z by software via language objects, as mentioned before, and by LEDs: z z the module I/O LED is always lit, the CH LED associated with the voltage overload channel flashes.
In addition, a current limit of 625 mA is put in place.
88
35015371 00 May 2007
Standard functions of the TSX CTY ••
Reactivating outputs after a trip (TSX CTY 2A/4A/2C)
At a Glance When a fault has tripped one or several physical outputs, it is essential to reactivate them. This operation varies according to whether the configuration is set up to be manual or automatic.
When a trip causes an incorrect operation of a PLC-controlled process, it is recommended to link output reactivation to a manual operation (for example: press a button to acknowledge, etc.). The operator can then take the necessary action with regard to the automatic process and personnel safety (e.g. request to change to manual mode).
Note: it is possible to program an automatic reactivation, if under the responsibility of the user and PLC-controlled process allowing.
Basic principle When one of the physical outputs short-circuits, all outputs are set to 0 by the down counting module. In spite of this, as long as the short circuit is present, physical outputs on 0 must be blocked for safety reasons: z whatever the mode, ( manual or automatic physical output enabling bits to 0,
), you must disable output: set z in manual mode: program a set to 0 of physical output manual command objects.
35015371 00 May 2007 89
Standard functions of the TSX CTY ••
Principle of manual reactivation
The short-circuit fault reactivation
bit is set on 1 as soon as a short-circuit appears. The
The program can, for example, wait until an acknowledgement button has been pressed before activating this bit.
Reactivation will take effect at least 10 seconds after the short-circuit has been detected, providing that the short-circuit is no longer present. To find out the associated language objects, see implicit objects (See Details of implicit exchange
objects, p. 163
) and explicit objects (See Breakdown of objects for user defined
exchange, p. 172
).
The time diagram below shows how a short-circuit is manually acknowledged.
Physical state
Q0 output
Reactivation of outputs
Appearance of a short-circuit
Disappearance of a short-circuit
10 seconds 10 seconds
1 second output
bit must be enabled to reactivate physical output, providing the manual reactivation mode has been configured.
Short-circuit error
90
35015371 00 May 2007
Principle of automatic reactivation
Standard functions of the TSX CTY ••
Reactivation is automatically requested by the module every 10 seconds. The basic time of 10 seconds is synchronous in relation to the appearance of the fault.
The time diagram below shows how a short-circuit is automatically acknowledged.
Appearance of a short-circuit
Disappearance of a short-circuit
Physical state
Q0 output
10 seconds 10 seconds 10 seconds
Time base system of reactivation
1 second
Short-circuit error
35015371 00 May 2007 91
Standard functions of the TSX CTY ••
3.8
Description of the speed measuring function for the TSX CTY 2C module
Speed Monitoring Function (TSX CTY 2C)
At a Glance
Operation
Speed monitoring, via user adjustable overspeed monitoring, provides a safety measure for the output(s) during an overspeed monitoring overshoot (the outputs are then set to 0). These outputs must be configured in automatic mode.
The figure below shows reflex output changes according to configuration (Q0 output example).
Speed
Overspeed monitoring
Faults Latch
Overspeed error
End of the fault Fault acknowledgement
Position or time
If the faults latch is configured:
Q0 output automatic mode
If the faults latch is not configured:
Q0 output automatic mode
When the output is in automatic mode: z if the faults latch is configured: when the fault has disappeared, it must be acknowledged in order to set the output to its initial state before the fault. A z premature acknowledgement has no effect.
if the faults latch is not configured: when the overspeed error disappears, the output is reset to its initial state.
92
35015371 00 May 2007
Standard functions of the TSX CTY ••
Note: outputs in manual mode
The outputs in manual mode are reset to zero by the overspeed error.
Choice of the
Measurement
Period
The default measurement period is 1 second, which can cause an excessive delay in the detection of overspeed, or an insufficient precision. It is possible to program the measurement period according to the speed to be monitored and the required precision:
Measurement period
1
precision x speed
where the precision is expressed as a decimal value (for example: 0.1% = 0.001) and the speed in pulses/second. The sampling period is expressed in seconds.
Admissible values range from 10
-2
s to 30 s.
The following table shows the minimum measurement period as a function of the speed to be measured, in order to ensure for example a precision of 0.1%.
Speed to be measured
(pulses/second)
250000 ... 1000000
40000 ... 250000
10000 ... 40000
1000 ... 10000
100 ... 1000
Minimum measurement period
(s)
Greater than or equal to 10
-2
Greater than or equal to 25 10
-3
Greater than or equal to 0.1
Greater than or equal to 1
Greater than or equal to 10
Precision
(%)
0.1
0.1
0.1
0.1
0.1
35015371 00 May 2007 93
Standard functions of the TSX CTY ••
3.9
Description of the special functions of the
TSX CTY 2C counting module
At a Glance
Subject of this section
What's in this
Section?
This section describes the three special functions for the TSX CTY 2C counting module.
This section contains the following topics:
Topic
Special function number 1 (TSX CTY 2C)
Special function number 2 (TSX CTY 2C)
Special function number 3 (TSX CTY 2C)
Page
95
96
97
94
35015371 00 May 2007
Standard functions of the TSX CTY ••
Special function number 1 (TSX CTY 2C)
At a Glance
Operation
Special function number 1 calculates the time elapsed between the last up/down count pulse and a capture event. The time between the last pulse and the capture is expressed in milliseconds with an accuracy within + or – 1ms.
The time diagram below shows how special function number 1 operates. final pulse before capture capture done
time
35015371 00 May 2007 95
Standard functions of the TSX CTY ••
Special function number 2 (TSX CTY 2C)
At a Glance
Operation
Special function number 2 triggers a direct (software) capture and a direct (software) preset of the up/down counter on the counting channel. These two events are synchronized with the programmable output frequency (this output must not be used externally in this case).
Each rising edge of the programmable frequency output of the counting channel enables a direct (software) capture of the counter value followed by a direct
(software) preset.
The principle of special function number 2 is shown below:
- direct capture
- direct preset
- direct capture
- direct preset
Notes
Programmable frequency output
The following language objects behave differently in relation to the standard direct capture and preset functions: z the %Ixy.i.2
capture done does not set this bit to 1),
bit is then positioned on 1 (standard direct capture z the %Ixy.i.1
preset done bit is then positioned on 1 (standard direct preset does not set this bit to 1),
For more information on associated language objects, see default objects (See
Details of implicit exchange objects, p. 163
).
96
35015371 00 May 2007
Standard functions of the TSX CTY ••
Special function number 3 (TSX CTY 2C)
At a Glance Special function number 3 is an extension of the speed monitor and measurement function. It enables the counting and measurement channel to: z monitor the correct speed , corresponding to the boolean function:
(Target speed - X% < Speed measure) AND (Speed measure <Target speed + X%) z and detect a stationary moving part , which corresponds to the following boolean function:
(Speed measure < Stop speed)
Function parametering
Operation
Notes
35015371 00 May 2007
Tolerance on the X% speed is a configuration parameter completed by the user.
The Target speed and the Stop speed are adjustment parameters set by the application program using a WRITE_PARAM %CHxy.i ( List of explicit exchange
objects, p. 171
) or a variables animation table in online mode.
The time diagram below shows the principle of special function number 3.
Speed
+X%
Target speed
-X%
Stop speed
Position or time
Correct speed
(1) Significant
Moving part stationary
(1) Significant zone, no other zone for correct speed or stationary moving part is significant.
Correct speed and Moving part stationary information is only significant for speed plateaus. Managing the relevance of this information is the responsibility of the application program.
97
Standard functions of the TSX CTY ••
3.10
Description of how counting modules deal with faults
At a Glance
Subject of this section
What's in this
Section?
This section describes how faults are processed which can occur in a counting application. It also describes the tools provided by the counting modules to detect and deal with them.
This section contains the following topics:
Topic
Introduction to dealing with channel and module faults
How to deal with an invalid measurement
Dealing with faults (TSX CTY 2C)
Page
99
100
102
98
35015371 00 May 2007
Standard functions of the TSX CTY ••
Introduction to dealing with channel and module faults
At a Glance Counting modules can indicate and identify faults occurring in their configuration and during operation. These indication/identification functions vary according to the type of module.
In addition, module outputs have fallback modes, which are either preset or can be configured, in order to ensure safe operation. Output behavior is described in detail in the
Description of physical outputs associated with counting modules, p. 78
section.
Dealing with
TSX CTY 2A/4A module faults
These modules indicate that a fault has occurred, shown by the following default exchange language objects: z z z channel error ( %Ixy.i.ERR
), module error ( %Ixy.MOD.ERR
), invalid measurement ( %IxWxy.i.2:X7 ).
The application can identify the cause of the fault by examining the status words.
This is only possible if the fault is still present when the processing takes place.
Dealing with
TSX CTY 2C module faults
This module uses the same language objects as before to indicate the occurrence of faults.
z z
However, in addition, it has functions for: storage, which is used to acknowledge and identify temporary faults, and masking, which is used selectively to avoid certain faults being brought up again.
35015371 00 May 2007 99
Standard functions of the TSX CTY ••
How to deal with an invalid measurement
At a Glance
Fault context
Notes
Invalid measurement information is available to the user, in addition to diagnostics.
It is used to detect a loss of counting or measurement data.
This fault management, which is similar to latching, is provided in all counting modules. z z
Faults can be indicated by: a cold start or warm restart of the application, a fault on counting input: z a power supply fault or a break in the sensor line (proximity detector or encoder), z z a series frame transmission error (TSX CTY 2C), a specific absolute encoder fault (TSX CTY 2C); z z exceeding the capacity of the counting register, exceeding the speed threshold (TSX CTY 2C).
In this case the contents of the counting register cannot be used and counter outputs are set to 0. If this happens, the Invalid measurement bit (%IWxy.i.2:X7) is set to 1.
When the register is initialized or re-initialized by presetting (or reset) and as long as none of the faults above are still present, the Invalid measurement bit switches to
0. z z
The Invalid measurement bit set to 1 does not give any information about the fault which caused it. To find this out, the application must examine status words
%MWxy.i.2
and 3 (See
Breakdown of objects for user defined exchange, p. 172 ),
as long as the fault is still there (TSX CTY 2C).
Masked faults do not trigger the Invalid measurement indicator (TSX CTY 2C).
100
35015371 00 May 2007
How to manage the incident
Standard functions of the TSX CTY ••
The procedure for managing and removing the invalid measurement by the application is as follows:
Warm restart or cold start
Counter preset/reset
Invalid measurement
bit is it at 1?
NO
Normal operation
YES Application fault management
35015371 00 May 2007 101
Standard functions of the TSX CTY ••
Dealing with faults (TSX CTY 2C)
At a Glance The TSX CTY 2C module has two independent and additional functions, which can be configured by the user, for dealing with channel faults: z z
Storing is used to indicate occurrence of a fault, however temporary.
Masking certain faults enables the application to continue operating in downgraded mode.
These two functions are selected using the configuration screen (See Description of
the configuration screen for a counting module, p. 104 ).
Principle of fault storing
Storing is used to: z indicate to the application the occurrence of a fault, temporary or otherwise, shown by the channel error bit %Ixy.i.ERR
and the module error bit z
%Ixy.MOD.ERR
(implicit exchanges), and identify it via status words (explicit exchanges).
In the absence of a latch, there is a risk that temporary faults will not be detected in the regular scans by the processor, for these language objects are reset to zero as soon as the fault has disappeared.
Principle of masking faults
Masking involves preventing, according to the situation, channel error bits, module error bits and I/O and ERR LEDS being set. The faults concerned are selected individually (fault masking by default).
Note: in the event of an error whether masking was enabled or not, outputs will change to fallback mode to ensure safety, and the CH LED will flash.
Masked faults therefore risk being ignored by the application. Nevertheless, the application can access the fault warning if the COUNT_FLT bit test ( %Ixy.i.3
) has been programmed.
Status words continue to be positioned normally, whether faults are masked or not.
Important notes
Principle of reading and acknowledging faults z z
Even if a fault has been unmasked, it can pass unnoticed by the application if the store has not been configured, and if this fault is temporary.
There is also another parallel function which indirectly indicates faults linked to counting, using an Invalid measurement (See How to deal with an invalid
measurement, p. 100 ) which has been detected.
z z
When the fault has been indicated to the processor, the latter must read the module status words using a READ_STS instruction.
Module status words are reset to zero when: the fault(s) have disappeared, and if there is a latch, after the acknowledgement command (bit %Qxy.i.3
).
102
35015371 00 May 2007
Configuration of the TSX CTY2A,
TSX CTY4A and TSX CTY 2C modules
4
At a glance
Subject of this chapter
What's in this
Chapter?
This chapter describes the different configuration options of the TSX CTY2A,
TSX CTY4A and TSX CTY2C modules.
This chapter contains the following topics:
Topic
Description of the configuration screen for a counting module
How to configure the counting inputs (TSX CTY 2A/4A)
How to configure the counting and measurement inputs (TSX CTY 2C)
How to configure an absolute encoder interface (TSX CTY 2C)
How to configure the capture of a counting register
How to configure preset or reset in a counting function
How to configure event processing
How to configure the combined input IEna/Q2 (TSX CTY 2C)
How to program multiplexing of absolute encoders with parallel outputs
How to configure operation on switch to zero or setpoint crossing
How to configure the behavior of faulty outputs
How to configure a special function (TSX CTY2C)
Page
104
106
107
110
112
113
114
115
116
118
119
121
35015371 00 May 2007 103
Configuration
Description of the configuration screen for a counting module
General The configuration screen is a graphic tool used to configure a module selected from a rack. It displays the parameters associated with the module channels and is used to modify them in both offline and on-line modes.
It also enables access to adjustment and debugging screens (only in on-line mode for the latter).
Note: refer to the Common application functions (See: PL7 Junior, Pro ;
Application-specific functions volume 1) section to see how to configure, adjust and debug an application.
Illustration
Note: it is not possible to configure a module with the program by using language objects %KW directly. These words are accessed in read-only format.
The diagram below shows a configuration screen.
1
2
TSX CTY 2C [ RACK0 POSITION 5 ]
Configuration
Reference: MOD.COMPT.MESURE 2 VOIES
3
4
5
Symbol:
Channel:
Channel 0
Input interfaces
Counting pulses
Function:
Up/Down counting and
Preset on IPres
IPres rising edge
Capture on ICapt
ICapt rising edge
Capture before preset on IPres
Enabling on IEna or output Q2
Enable input on IEna
Faults
Storing
Output Q2
Task:
MAST
Configuration...
Masking…
Resetting the outputs
Manual
Automatic
Fallback mode
Reset
Maintain
Event
EVT
Special functions
Num.:
Parameter:
0 0 0 0
0
104
35015371 00 May 2007
Description
Configuration
The table below shows the different elements of the configuration screen and their functions.
3
4
Address Element
1
2
5
Title bar
Function
Calls up the reference for the selected module and its geographical address (rack number and physical position in the rack).
Command zone z z
Shows the mode in progress ( Configuration in this example) and is used to select the other modes:
Adjusting
Debugging mode.
(or diagnostics), can only be accessed in on-line
Module zone Calls up the abbreviated name of the module.
Channel field Is used to select the counting channel to be configured and the associated counting function: z Symbol: channel name set by the user (using the variables z editor).
Counter or Channel: counter number, i.e. of the module channel.
z Function: counting function from those available for the module concerned. Depending on this selection the headings of the configuration field can differ. By default, No function is z configured.
Task: defines the ( MAST or FAST task in which the channel default exchange objects will be exchanged).
Configuration zone
Is used to configure the channel parameters. This field contained various headings, displayed according to the counting function selected. Some selections can be fixed and appear grayed out.
In this example, the headings Input interface and Masking have a button which accesses a sub-menu which must be completed.
35015371 00 May 2007 105
Configuration
How to configure the counting inputs (TSX CTY 2A/4A)
At a Glance
Procedure
The counting modules TSX CTY 2A and 4A have several possible input interface types, according to the selected counting function. The interface is configured using the configuration editor.
The table below summarizes the procedure for configuring the input interface for a
TSX CTY 2A or 4A.
Step Action
1 Access the module configuration screen required.
2 In the Channel field: select the counter (i.e. the channel) concerned and its function.
3 In the Input interfaces field, select from the drop-down list in the first field:
Input interfaces
IA up/down counts, application direction
Solid state contact
Line check
Multiplication by 1 by 4 z the type of input interface.
The details of the different types of interface are described in the section named
Description of counting module input interfaces, p. 37 .
Note: in up or down counting only, the IA Input selection is frozen.
4 Select input filtering from the drop-down list of the second field: z z
Solid state contact (reduced filtering), or
Mechanical contact (anti-rebound filtering, pulse frequency limited to 100 Hz).
5 If an incremental encoder interface was selected at step 3, fill in the following fields, otherwise, go to step 6 to complete the configuration: z Line check (is used to indicate a channel fault in the event of a break in the z physical connection of the encoder).
Multiplying by 1 or by 4 (is used to increase counting accuracy at the expense of maximum frequency).
6 Configuration of the input interface is complete.
Confirm the new configuration. To do this: z pull down the Edit menu and select the Enable command.
106
35015371 00 May 2007
How to configure the counting and measurement inputs (TSX CTY 2C)
Configuration
At a Glance The TSX CTY 2C speed counting and measurement module has several possible input interface types. The interface is configured using the configuration editor.
35015371 00 May 2007 107
Configuration
Procedure
108
The table below summarizes the procedure for configuring a TSX CTY 2C module input interface.
Step Action
1 Access the module configuration screen required.
2 In the Channel field: select the counter (i.e. the channel) concerned and its function.
3 In the Input interface field, select from the drop-down list.
Input interfaces
Counting pulses Configuration...
z the type of input interface: z Counting pulses, z z
Incremental encoder, or
Absolute encoder.
4 Click on the Configuration button to access these details.
5 The following screen entitled Input interface details depends on the type of interface chosen in step 3: z Counting pulses interface: choose the configuration for the physical inputs IA,
IB, IZ , then the filtering (signal frequency limit).
Details of input interface
Input interface: COUNTING PULSES
Counting pulses:
IA up/down counts, IB direction
Filtering:
Solid state contact < 250 kHz
Measurement inversion
Modulo
Enable Cancel z z
Incremental encoder interface: choose the filtering, while taking into account the multiplication by 1 or by 4.
Absolute encoder interface: refer to the part How to configure an absolute
encoder interface (TSX CTY 2C), p. 110 .
6 Then select, according to the application: z Measurement inversion (invert the measurement change direction given by the input definition).
z The modulo mode and its value.
35015371 00 May 2007
Step Action
7 Configuration of the input interface is complete.
Confirm the new configuration. To do this: z z enable the Input interface details screen, pull down the Edit menu and select the Enable command.
Configuration
35015371 00 May 2007 109
Configuration
How to configure an absolute encoder interface (TSX CTY 2C)
At a Glance
Procedure z z
Module TSX CTY 2C as well as having counting pulse inputs, has a specific interface for data acquisition: of data from a series output absolute encoder (SSI), or of data from one of four parallel output absolute encoders, with adaptation base(s) ABE-7CPA11.
The table below shows the interface configuration steps.
Step Action
1 Follow the general procedure for the TSX CTY 2C module How to configure the
counting and measurement inputs (TSX CTY 2C), p. 107
to start configuring, as far as the next Input interface details entry screen.
Details of input interface
Input interface: ABSOLUTE SSI ENCODER
Encoder
Binary Gray code Measurement inversion
SSI Frame
Transmission frequency:
Header
No. of header bits:
200 kHz
0
Status
Multiplexing
Line check
No. of status bits: 0
Error bit
Data
No. of encoder data bits:
No. of most significant bits masked:
Resolution reduction:
Modulo 65 536
16
0
0
Parity
Parity bit
Frame: x16x
Enable Cancel
Some headings are frozen, or not displayed, according to the type of encoder output (series or parallel).
2 Fill in the accessible headings according to the following table.
3 Confirm the new configuration. To do this: z z enable the entry screen above, pull down the Edit menu and select the Enable command.
Definitions and heading options
The table below shows the possible definitions and heading options on the Input interface details screen according to the type of absolute encoder output.
110
35015371 00 May 2007
Configuration
Zone Heading SSI Series output encoder Parallel output encoder(s)
Encoder
Binary or Gray
Measurement inversion
Multiplexing
Coding type.
Invert the measurement change direction to a rotation direction given by the encoder.
Does not exist.
idem series output idem series output
Authorizes encoder multiplexing by the application (See How to program multiplexing of absolute encoders
with parallel outputs, p. 116
).
SSI Frame
Header
Data
Transmission frequency
Line check
150, 200 (by default), 375, 500, 750 kHz or 1 MHz.
idem series output
Line check selection (rupture or short circuit).
Frozen: line check control present.
Number of header bits
No. of encoder data bits
0 to 4 (0 by default)
8 to 25 (16 by default)
No. of masked MSBs 0 to 17 (0 by default) 0 to 16 (0 by default)
Reducing the resolution
0 to 17 (least significant masked bits, 0 by default).
0 to 16 (0 by default).
Limit: No. of encoder data bits – No. of most significant masked bits – No. of least significant masked bits
> 8 active data bits.
Modulo idem series output
No. of status bits
Frozen (depending on the number of active data bits).
0 to 4 (0 by default)
Frozen at 0.
8 to 24 (24 by default)
Frozen at 3.
Error bit
Status
Parity
Frame
Position
Active at 0/1
Parity bit none by default. To gain access to this choice, the number of status bits must be
> 1.
none by default.
1 to 4 (1 by default). The heading only appears if the error bit is selected.
Error bit active level (1 by default). The heading only appears if the error bit is selected.
Frozen at 3. The heading only appears if the error bit is selected.
idem series output none by default. The choice of parity only appears if the bit is selected. If the parity is odd, the number of status bits is limited to 3.
Frozen: with , even parity.
Information: summary of the series frame characteristics.
idem series output
35015371 00 May 2007 111
Configuration
How to configure the capture of a counting register
At a Glance
Notes
Procedure
This parameter defines how to capture the current counting register value at a precise moment defined by the signal on the physical input ICapt . This function only exists in up/down counting (TSX CTY 2A / 4A) and up/down counting and measurement (TSX CTY 2C).
z z
Hardware capture configuration is defined in the Capture on ICapt zone in the configuration screen. There are two available options: capture on rising edge, capture on falling edge.
So that capture takes place correctly, it must be enabled beforehand by the software using the corresponding language objects (See Software commands, %Qxy.i.r bits,
p. 167
), run by the application.
Direct capture by the software does not require the following procedure to be set up.
The table below summarizes the procedure for configuring hardware capture with
TSX CTY 2A, 4A and 2C modules.
Step Action
1 Access the module configuration screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Capture on ICapt zone click on the drop-down menu button.
Result: the list of options below appears.
Capture on Capt
ICapt falling edge
ICapt rising edge
ICapt falling edge
ICapt rising and falling edges
4 Select the hardware capture edge required.
5 Hardware capture configuration is complete.
If there are no more parameters to configure, enable the new configuration. To do this: z scroll down the Edit menu and select the Enable command.
112
35015371 00 May 2007
Configuration
How to configure preset or reset in a counting function
At a Glance
Notes
Procedure
This parameter defines the initialization mode of the counting register at a moment defined by the signal on the IPres physical input or IReset (depending on the counting function).
Configuring hardware preset or reset is defined in the Preset on IPreset zone or
Reset on IReset zone in the configuration screen. z z z
So that the hardware preset IPreset or Reset IReset does take place, it must first be enabled by the software using the corresponding language objects (See
Software commands, %Qxy.i.r bits, p. 167 ), run by the application.
Direct presetting or resetting by the software does not require implementation of the following procedure.
The preset value is defined in the adjustment screen (See How to adjust the
preset value, p. 127
).
The table below summarizes the hardware preset configuration procedure for the
TSX CTY 2A, 4A and 2C modules.
Step Action
1 Access the module configuration screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Preset on IPres or Reset on IReset zone click on the drop-down menu button.
Result: a list of options similar to this one appears. The options that are actually available depend on the type of module and the counting function selected.
Preset on IPres
IPres rising edge
IPres falling edge
IPres rising edge +direction/IPres Falling edge -direction
IPres rising edge -direction/IPres falling edge +direction
IPres
Original short cam port
4 Select the hardware preset (or reset) required.
5 Hardware preset (or reset) configuration is complete.
If there are no more parameters to configure, enable the new configuration. To do this: z scroll down the Edit menu and select the Enable command.
35015371 00 May 2007 113
Configuration
How to configure event processing
At a Glance
Procedure
This parameter is used to associate event processing to the counting channel.
This configuration is defined in the Event zone of the configuration screen.
The table below summarizes the procedure for configuring event processing for all
TSX CTY 2A, 4A and 2C modules.
Step Action
1 Access the module configuration screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Event zone, check the EVT box.
Event
EVT 31
4 Select the number of the event task which is associated to the counting channel
(this task must then be programmed).
5 Configuration of the event processing is complete.
If there are no more parameters to configure, enable the new configuration. To do this: z scroll down the Edit menu and select the Enable command.
114
35015371 00 May 2007
Configuration
How to configure the combined input IEna/Q2 (TSX CTY 2C)
At a Glance
Procedure z z
This parameter defines the use of this combined input/output: either as counter enable input IEna , or as physical output Q2 (in manual mode).
These parameters are set in the Enable on IEna or Q2 output zone in the configuration screen.
The table below summarizes the procedure for configuring the combined input/ output IEna / Q2 of the TSX CTY 2C module.
Step Action
1 Access the module configuration screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Enable on IEna or Q2 output zone, click on the button corresponding to the required option.
Enabling on IEna or output Q2
Enable input on IEna
Output Q2
4 Configuration of the combined input/output IEna/Q2 is complete.
If there are no more parameters to configure, enable the new configuration. To do this: z scroll down the Edit menu and select the Enable command.
35015371 00 May 2007 115
Configuration
How to program multiplexing of absolute encoders with parallel outputs
At a Glance
Principals of multiplexing
Analysis of multiplexing
Each channel of the TSX CTY 2C module is used to acquire the signals supplied by an absolute encoder with parallel outputs, via a series frame, using adaptation
TELEFAST ABE-7CPA11. Use of several TELEFASTs enables up to 4 absolute encoders with parallel outputs to be multiplexed on the same channel.
Multiplexing is managed by the counting application.
The encoders are addressed by two discrete outputs (belonging to the TSX CTY 2C module, preferably Q2 and Q3 outputs, or to a discrete module). These outputs are looped onto the dedicated TELEFAST inputs. This sends the acquisition value and the address of the present encoder to the TSX CTY 2C module.
The context linked to the encoder (offset value, threshold values, SET and RESET values of the switches), which must change when a new encoder is addressed, is controlled by the application program.
Furthermore, this must take into account the fact that the information regarding position/crossing of thresholds, rollover, the speed value and the overspeed fault is invalid when an encoder is being changed.
This operation involves the following steps for each absolute encoder and at each acquisition:
Step
1
2
3
4
Action
Application loading of the context for the encoder concerned.
Application addressing of the encoder concerned.
Acquisition of data.
Possible wait linked to the acquisition period, then return to step 1 to process the next encoder.
116
35015371 00 May 2007
Multiplexing flowchart
Configuration
The diagram below shows an example of how to program multiplexing:
Step 0
Step 1
Step 2
- Setting addressing outputs (Q2, Q3)
in manual mode (Q2, Q3).
- Encoder i parameter loading
( WRITE_PARAM ).
WRITE_PARAM complete: no adjustment in progress
ET encoder test for addressing outputs.
- Initial fault processing.
- Fault acknowledgment.
No channel error ET no invalid measurement
- Event unmasking during
event processing.
- Fault processing.
Step 3
- Current value acquisition.
- Dealing with setting information
in relation to the thresholds and modulo.
- Event processing.
Step 4
- Event unmasking during configured
event processing.
35015371 00 May 2007 117
Configuration
How to configure operation on switch to zero or setpoint crossing
At a Glance
Notes
Procedure
This parameter defines the automatic reset mode of a TSX CTY 2A/4A module’s counting register: z z on switch to the value zero (only during down counting), on high setpoint crossing (only during up counting).
This configuration is defined in the Operation on switch to 0 or Operation on setpoint crossing zone in the configuration screen. z z
These operations are similar to automatic preset or reset respectively. They do not require any preset or reset software enabling.
The setpoint values are defined in the adjustment screen.
The table below summarizes the procedure for configuring the operation on zero value crossing or high setpoint crossing of the TSX CTY 2A and 4A modules.
Step Action
1 Access the module configuration screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Operation on switch to 0 or Operation on setpoint crossing zone, click on the button corresponding to the required option.
Operation on switch to 0
Without down counter preset
With down counter preset
Action when crossing setpoint
Without counter reset
With counter reset
4 Configuration of the operation on zero or setpoint crossing is complete.
If there are no more parameters to configure, enable the new configuration. To do this: z scroll down the Edit menu and select the Enable command.
118
35015371 00 May 2007
Configuration
How to configure the behavior of faulty outputs
At a Glance These parameters define the behavior of physical outputs of a channel on
TSX CTY 2A, 4A and 2C modules when faults occur due to a voltage surge or shortz z circuit: reactivation of outputs, fallback mode.
These configurations are defined in the zones of the same name in the configuration screen.
CAUTION
Ensure that the desired configuration, and in particular the reactivation mode, is compatible with the operation safety requirements
Failure to follow this precaution can result in injury or equipment damage.
Note Configurations defined in this way are only valid when there is an overload or shortcircuit of one or more outputs. In the event of a different kind of fault, the fallback mode is predefined according to the fault and the module type (see Description of
physical outputs associated with counting modules, p. 78
).
35015371 00 May 2007 119
Configuration
Procedure The table below summarizes the procedure for adjusting the behavior of faulty outputs.
Step Action
1 Access the module configuration screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Reactivation of outputs zone, select: z Manual, or z Automatic .
Resetting the outputs
Manual
Automatic
Fallback mode
Reset
Maintain
4 In the "Fallback mode" zone, select: z Reset, or z Maintain .
5 Configuration of physical output behavior is complete.
If there are no more parameters to configure, enable the new configuration. To do this: z scroll down the Edit menu and select the Enable command.
120
35015371 00 May 2007
Configuration
How to configure a special function (TSX CTY 2C)
At a Glance The special functions of the TSX CTY 2C module are used to respond to certain particular needs that are not covered by the standard functions.
The table below shows the objects of these functions and the numbers of the version required for the module:
Function
No.
Description
1 Time lapsed between the last pulse and a hardware capture occurrence.
2
3
Triggering a direct and synchronized capture and preset with each rising edge of the programmable frequency output.
Speed checks correct and moving part stationary .
Version module
1.0
1.0
1.1
Functions that are specific to a case can also be developed.
Compatibility of special functions
Any attempt to configure a counting module with an unsupported special function will result in an application error.
z z
The counting module version is indicated: on the product reference label on the right-hand side of the module, in the Module zone of the debugging screen (on-line mode).
Configuring several special functions
It is possible to configure two special functions simultaneously if they are not exclusive, that is to say if there is no overlap between their language objects. In practice, these are functions nos. 1 and 2.
The table below summarizes the properties of reciprocal exclusions.
Funct. No. 1
Funct. No. 2
Funct. No. 3
Funct. No. 1
-
Funct. No. 2
Non exclusive (1)
Non exclusive (1) -
Exclusive Exclusive
Funct. No. 3
Exclusive
Exclusive
-
(1) When special functions 1 and 2 are used simultaneously, the time calculation of special function number 1, %IDxy.i.11, can only be accessed in a Fast or Mast task, on capture done %Ixy.i.2=1.
35015371 00 May 2007 121
Configuration
Procedure The table below summarizes the procedure for configuring the special functions of the TSX CTY2C module.
Step Action
1 Access the module configuration screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Special functions zone, enter the number of the special function in one of the Num fields.
Special functions
Num.:
Parameter:
0 0 0 0
0
Enter the number of the second special function, if necessary. A zero means that no function has been selected.
4 Complete the Parameter field if necessary, for special function number 3 (See
Special function number 3 (TSX CTY 2C), p. 97
) for example.
5 Special function(s) configuration is complete.
If there are no more parameters to configure, enable the new configuration. To do this: z scroll down the Edit menu and select the Enable command.
122
35015371 00 May 2007
Adjustment of the data modules
TSX CTY 2A, TSX CTY 4A and
TSX CTY 2C
5
At a Glance
Subject of this chapter
What's in this
Chapter?
This chapter describes the different adjustment options of the TSX CTY 2A,
TSX CTY 4A and TSX CTY 2C modules.
This chapter contains the following topics:
Topic
Description of the adjustment screen of a counting module
How to adjust the offset value of an absolute encoder
How to adjust the preset value
How to adjust channel fault processing (TSX CTY 2C)
How to adjust threshold and set point values
How to adjust the speed measurement and monitoring function
How to adjust the frequency output period (TSX CTY 2C)
How to adjust the switch change of status conditions
Page
124
126
127
128
129
130
131
132
35015371 00 May 2007 123
Adjustment
Description of the adjustment screen of a counting module
General The adjustment screen displays adjustment parameters for the module and is used to modify them in both offline and on-line mode.
It also gives access to configuration and debugging screens.
The structure of the adjustment screen is very similar to that of the configuration screen.
Note: consult the Common task functions (See: PL7 Junior, Pro; Applicationspecific functions volume 1) section to see how to configure, adjust and debug an application.
Illustration
Note: the adjustment screen is a graphic tool for facilitating an application development. Unlike in configuration, it is possible to program adjustments by using language objects directly.
The diagram below shows an example of an adjustment screen.
1
2
TSX CTY 4A [RACK 0 POSITION 4]
Adjust
Reference: MOD.COMPT.4VOIES 40KHZ
3
4
5
Symbol:
Counter:
Counter 0
Preset value
100
Initial value 0
Threshold value
Threshold 0
Initial value 0
Threshold 1
Initial value
Setpoint values
0
High
Initial value
Low
Initial value
0
0
200
300
500
50
Function:
Up/Down counting Switch status
State of switches
Changing switch state on
Crossing threshold 0 in + direction
Crossing threshold 0 in - direction
Captured value>= threshold 0
Captured value < threshold 0
Crossing threshold 1 in + direction
Crossing threshold 1 in - direction
Captured value >= threshold 1
Captured value <threshold 1
High setpoint crossing in + direction
High setpoint crossing in - direction
Value captured >= high setpoint
Low setpoint crossing in + direction
Low setpoint crossing in - direction
Actions: Set Reset
B0 B0i B1 B1i
R R
S S
None
124
35015371 00 May 2007
Description
Adjustment
The table below shows the different elements of the adjustment screen and their functions.
3
4
Address Element
1
2
Title bar
Command zone
Function
Shows the selected module’s reference and geographical address (rack number and physical position in the rack).
Shows the screen in progress ( Adjustment ) and is used to switch to or switch back to other screens: z Configuration, z Debugging (or diagnostics), can only be accessed in on-line mode.
Module zone Shows the abbreviated name of the module.
Channel zone Is used to select the channel to be adjusted and the heading for z z setting switch parameters: z Symbol: channel name set by the user (using the variables editor).
Counter: counter number, i.e. of the module channel.
Function: calls up the configured counting function. This heading is fixed. z Switch status: box to be checked if you wish to set latch change of status parameters. Otherwise, the heading does not appear in the adjustment field.
5 Adjustment field
This field contains various headings to be completed (parameter values), displayed according to the counting function selected.
Current value and initial value z z
For each heading two values appear: the entered value which can be modified, in one window, and the initial value which cannot be directly modified.
The behavior of these values depends on the PLC connection mode.
z In offline mode: after enabling ( Edit
→
Enable command), the entered value becomes the initial value and appears in the corresponding field. On transfer the z initial value becomes the current value.
In on-line mode: after enabling, the entered value becomes the current value.
The Edit
→
Save adjustment parameters command is used to copy the current value in the initial value.
Note: the initial value is the one that the parameter concerned takes when the PLC starts from cold.
35015371 00 May 2007 125
Adjustment
How to adjust the offset value of an absolute encoder
At a Glance
For encoders with parallel outputs
Procedure
This parametering is an option when the input interface of the TSX CTY 2C module is configured for a series output absolute encoder.
This parameter is used to perform a shift from zero by adding the offset value to the current value supplied by the encoder.
Parameters are set in the Offset value zone in the adjustment screen.
For multiplexed encoders with parallel outputs, the offsets must be managed by the application (See How to program multiplexing of absolute encoders with parallel
outputs, p. 116 ).
The table below summarizes the procedure for adjusting the offset value.
Step Action
1 Access the module adjustment screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Offset value zone enter the value desired.
Offset Value
100
Initial value 0
This value must be between: 0 and the rollover value (this mode is implicit for an absolute encoder interface).
4 Offset value adjustment is complete.
z If there are no more parameters to be defined, enable the new adjustment with the Edit
→
Enable command.
Note: in offline mode, the value entered is then copied again in the Initial value field. In on-line mode, the value entered then becomes the current value.
126
35015371 00 May 2007
Adjustment
How to adjust the preset value
At a Glance
Procedure
This parameter defines the preset value (in down counting only or up/down counting) i.e. the value reloaded in the counting register after: z a hardware or software preset command, especially after an invalid measurement, z or automatic preset when switching to zero.
This parameter exists when the input is configured for counting pulses or an incremental encoder.
Parameters are set in the Preset value zone in the adjustment screen.
The table below summarizes the procedure for adjusting the preset value.
Step Action
1 Access the module adjustment screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Preset value zone enter the required value.
Preset value
100
Initial value 100 z z
This value must be between:
-16 777 216 and +16 777 215 in normal mode,
0 and the rollover value if this mode is configured (TSX CTY 2C).
4 Reset value adjustment is complete.
z If there are no more parameters to be defined, enable the new adjustment with the Edit
→
Enable command.
Note: in offline mode, the value entered is then copied again in the Initial value field. In on-line mode, the value entered then becomes the current value.
35015371 00 May 2007 127
Adjustment
How to adjust channel fault processing (TSX CTY 2C)
At a Glance
Procedure
The TSX CTY 2C module has two independent channel fault processing mechanisms which can be configured by the user: z Storing enables the application to detect the occurrence of a fault temporary or otherwise.
z Masking certain faults enables the application to continue operating in downgraded mode (safeguards activated).
The table below summarizes the procedure for configuring fault processing for a
TSX CTY 2C module:
Step Action
1 Access the adjustment screen of the TSX CTY2C module required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 Under the Faults heading, check the Recording box if required or leave blank.
Fault
Storing Masking…
4 Click on the Mask button. The following dialog box appears:
Mask faults
Faults
Auxiliary Inputs/Outputs: Power supply
Auxiliary Outputs: During short-circuit
Counting inputs: Encoder or proximity sensor supply
Counting inputs: Encoder line break or short-circuit
Counting inputs: SSI frame transmission fault
Masking
Enable Cancel
5 Check the boxes corresponding to the faults which are to be masked.
The masked information is displayed next to each checked box.
6 Enable the dialog box.
7 Fault processing adjustment is complete.
z If there are no more parameters to be defined, enable the new configuration with the command Edit
→
Enable .
128
35015371 00 May 2007
Adjustment
How to adjust threshold and set point values
At a Glance
Procedure
These parameters define threshold values 0 and 1 and high and low setpoints.
These objects have very similar roles in comparisons.
Parameters are set in the Threshold value and Setpoint value zones in the adjustment screen.
The table below summarizes the procedure for adjusting threshold values.
Step Action
1 Access the module adjustment screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Threshold values zone enter the required values.
Threshold
Threshold 0:
Initial value: 250
250 Threshold 1:
Initial value: 500
500 z z
These values must be between:
-16 777 216 and +16 777 215 in normal mode,
0 and the rollover value if this mode is configured or implicit (TSX CTY 2C, absolute encoder interface).
Note: the respective values of threshold 0 and threshold 1 do not have to be in this order.
4 In the Set point value zone enter the value(s) required; when they are defined
(depending on the module and the counting function configured).
Setpoint values
High
Initial value 0
500
Low
Initial value 0
50
These values must be between: -16 777 216 and +16 777 215.
5 Threshold and set point value adjustment is complete.
z If there are no more parameters to be defined, enable the new adjustment with the Edit
→
Enable command.
Note: in offline mode the value entered is then copied in the Initial value fields. In on-line mode the values entered then become the current values.
35015371 00 May 2007 129
Adjustment
How to adjust the speed measurement and monitoring function
At a Glance
Procedure
This parametering is offered with the TSX CTY 2C module. z z
The Speed monitoring zone is used to define: the overspeed threshold value, the speed measurement period.
The table below summarizes the procedure for adjusting the speed measurement and monitoring function.
Step Action
1 Access the module adjustment screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 In the Speed monitoring zone enter the required overspeed threshold value.
Speed monitoring
Overspeed threshold:
Initial value: 200
200 pulses/s
Measurement period:
Initial value: 10
10 ms
This value must be between: 1 and 4 000 000 pulses/s .
The value 0 inhibits the overspeed monitoring.
4 Enter the value of the measurement period according to the estimated pulse frequency and the desired precision or response time (See Speed Monitoring
Function (TSX CTY 2C), p. 92 ).
This value must be between: 10 and 30 000 ms .
5 Speed reading function and monitoring adjustment is complete.
z If there are no more parameters to be defined, enable the new adjustment with the Edit
→
Enable command.
Note: in offline mode, the value entered is then copied again in the Initial value field. In on-line mode, the value entered then becomes the current value.
130
35015371 00 May 2007
Adjustment
How to adjust the frequency output period (TSX CTY 2C)
At a Glance
Procedure
The TSX CTY 2C module has a Q3 output which can be programmed in automatic mode to generate an adjustable period signal, destined for various uses (for example: synchronization of several channels or modules).
Output configuration (automatic or manual) is controlled by the application, but it is possible to modify it temporarily in the Debugging (See Debugging the data modules
TSX CTY 2A, TSX CTY 4A and TSX CTY 2C, p. 135
) screen.
Parameters for the signal period are set under the Frequency output heading in the adjustment screen.
The table below summarizes the procedure for adjusting the frequency output signal period.
Step Action
1 Access the module adjustment screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 Under the Frequency output heading enter the required value.
Frequency output
Period:
Initial value: 2
2 ms
This value must be between: 0 and 4 000 000 ms , per 1 ms step.
4 The Q3 output period adjustment is complete.
z If there are no more parameters to be defined, enable the new adjustment with the Edit
→
Enable command.
Note: in offline mode, the value entered is then copied again in the Initial value field. In on-line mode, the value entered then becomes the current value.
35015371 00 May 2007 131
Adjustment
How to adjust the switch change of status conditions
At a Glance Switch 0 and 1 change of status condition parameters can be set from the adjustment screen.
There are a great number of these conditions and they depend on the module and function configured. Priorities are defined in the Description of switches associated
with counting modules, p. 67
section.
132
35015371 00 May 2007
Procedure
Adjustment
The table below summarizes the procedure for adjusting the change of status conditions of switches 0 and 1.
Step Action
1 Access the module adjustment screen required.
2 In the Channel zone select or enable the counter selection (i.e. the channel) involved and its function.
3 Check the Switch status box.
A heading with the same name appears in the adjustment zone.
Status of switches
Changing switch status on
Crossing of threshold0 in +direction
Crossing of threshold0 in -direction
Captured value >= threshold0
Captured value <threshold0
Crossing of threshold1 in +direction
Crossing of threshold1 in -direction
Captured value >= threshold1
Captured value <threshold1
High setpoint crossing in +direction
High setpoint crossing in -direction
Value captured >= high setpoint
Low setpoint crossing in +direction
Low setpoint crossing in -direction
Actions: Set Reset
B0 B0i B1 B1i
R
S
None
R
S
4 Under the heading Switch status : z select the box corresponding to the condition and the switch (0 or 1) concerned, z then click on the SET button (set to 1), the button (delete an existing value).
RESET button (set to 0), or the NONE
Note: the conditions are not shown in order of priority.
5 Adjust the other change of status conditions in the same way.
6 Adjustment of the switch change of status conditions is complete.
z If there are no more parameters to be defined, enable the new adjustment with the Edit
→
Enable command.
Notes: in offline mode the values entered are then copied into the initial status fields
B0i and B1i . Priority rules also apply to initial values. In on-line mode the values entered then become the current status values.
35015371 00 May 2007 133
Adjustment
134
35015371 00 May 2007
Debugging the data modules
TSX CTY 2A, TSX CTY 4A and
TSX CTY 2C
6
At a Glance
Subject of this chapter
What's in this chapter?
This chapter describes the different debugging options of the TSX CTY 2A,
TSX CTY 4A and TSX CTY 2C modules.
This chapter contains the following topics:
Topic
Introducing the debugging screens
Description of the maximized debugging screen
Description of the minimized debugging screen
How to use value or parameter windows
How to use the LEDs and buttons
Page
136
137
139
142
143
35015371 00 May 2007 135
Debugging
Introducing the debugging screens
General Debugging screens are used to debug an application. They are used to display the status of inputs and outputs on a channel, the contents of the registers, the possible faults and to control language objects (setting to 0 or 1, forcing or unforcing a bit, etc.) They can therefore only be accessed in on-line mode.
They also give access to adjustment (See Adjustment of the data modules
TSX CTY 2A, TSX CTY 4A and TSX CTY 2C, p. 123
) and configuration (See
Configuration of the TSX CTY 2A, TSX CTY 4A and TSX CTY 2C modules, p. 103
) screens.
There are two debugging screens: z a minimized screen , which is the application operation monitoring tool for the counting or measurement channel. It displays the main data: contents of registers, status of inputs and outputs, fault indicators.
z an maximized screen , which is the debugging tool. It is used to view and control language objects.
Switching from one to the other is immediate, and there is no need to stop the application or counting in progress.
Opening a module in on-line mode displays the minimized debugging screen by default.
Note: the general principles for debugging an application are described in the
Common task functions (See: PL7 Junior, Pro; Application-specific functions volume 1) section.
136
35015371 00 May 2007
Debugging
Description of the maximized debugging screen
At a Glance
Illustration
The maximized debugging screen is used to provisionally modify the operation of an application at counting module level, with a view to detecting programming faults. It displays the status of inputs, outputs and main channel bits, contents of registers, and possible faults. It is used to control or force (lock) certain bits.
You return to the minimized screen simply by clicking on an icon.
The minimized screen does not include a default module zone. However, you can display one with the View menu. This module zone also gives access to the adjustment (See Description of the configuration screen for a counting module,
p. 104
) and configuration (See Description of the adjustment screen of a counting
module, p. 124 ) screens.
The diagram below shows an example of a maximized debugging screen.
1
2
3
TSX CTY 2C [ RACK0 POSITION 5 ]
Symbol:
Channel:
Channel 0
Function:
Up/Down counting and measurement
Counter
Measurement:
Speed:
IA IB IZ
Encoder address:
0
0
Counting direction
0
EVT overrun pulses/s
CH0
Comparison in relation to thresholds
Threshold 0: Threshold 1: Rollover:
50 80 0
Rollover S0 S1
EVT
Current value position/ -
Capture position/
Faults
Invalid measurement Fault Ack
Enabling/Preset/Capture
Preset
100
Offset:
0
Capture:
0
ENA PRES CAPT
EVT
Done/Active
Input
Enable
Direct
EVT processing
Reset
EVT processing
Reset
Outputs/Switches
State
B0
Set to 1
Set to 0
Auto Enable
Auto mode
Manual control
Reactivating outputs
B1
-
Q0 Q1 Q2
+
DIAG...
+
Q3
35015371 00 May 2007 137
Debugging
Description The table below shows the different elements of the maximized debugging screen and their functions.
Address Element
1
2
Title bar
Function
Shows the selected module’s reference and its geographical address (rack number and physical position in the rack).
Channel field Is used to select the counting channel to be debugged in the
Channel or Counter window. The symbol (name) of the channel and its function are shown.
In the same zone are: z z z z the button to access the unforce button and the button to access the minimized screen, for forced bits, a copy of the CHx channel indication LED,
DIAG...
the channel
3 View and command field diagnostics window, the icon masked faults (CTY2C).
signaling the presence of
This field displays the status of inputs, outputs, intermediate bits and the values of the various counting in progress registers. It is also used to control and force various objects (bits).
The field is divided into function groups corresponding to the main functions (See Description of the standard functions of the
TSX CTY•• counting modules, p. 33 ).
Note: it is possible to display the concise definition of an object that is not selected by keeping the mouse cursor over it. The definition also provides the name of the associated language object.
Note: the LEDs and commands that are not available appear grayed out.
138
35015371 00 May 2007
Debugging
Description of the minimized debugging screen
At a Glance
Illustration
The minimized debugging screen is used to monitor the operation of an application at counting module level. It displays the status of inputs, outputs and main bits of a channel, the contents of registers, possible faults.
To switch to the maximized screen, just click on an icon. It also gives access to the adjustment and configuration screens.
The figure below shows an example of a minimized debugging screen.
1
2
TSX CTY 4A [ RACK 0 POSITION 4 ]
Debugging
Name: COUNT. MOD. 4 CHANNELS 40KHZ
3 RUN ERR IO DIAG...
4
Symbol:
Counter:
Counter 0
Function:
Up/Down counting
DIAG...
5
IA
IB
IPres
IEna
ICapt
Current measurement:
Invalid measurement
Counting direction:
Preset value:
Capture value:
0
100
0
Q0
Q1
Preset done
Active enabling
Capture done
Choice of functions for zoom:
Measurement
Enabling
Preset
Capture
Comparison
Switches
Outputs
35015371 00 May 2007 139
Debugging
Description The table below shows the different minimized debugging screen elements and their functions.
Address
1
2
3
4
Element
Title bar
Function
Shows the selected module’s reference and its geographical address (rack number and physical position in the rack).
Command zone
Shows the mode in progress (Debugging) and is used to access other modes: z Adjusting (See Description of the adjustment screen of a
counting module, p. 124 )
z Configuration (See Description of the adjustment screen of
a counting module, p. 124 ).
Module zone Shows the module’s abbreviated name and its version number
(this is the only screen where this information is displayed).
In the same zone are: z a copy of the module status LEDs: RUN (in operation), ERR
(error), I/O (external fault), z and the access button
DIAG...
to the module diagnostics
(See
Displaying fault diagnostics, p. 146
) window.
Channel field Is used to select the counting channel to be debugged in the
Channel or Counter window. The following information is shown at this level: z Symbol: editor).
channel name set by the user (using the variables z Function: counting function configured. This selection is defined in the configuration screen.
In the same zone are: z z z z the access button for the extended screen (See
Description of the maximized debugging screen, p. 137 )
(zoom), where the debugging commands are located,
Note: with CTY2A/4A modules only, the functions to be displayed in the extended screen can be selected in a window in the parameter field, lower down. For the CTY2C module, all functions will be displayed systematically.
the unforce button for inputs/outputs.
a copy of the CHx channel fault LED, and the button to access DIAG...
the channel diagnostics window, the icon faults (CTY2C).
signaling the presence of masked
140
35015371 00 May 2007
Debugging
Address Element
5 Parameters in progress zone
Function
This zone displays the status of the inputs and outputs and the various counting parameters in progress. If the contents of the counting register cannot be used following an input fault, the
Invalid measurement indicator or LED appear in red.
Note: the concise definition of an object that is not selected, but which can be activated, is displayed by keeping the mouse cursor over it. The definition also gives the name of the associated language object.
35015371 00 May 2007 141
Debugging
How to use value or parameter windows
At a Glance
Principle for using measurement windows
The maximized debugging screen commands zone is divided into headings or function groups. The corresponding functions are described in detail in the
Description of the standard functions of the TSX CTY •• counting modules, p. 33
section, and their essential characteristics are shown in the module configuration
(See Configuration of the TSX CTY 2A, TSX CTY 4A and TSX CTY 2C modules,
p. 103
) procedures.
This document module shows the general principles for using measurement or parameter windows.
A measurement is the result of counting, acquisition or calculation.
A parameter is a piece of input data by the user or application.
Windows as shown in the example below are used to display the current contents of a register. The values displayed cannot be modified directly by selecting these windows.
Counter Comparison in relation to thresholds
Measurement:
Speed:
0
0
EVT overrun
Pulses/s
Threshold 0: Threshold 1:
50 80
Rollover:
0
The following table summarizes the behavior of values that cannot be modified:
Value
Measurement
Speed (CTY 2C)
Address of multiplexed encoder (CTY 2C)
Behavior
Cannot be modified. Can be preset by a preset or reset command.
The + or - sign on the right of the window indicates the actual direction measurement change.
Cannot be modified or preset.
Cannot be modified. Can be preset using the manual Q2 and Q3 outputs if these control the multiplexing.
To modify a parameter value, such as threshold, preset, or rollover values, use the following procedure.
How to change a parameter value
The table below describes the procedure for changing a parameter.
Step Action
1 In the Rollover zone select the Adjustment mode
2 In the adjustment screen modify the required parameter.
3 Enable ( Edit - Enable menu), otherwise say Yes in the Enable modifications dialog box, which appears at the next step.
4 In the Rollover zone select the Debugging mode again.
Result: the new parameter value is displayed.
142
35015371 00 May 2007
Debugging
How to use the LEDs and buttons
At a Glance The maximized debugging screen commands zone is divided into headings or function groups. The corresponding functions are described in detail in the
Description of the standard functions of the TSX CTY •• counting modules, p. 33
section, and their essential characteristics are shown in the module configuration
(See Configuration of the TSX CTY 2A, TSX CTY 4A and TSX CTY 2C modules,
p. 103
) procedures.
This section shows the general principles for using LEDs and buttons.
The LEDs are used to display the status of a bit.
The buttons are used to set a bit, triggering an action or not (depending on the case).
Note: it is possible to display the concise definition of an object that is not selected by keeping the mouse cursor over it. The definition also provides the name of the associated language object.
Meaning of the
LEDs
When the bit is at 0, the LED is off (white) (see the example below).
When the bit is at 1, the LED is on (black, blue or red). Some LEDs display a little black dot in status 1.
There are also position LEDs which use a bold dash to display the measurement or capture position in relation to a threshold or a set point. These latter are represented by a thin central dash.
35015371 00 May 2007 143
Debugging
Button use principle
Forcing a bit
In the example below the Direct enabling and Direct capture buttons are set to 1.
Counter enable/Preset/Capture
Preset: Offset: Capture:
100 0 260
ENA PRES CAPT
EVT
Done/Active
Input
Direct
Enabling
EVT processing
Reset
Clicking on this button sets the associated bit to 1. The button and possibly the LED above light up (switch to a color).
Clicking on this button sets the associated bit to 0. The button and possibly the LED above go out (switch to white).
These actions are provisional in the sense that the application or counting can change the bit status.
Note: the LED status can be different from the button status. Some LEDs are reserved for storing the action carried out by the physical input (capture, preset or reset). These LEDs can be recognized by the presence of a reset button (action carried out) in the same column. In this case you can switch off the LED, if necessary, by pressing this button.
To lock the status of a bit (i.e. to make it permanent), use the forcing commands, which can be accessed by right-clicking on the mouse. The button goes on or off in
Force to 0
Force to 1
Unforce
F4
F5
F6 the same way as before but with the letter F superimposed the same menu to delete bit forcing.
F
You can also unforce all forced bits by clicking on the padlock
Channel field.
. Conversely, use icon in the
144
35015371 00 May 2007
Diagnostics of the data modules
TSX CTY 2A, TSX CTY 4A and
TSX CTY 2C
7
At a Glance
Subject of this chapter
What's in this
Chapter?
This chapter describes the different diagnostics options of the TSX CTY 2A,
TSX CTY 4A and TSX CTY 2C data modules.
This chapter contains the following topics:
Topic
Displaying fault diagnostics
Lists of fault diagnostics
Page
146
148
35015371 00 May 2007 145
Diagnostics
Displaying fault diagnostics
At a Glance Diagnostic screens at module or channel level can only be accessed in on-line mode. When a unmasked fault appears, this is indicated: z in the rack configuration screen by the appearance of a red square in the position of the counting module that is faulty, z in the debug screen by the DIAG buttons at module or channel level which turn red. Clicking on these buttons then gives access to the fault diagnostics.
z z
The fault is also indicated: on the module via the central display, by the dedicated language objects: %Ixy.i.ERR
, %Ixy.i.MOD.ERR
,
%MWxy.i.MOD.2
, etc., and the status words (See The counting task’s language
objects, p. 159
).
Note: even if the fault is masked (TSX CTY 2C), it is indicated by the flashing of the CHx light and by the DIAG button at channel level.
146
35015371 00 May 2007
Illustration
Diagnostics
The diagram below shows how the faults are indicated.
Configuration
TSX 5730 V3.0...
XMWI
XTI..
0
1
0
0
2
6
P
S
Y
3
0
5
7
0
T
S
X
1
D
E
Y
2
D
S
Y
3
D
S
Y
4
C
T
Y
5
3
2
D
2
1
6
T
3
Debugging
0
8
R
5
4
A
2
C
C
T
Y
6 7 8 9
Designation: MOD.COMPT.4 CHANNELS 40KHZ Version : 1.0
10
RUN ERR
Symbol:
Counter:
Counter 0
Function:
Up/Down counting
IO
CH0
Module Diagnostics
Internal faults External faults Other faults
Faulty channel(s)
DIAG…
DIAG…
OK
Channel Diagnostics
Internal faults External faults
Auxiliary I/O
Supply
Counting inputs:
Encoder or PD supply
OK
Other faults
Application fault
Invalid software configuration
35015371 00 May 2007 147
Diagnostics
Lists of fault diagnostics
At a Glance
List of the module fault messages
The messages displayed on the diagnostics screens are used to assist in application debugging. These messages must be concise and are sometimes ambiguous (as different faults may have the same consequences).
These diagnostics are on two levels: module and channel, the latter being the most explicit. The lists below show the message headings with suggestions for finding out what is wrong.
The table below provides a list of the module fault messages.
Fault indicated
Module failure
Faulty channel(s)
Self-test
Possible interpretation and/or action
The module has a fault.
Check the module mounting. Change the module.
One or more channels have a fault.
Refer to channel diagnostics.
The module is running a self-test. Wait until the self-test is complete.
Different hardware and software configurations
There is a lack of compatibility between the module configured and the module in the rack.
Make the configuration and the software configuration compatible.
Module is missing or off Install the module. Fasten the mounting screws.
148
35015371 00 May 2007
Diagnostics
List of channel fault messages
The table below gives the list of fault messages at channel level.
Fault indicated. Other consequences.
Possible interpretation and/or action. z z
External fault or counting input fault: z encoder or proximity sensor supply fault, z line break or short circuit of at least one encoder differential signal (1A, 1B or 1Z),
SSI series frame fault, specific fault on absolute encoder.
outputs are set to 0 in automatic mode.
Invalid measurement message.
Check the sensor connections.
Check the sensor power supply.
Check the sensor operation.
Delete the fault and acknowledge if the fault storing is configured (CTY 2C).
Counting pulses or incremental encoder: preset or reset to acknowledge the Invalid measurement message.
Counting application fault: z measurement overrun, z overspeed.
Outputs are set to 0 in automatic mode.
Invalid measurement message.
Diagnose the fault more precisely (external causes).
Check the application again, if necessary.
Delete the fault and acknowledge if the fault storing is configured (CTY 2C).
Counting pulses or incremental encoder: preset or reset to acknowledge the Invalid measurement message.
Check the output connections.
Check the input/output power supply (24 V).
Diagnose the fault more precisely (external causes).
Delete the fault and acknowledge if the fault storing is configured (CTY 2C).
Auxiliary input/output fault: z z power supply, short circuit of at least one output.
Outputs are set to 0 in automatic mode.
z z z
Internal fault or channel self-test: faulty module, module missing or off, module running self-test.
Different hardware and software configurations z z
Invalid software configuration: incorrect constant, bit combination not associated with any configuration.
Communication fault
Application fault: refusal to configure or adjust
Module fault has gone down to channel level.
Refer to module level diagnostics.
Module fault has gone down to channel level.
Refer to module level diagnostics.
Check and modify the configuration constants.
Check the connections between the racks.
Diagnose the fault more precisely.
35015371 00 May 2007 149
Diagnostics
150
35015371 00 May 2007
Software implementation
8
At a glance
Subject of this chapter
What's in this
Chapter?
This chapter describes the counting modules’ operating modes as well as the operation of the event processing, which supports completion of the counting applications with optimized response times.
This chapter contains the following sections:
Section
8.1
8.2
Topic
Counting module operating modes
Event processing installation
Page
152
154
35015371 00 May 2007 151
Software implementation
8.1
Counting module operating modes
How counting modules behave in the different operating modes
General z z
The counting modules operate in specific ways according to the different PLC operating modes. Knowing about these specific ways is important for programming and debugging the application.
General principles for dealing with operating modes are described: in the set up manual for Premium - TSX 57 PLCs, (TSX DM 57 xx E), the reference manual (See: PL7 Junior, Pro; Reference manual), PL7 Micro/
Junior/Pro (TLX DR PL7 xxE).
Summary table The table below shows the special features of counting modules in different operating modes.
Cold start Warm restart STOP
1 unchanged
0 unchanged
Reconfiguring in online mode
1 initial values
Invalid measurement bit
Adjustment parameters: set points, thresholds, preset, measurement period (speed), output period (frequency)
%MDxy.i.r
Commands (direct software actions, various actions, event unmasking)
%Qxy.i.r, %QWxy.i.r
Information and module data -> processor
%IDxy.i.r, %IWxy.i.r, %Ixy.i.r
Forced objects
Switches (as a result of Invalid measurement )
Outputs
1 initial values
0 unchanged if no power outage unforced
0
0 unchanged unchanged if no power outage unchanged
0
0 unchanged, new commands not sent sent unchanged unchanged fallback mode unchanged unchanged unchanged
0
0
The paragraphs below show the essential properties of these operating modes, seen from a module.
152
35015371 00 May 2007
Software implementation
Cold start
Warm restart
A cold start occurs when the application first starts running, when some power is restored, when initialization takes place from a PL7, or when the Reset button on the processor is pressed.
Parameters are initialized at their set initial values using the configuration editor. The current counter measurement cannot be used ( Invalid measurement bit set to 1).
If the module has not had a power outage, the current value of the counter is unchanged although the Invalid measurement bit is set.
The user must set the procedure to be carried out from a cold start (See How to deal
with an invalid measurement, p. 100 ).
The program starts again from the program element where the power outage took place, but the outputs remain at 0 until refreshed by the task.
The values of counting application-specific function objects are not changed by a warm restart, except for those involved with the Invalid measurement bit.
If the module has not had a power outage, the current value of the counter is unchanged although the Invalid measurement bit is set.
The user must define the processing procedure to be carried out on a warm restart.
Power outage and restart
STOP mode
When there is a power outage, the application context and time of the outage are stored.
When the power is restored the saved context is compared with that in progress: z if the application context has changed (i.e. loss of system context or new z application), the PLC initializes the application: see cold start , if the application context is the same, the PLC carries out a warm restart .
In STOP mode the user program is not run. However the application-specific counting function does operate: the counter advances according to the status of the physical inputs ( IA , IB , IPres or IReset , IEna , ICapt ).
Reconfiguring in online mode
This mainly involves debugging an application.
Changes must be confirmed.
35015371 00 May 2007 153
Software implementation
8.2
Event processing installation
At a Glance
Subject of this section
What's in this
Section?
This section describes how to install event processing associated with a counting module.
This section contains the following topics:
Topic
Introduction to event processing
How to program event processing
Page
155
157
154
35015371 00 May 2007
Software implementation
Introduction to event processing
At a Glance
Event processing principle
Event processing is used to minimize the reaction time when installing counting modules by: z z programming reflex actions, extending (physical) reflex output time performances Q0 and Q1 to other outputs on the PLC output modules.
One event (task) process can be associated with each counting channel. The appearance of an event in the application-specific counting function re-routes the application program to the event task associated with the channel.
The priority of the task is linked to its number. There are two priority levels determined by the process number: EVT0 has priority over all other EVTi's (i: from
1 to 31 or 63, depending on processor type). You must therefore assign EVT0 to the most important channel of the application, which will not necessarily be a counting channel.
The Multi-task application structure section in the Premium - TSX 57 PLCs
(TSX DM 57 xx E) installation manual provides details on how to integrate event tasks into the application.
Event processing is enabled when: z z z bit %S38 which enables PL7 event processing is set to 1, the UNMASKEVT is carried out in MAST and FAST tasks, the counting channel events involved are unmasked.
The objects indicating: z z the source of the event (event status word %IWxy.i.3), and the captured value, are updated implicitly before the event process is carried out. The other counting objects are not updated.
Event processing must first of all identify the source of the event by testing the event status word bits set to 1.
35015371 00 May 2007 155
Software implementation
Illustration The figure below illustrates the event processing principle
Unmask EVT
Up counting on
CTY 2A/4A or
CTY 2C
Enable
Preset
Capture
Crossing threshold etc.
UNMASKEVT
%S38
EVT testing and processing
Reflex action
Reflex action
Reflex action
Reflex action
156
35015371 00 May 2007
Software implementation
How to program event processing
Procedure The table below summarizes the essential steps for programming event processing.
Step
1
2
3
Action
Configuration phase
In offline mode, in the configuration editor, select Event processing and the event number for the counting channel.
Unmasking phase
In particular, the MAST or FAST calling task must: z enable processing of events at system level: set bit %S38 to 1 (default z value), unmask events in MAST and FAST tasks with the UNMASKEVT instruction
(active by default), z unmask events concerned at channel level by setting implicit event unmasking language objects (See Unmask event commands, word
%QWxy.i.1, p. 168 ). By default, the events are masked,
z check that the stack of events at system level is not saturated (bit %S39 must be at 0).
Event program creation phase
On the Events tab, select Edit
→
Create and create the event program. In particular, this program must: z Determine the source of the event(s) from the event status word (See z
Status of events and switches, word %IWx.i.3, p. 166
) in implicit exchange.
Carry out the reflex tasks associated with the event. This process must be as short as possible.
z Explicitly update the reflex outputs concerned.
Note : the event status word is automatically reset to zero.
35015371 00 May 2007 157
Software implementation
Illustration of event unmasking
This figure shows event unmasking in the MAST task.
LD: MAST - MAIN
(*Unmasking events*)
OPERATE
UNMASKEVT()
(*If unmasking from cold THEN authorize events*)
%S1
(*If starting from cold THEN unmask threshold 0 crossing event: %QW1.1.0:X5*)
%S1
%S38
S
%QW1.0.1:X5
(*If starting from cold THEN unmask crossing threshold 1 event: QW1.1.0:X6*)
%S1 %QW1.0.1:X6
F2 F3
P
F4
N
F5 F6 F7
X
F8 F9 F10 F11
S
F12
R
S.F1
S.F2
OPER
S.F3
COHP
H
S.F4
COHP
S.F5
S.F6
FB
S.F7
F (...)
S.F8
Illustration of the contents of an event task
This figure shows the possible contents of an event task (testing event and action bit).
LD: EVT - EVT0
(*If threshold 0 crossing event THEN set physical output %Q2.0 to 1*)
%IW1.0.3:X5 %Q2.0
S
(*If crossing threshold 1 event THEN set physical output %Q2.0 to 0*)
%IW1.0.3:X6
%Q2.0
R
F2 F3
P
F4
N
F5 F6 F7
X
F8 F9 F10 F11
S
F12
R
S.F1
S.F2
OPER
S.F3
COHP
H
S.F4
COHP
V
S.F5
S.F6
FB
S.F7
F (...)
S.F8
158
35015371 00 May 2007
The counting task’s language objects
9
At a glance
Subject of this chapter
What's in this
Chapter?
This chapter describes the language objects associated to the counting tasks as well as the different ways of using them.
This chapter contains the following topics:
Topic
Introducing language objects for application-specific counting
Implicit exchange language objects associated with the application-specific counting function
Details of implicit exchange objects
Explicit exchange language objects associated with the application-specific counting function
Breakdown of objects for user defined exchange
Explicit object exchange and report management
Page
160
161
163
169
172
178
159 35015371 00 May 2007
Language objects
Introducing language objects for application-specific counting
General Counting modules configured in a given position automatically generate a group of language objects enabling them to be programmed, and measurement results and diagnostics to be read.
There are two main types of language object: z z implicit exchange objects which are automatically exchanged on each cycle revolution of the task associated with the module, explicit exchange objects, which are exchanged at the request of the application using explicit exchange instructions.
The former (implicit exchanges) involve input/output module maps: measurement results, software information and commands necessary for the operation.
The latter (explicit exchanges) are used to set module parameters and bring in additional arguments (parameters, commands and information) for advanced programming. They are not necessary for normal programming.
160
35015371 00 May 2007
Language objects
Implicit exchange language objects associated with the application-specific counting function
At a Glance
Reminders
Illustration
These objects are used to access inputs and software information for the application-specific counting function.
The addressing system for words and bits is given in the Common applicationspecific functions (See : PL7 Junior, Pro ; Application-specific functions volume 1) section.
Module input maps (%I and %IW) are updated in the processor at the beginning of the task cycle in RUN or STOP mode.
Output commands (%Q and %QW) are updated in the module at the end of the task cycle, only when in RUN mode.
xy represents the position of the module, i represents the channel number (counted from 0) in the module.
The chart below illustrates the operation cycle relating to a PLC task (cyclic running).
Internal processing
Acquisition of inputs
RUN STOP
Program processing
Updating outputs
35015371 00 May 2007 161
Language objects
List of implicit exchange objects
The table below summarizes the implicit exchange objects in the application-specific counting function.
Object
%QWxy.i.1
Content
%Ixy.i.ERR
%Ixy.MOD.ERR
%IDxy.i.0
%IDxy.i.4
%IDxy.i.6
Counting channel error bit. When set to 1 it shows that channel i of the module in position xy has a fault. The causes of the fault are listed in the explicit exchange words %MWxy.i.2 (see Channel
standard fault, %MWxy.i.2, p. 173
) and %MWxy.i.3 (see Specific
channel faults, %MWxy.i.3, p. 173 ).
Module error bit. When set to 1 it shows that the module in position xy has a fault. The causes of the fault are listed in the explicit exchange module status word %MWxy.MOD.2 (see Module error
flags: %MWxy.MOD.2, p. 172 ).
Current counter value (24 active bits).
Captured counter value (24 active bits).
Reserved for special functions (CTY2C), this is the time elapsed
(event task) between capture and last pulse (special function number 1).
%IDxy.i.8
%IDxy.i.10
%IDxy.i.11
%Ixy.i.0
to %Ixy.i.23
Speed (number of pulses per second, 24 active bits, CTY2C).
Multiplexed address of the absolute encoder with parallel outputs
(CTY2C).
Reserved for special functions (CTY2C), this is the time elapsed
(Mast or Fast task) between capture made and last pulse detected
(special function number 1).
Software information bits. (see Software information: %Ixy.i.r bits,
p. 164
)
%IWxy.i.2
%IWxy.i.3
Software information word showing the status of the physical counting inputs (see Status of physical inputs/outputs, word
%IWxy.i.2, p. 165 ).
Information word showing the source of the events and the state of the software output switches (see Status of events and switches,
word %IWx.i.3, p. 166 ).
%Qxy.i.0
to %Qxy.i.23
Software commands (see Software commands, %Qxy.i.r bits,
p. 167
).
%QWxy.i.0
Stored information reset commands, software direction commands
(see
Reset and output commands, word %QWxy.i.0, p. 168
).
Unmask event (see Unmask event commands, word %QWxy.i.1,
p. 168
) commands.
162
35015371 00 May 2007
Language objects
Details of implicit exchange objects
At a Glance This section describes the group of implicit exchange bits. The columns in the tables give the following information: z z z its address, its symbol generated by the PL7 during Pre-symbolization, the description of its function.
35015371 00 May 2007 163
Language objects
Software information:
%Ixy.i.r bits
The table below shows the meanings of the %Ixy.i.r status bits.
%Ixy.i.0
%Ixy.i.1
%Ixy.i.2
%Ixy.i.4
%Ixy.i.5
%Ixy.i.6
%Ixy.i.7
%Ixy.i.8
%Ixy.i.9
%Ixy.i.10
%Ixy.i.11
%Ixy.i.12
%Ixy.i.13
%Ixy.i.16
%Ixy.i.17
ENAB_ACTIV
Meaning:
Counter enable active
PRES_DONE Preset done (hardware, except special function
CTY2C)
CAPT_DONE Capture done (hardware, except special function
CTY2C)
OVERSPEED_WRN Overspeed fault (CTY2C)
CUR_MEAS_THR0 Current value more than or equal to threshold 0 (<or less than 0 when down counting, CTY2A/4A)
CUR_MEAS_THR1 Current value more than or equal to threshold 1
CUR_MEAS_HISP Current value more than or equal to the high setpoint
(CTY2A/4A)
CUR_MEAS_LOSP Current value more than or equal to the low setpoint
(CTY2A/4A)
COUNT_DIR
CAPT_THR0
CAPT_THR1
Counting direction
0: direction - (down counting), 1: direction + (up counting)
Captured value more than or equal to threshold 0
CAPT_HISP
INC_MOD_DONE
CAPT_LOSP
DEC_MOD_DONE z z
Captured value more than or equal to threshold 1 z Captured value more than or equal to the high setpoint (CTY2A/4A)
Modulo crossing in + direction (CTY2C) z
Captured value more than or equal to the low setpoint (CTY2A/4A)
Rollover moving in - direction (CTY2C)
Reserved for special functions (CTY2C):
%Ixy.i.16: Correct speed,
Reserved for special functions (CTY2C):
%Ixy.i.17: moving part stationary.
164
35015371 00 May 2007
Language objects
Status of physical inputs/ outputs, word
%IWxy.i.2
The table below shows the meanings of %IWxy.i.2 status word bits.
%IWxy.i.2:X0
%IWxy.i.2:X1
%IWxy.i.2:X2
%IWxy.i.2:X3
%IWxy.i.2:X4
%IWxy.i.2:X6
%IWxy.i.2:X7
%IWxy.i.2:X8
%IWxy.i.2:X9
ST_IA
ST_IB
ST_IVAL
ST_PRES
ST_CAPT
ST_IZ
INVALID_MEAS
ST1_SSI_FRAME
ST2_SSI_FRAME
%IWxy.i.2:X10 ST3_SSI_FRAME
%IWxy.i.2:X11 ST4_SSI_FRAME
%IWxy.i.2:X12 ST_Q2
%IWxy.i.2:X13 ST_Q3
%IWxy.i.2:X14 ST_Q0
%IWxy.i.2:X15 ST_Q1
Meaning
Status of physical counting input IA
Status of physical counting input IB
Status of physical enable input IEna
State of the IPres or IReset physical preset input
State of physical capture input ICapt
Status of physical counting input IZ
Invalid measurement z z z
Rank 1 status bit from the SSI frame, or odd parity bit (SSI absolute encoder with odd parity, not checked by the module), or least significant part of the address (absolute encoder with multiplexed parallel outputs and adaptation base unit).
z z
Rank 2 status bit from the SSI frame, or most significant part of the address (absolute encoder with multiplexed parallel outputs and adaptation base unit).
z z
Rank 3 status bit from the SSI frame, or specific fault bit on absolute encoder with parallel outputs.
Rank 4 status bit 4 from the SSI frame
Q2 output status (CTY2C)
Q3 output status (CTY2C)
Q0 output status
Q1 output status
35015371 00 May 2007 165
Language objects
Status of events and switches, word %IWx.i.3
The table below shows the meanings of %IWxy.i.3 status word bits.
%IWxy.i.3:X0
%IWxy.i.3:X1
%IWxy.i.3:X2
%IWxy.i.3:X3
%IWxy.i.3:X5
%IWxy.i.3:X6
%IWxy.i.3:X7
%IWxy.i.3:X8
%IWxy.i.3:X9
ENAB_EVT
PRES_EVT
CAPT_EVT
CAPT_EDGE
THR0_EVT
THR1_EVT
HISP_EVT
LOSP_EVT
ST_COUNT_DIR
%IWxy.i.3:X10 ST_LATCH0
%IWxy.i.3:X11 ST_LATCH1
%IWxy.i.3:X12 INC_MOD_EVT
%IWxy.i.3:X13 DEC_MOD_EVT
%IWxy.i.3:X15 OVERRUN_EVT
Meaning
Enabling event
Event preset or reset
Capture event
Capture edge direction (TSX CTY2C)
0: rising edge, 1: falling edge.
Threshold 0 crossing event (or zero value when down counting with TSX CTY2A/4A) z z z z
Threshold 1 crossing event
Crossing high setpoint event (CTY2A/4A)
Reserved for special functions (CTY2C)
Crossing low setpoint event (CTY2A/4A)
Reserved for special functions (CTY2C)
Direction when crossing threshold or setpoint
(CTY2A/4A)
0: direction - (down counting), 1: direction + (up counting)
State of switch 0
State of switch 1
Rollover moving event in + direction (CTY2C)
Rollover moving event in - direction (CTY2C)
Overrun events (channel level).
166
35015371 00 May 2007
Software commands,
%Qxy.i.r bits
Language objects
The table below shows the meanings of the %Qxy.i.r command bits.
Address
%Qxy.i.0
%Qxy.i.1
%Qxy.i.2
%Qxy.i.3
%Qxy.i.5
%Qxy.i.6
%Qxy.i.7
%Qxy.i.9
%Qxy.i.10
%Qxy.i.11
%Qxy.i.12
%Qxy.i.13
%Qxy.i.14
%Qxy.i.15
%Qxy.i.16 to
%Qxy.i.19
%Qxy.i.20
%Qxy.i.21
Standard symbol
DIRENAB
DIRPRES
DIRCAPT
FLT_ACK
ENAB_IENAB
ENAB_IPRES
ENAB_ICAPT
ENAB_Q3_AUTO
SET_LATCH0
SET_LATCH1
RESET_LATCH0
RESET_LATCH1
ENAB_Q0_AUTO
ENAB_Q1_AUTO
MANU_CMD_Q2
MANU_CMD_Q3
Meaning
Direct enabling by the software
Direct preset by the software
Direct capture by the software
Fault acknowledgement (CTY2C)
Enabling the physical input IEna
Enabling the IPres or IReset physical output
Enabling the physical input ICapt
Enabling the Q3 output in automatic mode
(CTY2C)
Switch 0 set to 1
Switch 1 set to 1
Switch 0 set to 0
Switch 1 set to 0
Enabling the Q0 output in automatic mode
Enabling the Q1 output in automatic mode
Reserved for special functions (CTY2C)
Q2 output manual command (CTY2C)
Q3 output manual command (CTY2C)
35015371 00 May 2007 167
Language objects
Reset and output commands, word
%QWxy.i.0
The table below shows the meanings of the %QWxy.i.0 command word bits.
%QWxy.i.0:X1
%QWxy.i.0:X2
%QWxy.i.0:X4
CAPT_RESET
MOD_RESET
%QWxy.i.0:X9 COUNT_DIR_CHG Counting direction
0: direction - (down counting), 1: direction + (up counting)
%QWxy.i.0:X10 REACTIV_Q Reactivation of outputs Q0 , Q1 , and outputs Q2 ,
Q3 (CTY2C)
%QWxy.i.0:X11 AUTO_MOD_Q3
Hardware reset capture done
Rollover moving reset done (CTY2C)
%QWxy.i.0:X12 AUTO_MOD_Q0
Manual/automatic output mode Q3 (frequency,
CTY2C)
0: manual, 1: automatic (programmable frequency)
Manual/automatic output mode Q0
0: manual, 1: automatic
%QWxy.i.0:X13 AUTO_MOD_Q1
%QWxy.i.0:X14
%QWxy.i.0:X15
PRES_RESET
MANU_CMD_Q0
MANU_CMD_Q1
Meaning
Reset of hardware preset done
Manual/automatic output mode Q1
0: manual, 1: automatic
Output status manual command Q0
Output status manual command Q1
Unmask event commands, word
%QWxy.i.1
The table below shows the meanings of word bits %QWx.i.1.
Address
%QWxy.i.1:X0
%QWxy.i.1:X1
%QWxy.i.1:X2
%QWxy.i.1:X5
%QWxy.i.1:X6
Standard symbol
ENAB_UNMSK
PRES_UNMSK
CAPT_UNMSK
THR0_UNMSK
THR1_UNMSK
Meaning
Enable event unmasking
Unmask preset or reset event
Unmask capture event
Unmask threshold 0 event
Unmask threshold 0 event
%QWxy.i.1:X7
%QWxy.i.1:X8
HISP_UNMSK
LOSP_UNMSK
Unmask high setpoint event (CTY2A/4A)
Unmask low setpoint event (CTY2A/4A)
%QWxy.i.1:X12 INC_MOD_UNMSK Unmasking rollover moving event in + direction
(CTY2C)
%QWxy.i.1:X13 DEC_MOD_UNMSK Unmask rollover moving event in - direction
(CTY2C)
168
35015371 00 May 2007
Language objects
Explicit exchange language objects associated with the application-specific counting function
At a Glance Explicit exchanges are exchanges carried out on request from the program user using the following instructions: z z z z z z
READ_STS (See : PL7 Junior, Pro ; Application-specific functions volume 1)
(read status words),
WRITE_CMD (See : PL7 Junior, Pro ; Application-specific functions volume 1)
(write command words),
WRITE_PARAM (See : PL7 Junior, Pro ; Application-specific functions volume 1)
(write adjustment parameters),
READ_PARAM (See : PL7 Junior, Pro ; Application-specific functions volume 1)
(read adjustment parameters),
SAVE_PARAM (See : PL7 Junior, Pro ; Application-specific functions volume 1)
(save adjustment parameters),
RESTORE_PARAM (See : PL7 Junior, Pro ; Application-specific functions volume 1) (restore adjustment parameters).
These exchanges apply to all %MW objects that are of the same type (status, commands or parameters) on the same channel.
Note: These objects bring information (e.g.: Type of channel fault…), commands
(e.g.: switch commands) and additional operating modes (saving and restoring adjustment parameters while the application is in progress) to carry out more precise operation programming of the function.
35015371 00 May 2007 169
Language objects
General principle for the use of explicit instructions
The diagram below shows the different types of explicit exchange that are possible between the PLC processor and the module (or the built-in interface).
PLC processor Task or interface module built-in task
Objects %MWxy.i.r
or
%MWxy.MOD.r (1)
Status parameters
READ_STS
Status parameters
Command parameters
WRITE_CMD
Command parameters
Adjustment parameters: actual
WRITE_PARAM
READ_PARAM
SAVE_PARAM
Adjustment parameters: current
Initial adjustment parameters
RESTORE_PARAM
(1) Only with READ_STS and WRITE_CMD instructions.
Managing exchanges
During an explicit exchange, it may be interesting to monitor the progress that this makes, in order to, for example, only take into account the data read when the exchange has actually been carried out.
For this, two kinds of information are available: z z detecting an exchange in progress (see Explicit Exchange Execution Indicators:
%MWxy.i.0, p. 181 ),
an end of exchange report (see
Explicit exchange report: %MWxy.i.1, p. 181
).
The diagram below describes the principle for managing an exchange.
Carrying out an: explicit exchange
Detecting an exchange in progress
Report for end of exchange
170
35015371 00 May 2007
List of explicit exchange objects
Language objects
The table below summarizes the explicit exchange objects in the application-specific counting function.
Object
%MWxy.i.MOD.2
%MDxy.i.4
Content
Module fault status word (updated by the
READ_STS%CHxy.MOD instruction)
Preset value
Type
State
Parameter
%MDxy.i.6
%MDxy.i.8
%MDxy.i.10
%MDxy.i.12
%MDxy.i.22
%MDxy.i.24
Value of threshold 0
Value of threshold 1 z z z z
High setpoint value (CTY2A/4A)
Absolute encoder offset value (CTY2C)
Low setpoint value (CTY2A/4A)
Overspeed threshold (CTY2C)
Frequency output period Q3 (CTY2C)
Target speed (special function number 3,
CTY2C)
Parameter
Parameter
Parameter
Parameter
Parameter
Parameter
%MWxy.i.2
and 3 Counting channel fault diagnostics i of the module in position xy (see Channel standard
fault, %MWxy.i.2, p. 173 )
State
%MWxy.i.14
and 15 Switch 0 SET conditions (see 0 counter output
SET commands, %MWxy.i.14, p. 174
)
Parameter
%MWxy.i.16
and 17 Switch 0 RESET conditions (see 0 counter output RESET commands, %MWxy.i.16,
p. 175 )
Parameter
%MWxy.i.18
and 19 Switch 1 SET conditions (see 1 counter output
SET commands, %MWxy.i.18, p. 176
)
Parameter
Parameter %MWxy.i.20
and 21 Switch 1 RESET conditions (see 1 counter output RESET commands, %MWxy.i.20,
p. 177 )
%MWxy.i.26
Stopping speed (special function number 3,
CTY2C)
Parameter
%MWxy.i.27
%MWxy.i.28
Speed measurement period (CTY2C)
Reserved for special functions (CTY2C)
Parameter
Parameter
35015371 00 May 2007 171
Language objects
Breakdown of objects for user defined exchange
At a glance
Observations
This part collates the word type objects for user defined exchange, whose bits have a particular meaning. This objects are introduced in detail below, bit by bit. z z
A bit’s meaning extends to State 1 . The non Boolean bits (neither true nor false) are detailed to avoid any ambiguity.
None of the bits are used.
Summary
Module error flags:
%MWxy.MOD.2
z z xy shows the module’s position.
i shows the channel number (from 0) in the module.
The table below introduces the meanings of the module state word’s bits. These bits do not have standard symbols and are read by a READ_STS %CHxy.MOD.
Address Meaning
%MWxy.MOD.2:X0
%MWxy.MOD.2:X1
Broken down module
Faulty channel(s)
%MWxy.MOD.2:X5
%MWxy.MOD.2:X6
Different hardware and software configurations
Module is absent or switched off
172
35015371 00 May 2007
Channel standard fault,
%MWxy.i.2
Language objects
The table below introduces the meanings of the CH_FLT status word bits. Reading can be done via a READ_STS %CHxy.i.
%MWxy.i.2:X0
%MWxy.i.2:X1
%MWxy.i.2:X3
%MWxy.i.2:X4
%MWxy.i.2:X5
%MWxy.i.2:X6
%MWxy.i.2:X7
%MWxy.i.2:X8 and
%MWxy.i.2:X9
%MWxy.i.2:X11
%MWxy.i.2:X12
%MWxy.i.2:X13
%MWxy.i.2:X14
%MWxy.i.2:X15
COUNT_INP_FLT
Meaning
Counting input error
COUNT_APP_FLT Counting application fault
AUX_IO_FLT
INTERNAL_FLT
Auxiliary I/O
Internal error or channel self-testing
CONF_FLT
COMMUNIC_FLT
APPLI_FLT
CH_LED0,1
Different hardware and software configurations
Communication error with the PLC
Application fault
Green indicator’s command bits CHx (channel state)
00 = off, 01 = blinking, 11 = lit
AUX_SUPPL_FLT Auxiliary I/O supply fault
SHORT_CIRC_FLT Output short-circuit error
ENC_SUPPLY_FLT Supply, encoder or potential difference error
LINE_BRK_FLT Encoder line break or short-circuit error
SSI_TRAME_FLT Transmission of SSI absolute encoder frame
(CTY 2C) error
Specific channel faults,
%MWxy.i.3
The table below introduces the meanings of the %MWxy.i.3 channel status word bits. Reading can be done via a READ_STS %CHxy.i.
%MWxy.i.3:X0
%MWxy.i.3:X1
%MWxy.i.3:X2
%MWxy.i.3:X3
CH_CONF_FLT
Meaning
Channel configuration error
XERFLOW_FLT Measurement overrun error
ABS_ERROR_FLT Specific absolute encoder error
OVERSPEED_FLT Overspeed error
35015371 00 May 2007 173
Language objects
0 counter output
SET commands,
%MWxy.i.14
The table below introduces the meanings of the %MWxy.i.14 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.14:X0
%MWxy.i.14:X1
%MWxy.i.14:X2
%MWxy.i.14:X4
%MWxy.i.14:X5
Standard symbol
S0_ENAB
S0_PRES
S0_CAPT
S0_MOD_INC
S0_MOD_DEC
Meaning: Setting the 0 counter output to 1 on confirmation on preset on capture on +direction modulo overshoot on -direction modulo overshoot
0 counter output
SET commands,
%MWxy.i.15
The table below introduces the meanings of the %MWxy.i.15 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.15:X0
%MWxy.i.15:X1
%MWxy.i.15:X2
%MWxy.i.15:X3
%MWxy.i.15:X4
%MWxy.i.15:X5
%MWxy.i.15:X6
Standard symbol
S0_TH0_INC
S0_TH0_DEC
S0_C_SUP_TH0
S0_C_INF_TH0
S0_TH1_INC
S0_TH1_DEC
S0_C_SUP_TH1
%MWxy.i.15:X7
%MWxy.i.15:X8
S0_C_INF_TH1
S0_HISP_INC
%MWxy.i.15:X9 S0_HISP_DEC
%MWxy.i.15:X10 S0_C_SUP_HISP
%MWxy.i.15:X12 S0_LOSP_INC
%MWxy.i.15:X13 S0_LOSP_DEC
%MWxy.i.15:X15 S0_C_INF_LOSP
Meaning: Setting the 0 counter output to 1 on +direction 0 threshold overshoot on -direction 0 threshold overshoot if the captured value is more than or equal to 0 if the captured value is less than the 0 threshold on +direction 1 threshold overshoot on -direction 1 threshold overshoot if the captured value is more than or equal to 1 if the captured value is less than the 1 threshold on high setpoint crossing on high setpoint crossing if the captured value is more than or equal to the high setpoint on +direction low crossing setpoint on -direction low crossing setpoint if the captured value is less than the low setpoint
174
35015371 00 May 2007
Language objects
0 counter output
RESET commands,
%MWxy.i.16
The table below introduces the meanings of the %MWxy.i.16 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.16:X0
%MWxy.i.16:X1
%MWxy.i.16:X2
%MWxy.i.16:X4
%MWxy.i.16:X5
Standard symbol
R0_ENAB
R0_PRES
R0_CAPT
R0_MOD_INC
R0_MOD_DEC
Meaning: Setting the 0 counter output to 0 on confirmation on preset on capture on +direction modulo overshoot on -direction modulo overshoot
0 counter output
RESET commands,
%MWxy.i.17
The table below introduces the meanings of the %MWxy.i.17 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.17:X0
%MWxy.i.17:X1
%MWxy.i.17:X2
%MWxy.i.17:X3
%MWxy.i.14:X4
%MWxy.i.17:X5
%MWxy.i.17:X6
Standard symbol
R0_TH0_INC
R0_TH0_DEC
R0_C_SUP_TH0
R0_C_INF_TH0
R0_TH1_INC
R0_TH1_DEC
R0_C_SUP_TH1
%MWxy.i.17:X7
%MWxy.i.17:X8
R0_C_INF_TH1
R0_HISP_INC
%MWxy.i.17:X9 R0_HISP_DEC
%MWxy.i.17:X10 R0_C_SUP_HISP
%MWxy.i.17:X12 R0_LOSP_INC
%MWxy.i.17:X13 R0_LOSP_DEC
%MWxy.i.17:X15 R0_C_INF_LOSP
Meaning: Setting the 0 counter output to 0… on +direction 0 threshold overshoot on -direction 0 threshold overshoot if the captured value is more than or equal to the
0 threshold if the captured value is less than the 0 threshold on +direction 1 threshold overshoot on -direction 1 threshold overshoot if the captured value is more than or equal to the
1 threshold if the captured value is less than the 1 threshold on high setpoint crossing on high setpoint crossing if the captured value is more than or equal to the high setpoint on +direction low crossing setpoint on -direction low crossing setpoint if the captured value is less than the low setpoint
35015371 00 May 2007 175
Language objects
1 counter output
SET commands,
%MWxy.i.18
The table below introduces the meanings of the %MWxy.i.18 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.18:X0
%MWxy.i.18:X1
%MWxy.i.18:X2
%MWxy.i.18:X4
%MWxy.i.18:X5
Standard symbol
S1_ENAB
S1_PRES
S1_CAPT
S1_MOD_INC
S1_MOD_DEC
Meaning: Setting the 1 counter output to 1… on confirmation on preset on capture on +direction modulo overshoot on -direction modulo overshoot
1 counter output
SET commands,
%MWxy.i.19
The table below introduces the meanings of the %MWxy.i.19 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.19:X0
%MWxy.i.19:X1
%MWxy.i.19:X2
%MWxy.i.19:X3
%MWxy.i.19:X4
%MWxy.i.19:X5
%MWxy.i.19:X6
Standard symbol
S1_TH0_INC
S1_TH0_DEC
S1_C_SUP_TH0
S1_C_INF_TH0
S1_TH1_INC
S1_TH1_DEC
S1_C_SUP_TH1
%MWxy.i.19:X7 S1_C_INF_TH1
%MWxy.i.19:X8
%MWxy.i.19:X9
S1_HISP_INC
S1_HISP_DEC
%MWxy.i.19:X10 S1_C_SUP_HISP
%MWxy.i.19:X12 S1_LOSP_INC
%MWxy.i.19:X13 S1_LOSP_DEC
%MWxy.i.19:X15 S1_C_INF_LOSP
Meaning of setting the 1 counter output to 1… on +direction 0 threshold overshoot on -direction 0 threshold overshoot if the captured value is more than or equal to the
0 threshold if the captured value is less than the 0 threshold on +direction 1 threshold overshoot on -direction 1 threshold overshoot if the captured value is more than or equal to the
1 threshold if the captured value is less than the 1 threshold on high setpoint crossing on high setpoint crossing if the captured value is more than or equal to the high setpoint on +direction low crossing setpoint on -direction low crossing setpoint if the captured value is less than the low setpoint
176
35015371 00 May 2007
Language objects
1 counter output
RESET commands,
%MWxy.i.20
The table below introduces the meanings of the %MWxy.i.20 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.20:X0
%MWxy.i.20:X1
%MWxy.i.20:X2
%MWxy.i.20:X4
%MWxy.i.20:X5
Standard symbol
R1_ENAB
R1_PRES
R1_CAPT
R1_MOD_INC
R1_MOD_DEC
Meaning: Setting the 1 counter output to 0… on confirmation on preset on capture on +direction modulo overshoot on -direction modulo overshoot
1 counter output
RESET commands,
%MWxy.i.21
The table below introduces the meanings of the %MWxy.i.21 command word bits.
The requests used are those associated to the (READ_PARAM, WRITE_PARAM...) parameters.
Address
%MWxy.i.21:X0
%MWxy.i.21:X1
%MWxy.i.21:X2
%MWxy.i.21:X3
%MWxy.i.21:X4
%MWxy.i.21:X5
%MWxy.i.21:X6
Standard symbol
R1_TH0_INC
R1_TH0_DEC
R1_C_SUP_TH0
R1_C_INF_TH0
R1_TH1_INC
R1_TH1_DEC
R1_C_SUP_TH1
%MWxy.i.21:X7 R1_C_INF_TH1
%MWxy.i.21:X8
%MWxy.i.21:X9
R1_HISP_INC
R1_HISP_DEC
%MWxy.i.21:X10 R1_C_SUP_HISP
%MWxy.i.21:X12 R1_LOSP_INC
%MWxy.i.21:X13 R1_LOSP_DEC
%MWxy.i.21:X15 R1_C_INF_LOSP
Meaning: Setting the 1 counter output to 0… on +direction 0 threshold overshoot on -direction 0 threshold overshoot if the captured value is more than or equal to the
0 threshold if the captured value is less than the 0 threshold on +direction 1 threshold overshoot on -direction 1 threshold overshoot if the captured value is more than or equal to the
1 threshold if the captured value is less than the 1 threshold on high setpoint crossing on high setpoint crossing if the captured value is more than or equal to the high setpoint on +direction low crossing setpoint on -direction low crossing setpoint if the captured value is less than the low setpoint
35015371 00 May 2007 177
Language objects
Explicit object exchange and report management
Presentation
Illustration
When data is exchanged between the PLC memory and the module, it may take several task cycles for the module to take this into account. Two words are used to handle exchanges: z z
%MWxy.i : Exchange in progress,
%MWxy.i.1 : Report.
The illustration below shows the different significant bits for managing exchanges.
Reconfiguration (X15)
Adjustment (X2)
Command (X1)
Status (X0)
Status parameters
Command parameters
Adjustment parameters
READ_STS
WRITE_CMD
WRITE_PARAM
READ_PARAM
SAVE_PARAM
RESTORE_PARAM
178
35015371 00 May 2007
Description of significant bits
Language objects
Each bit of the words %MWxy.i and %MWxy.i.1 is associated with a parameter type: z z z z
Bits from rank 0 are associated with status parameters: z The bit %MWxy.i.0:X0 indicates if a status word read request is in progress,
Bits from rank 1 are associated with command parameters: z z
The bit %MWxy.i.0:X1 indicates if command parameters are sent to the channel i of the module,
The bit %MWxy.i.1:X1 indicates if command parameters are accepted by the channel i of the module, bits from rank 2 are associated with adjustment parameters: z The bit %MWxy.i.0:X2 indicates if adjustment parameters are exchanged with the channel i of the module (by WRITE_PARAM, READ_PARAM,
SAVE_PARAM, RESTORE_PARAM), z the bit %MWxy.i.1:X2 indicates if adjustment parameters are accepted by the module. If the exchange was successful, this bit is set to 0,
Bits of rank 15 indicate a reconfiguration on the channel i of the module from the terminal (modification of configuration parameters + cold start of the channel).
Note: Exchange and report words also exist at the module level (%MWxy.MOD et
%MWxy.MOD.1).
35015371 00 May 2007 179
Language objects
Example Phase 1: Sending data using the instruction WRITE_PARAM
PLC memory
Status parameters
Command parameters
Adjustment parameters
1
0
I/O module memory or integrated applicationspecific function
Status parameters
Command parameters
Adjustment parameters
When the instruction is scanned by the PLC processor, the Exchange in progress bit is set to 1 in %MWxy.
Phase 2: Data analysis by the I/O module and report
PLC memory
Status parameters
Command parameters
Adjustment parameters
0
1
I/O module memory or integrated applicationspecific function
Status parameters
Command parameters
Adjustment parameters
When data is exchanged between the PLC memory and the module, acknowledgment by the module is managed by the bit %MWxy.i.1:X2: Report(0 = exchange successful, 1=exchange unsuccessful).
Note: There are no module level adjustment parameters.
180
35015371 00 May 2007
Explicit
Exchange
Execution
Indicators:
%MWxy.i.0
Language objects
0
1
2
The table below lists the meanings of the EXCH_STS channel exchange control bits.
15
STS_IN_PROGR
Meaning
Exchange of channel status words in progress
COMMAND_IN_PROGR Exchange of command words in progress
ADJUST_IN_PROGR
RECONF_IN_PROGR
Exchange of adjustment words (parameters) in progress
Channel reconfiguration in progress
Explicit exchange report:
%MWxy.i.1
The table below lists the meanings of the EXCH_ERR report bits.
0
1
2
15
STS_READ_ERR
COMMAND_ERR
ADJUST_ERR
RECONF_ERR
Meaning
Channel status read error
Command word send error
Adjustment word send error
Channel reconfiguration error
Using a Premium
Counting Module
The following table describes the steps carried out between a Premium counting module and the PLC after start up.
2
3
Step
1
Action
Startup
The processor sends the configuration parameters.
The processor sends the configuration parameters using the WRITE_PARAM method.
Note: When the operation is completed, the bit %MWr.m.c.0.2 is set to 0.
If you use the command WRITE_PARAM at the beginning of your application, you must wait until the bit %MWr.m.c.0.2 is set to 0.
35015371 00 May 2007 181
Language objects
182
35015371 00 May 2007
Example of the counting application
10
At a glance
Subject of this chapter
What's in this
Chapter?
This chapter introduces an example of the counting application, from the configuration of the modules to the application’s development in the PLC.
This chapter contains the following sections:
Section
10.1
10.2
Topic
Introducing and configuring the example
Programming details for the example
Page
184
190
35015371 00 May 2007 183
Example of the application
10.1
Introducing and configuring the example
At a Glance
Subject of this section
What's in this
Section?
This section shows an example of the counting application and describes how the hardware should be configured for the program to be used.
This section contains the following topics:
Topic
Introduction to an example of an application
Configuration of the PLC
Page
185
187
184
35015371 00 May 2007
Example of the application
Introduction to an example of an application
At a glance
Illustration
This very simple example shows a TSX CTY 2A counting module being used in tandem with a discrete module. It consists of a MAST task and an event task.
The illustration above shows the principle of monitoring automated palette stacking.
C
M
V
P
25 50 new palette
Command frame new compartment
35015371 00 May 2007 185
Example of the application
The application’s external specifications
The PLC is loaded to monitor the palette stacking. Each palette has three compartments. The compartments are put into place beneath the stacking device using a V jack. They are put into 4 positions, with the last one for moving out full palettes. z z z
There are two types of palettes, one with 25 and one with 50 compartments.
The operating principle is as follows: the M motor powers a conveyor belt which carries the objects.
a C sensor counts the objects before they are put back into the palette. a telescopic V jack is used to move on to the next compartment when the one in progress is full, and it moves out the full palette.
z a P plate allows you to change the palette.
Using the motor brings about the physical confirmation of the counting.
z z
The dialog operator consists of the following controls: z 25/50 switch: allows you to choose the type of palette. This takes effect for the next palette (on state), new palette button: forces the palette to be changed (on the rising edge), new compartment edge).
button: forces the compartment to be changed (on the rising
186
35015371 00 May 2007
Example of the application
Configuration of the PLC
The PLC structure
The diagram below shows the PLC’s constitution.
Configuration
TSX 57202 V3.0...
XMWI
XTI..
0
0
0
2
6
P
S
Y
0
T
S
X
2
0
5
7
2
1
C
T
Y
2
A
2
C
T
Y
2
C
3
D
E
Y
3
2
D
2
K
4
1
5 6
Note: the CTY 2C module in position 2 is not used in this example.
35015371 00 May 2007 187
Example of the application
Configuration of the processor
The diagram below shows the configuration of the TSX 57202 processor used in the example.
TSX 57202 [RACK 0 POSITION 0]
Configuration
Reference: TSX P processor 57202
Operating Mode
Run/Stop input
Automatic start in Run
%MWi Reset on cold restart
Memory card
None
Tasks
MAST
Cyclic
Periodic
Watchdog
FAST
Period:
Watchdog
250
50 ms ms
FIPIO Mode
Cycle time network (calculated)
Controlled
Free ms
100
10 ms ms
FIPIO Mode
Cycle time network (calculated)
Controlled
Free ms
The counting module’s configuration
The diagram below shows the configuration of the TSX CTY 2A module used in the example.
TSX CTY 2A [RACK 0 POSITION 1 ]
Configuration
Reference: MOD.COUNT. 2 CHANNELS 40KHZ
Symbol:
Counter:
Counter 0
Function:
Down counting
Inpurt interface
1 IA input
Solid State contact
Preet on IPres
Rising edge IPres
Operation on switching to 0
No down counter preset
With down counter preset
Task:
MAST
Event
EVT
Reset output Q0
Manual
Automatic
Fallback mode
Reset
Maintain
0
The C sensor (for counting the objects) is mated with the 0 channel.
188
35015371 00 May 2007
The discrete module’s configuration
Example of the application
The diagram below shows the configuration of the TSX DEY 32D2K module used in the example.
TSX DEY 32D2K [ RACK 0 POSITION 3 ]
Configuration
Designation: 32E 24VCC SINK CONN
6
7
8
9
10
11
12
13
14
15
Chan
0
1
4
5
2
3
Symbol
NOUV_PAL
NOUV_COMP
TAILLE_COMP
Supply Monit.
Active
Task
MAST
MAST z z z
The assignments of the inputs are as follows: input 13: new palette forcing button (active at 1), input 14: new compartment forcing button (active at 1), input 15: 25/50 objects per compartment switch (1 = 50 objects).
Note: this module is only used for input.
Assignment of the internal bits and words z z z
The example uses the assignments of the following internal variables:
%M0: at 1 starts the M motor, at 0 stops it,
%M1: at 1 the palette is being positioned, at 0 it is ready to receive the objects,
%MW0: positions of the jack: 1, 2, 3 (corresponding to the three compartments) and 4 (for moving out the palette), z %MW1: 25 or 50 (for storing the size of a palette’s compartments).
35015371 00 May 2007 189
Example of the application
10.2
Programming details for the example
At a Glance
Subject of this section
What's in this
Section?
This section describes in detail the PL7 programming needed to install the counting application.
This section contains the following topics:
Topic
The application structure
Program: preliminary processing
Program: sequential processing
Program: step 0 of the sequential processing
Program: step 2 of the sequential processing
Program: subsequent processing
Program: event processing
Page
191
192
193
194
197
199
200
190
35015371 00 May 2007
The application structure
Structure view of the application
The diagram below shows the application’s structure.
Application Browser
+
+
Structure view
STATION
Configuration
Hardware configuration
Software configuration
Configuring Grafcet objects
Program
Mast task
Sections
Sequential
Prl
Chart
Post
Sr
Events
DFB types
Variables
Evt0
Animation tables
Documentation
Operating screens
Example of the application
35015371 00 May 2007 191
Example of the application
Program: preliminary processing
The aims of the preliminary processing z z
The preliminary processing manages the forced operating modes: changing the palette, changing the compartment.
The operation of the preliminary processing
The diagram below shows the programming of the preliminary processing.
LD: MAST - Sequential - Prl
(*new compartment*)
%I3.14
P
(*new palette: reset grafcet*)
%M0
R
%I3.13
P
%S21
S
%I1.0.ERR
P
(*General and special unmasking*)
OPERATE
UNMASKEVT()
%QW1.0.3:X5
S
F2 F3
P
F4
N
F5 F6 F7 F8 F9 F10
S
F11
R
F12 1.F2
OPER COHP
1.F3
1.F4
COHP
1.F5
1S.F6
1F7
F (...)
1.F8
192
35015371 00 May 2007
Example of the application
Program: sequential processing
General Sequential processing constitutes the heart of the application. It concerns monitoring the compartments being filled and changing the palette.
Flowchart of the sequential processing
The diagram below shows the GRAFCET flowchart of the sequential processing.
GRAFCET: MAST - Sequential - Chart
0
(*new palette*)
1
(*waiting to position compartment>>
2
(*filling compartment*)
F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 1F2
35015371 00 May 2007 193
Example of the application
Program: step 0 of the sequential processing
Introduction of step 0 z z
Step 0 initializes the loop: stops the motor, confirms the counting module’s IVal input, z unmasks the zero value overshoot event.
194
35015371 00 May 2007
Example of the application
Step 0: Action on
P1 activation
The diagram below shows the action on activation of step 0 (P1).
LD: MAST - Sequential - Chart - PAGE0 %X0 P1
(*stopping motor for whatever reason*)
%M0
R
(*take palette out*)
OPERATE
%MW0:=4
(*new palette load request*)
%M1
S
(*Store compartment sizes*)
%I3.15
%I3.15
OPERATE
%MW1:=50
OPERATE
%MW1:=25
The diagram below shows the result of the action on activation of step 0 (P1).
LD: MAST - Sequential - Chart - PAGE0 %X0 P1
(*writing of down counter preset value according to compartment size*)
OPERATE
%MD1.0.4:=%MW1
OPERATE
WRITE_PARAM %CH5.0
(*confirm IEna enabling input *)
%Q1.0.5
S
(*prepare direct preset*)
%Q1.0.1
R
(*unmask event enabling*)
OPERATE
%QW1.0.1 := 16#0020
35015371 00 May 2007 195
Example of the application
Step 0: action on
P0 deactivation
The diagram below shows the action on deactivation of step 0 (P0).
LD: MAST - Sequential - Chart - PAGE0 %X0 P0
(*Return the jack to its starting position*)
OPERATE
%MW0:=1
(*Direct preset*)
%Q1.0.1
S
F2 F3
P
F4
N
F5 F6 F7
X
F8 F9 F10 F11
S
F12
R
S.F1
S.F2
OPER
S.F3
COHP
H
S.F4
COHP
V
S.F5
S.F6
FB
S.F7
F (...)
S.F8
Transition of step 0 to step 1
Illustration
The transition conditions from step 0 to step 1 are as follows: z palette ready to receive objects, z exchanges between the PLC and the counting module are terminated.
The diagram below shows the transition conditions from step 0 to step 1.
LD: MAST - Sequential - Chart - PAGE0 %X(0) >%X(1)
%M1 %MW1.0:X1
F2 F3
P
F4
N
F5 F6
X
F7 F8 F9
COHP
I F4
COHP
I F5
196
35015371 00 May 2007
Example of the application
Program: step 2 of the sequential processing
Introduction of step 2
Step 2 deals with monitoring the compartments being stacked.
Step 2: action on
P1 activation
The diagram below shows the action on activation of step 2 (P1).
LD: MAST - Sequential - Chart - PAGE 0 %X2 P1
%M0
S
Step 2: action on
P0 deactivation
The diagram below shows the action on deactivation of step 2 (P0).
LD: MAST - Sequential - Chart - PAGE 0 %X2 P0
(*Advance palette by one notch*)
OPERATE
INC %MW0
Transition from step 2 to step 0
The diagram below shows the transition conditions from step 2 to step 0.
LD: MAST - Sequential - Chart - PAGE0 %X(2)->%X(0)
%M0
COMPARE
%MW0>=3
F2 F3 F4
P N
F5 F6 F7
X
F8 F9
COHP
H
I F4
COHP
V
I F5
35015371 00 May 2007 197
Example of the application
Transition from step 2 to step 1
The diagram below shows the transition conditions from step 2 to step 1.
LD: MAST - Sequential - Chart - PAGE0 %X(2)->%X(1)
%M0
COMPARE
%MW0<4
F2 F3 F4
P N
F5 F6 F7
X
F8 F9
COHP
I F4
COHP
I F5
Transition from step 1 to step 2
The diagram below shows the transition conditions from step 1 to step 2, (this always applies).
LD: MAST - CHART - PAGE 0 %X ( 1 ) - > %X ( 2 )
F2 F3
P
F4
N
F5 F6 F7
X
F8 F9
#
F10
COHP
H
S.F4
COHP
S.F5
198
35015371 00 May 2007
Example of the application
Program: subsequent processing
The aim of subsequent processing
Subsequent processing manages errors and stops the motor if there is a PLC error.
The operation of subsequent processing
The diagram below shows the programming of the subsequent processing.
LD: MAST - Sequential - Post
(*Stop motor in the event of an error*)
%I1.0.ERR
OPERATE
READ_STS %CH1.0
%M0
R
35015371 00 May 2007 199
Example of the application
Program: event processing
At a glance
Illustration
Event processing stops the motor by resetting the %M0 when the switch to zero value event is enabled.
The diagram below shows the programming of the 0 event task.
LD: EVTO - Evt0
%IW1.0.3:X5
%M0
R
F2 F3
P
F4
N
F5 F6 F7 F8 F9 F10
S
F11
R
F12 1.F2
OPER COHP
1.F3
1.F4
COHP
1.F5
1S.F6
1F7
F (...)
1.F8
200
35015371 00 May 2007
Index
A
Adjusting
Absolute encoder offset, 126
Fault processing, 128
Frequency output, 131
Preset, 127
Set points, 129
Speed measurement, 130
Switches, 132
Thresholds, 129
Adjustment
At a Glance, 124
C
Configuration
Absolute encoder interface, 110
Capturing a counting register, 112
Input TSX CTY 2A/4A, 106
Input TSX CTY 2C, 107
Screen, 104
Configuring
Combined input IEna/Q2, 115
Event processing, 114
Faulty outputs, 119
Multiplexing absolute encoders, 116
Preset, 113
Reset, 113
Setpoint crossing, 118
Special functions, 121
Switch to zero, 118
35015371 00 May 2007
Counting
Direction, 38
Introduction, 11
Resetting, 52
CTY2A/4A
Introduction, 16
CTY2C
Introduction, 24
D
Dealing with an
invalid measurement, 100
Debugging
At a Glance, 136
LEDs and buttons, 143
Maximized screen, 137
Minimized screen, 139
Use, 142
Diagnostics
Display, 146
List of faults, 148
Down counting
Principle, 18, 19
E
Entrée
Interface, 37
Event processing
Programming, 157
A C
201
Index
Example
Configuration, 184, 187
Programming, 190
F
Fault
Masking, 128
Storing, 128
Faults
Processing, 98
Function
Capture, 43
Comparison, 61
Event processing, 155
Physical outputs, 78
Preset, 47
Reset, 47
Special, 94
Speed Monitoring, 92
Switch, 67
I
Input
Counting, 37
L
Language objects
Exchange management, 178
Explicit exchanges, 169
Implicit, 161
User defined exchanges, 172
O
Operating modes
Counting function, 152
S
Speed measurement
Principle, 30
202
U
Up counting
Principle, 18, 19
Up counting/Down counting
Principle, 20, 27
Up counting/down counting
Principle, 22, 29
35015371 00 May 2007