Schneider Electric TSXDTM100 Intelligent module User Guide
விளம்பரம்
விளம்பரம்
________________________________________________________
___________________________________________________________________________
For the benefit of the user who is already familiar with the TSX CTM 100 module, the following table compares the functions of the two modules :
TSX CTM 100 Module
• Incremental encoder input max. frequency 40 kHz
TSX DTM 100 Module
• Absolute encoder Gray code input up to 16 bits frequency 40 kHz max.
• Counter function
• Up-down counter function
• Timer function
• Position measurement function
• Tachometer function
• Measurement acquisition function
• Tachometer function
• Electronic cam function
The sub-functions of the TSX DTM module are very similar to those of the TSX CTM 100 :
• the data acquisition period and the updating time for the current measurement is
950
µ s,
• the validate/inhibit function remains unchanged. It validates the acquisition data from the absolute encoder,
• the preset function is eliminated. However, the TSX DTM 100 module offers an offset function. The actual measurement used is the encoded value plus the offset value, which is always valid. This offset compensates for mechanical offset,
• the capture function remains essentially unchanged and is only active in the measurement acquisition mode and in the electronic cam mode,
• the comparison function remains essentially unchanged : comparison of the measurement with 2 thresholds (with or without hysteresis),
• the choice of event driven interrupts and the principle of generation remain unchanged,
• the operating modes are identical.
Note : for most applications, the value provided by the absolute encoder represents the position of a moving object (angular or linear position). For this reason, in this document, the words measurement or position will be used interchangeably, for the value generated by the absolute encoder.
___________________________________________________________________________
1
________________________________________________________
___________________________________________________________________________
Page
General presentation
1.1
Intellegent modules
1.2
The TSX DTM 100 module
_________________________________________________________________________________________________
Operation
2.1
2.2
2.3
2.4
Functions available
Dialogue with a PLC
Functional modes for the module
Operating modes for the module
9
10
16
18
24
5
6
6
_________________________________________________________________________________________________
Configuration
3.1
3.2
Principle
Definition of parameters
27
28
30
_________________________________________________________________________________________________
Programming
4.1
4.5
Method
4.2
Example using measurement acquisition mode
4.3
Example using tachometer mode
4.4
Example using electronic cam mode
Complementary programming information
37
38
40
48
54
61
_________________________________________________________________________________________________
Installing and wiring
5.1
5.2
Installing the module
Wiring
71
72
74
___________________________________________________________________________
2
________________________________________________________
___________________________________________________________________________
Page
Specifications
6.1
Consumption
6.2
I/O characteristics
6.3
Performance
6.4
Conditions for input signals
6.5
Selecting threshold settings
_________________________________________________________________________________________________
Appendix
7.1
Discrete bits and register words
7.2
Glossary
7.3
Index
89
90
93
94
77
78
79
81
83
84
___________________________________________________________________________
3
___________________________________________________________________________
___________________________________________________________________________
4
________________________________________________________
General Presentation
1
Section 1
___________________________________________________________________________
1.1
Intelligent modules
Page
6
________________________________________________________________________________________________________
1.2
The TSX DTM 100 module 6
6
8
___________________________________________________________________________
5
___________________________________________________________________________
1.1
Intelligent modules
The Series 7 intelligent I/O modules are programmable coprocessors, developed by
Telemecanique to distribute processing of the application.
These modules have the following structure :
Structure of an intelligent module
PLC bus
Application inputs
Bus interface
Shared memory
Processor unit
Specific circuitry
Application outputs
They consist of :
• an interface bus using standard modes of communication between the PLC processor and the module,
• shared memory in which data accessible to the module and the PLC processor is stored,
• a processor unit comprising a processor and operational software,
• inputs and outputs specific to the module.
The user can adjust the parameters for the pre-programmed functions. Using the modules requires an understanding of PL7-2 and PL7-3 software. It may be necessary to refer to the corresponding programming manual for additional information.
_______________________________________________________________________________________
1.2 The TSX DTM 100 module
_________________________________________________________________________________________________
1.2-1 Description
General
The TSX DTM 100 module is a mutifunction intelligent module for absolute encoders where the coding method is Gray code (up to 16 bits). The output from the encoder should be an open collector NPN type. The 24V power supply for the ENCODER (see connection circuit, section 5.3-1) should be between 13.5V and 25.2V.
In addition to the 16 encoder inputs (B1 to B16), the TSX DTM 100 has 2 auxiliary inputs
(In0 and In1) and 4 transistor outputs, 24V - 300 mA (O.0 to O.3).
___________________________________________________________________________
6
General Presentation
1
___________________________________________________________________________
Once initialized and configured, the module can execute a predefined operation independently of the PLC processor.
However, if an application needs to be synchronized with the general sequence, this can be achieved by using :
• the IW/OW interface register, which is updated at the same rate as the task in which the module is configured,
• interrupts for immediate action : which interrupt the task currently being executed
(except for TSX 47-20).
Operating modes
Intended for use with TSX 47-20, TSX 47-30, TSX 67 and TSX 87 PLCs, the TSX DTM
100 module offers the following functional modes of operation :
• measurement acquisition,
• tachometer,
• electronic cam.
Absolute encoder
B1
B16
Validate/ inhibit
In0
Gray ➤ bin
▲
Capture In1
Transistor outputs
O.0
O.3
▲
Measurement acquisition
▲
Tachometer
Captured measurement
▲
▲
Current measurement
▲
Electronic cam
▲ ▲
Comparison of thresholds
Dialogue with
PLC-CPU
• measurement acquisition mode
In this mode the module periodically acquires a value from the encoder, transforms it from Gray code to binary and saves it. This value is then compared with 2 thresholds.
The result of this comparison determines the state of the outputs.
• tachometer mode
In this mode, in addition to the periodic acquisition of measurements from the encoder, the module calculates the distance moved (speed of evolution of the moving object) at regular time intervals (defined during configuration). This distance moved per unit of time is then compared with 2 thresholds. The result of this comparison determines the state of the outputs.
___________________________________________________________________________
7
___________________________________________________________________________
• electronic cam mode
This mode enables up to 15 thresholds to be configured (threshold 0 is implicit). The active threshold, and thus the state of the outputs of the module (each threshold configured is associated with a matrix of outputs), is determined by the comparison between the current measurement and these thresholds (active threshold < current measurement < threshold +1).
Thresholds S0
➤
S1 S2 S3 current mesurement
X
S4 S5 S6 S7 S8 S9 S10 S11 S12
➤
O.0
O.1
O.2
O.3
In this example if S7 is the active threshold, the state of the outputs is as follows :
O.0 = 0, O.1 = 1, O.2 = 0 and O.3 = 1.
_______________________________________________________________________________________
1.2-2 Physical appearance
The TSX DTM 100 module is a single height module. It must be inserted into a complete input/output bus rack for the TSX 47-30/67/87 PLCs, or in one of the first 4 slots of the basic configuration for the TSX 47-20 PLCs. It comprises :
1 A metallic case, physically protecting the electronic circuits and providing protection against radiated interference,
2 A red LED, F : lights if the module is faulty,
3 A green LED, OK : lights if the module is configured.
O.O
O.1
O.O
O.O
O.2
In0
In1
1
2
3
4
5
4 Three red LEDs, O.0 to O.2, light if the corresponding outputs are at state 1,
6
5
Two red LEDs, In0 and In1, light if the corresponding inputs are at state 1,
6 A 15 pin SUB D connector to connect the I/O and the external power supply,
7 A 25 pin SUB D connector to connect the absolute encoder.
7
Notes : • output O.3 does not have an LED.
• LEDs In0 and In1 light whenever the module is not OK.
___________________________________________________________________________
8
________________________________________________________
Operation
2
Section 2
___________________________________________________________________________
2.1
Functions available
Page
10
_________________________________________________________________________________________________
2.2
Dialogue with the PLC 16
_________________________________________________________________________________________________
2.3
Functional modes for the module 18
18
20
22
_________________________________________________________________________________________________
2.4
Operating modes for the module 24
24
25
___________________________________________________________________________
9
___________________________________________________________________________
2.1
Functions available
The following functions are available with each of the 3 functional modes :
• conversion of the current measurement,
• capture of the measurement (except in tachometer mode),
• validatation of the measurement,
• comparison of the measurement with the thresholds,
• assignment of physical outputs,
• calculation of sense of direction,
• operation with hysteresis,
• generation of interrupts on an event.
Conversion of the current measurement
The Gray code data , provided by the absolute encoder, is converted into pure binary and then stored in the module acquisition registers. This value is then expressed in either single length or double length format, depending on the type of encoder declared during configuration. The off set value is then added (this is also entered during configuration).
This result, referred to as the current measurement, may then be scaled in line with the measurement range : 0 to MODOLO - 1 (where MODULO = 2 Nbits ), then stored in registers
IWxy,6 and IWxy,7 (double length).
Calculation of distance moved
This process only concerns the tachometer mode.
➤ TACH-PER
➤ time
Measurement distance moved
MEAS n - 2
MEAS
MEAS n - 1
n - 1
MEAS n - 2
MEAS
MEAS n n
-
MEAS n - 1
At regular intervals, where the period TACH-PER is defined during configuration, the module calculates the distance moved during the period (MEAS n
- MEAS n-1
). The distance moved during a period, equivalent to a speed, is only valid if the following conditions are respected :
• the reference period, TACH-PER, should be chosen such that the variation of the measurement during a period is less than the encoder distance.
Example : for a 10 bit (1024 point) single turn encoder turning at 20 rps maximum, the time required to cover the encoder distance = 1/20 s (time required for
1 turn). The parameter TACH-PER, will thus be
≤
50ms.
• when setting the module into RUN, or after the sense of direction of the measurement has changed, time should be allowed to initiate the calculation.
___________________________________________________________________________
10
Operation
2
___________________________________________________________________________
Capturing the measurement
Capturing the measurement consists of acquiring data from the encoder «on the fly» and calculating the current measurement. The result is then transferred into registers
IWxy,4 and IWxy,5 (double length).
➤ T = 950 µs
➤
X
Capture event
Calculate current measurement
IWxy,4 / 5
The calculation is made on one of the following events, selected during configuration :
• rising or falling edge of input In1 (declared in nibble * EDGE-In1),
• rising edge of bit Oxy,2,
• rising or falling edge of input In1 with bit Oxy,2 at state 1.
Measurement capture is not possible in tachometer mode.
If a request to check the captured value against the thresholds is made, this is activated as soon as the module is placed into RUN and, therefore, even before the first measurement is captured (the captured value is initialized to 0 during configuration). To avoid outputs taking an undesired state you can :
• use bit Oxy,2 to force a capture as soon as moving into RUN, in order to initialize the captured value,
• use validation bit for outputs Oxy,3 so that they are only validated after the first capture,
• use bit Oxy,4 to force the outputs until the first capture is made.
Input In1 can be declared as an interrupt event to the PLC processor. This interrupt is indicated by bit IWxy,1,C.
Note : capture repetition time should be greater then 2ms.
Validating the measurement
This validates acceptance of the measured value in the selected functional mode.
Depending on the user’s requirements, this operation is executed when :
• physical input In0 is at state 1,
• discrete bit Oxy,0 is at state 1,
• input In0 and bit Oxy,0 are at state 1.
*Note : a nibble is the term used here for 4 bits.
___________________________________________________________________________
11
___________________________________________________________________________
Comparison of measurement with the thresholds
Depending on the functional mode selected, the module offers the following possibilities :
• in measurement acquisition and tachometer modes :
- to define 2 thresholds, expressed as single or double length values, written by the application program to registers OWxy,3/OWxy,4 and OWxy,5/OWxy,6,
- to compare these threshold values with the current measurement, or with the measurement captured in measurement acquisition mode, or with the distance moved in a unit of time in tachometer mode. The result of the comparison activates physical outputs of the module according to a matrix stored in OWxy,7. An interrupt to the PLC processor can be generated each time the threshold is crossed.
The comparison takes place once during each 950
µ s scan cycle
• in electronic cam mode :
- up to 15 thresholds, expressed as single or double length values (threshold 0 is implicit), are defined during configuration,
- these threshold values are compared with the current measurement to determine the active threshold (immediately lower than the current measurement). The result of the comparison activates the physical outputs of the module according to matrices defined during configuration (OSN0 to OSN15).
Each time the threshold is crossed an interrupt to the PLC processor may be generated.
Assigning physical outputs
This depends on the functional mode selected : in measurement acquisition mode and tachometer mode, the physical output assignment matrix is provided dynamically by register OWxy,7 (least significant 3 nibbles) in order to be able to use multiple thresholds. To ensure compatibility between the threshold values and the assignment of outputs, this matrix is updated at the same time as the thresholds.
Comparison measurement/ threshold output O.0
output O.1
output O.2
output O.3
meas<thresh0 thresh0<meas<thresh1
and or meas<thresh1 thresh1<meas<thresh0
IWxy,1,4 = 1 IWxy,1,5 = 1
OWxy,7,8 = x
OWxy,7,9 = x
OWxy,7,A = x
OWxy,7,B = x
OWxy,7,4 = x
OWxy,7,5 = x
OWxy,7,6 = x
OWxy,7,7 = x meas>thresh1 and meas>thresh0
IWxy,1,6 = 1
OWxy,7,0 = x
OWxy,7,1 = x
OWxy,7,2= x
OWxy,7,3 = x x = 0 : output at state 0, x = 1 : output at state 1.
___________________________________________________________________________
12
Operation
2
___________________________________________________________________________
The result of the measurement/threshold comparison is provided by 3 bits of a register word :
• IWxy,1,4 = 1 : measurement less than the 2 thresholds,
• IWxy,1,5 = 1 : measurement between the 2 thresholds,
• IWxy,1,6 = 1 : measurement greater than the 2 thresholds.
In order for the outputs to assume the states defined by the matrix, the user must activate the following bits :
Oxy,3 : Output validation command,
• at state 0, freezes the state of the outputs at their current state,
• at state 1, enables outputs to assume states defined by the matrix.
Note : bit Oxy,3 only needs to be used if validation of the output states has been requested during configuration (VAL-OUT bit = 1).
Oxy,4 : Output forcing instruction,
• at state 0, the outputs assume the state defined by the matrix,
• at state 1, forces the outputs to the state defined during configuration.
OWxy,0,F :
• at state 1, forces the module outputs to 0.
Priority for assigning the outputs
Priority Oxy,3.VAL-OUT + VAL-OUT
Validation
FB
Fall-back
N
Output matrix defined in
OWxy,7
O
➤ ➤ ➤ ➤
Nibbles defined in configuration
➤
FBS
Oxy,4
Force
0
1
➤ ➤ ➤ ➤
FORCING
Oxy,0,F
Force to 0
0
1
➤ ➤ ➤ ➤
0000
O.0
O.1
O.2
O.3
If the thresholds are outside the measurement range, the module warns the user of an
OVERFLOW. If overflow or a PLC processor fault occurs, the module offers the possibility to set the outputs to a fall-back-state. This choice is made during configuration.
in electronic cam mode an output matrix is associated with each of the other 15 thresholds. These matrices are defined at the same time as the thresholds in configuration mode.
___________________________________________________________________________
13
___________________________________________________________________________
Determining the sense of direction
The module determines the sense of direction by calculating the change in the current measurement.
This calculation is only reliable if the conditions for the input signals are respected (see section 6.3-3).
The user program can interrogate bit IWxy,1,0 for the sense of direction :
• if the sense of direction is positive, IWxy,1,0 = 1,
• if the sense of direction is negative, IWxy,1,0 = 0.
If the current measurement is frozen, the sense of direction is that which was last calculated.
Operating with hysteresis
This function enables a hysteresis value to be assigned to each of the thresholds so as to stabilize the system. The value of the hysteresis, H, is defined during configuration and should be between 0 and ( 2 Nbits -1)/2.
The comparison threshold for increasing values is provided by the relationship :
AT0 = THRESH 0 + H and for decreasing values by the relationship :
AT0 = THRESH 0 - H (AT0 = Actual Thresh 0 and H = hysteresis value/2).
▲
▲
➤
H ➤
➤
H
Threshold 0
➤
Measurement
If overflow occurs during the calculation, bit IWxy,1,3 signals an overflow fault to the user. In this case, it should be acknowledged by raising bit Oxy,7 and the value of the threshold should be altered to eliminate the fault.
___________________________________________________________________________
14
Operation
2
___________________________________________________________________________
Generation of inputs on events
The events which can generate an interrupt to the PLC processor are as follows, in descending order of interrupt priority :
• crossing threshold 0,
• crossing threshold 1,
• a capture command from In1 (rising or falling edge depending on selection made during configuration),
• validation command from In0 (rising edge),
• «top» of clock in tachometer mode.
Each interrupt is associated with a status bit which is set to 1 when interrupt occurs. This bit is reset to 0 once the interrupt has been acknowledged by the interrupt task. The interrupt status bits are as follows :
• IWxy,1,A : interrupt on threshold 0 or on crossing any threshold in electronic cam mode,
• IWxy,1,B : interrupt on threshold 1,
• IWxy,1,C : interrupt on capture input,
• IWxy,1,E : interrupt on measurement acquisition validation input,
• IWxy,1,F : interrupt on clock in tachometer mode.
During an interrupt due to the crossing of a threshold in electronic cam mode, the number of the threshold crossed is provided by the second nibble of word IWxy,1 (bits IWxy,1,4 to IWxy,1,7).
Note : interrupts are not available with the TSX 47-20 PLC.
___________________________________________________________________________
15
___________________________________________________________________________
2.2
Dialogue with the PLC
Dialogue mode
The dialogue between the user program in a PLC and the TSX DTM 100 module is made using :
• discrete input/output bits,
• registers (16 bit words),
• messages (tables of 16 bit words),
• interrupts (except for TSX 47-20).
Discrete bits I/Oxy,i
The TSX DTM 100 is viewed by the discrete interface as a module with 8 inputs and 8 outputs.
The output bits allow the PLC program to start certain operations (measurement acquisition, capture, etc.). The input bits enable the physical inputs/outputs of the module to be monitored. These bits are updated during each scan of the task in which the module is configured.
Register words IW/OWxy,i
The input register words, which can only be read, are status words supplying information about the operation of the module. They contain, amongst other information, an image of the current measurement and the captured measurement.
The output register words, which can be written to, are words enabling the module to be controlled (selection of threshold values, state of outputs with respect to thresholds, etc.).
These exchanges are made during each scan of the task in which the module is configured (every second scan for TSX 47-20).
Refer to section 7.3 for detailed information concerning the discrete bits and register words.
Message interface
At the request of the user program, the message interface transfers data tables between the module and the PLC processor. This dialogue enables the configuration to be written and special requests to be executed. Programming these exchanges is achieved with a text function block.
Interrupts
Interrupts enable a fast programmed response by the PLC processor to events from the module.
___________________________________________________________________________
16
Operation
2
___________________________________________________________________________
Overview of exchanges
Absolute encoder
Validate
Capture
B1
.
.
.
B16
In 0
U
T
S
I
N
P
In 1
Ixy,8 to F Ixy,0 to 7
8 output register words :
OWxy,0 to OWxy,7
OW
IT
Discrete interface
24 V/
300 mA outputs
O.0
O.1
O.2
O.3
U
T
S
O
U
T
P
➡ ➡
Preprogrammed function selected
Configuration
8 input register words:
IWxy,0 to IWxy,7
Request interpreter
IW
Register interface
Message interface
TXT
CPL
___________________________________________________________________________
17
___________________________________________________________________________
2.3
Functional modes for the module
2.3-1 Measurement acquisition mode
Principle
In this mode, the module acquires measurements at inputs B1 to B16 at a rate corresponding to the fast task period, i.e. 950
µ s.
The measurement range is valid between 0 and 2 Nbits -1.
In addition to measurement acquisition, which should be validated either by an external event (In0), or by a PLC processor command (Oxy,0), this mode also performs the processing described in section 2.1.
The PLC program has commands allowing it to intervene in the operation of the module, for example, in order to synchronize the application with the general sequence :
• validate/inhibit measurement acquisition,
• validate/inhibit output forcing,
• modify comparison thresholds,
• modify the output matrix.
In return, the module supplies the following data :
• current measurement,
• captured measurement,
• together with various discrete data allowing the processor to be informed about events detected by the module.
___________________________________________________________________________
18
Operation
2
___________________________________________________________________________
Overview Measurement acquistion mode
Sensors and pre-actuators
PLC complete
I/O bus
Absolute encoder inputs
B1 to
B16
Validation input
In0
Capture input
In1
ACQUISITION
CODE CONVER.
❊
& or
> = 1
❊ OFFSET
❊
& or
> = 1
O.0
O.1
24V/300mA outputs O.2
O.3
OUTPUT
MATRIX
❊ Defined in configuration
OUTPUT
FORCING
❊
MEASURED
VALUE
&
▲
▲
+
CURRENT
MEASUREMENT
CAPTURED
MEASUREMENT
❊
COMPARISON
HYS-VAL
❊
THRESHOLDS
PLC interrupt
measurement
acquisition
PLC interrupt
IWxy,6 / (IWxy,7)
IWxy,4 / (IWxy,5)
Oxy,2 : current
measurement
capture
PLC interrupt
OWxy,3 / (OWxy,4)
OWxy,5 / (OWxy,6)
matrix
outputs
outputs
___________________________________________________________________________
19
___________________________________________________________________________
2.3-2 Tachometer mode
Principle
As for the measurement acquisition mode, the module reads the inputs every 950
µ s.
The change of the measurement during a time period, where the time base is defined during configuration, enables the speed to be determined (distance moved per unit of time). The time base is expressed in multiples of 10ms.
The measurement is valid for a range between 0 and 2 Nbits -1.
In addition to measurement acquisition, which can be validated either by an external event or by a PLC processor command, this mode also performs the operations described in section 2.1 (except for measurement capture).
The PLC program has commands which allow it to intervene in the operation of the module, for example, in order to synchronize the application with the general sequence :
• validate/inhibit acquisition of the measurement,
• validate/inhibit forcing of outputs,
• modify comparison thresholds,
• modify the output matrix.
In return, the module supplies the following data :
• current measurement,
• distance moved per unit of time (speed of change),
• together with various discrete data enabling the process to be informed about events detected by the module.
Notes : • calculation of the speed is only carried out at each «top» of the clock where the period is defined during the configuration.
• the value of the speed is only significant after the second «top» of the clock, following a measurement acquisition command or after the module is set into RUN.
___________________________________________________________________________
20
Operation
2
___________________________________________________________________________
Overview Tachometer mode
Sensors and pre-actuators
PLC complete
I/O BUS
Absolute encoder inputs
B1 to
B16
Validation input
In0
ACQUISITION
CODE CONVER.
❊
& or
> = 1
❊ OFFSET
CLOCK
K x 10 ms
O.0
24V/300mA outputs
O.1
O.2
O.3
OUTPUT
MATRIX
OUTPUT
FORCING
❊
❊ Defined in configuration
MEASURED
VALUE
2 Nbit - 1
&
▲
+
CURRENT
MEASUREMENT
▲
DISTANCE / T
MEASUREMENT
▲
COMPARAISON
HYS-VAL ❊
THRESHOLDS
▲
PLC interrupt
measurement
acquisition
PLC interrupt
IWxy,6 / (IWxy,7)
IWxy,3
PLC interrupt
OWxy,3
OWxy,5
matrix
outputs
outputs
___________________________________________________________________________
21
___________________________________________________________________________
2.3-3 Electronic cam mode
Principle
In this mode the module operates as a cam mechanism with 15 thresholds/4 tracks.
As in the previous modes, the measurement acquisition is made every 950
µ s and its validity range is between 0 and 2 Nbits -1.
Apart from the measurement acquisition function, which can be validated either by an external event or by a PLC processor command, this mode performs other functions as described in section 2.1.
The PLC program has commands enabling it to intervene in the operation of the module, for example in order to be able to synchronize the application with the general sequence :
• validate/inhibit measurement acquisition,
• validate/inhibit forcing of the outputs,
• modify comparison thresholds,
• modify the output matrix.
In return, the module provides the following data :
• current measurement,
• captured measurement,
• number of active threshold (immediately below the measurement),
• together with various discrete data allowing the PLC processor to be informed about events detected by the module.
Note : the number of tracks or outputs can be increased beyond 4 by the application program controlling a discrete output module. This can be achieved in several ways:
• by using the 4 physical outputs of the module (O.0 to O.4) to code the discrete output of the module (amongst 15) to be activated.
• by associating a discrete output with each of the thresholds T0 to T15. Depending on which threshold is active, whose number is available in register bits IWxy,1,4 to 7, the application program activates one of the discrete outputs. Interrupts can be used to indicate a change of the active threshold.
It is equally possible to assign one discrete output to 2 successive thresholds. The first active threshold activates the output and the second threshold deactivates it.
___________________________________________________________________________
22
Operation
2
___________________________________________________________________________
Overview Electronic cam mode
Sensors and
pre-actuators
PLC complete
I/O bus
Absolute encoder inputs
B1 to
B16
Validation input
In0
Capture input
In1
ACQUISITION
TRANSCODAGE
❊
& or
> = 1
❊ OFFSET
❊
& or
> = 1
O.0
24V/300mA
O.1
outputs O.2
O.3
OUTPUT
MATRIX
❊ Defined in configuration
OUTPUT
FORCING
❊
MEASURED
VALUE
2 Nbit - 1
&
▲
PLC interrupt
measurement
acquisition
▲
+
CURRENT
MEASUREMENT
CAPTURED
MEASUREMENT
PLC interrupt
IWxy,6 / (IWxy,7)
IWxy,4 / (IWxy,5)
❊
COMPARISON
❊
THRESH0/THRESH15
current
measurement
PLC interrupt
: active threshold number (less than measurement)
OSN 0 to OSN 15
outputs
outputs
___________________________________________________________________________
23
___________________________________________________________________________
2.4
Operating modes for the module
2.4-1 Description
The module has 4 operating modes : SELF-TEST, NCONF, STOP and RUN, of which
3 (NCONF, STOP and RUN) are accessible sequentially : each offers the user its own range of functions.
Module state chart
▲
Configuration protected conf. request OK
POWERED-OFF
Init
SELF-TEST
Configuration not protected
NCONF conf. request OK
STOP
Run module
RUN stopped or module fault conf. request NOT OK conf. request NOT OK
▲
Self-tests
The standard and specific self-tests, executed on powering up the module, monitor and signal faults.
During the self-tests the outputs of the module are set to 0.
If, at the end of these tests no fault is detected, the OK LED on the module lights.
Not configured : NCONF
If the module has not received configuration data, no mode is authorized (the module does not have any default configuration).
An incorrect configuration, a battery supply fault or loss of memory content can also cause this state.
___________________________________________________________________________
24
Operation
2
___________________________________________________________________________ module in STOP
The module knows all of the configuration data, and in particular the function selected :
• the current measurement is updated,
• the functions for threshold comparison and for capture are not implemented,
• the physical outputs are forced to 0,
• interrupts are inhibited,
• the module can receive a new configuration.
module in RUN
The module knows the configuration data and operates with all functions. It cannot receive a new configuration.
If the PLC processor develops a fault, the module can function more or less independently.
_______________________________________________________________________________________
2.4-2 Response of the module to power breaks and restarts
Power breaks
• if the power break is longer than 10ms and shorter than the energy reserve time of the supply :
- bit IWxy,1,2 is set to 1. (it is reset to 0 on the rising edge of Oxy,7),
- the outputs are set to 0.
• if the power break is longer than the energy reserve time of the power supply :
- the outputs are set to 0,
- the module is placed in the initialization state on power-up (SUPPLY OFF in the module state chart - section 2.3).
In all cases the software configuration is protected by a battery within the module.
Power restart
While the module is being re-initialized, a check is made on the conformity of the configuration data saved in memory.
___________________________________________________________________________
25
___________________________________________________________________________
___________________________________________________________________________
26
________________________________________________________
Configuration
3
Section 3
___________________________________________________________________________
3.1
Principle
Page
28
28
28
28
29
__________________________________________________________________________________________
3.2
Definition of parameters 30
30
33
___________________________________________________________________________
27
___________________________________________________________________________
3.1
Principle
3.1-1 General
The configuration data allows the operation of the module to be adapted for each application. Configuration is obligatory, and the module cannot function in any mode until it has received this configuration.
In the case of a power break the configuration is protected by an internal battery in the module.
Configuring the module consists of :
• defining the module operating characteristics,
• coding the characteristics in hexadecimal or decimal, in a word table,
• transferring these codes to the module via the application program.
Note : after reconfiguring the module, the current measurement and captured measurement values, together with the distance moved per unit of time, are reset to 0.
_______________________________________________________________________________________
3.1-2 Configuration data
The configuration data is divided into 2 parts :
• a part common to all the operational modes :
- functional mode of the module,
- type of data coming from the absolute encoder,
- assignment of functional inputs,
- assignment of threshold detection,
- the value of various parameters.
• a part specific to the electronic cam mode :
- value of the thresholds,
- state of the outputs associated with each threshold.
_______________________________________________________________________________________
3.1-3 Coding and transmitting the configuration
The configuration data must be coded in a word table situated in the W zone (internal words) or preferably the CW zone (constant words).
___________________________________________________________________________
28
Configuration
3
___________________________________________________________________________
Once coded and saved, this data is transmitted from the PLC memory to the module memory by the user program. For this the coupler text block, CPL, is used to send the configuration write request.
Note : sending a configuration write request requires that the module be in STOP. If this request has an error the module takes a non configured state.
_______________________________________________________________________________________
3.1-4 Writing the configuration
After having defined and saved the configuration data into the PLC memory, it is necessary to transfer this to the module memory. For this a “receive-transmit” CPL text block must be programmed with the following characteristics :
TXTi,M = H’••63'
Channel N
°
: 63 (module system)
Slot N
°
in the rack
Rack N
°
TXTi,C = H’0040': request to write the configuration.
TXTi,L = length of transmission table and number of bytes :
• configuration of operational mode, TXTi,L = 16,
• configuration of thresholds/outputs, TXTi,L = 6 to 92,
• configuration of operational mode and thresholds/outputs, TXTi,L = 22 to 108
The confirmation of transfer sent by the module : TXTi,V (or TXTi,R for TSX 47-20) is used after the exchange to check that the transmission of the data was correct. It is H’FE’ if the exchange was correct and H’FD’ if incorrect.
Note : with TSX 47-20 PLCs, if TYPE = 15 or NBT > 7, the configuration is refused and the module goes into a non configured state.
___________________________________________________________________________
29
___________________________________________________________________________
3.2
Definition of parameters
3.2-1 Common part : operational mode
This table may be used for any configuration mode.
N3
CWi / Wi
TYPE
CWi / Wi + 1
HYSTER
CWi / Wi + 2 0
CWi / Wi + 3
FBS
CWi / Wi + 4 0
CWi / Wi + 5
CWi / Wi + 6
CWi / Wi + 7
N2
1
0
N1
0
TH-MON
N0
FUNCTION
LOGIC
VAL-OUT EDGE-IN1 FORCING
FB
0
TACH-PER
HYS-VAL
OFFSET
0
IT-EVENT
0 hexadecimal code hexadecimal code hexadecimal code hexadecimal code hexadecimal code decimal value decimal value decimal value
FUNCTION : This nibble defines the functional mode.
• code 1 : measurement acquisition mode,
• code 4 : tachometer mode,
• code 5 : electronic cam mode.
All other codes are refused except for code F, which corresponds to the threshold/output table in electronic cam mode.
TYPE : this nibble defines the number of bits (or tracks) for the encoder used.
If Nbits is the number of bits or tracks of the encoder (4 to 16),
TYPE = Nbits - 1 (3
≤
TYPE
≤
15)
Depending on the code, the software converts the Gray code value from the encoder into natural binary in single or double length format :
• codes 3 to 14 : single length format (16 bits),
• code 15 : double length format (32 bits).
This format appears to be superfluous considering that the measurement can be expressed in 16 bits, but it is required for correct interpretation of the value by the
PL7-3 language, which works on numbers expressed in 2s complement. The double length format may not be used with the TSX 47-20 PLC.
___________________________________________________________________________
30
Configuration
3
___________________________________________________________________________
LOGIC : this nibble defines the activation conditions for acquisition and capture validation functions.
0 X 0 X
Validate/Inhibit (In0 x Oxy,0)
Capture (In1 x Oxy,2) x = 0 : physical input AND PLC processor input x = 1 : physical input OR PLC processor input
Example : nibble 0 = 4, i.e. B’0100',
• the acquisition validation function for the measurement is activated when In0 = 1 AND
Oxy,0 = 1,
• the capture function is activated on the rising or falling edge of input In1, OR on a rising edge of Oxy,2.
TH-MON : this nibble defines the type of measurement for threshold monitoring.
• code 0 : the current measurement or the distance moved per time unit (tachometer mode),
• code 1 : the captured value.
HYSTER : this nibble enables or not the hysteresis function.
• code 0 : operation without hysteresis,
• code 1 : operation with hysteresis. The hysteresis value is defined in the word
CWi ⁄ Wi+6.
FORCING : this nibble defines the state of forcing of the physical outputs (state assumed by the outputs when bit Oxy,4 is set to 1).
X X X X output O.0
output O.1
output O.2
output O.3
x = 0 : output OFF, x = 1 : output ON.
___________________________________________________________________________
31
___________________________________________________________________________
EDGE-In1 (not used in tachometer mode) : this nibble defines whether activation occurs on the rising or falling edge of input In1 (capture function).
• code 0 : input active on rising edge,
• code 1 : input active on falling edge.
VAL-OUT : this nibble defines the validation mode used by the PLC processor for the physical outputs.
• code 0 : without PLC processor validation,
• code 1 : with PLC processor validation (bit Oxy,3).
IT-EVENT : this byte defines the events causing the PLC processor to interrupt.
0 0 X X 0 X X X cross threshold 0 or cross any threshold in electronic cam mode cross threshold 1 capture via input In1 validate via input In0 top of clock in tachometer mode x = 0 : no interrupt to PLC processor x = 1 : interrupt to PLC processor
FB : this nibble authorizes the outputs to be set to the fall-back state defined in nibble FBS.
• code 0 : operation without fall-back state,
• code 1 : operation with fall-back state.
FBS : this nibble defines the fall-back state of the outputs.
X X X X output O.0
output O.1
output O.2
output O.3
x = 0 : output OFF x = 1 : output ON
If bit FB is set to 1, the outputs assume the fall-back state :
• on failure or when the PLC processor stops,
• on overflow (OVF).
___________________________________________________________________________
32
Configuration
3
___________________________________________________________________________
TACH-PER : this word defines the tachometer operating period expressed in multiples of 10ms. It is between 1 and 32767.
10 ms < Periode < 32767 x 10ms
Note : the value should be selected so that the distance moved in a period is less than the encoder distance.
HYS-VAL : this word defines the value H (hysteresis/2). This value is between 0 and (2 Nbits - 1), i.e.32767 maximum (16 bit encoder)
OFFSET : this word defines the offset value or mechanical offset. It lies between
±
(2 Nbits - 1), i.e.
±
32767 in the case of a 16 bit encoder.
_______________________________________________________________________________________
3.2-2 Specific part for the electronic cam mode
This part enables a table of 15 thresholds and associated outputs to be defined. The first word identifies the type of table as well as the number of thresholds to be coded. Use of single length or double length format is defined by the type of encoder, entered in the common part of the configuration (operational mode).
Single length table for encoders < 16 bits (Type < 15)
CWj / Wj
CWj / Wj + 1
CWj / Wj + 2
CWj / Wj + 3
CWj / Wj + 4
N3 N2
OSN0 NBT
OSN1
OSN2
N1
1
THRESHOLD 1
0 0
THRESHOLD 2
0 0
N0
F
0
0 hexadecimal code decimal value hexadecimal code decimal value hexadecimal code
CWj or
Wj + (2xNBT)
OSNn
THRESHOLD n
0 0 0 decimal value hexadecimal code with n = NBT
___________________________________________________________________________
33
___________________________________________________________________________
Double length table for encoders = 16 bits (Type = 15)
CWj / Wj
CWj / Wj + 1
CWj / Wj + 2
CWj / Wj + 3
CWj / Wj + 4
N3 N2
OSN0 NBT
OSN1
OSN2
N1
1
THRESHOLD 1
0 0
THRESHOLD 2
0 0
N0
F
0
0 hexadecimal code decimal value hexadecimal code decimal value hexadecimal code
CWj or
Wj + (2xNBT)
OSNn
THRESHOLD n
0 0 0 decimal value hexadecimal code where n = NBT
The first nibble (value F) defines the type of configuration table for the thresholds and associated outputs.
NBT : this nibble defines the number of thresholds contained in the table :
1 < NBT < 15. Threshold 0 (always 0) is not counted in NBT.
OSN0 to OSNn : these nibbles define the state of the outputs associated with the corresponding threshold (0 to n).
X X X X output O.0
output O.1
output O.2
output O.3
x = 0 : output OFF, x = 1 : output ON.
THRESH1 to THRESHn : these words define the values of thresholds 1 to n (with n = NBT) and :
0 (THRESH0) < THRESH1< THRESH2 < THRESH3 •••< THRESHn < 2 Nbits - 1.
___________________________________________________________________________
34
Configuration
3
___________________________________________________________________________
Notes : • the threshold/output configuration is only accepted if the module is configured : following a warm start or after receiving a correct operational mode configuration. It is not accepted if FUNCTION = 5 (electronic cam function).
• for each configuration of the operational mode, the table of thresholds/outputs, internal to the module, is inhibited and reset to 0.
• if the configuration of the thresholds/outputs received by the module is incorrect, the module goes to an NCONF (non configured) state. In this case a new transmission of the complete configuration (operational mode and thresholds/outputs) is required.
• for TSX 47-20 PLCs, the length of the transmission messages cannot exceed 30 bytes.
For this reason, the number of thresholds which can be used is limited to 7 (i.e. 8 thresholds in total including threshold 0).
• the number of active thresholds is a function of the number of thresholds configured.
Each time a threshold/output configuration request is received, the number of thresholds is reset to 0 and a test is made to check the conformity of all of the new values of the declared thresholds.
___________________________________________________________________________
35
___________________________________________________________________________
___________________________________________________________________________
36
________________________________________________________
Programming
4
Section 3
___________________________________________________________________________
4.1
Method
Page
38
__________________________________________________________________________________________
4.2
Example using measurement acquisition mode 40
__________________________________________________________________________________________
4.3
Example using tachometer mode 48
__________________________________________________________________________________________
4.4
Example using electronic cam mode 54
__________________________________________________________________________________________
4.5
Complementary programming information 61
61
65
67
___________________________________________________________________________
37
___________________________________________________________________________
4.1
Method
The TSX DTM 100 may be set up using a Series 7 terminal in local or connected mode.
This involves two stages :
• a preparatory stage, defining and entering the configuration parameters,
• a programming stage.
Preparatory stage
Determine the values of the different configuration parameters (section 3.2) according to the data required to control the process and the functions to be implemented by the module.
Then, using the terminal, enter the contents of the parameter table preferably in the CW zone (local mode) or in the W zone (connected mode only).
Programming stage
This is the stage the program required for using the module is entered, defining the way it operates once the PLC is in RUN.
This is achieved in several steps :
• configuration step of the module, the module is placed in STOP and the configuration is transferred from the PLC memory (W or CW) to the module, via a text block (H’40' request).
• module initialization step required to prepare the module for the required operation:
- set the module into RUN (OWxy,0,C),
- initialize the threshold values for measurement acquisition and tachometer modes (OWxy,3 to
OWxy,6),
- initialize the output/validation matrix for measurement acquisition and tachometer modes (OWxy,7 and Oxy,3),
- optional validation of the interrupts (OWxy,0,4 and PLC processor commands),
- validate acquisition of the measurement
(Oxy,0).
Definite configuration parameters
Enter the configuration table in zone W or CW
Transfer configuration
Module configured
Set module into RUN
Module in RUN
Other initialization
Validation command for counting function
Operation
-normal operation
-fault management
___________________________________________________________________________
38
Programming
4
___________________________________________________________________________
Note : it is possible to delay setting the module into operation, particularly to synchronize it with the general sequence, using the validate/inhibit commands for the outputs and interrupts.
• operating step corresponds to the normal operation of the module. However, depending on the type of application to be processed, the degree of involvement of the measurement acquisition function in the general sequence (PLC processor program) may vary considerably (see the table below).
The detection and management of faults is done by the PLC processor program.
No operation
(see section 4.2)
Module function
PLC processor.
Program
Operation module side
The module operates in a way which is completely independent of the PLC processor.
From the data provided at the inputs, it operates the outputs according to the output matrix.
Operation
PLC program
Detection and managment of faults only.
Passive operation
(see section 4.3)
Module functionr
→
PLC processor program.
Active operation
(see section 4.4)
Module functionr
PLC processor program
The module operates independently of the
PLC processor program but makes use of numeric or boolean data
In addition to fault management, the PLC processor collects data transmitted by the module (current and captured measurements) in order to display it.
The module and the PLC processor program operate interactively.
The PLC processor program is totally or partially synchronized with the events generated by the module
(using the interrupts).
It may modify the commands and values used by the module in real time (thresholds, output matrix), if it wishes.
___________________________________________________________________________
39
___________________________________________________________________________
4.2
Example using the measurement acquisition mode
Based on a TSX 47-20 PLC
Description : controlling the level of a passenger ramp to an aeroplane
The object is to maintain the height difference between the passenger ramp and the plane door between 2 limit values during embarkation and dis-embarkation.
For this, the control cabin of the passenger ramp is equipped with :
• a sensor providing a measurement representing the difference in height between the ramp and the door,
• a motor to raise or lower the passenger ramp.
No adjustment is made to the passenger ramp height unless the difference in height exceeds 10 cm.
Time chart of measurement changes during embarkation
Measurement
100 end of embarkation
0
Lowering
➤ t
➤ t
___________________________________________________________________________
40
Programming
4
___________________________________________________________________________
Time chart of measurement changes during disembarkation
Measurement
➤ t end of disembarkation
-100
Raising
➤ t
Analysis
The time charts above enable the following truth table to be derived :
• Embarkation
Corresponding situation Measurement change
0 < Meas < 100 increasing
MEAS > 100 decreasing
0 < Meas < 100 decreasing
MEAS < 0 increasing
• Disembarkation
Measurement change
-100 < Meas < 0 decreasing
MEAS < -100 increasing
-100 < Meas < 0 increasing
MEAS > 0 decreasing plane door lowers readjust passenger ramp readjust passenger ramp plane door lowers
Corresponding situation plane door rises readjust passenger ramp readjust passenger ramp plane door rises
Control of passenger ramp movement none start lowering continue lowering stop lowering
Control of passenger ramp movement none start raising continue raising stop raising
___________________________________________________________________________
41
___________________________________________________________________________
The TSX DTM 100 module solves this problem simply. This module compares the current measurement value with 2 levels in measurement acquisition mode and uses the result to control the outputs.
Without Hysteresis
Thresh.1
Thresh.2
1
➤
➤ 2
➤
➤ 3
➤
➤ 2
➤
➤ 1
With Hysteresis
➤ t
Thresh.1
Hysteresis
Thresh.0
1
➤
➤
Hysteresis
2
➤
➤ 3
➤
➤ 2
➤
➤ 1
➤ t
State of outputs OWxy,7
2 : Thresh 0 < Meas < thresh 1
___________________________________________________________________________
42
Programming
4
___________________________________________________________________________
In the application described, careful choice of threshold and hysteresis settings enables the truth table to be satisfied.
➤ 2
➤
3 ➤ 2
➤
3 ➤ 2
➤
3 ➤ 2
100
Thresh1 = 50
Hysteresis
➤ t
Hysteresis Thresh0 = -50
-100
➤
2
➤
1
➤
2
➤
1
➤
2
➤
1
➤
2
An absolute encoder provides measurements between 0 and 2 N -1. Using an 8 bit encoder it is necessary to transpose the range [-100, 100] to an interval within the range used, i.e. [0,255]. Therefore, it is necessary to introduce an offset with a minimum value of 100 in order to avoid a discontinuity 2 N -1/0 in the variation range. An offset of 120 is chosen thus fixing the threshold values at 70 and 170. Taking into account the hysteresis the measurement varies over a range [20,220].
2 : Thresh 0 < Meas < Thresh 1
0 1 0 1 0 0 0 1 0 0 1 1
Output O.2 : raise
Output O.1 : lower
Output O.0 : start
___________________________________________________________________________
43
___________________________________________________________________________
The module thus provides overall control of the height of the passenger ramp. The role of the processor is reduced to :
• the configuration of the module on setting into RUN,
• monitoring of faults,
• validating outputs at the request of the operator.
Processor Module
00 10
8
TSX P 47 20 TSX DTM 100
O.0
O.1
O.2
O.3
01
Start
Lower
Raise
11
The processor does not intervene in the control
Hardware configuration
The hardware requirements for this sequential control can be met using :
• a TSX P47 20 processor,
• a TSX DET 16 input module with :
- I6,0 = passenger ramp control in automatic,
- I6,1 = fault acknowledgement command,
• a TSX DST 16 output module.
0 1 2 3 4 5
S
U
P
P
4
7
D
T
M
6
D
E
T
7
D
S
T
4
0
2
0
1
0
0
1
6
1
6
Configuration of the TSX DTM 100 module
H’7101' 8 bit encoder, measurement acquisition mode
H'1001' hysteresis, physical input or PLC processor
H'0100' validation of outputs by the PLC processor
H'0000' no fall-back state
0 not used
0 not used
50 hysteresis/2 setting
120 offset setting
44
Programming
4
___________________________________________________________________________
The module, however, should continue to control the passenger ramp when the PLC processor fails or stops. In this case it functions in “ non secure” mode, achieved by setting bit OW1,0,E to 1.
Preparation
• Configuration of application I/O
Rack 0
Rack 1
Module 0
63
1
35 24
2
• Assign text blocks
Loading the configuration : TXT0
Acknowledging the faults : TXT1
• Enter the configuration in CONSTANT mode
CW60 : H’7101'
CW61 : H’1001'
CW64 : 0
CW65 : 0
CW62 : H’0100'
CW63 : 0
CW66 : 50
CW67 : 120
3 4 5 6 7
Programming
The central processor carries out the initialization sequence.
The configuration is automatically reloaded after each power break, whatever its duration and whenever the module is removed or re-inserted. In both these cases the module available bit (IW1,0,3) is set to 1 at the end of the self-tests.
INITIALIZATION ** LABEL 10
SY0
SY1
IW1,0,3
0
OPERATE
➤ OW1,0
0
OPERATE
➤ O1,0 [8]
___________________________________________________________________________
45
___________________________________________________________________________
** LABEL 20
IW1,0,3
IW1,0,3 IW1,0,C
CONFIGURATION
R TXT0
S
O
I
CPL
T,M : H0163
LOCAL
T,C : H0040
T,R : H
CW60
T,L : 16
T,S :
COMPAR : 0
TXT0,R
=
H' .
B10
0 : TXT0,R = H'00FE'
** LABEL 30
B10 IW1,0,3
OW1,0,C
S
OW1,0,E
S
** LABEL 40
IW1,O,C B10
RUN CONF?
L 100
J
** LABEL 50
I6,0
I6,1
ACKNOWLEDGE POSITION
OPERATE
H'0513' ➤ OW1,7
O1,0
O1,3
O1,7
** LABEL 60 HIGH AND LOW THRESHOLDS
170
OPERATE
➤
OW1,3
70
OPERATE
➤ OW1,5
___________________________________________________________________________
46
Programming
4
___________________________________________________________________________
FAULT SIGNALLING ** LABEL 70
IW1,0,4
IW1,1,1
IW1,1,2
O7,1
** LABEL 80
I6,1
I6,1
FAULT ACKNOWLEDGEMENT
R TXT1
S
O
I
CPL
T,M : H0163
LOCAL
T,C : H0047
T,R : H
W80[4]
T,L :
T,S :
COMPAR : 0
TXT1,R = H' .
B20
0 : TXT1,R = H'0077'
** LABEL 100
END OF PROGRAM
___________________________________________________________________________
47
___________________________________________________________________________
4.3
Example using tachometer mode
Based on a TSX 67-20 PLC
Description of the application
A servo control system is to be implemented between 2 motors which are several hundred meters apart.
M1
Ω
1 X 25
M2
Ω
2
This servo control should only come into operation if the rotation speed of motor 1 is between 24 rpm and 96 rpm, provided that there is no fault. At all other times motor M2 should be stopped.
Note : to justify the use of an absolute encoder, which in principle is not required for this type of application, we will suppose the angular position of motor M1 is to be used for other requirements as well as for servo control.
Choosing encoder resolution
If we fix the precision of the angular position at 0.1 degrees, it is necessary to choose an encoder with at least 3600 points per revolution.
For example, an XCC AH6 C12 : single turn absolute encoder, NPN Gray code outputs, resolution 4096 points per revolution.
Analysis
The encoder is fixed to the rotor of M1 and provides the instantaneous position from which the TSX DTM 100 module can determine the speed of rotation. We will also use other facilities available internally to module, to determine if the speed lies between previously defined upper and a lower limits.
We will assume that ,in principle, a sampling period of 250ms is sufficient.
The servo control function is managed in the auxiliary task which calculates the analogue voltage to be applied to the variable speed drive for motor M2.
___________________________________________________________________________
48
Programming
4
___________________________________________________________________________
Schematic
TSX DTM 100 Absolute encoder
00 10
Auxilliary task
➤ M1
250ms
01 11
➤ M2
➤
TSX ASR 401
In this application, the possibility of controlling the process directly by the module is not used. The module serves as a sophisticated interface to the main program, providing pre-processing and data handling (calculation of speed, comparison of thresholds).
Determining threshold settings lower speed 24 rpm, ie 0.1rev/250ms, which corresponds to a 409 point encoder, high speed 96 rpm, ie 0.4 rev/250ms, which corresponds to a 1638 point encoder.
Determining the speed setting for M2
Servo control relationship required : VM2 = 25 * VM1
Speed range for VM1 : 0 to120 rpm for VM2 : 0 to 3000 rpm
The speed, calculated by the TSX DTM 100 module, corresponding to the theoretical maximum speed of motor M1 :
120 rpm, ie 0.5 rev/250ms, which corresponds to a 2048 point encoder
The resulting voltage to be applied to the variable speed drive to obtain VM2 = 3000 rpm :
10V which corresponds to a 2000 code at the input to module TSX ASR 401.
___________________________________________________________________________
49
___________________________________________________________________________
From this we obtain the correspondence between the speed provided by the TSX DTM
100 module and the code to be applied to the TSX ASR 401 module :
V = 2000 x (VM1/2048)
This value is only applied if the following condition has been checked :
409 < VM1 < 1638
If not :
• if
VM1
> 1638, V is limited to 1600 i.e. 8V
• if
VM1
< 409, V is set to 0.
Position
0-4095
Speed
0-2048
-1600 / 1600
-8V / 8V
2400
600
24 96 ➤
0-2400
ASR 401 Variable speed drive
M2 M1 Encoder DTM 100 AUX task
250ms
Hardware configuration
D
E
T
D
S
T
1
6
1
2
8
3
5
S
U
P
6
0
P
6
7
2
0
1
2
0
L
F
S
4
0
1
A
S
R
S
U
P
6
0
2
0
0
L
F
S
1
0
0
D
T
M Rack 4
M2 Encoder
00 10
➤
01 11
➤ approx 500 m
➤
___________________________________________________________________________
50
Programming
4
___________________________________________________________________________
The distance of approximately 500 meters between the 2 motors requires a configuration with extension rack connected via fibre optic cables. We assume that for certain reasons, the base rack supporting the processor is close to the motor to be served and therefore it is the TSX DTM 100 module which is placed in the remote rack.
Discrete I/O used
I20,0 state0 : servo control not operational, state 1 : servo control operational,
O21,0 speed of motor M1 within limits.
Configuration of TSX DTM 100 module
H’B104' 12 bit , tachometer mode
H’0005' using input In or PLC processor to validate acquisitions
H’0000' not used
H’0000' no fall-back state
0 not used
25 time base 25 x 10 ms
0 no hysteresis
0 no offset
Preparatory stage
• configuration of application I/O
Rack 7
Rack 6
Rack 5
Rack 4
Rack 3
Rack 2
Rack 1
Rack 0
Module
32
0
733
24
1 2 3 4 5
• configuration of text block assigned for exchanges with the module
TXT0 CPL DIR BUF.ADR:W0 LENGTH:4
6
• configuration entry for the module in CONSTANT mode
CW0 : H’B104'
CW1 : H’0005'
CW2 : H’0000'
CW3 : H’0000'
CW4 : 0
CW5 : 25
CW6 : 0
CW7 : 0
665
7
___________________________________________________________________________
51
___________________________________________________________________________
• configuration of the auxiliary task
I/O MODULES ASSIGNED
007 041 NAME
FAST
AUX0
AUX1
TASK
PERIOD SR
0
250
0
0
NB
Programming
• the module initialization sequence is managed within the master task MAST.
The configuration for the TSX DTM 100 module is systematically reloaded after each power break, whatever the duration, and also when the module is removed and reinserted. The module available bit (IW41,0,3) changes to 1 at the end of the selftests in both cases.
• the other operations, corresponding to the normal operation, are controlled by the module available bit (IW in auxiliary task AUX0) :
- acquisition of the speed and calculation of the set point to be applied to the variable speed drive,
- acquisition of the position to be processed (not described in this example),
- monitoring of faults.
___________________________________________________________________________
52
Programming
4
___________________________________________________________________________
MAST task
=========================== START AUX 0 ============================
!
IF I20,0 THEN START CTRL4 ELSE RESET CTRL4
-------------------
!
INITIALIZE DTM AND ASR ---------------------
IF SY1+SY0+NOT IW41,0,3 THEN 0-> OW41,0; 0->O41,0 [8];
!
0->OW7,1
IW41,0,3->B8
------------------ CONFIGURATION -------------------------------------
!
IF RE(B8) THEN H'40'->TXT0,C; H'4163'->TXT0,M;
16->TXT0,L; CW0[8]-> W2[8]; EXCHG TXT0
--------------------SET IN RUN; ACK.VALID
--------------------
!
IF IW41,0,3.TXT0,D.[TXT0,V=254].NOT IW41,0,B
THEN SET OW41,0,C; SET O41,0
! EOP
AUX0 task
==================================================================
! L400:
!
IF NOT IW41,0,C THEN JUMP L10
----------------- IF ASR 401 AVAILABLE SET IN RUN ----------------
!
IW7,0,3->OW7,0,C
!
!
!
-------------------------PREP. FORMAT ---------------------------
!
IW41,3->DW129
!
IF IW41,1,0 THEN DW129*2000/2048->OW7,3
ELSE - DW129*2000/2048->OW7,3
IF IW41,1,6.IW41,1,0 THEN 1600->OW7,3; JUMP L10
IF IW41,1,6.NOT IW41,1,0 THEN -1600->OW7,3; JUMP L10
IF IW41,1,4 THEN 0->OW7,3
------------------------MODULE FAULT --------------------------
! L10:
!
IF IW41,0,4 THEN 0->OW7,3; H’47'->TXT0,C; 0->TXT0,L;
H’4163'->TXT0,M; EXCHG TXT0
----------------------
!
ACK. FAULTS -----------------------
IF IW41,1,1+IW41,1,2+IW41,1,3 THEN SET O41,7; 0->OW7,3
ELSE RESET O41,7
!
IF IW41,0,8+IW41,0,A THEN 0->OW7,3
-----------------
!
INDICATE SPEED CORRECT
IW41,1,5->O21,0
-----------------
----------------- POSITION MEASUREMENT ACQUISITION -----------------
!
IW41,6->W131; IW41,7->W132
! EOP
___________________________________________________________________________
53
___________________________________________________________________________
4.4
Application example of electronic cam mode
Based on an TSX 87-30 PLC
Description of the application
The control of a stamping press requires various transducers to be activated (tool safety, greasing, evacuation, ejection, etc), at certain precise moments in the machine cycle.
This operation is similar to that of an electromechanical drum where each cam is associated with a transducer.
The duration of cam activation is defined by the starting and finishing angles.
0 cam 3 cam 2 cam 1
In order to control a press,12 transducers need to be activated each cycle in accordance with the following chart : revolution zone cam 1
0 30 60 90 120 150 180 210 240 270 300 330 360 cam 2 cam 3 cam 4 cam 5 cam 6 cam 7 cam 8 cam 9 cam 10 cam 11 cam 12
___________________________________________________________________________
54
Programming
4
___________________________________________________________________________
Choosing an encoder
In this example a 10 bit encoder is chosen (1024 points), corresponding to a resolution of 0.35 degrees.
Analysis
The TSX DTM 100 module can implement the required function. However, since more than 4 transducers are required, it is not possible for a single TSX DTM 100 module to perform all of the necessary operations. An architecture should therefore be adopted in which the TSX DTM 100 module performs the measurement acquisition, Gray/binary conversion, comparison of the different settings at the start and end, and the direct control of the first 4 transducers. The 8 other transducers are controlled by the processor on “commands” from the module. In order to be able to obtain a fast response, the interrupt task is used. This is activated by the module each time the measurement crosses a start or end value.
Schematic
Absolute encoder
00 10
Interrupt task
TSX DTM 100
O.0
O.1
O.2
O.3
➤
10
➤
➤
➤
➤
01
Actuator
11
3
4
1
2
Out0
1
2
5
6
3
4
Out7
TSX DST 882
➤
➤
➤
➤
➤
➤
➤
➤
Actuator
9
10
11
12
7
8
5
6
___________________________________________________________________________
55
___________________________________________________________________________
Hardware configuration
S
U
P
8
0
P
4
7
3
0
8
8
2
D
S
T
D
T
M
1
0
0
Configuration of the module
• 1 st part : operational mode
H’9105' 10 bit encoder, electronic cam mode
H’0005'
H’0000'
H’0001'
H’0000'
0
0
14 using input or PLC processor to validate acquistion/capture not used
IT on crossing threshold not used not used not used
5 degree offset to compensate the delay
• 2 nd part : threshold setting
H’0B1F’ state of the outputs between 0 and 30 degrees, 12 thresholds
85
H’3000'
171
H’F000'
256
H’A000'
341
H’8000'
427
H’8000'
512
H’8000'
597
H’8000'
683
H48000'
768
H’8000'
853
H’1000'
939
H’0000' value of 1st threshold : 30 degrees state of the outputs between 30 and 60 degrees value of 2nd threshold : 60 degree state of the outputs between 60 and 90 degrees value of 3rd threshold : 90 degrees state of the outputs between 90 and 120 degrees value of 4th threshold : 120 degrees state of the outputs between 120 and 150 degrees value of 5th threshold : 150 degrees state of the outputs between 150 and 180 degrees value of 6th threshold : 180 degrees state of the outputs between 180 and 210 degrees value of 7th threshold : 210 degrees state of the outputs between 210 and 240 degrees value of 8th threshold : 240 degrees state of the outputs between 240 and 270 degrees value of 9th threshold : 270 degrees state of the outputs between 270 and 300 degrees value of 10th threshold : 300 degrees state of the outputs between 300 and 330 degreess value of 11th threshold : 330 degrees state of the outputs between 330 and 0 degrees
Note : threshold 0 is implicit
___________________________________________________________________________
56
Programming
4
___________________________________________________________________________
Preparatory stage
• configuration of application I/O
Rack 2
Rack 1
Rack 0
Module 0
733
1 2 3 4 5 6
23
7
• configuration of text block assigned for exchanges with the module
TXT0 CPL DIR BUF.ADR:W0 LENGTH:4
• Entry for module configuration in CONSTANT mode
CW100 : H’9105 ’
CW101 : H’0005 ’
CW102 : 0
CW103 :
CW104 :
CW105 :
CW106 :
0
0
1
0
CW107 : 14
CW108 : H’0B1F ’
CW109 : 85
CW110 : H’3000 ’
CW111 : 171
CW112 : H’F000 ’
CW113 : 256
CW114 : H’A000 ’
CW115 : 341
CW116 : H’8000 ’
CW117 : 427
CW118 : H’8000 ’
CW119 : 512
CW120 : H’8000 ’
CW121 : 597
CW122 : H’8000 ’
CW123 : 683
CW124 : H’8000 ’
CW125 : 768
CW126 : H’8000 ’
CW127 : 853
CW128 : H’1000 ’
CW129 : 939
CW130 : H’0000 ’
• Entry for the state of the outputs controlled by the PLC processor
CW49 : H’0080’ state of outputs 5 to 12 between 0 and 30 degrees
CW50 : H’0000’ state of outputs 5 to 12 between 30 and 60 degrees
CW51 : H’0000’ state of outputs 5 to 12 between 60 and 90 degrees
CW52 : H’0001’ state of outputs 5 to 12 between 90 and 120 degrees
CW53 : H’0001’ state of outputs 5 to 12 between 120 and 150 degrees
CW54 : H’0007’ state of outputs 5 to 12 between 150 and 180 degrees
CW55 : H’0004’ state of outputs 5 to 12 between 180 and 210 degrees
CW56 : H’001C’ state of outputs 5 to 12 between 210 and 240 degrees
CW57 : H’0038’ state of outputs 5 to 12 between 240 and 270 degrees
CW58 : H’0030’ state of outputs 5 to 12 between 270 and 300 degrees
CW59 : H’0070’ state of outputs 5 to 12 between 300 and 330 degrees
CW60 : H’00C0’ state of outputs 5 to 12 between 330 and 3 60 degrees
___________________________________________________________________________
57
___________________________________________________________________________
Coding used not used status of actuator 12 ➤ status of actuator 6 ➤ status of actuator 5 ➤
Programming the PLC processor
• the initialization sequence for the module is managed in the master task MAST.
• the configuration of the TSX DTM 100 module is systematically reloaded after each power break, whatever its duration and when the module is removed. The event common to these 2 situations is the change of the module available bit (IW1,0,3) to
1 at the end of the self-tests.
• the other operations correspond to the normal operation and are handled in the interrupt task.
Interrupt task
================================ FROM IT ==============================
!
!
READINT(I1;B40)
IF NOT B40 THEN JUMP L10
-------------------- THRESHOLD IT MANAGEMMENT -----------—-------------
!
!
READREG(I1;W10)
SHR 4(W11) AND H’F’ -> W11
----------------------- OUTPUT MANAGEMENT ----------------------------
!
CW49(W11) -> B20[8]
!
!
B20[8] -> O17,0[8]
WRITEBIT(B20;I17)
------------------- ACKNOWLEDGE IT --------------------------------
!
! L10:
ACKINT(I1)
! EOP
MAST task - Module CHART
================= INITIALIZE GRAFCET; UNMASK IT ================
!
!
IW1,0,3 -> B8
IF SY1+RE(B8) THEN SET SY21; START CTRL1
------------------ UNMASK IT TSX DURING COLD START ------------------
!
IF NOT B0 THEN START CTRL1; SET B0
! EOP
___________________________________________________________________________
58
Programming
4
___________________________________________________________________________
# 0
1
2
3
4
6
RESET FAULT ; IT MASK
MODULE AVAILABLE
STOP MODULE
MODULE STOPPED
SEND CONF. TO MODULE
CONF. OK
RUN MODULE
MODULE RUNNING
VAL ACK ; DMASK IT
5
ACKNOWLEDGE FAULTS
NO FAULTS
MAST task - CHART Module
========================================================================
TRANSITION : 1 from 0 to 1
===================================
IW1,0,3
TRANSITION : 2 from 1 to 2
===================================
NOT IW1,0,C
TRANSITION : 3 from 2 to 3
===================================
[TXT0,V=254].NOT IW1,0,B
TRANSITION : 4 from 3 to 4
===================================
IW1,0,C
TRANSITION : 6 from 5 to 6
===================================
NOT IW1,0,4.NOT IW1,1,1.NOT IW1,1,2.NOT IW1,1,3
___________________________________________________________________________
59
___________________________________________________________________________
MAST task - CHART Module
==========================================================================
STEP 0 ACTION ON ACTIVATION
==========================================
------------------ MASK IT -------------------------------------
!
SET OW1,0,0; RESET OW1,0,4
------------------ RST I/O------------------------------------------
!
! EOP
0 -> O1,0[8]
STEP 1 ACTION ON ACTIVATION
==========================================
------------------ STOP MODULE---------------------------------------
!
RESET OW1,0,C
! EOP
STEP 2 ACTION ON ACTIVATION
==========================================
------------------ CONFIGURE MODULE ----------------------------
!
!
CW100[31] -> W2[31]
H’40' -> TXT0,C; H’0163' -> TXT0,M; 62 -> TXT0,L;
EXCHG TXT0
! EOP
STEP 3 ACTION ON ACTIVATION
==========================================
------------------ RUN MODULE---------------------------------------
! SET OW1,0,C
! EOP
STEP 4 ACTION ON ACTIVATION
==========================================
------------------ VALIDATE ACQUISITION
!
SET O1,0
---------------------
------------------ UNMASK AND VALIDATE IT
!
! EOP
-------------------
RESET OW1,0,0; SET OW1,0,4; DMASKINT(I1)
STEP 5 ACTION ON ACTIVATION
==========================================
----------------ACK. MODULE FAULTS -----------—----------------
!
H’47' -> TXT0,C; H’0163' -> TXT0,M; 0 -> TXT0,L;
EXCHG TXT0
------------------ ACK APPLIC. FAULTS -----------------------------
! SET O1,7
! EOP
___________________________________________________________________________
60
Programming
4
___________________________________________________________________________
4.5
Complementary programming
4.5-1 Interrupt processing
Object
Using interrupts enables actions to be taken by the PLC program without waiting for the end of the I/O update, so that the system can react quickly to the arrival of an event.
Master task Principle
An interrupt generated by an event from the module causes the current task to be suspended and a transfer to be made to the interrupt task, provided that it has been validated and not masked.
➤
Interrupt task
➤
The interrupt task must :
• recognize the module which caused the interrupt
(READINT),
• perform the processing associated with this interrupt,
• acknowledge the interrupt (ACKINT).
Return to the interrupted task is then made automatically.
Note : interrupts cannot be processed by :
• the TSX 47-20,
• local or remote extension racks of the TSX 67-30, TSX 87-10 and TSX 87-20 PLCs,
• the direct extension rack for the TSX 47-30 and TSX 67-20 PLCs.
Using the interrupt
The user program is able to validate or mask interrupts from the module.
At the module :
• OWxy,0,0 : at state 1, the interrupts are masked without being acknowledged, at state 0, the interrupts are transmitted to the I/O bus
• OWxy,0,4 : at state 1, enables the interrupt system, at state 0, inhibits the interrupt system and acknowledges the current interrupt demands (interrupts are not memorized during inhibition).
At the PLC processor :
• the DMASKINT (Ixy) instruction authorizes acceptance of interrupts from the module with address xy,
• the MASKINT (Ixy) instruction blocks the interrupt which remains memorized.
Note : MASKINT and DMASKINT are selective instructions since they only address a single module.
• the START CTRL1 instruction enables the interrupt task,
• the RESET CTRL1 instruction inhibits the interrupt task. No interrupt from a module can be processed by the interrupt task as long as it is inhibited.
___________________________________________________________________________
61
___________________________________________________________________________
Data available to the user program :
• IWxy,0,0 : at state 1 when the interrupt has been generated by the module and not yet acknowledged by the PLC processor (goes to 0 when the ACKINT (Ixy) instruction is executed),
• IWxy,1,9 : Interrupt demand overflow. This bit goes to state 1 when a new interrupt demand is received while the previous one has not been acknowledged.
Schematic overview
Module PLC processor
Origin of interrupt
Thresh n
(electro. cam)
Thresh 0
Thresh 1
Validation
Capture
Clock
(tachometer)
OWxy,0,4 Application interrupt request
OWxy,0,0 Bus interrupt request
Other
Modules
Interrupt occurs if :
- it is validated
- it is not masked
- the unmask order has been given
- interrupt task activated
DMASKINT
MASKINT
Start
Reset
CTLR1
PLC proc.
Notes : • if an interrupt occurs while the interrupt is masked, the interrupt demand remains as long as it has not been acknowledged by the PLC processor (ACKINT (Ixy) instruction).
• all interrupts must be processed and acknowledged by the PLC processor.
• if an interrupt arrives while the previous one has not yet been acknowledged, it is memorized and is not transmitted until after the previous interrupt has been acknowledged.
• in electronic cam mode, if 2 thresholds are crossed during the same scan of the fast task, only the interrupt corresponding to the last threshold crossed (active threshold) will be processed.
___________________________________________________________________________
62
Programming
4
___________________________________________________________________________
Access to I/O in the interrupt task
The I/O tables are updated during each scan of the task in which the module is configured.
In order to be able to react in « real time », the exchanges with the module within the interrupt task, must be made with immediate I/O exchange instructions :
• READBIT (Ixy;Bz) : read 8 discrete bits Ixy,i,
• WRITEBIT (Bz;Ixy) : write 8 discrete bits Oxy,i,
• READREG (Ixy;Wz) : read 8 register words IWxy,i,
• WRITEREG (Wz;Ixy) : write 8 register words OWxy,i.
The immediate I/O exchanges do not cause the I/O tables accessible to the periodic tasks to be updated.
There is a risk of incompatibility between the value given to the same bit or to the same word using an immediate I/O exchange. It is therefore essential to memorize the exchange made during the interrupt task in the I/O image tables.
Review of the different levels of information accessible
Module PLC processor
Hardware Software
Working register
I/O task in shared memory
Image task in PLC memory
Meas.
Acquis.
▲
IT
950µs
▲
Current meas.
Captured meas.
Period
5 ms
I and IW
Master task period
I and IW
Thresholds
O and OW O and OW
Master task
! IF IWxy,i,j
! W100 OW
950µs
Periodic task
Interrupt task
! WRITEREG
___________________________________________________________________________
63
___________________________________________________________________________
Information updated during an interrupt
Event causing interrupt
Acquisition validation
Capture
Crossing threshold
«top» of clock in tachometer mode
IWxy,1,E
IWxy,1,C
IWxy,1,A/
IWxy,1,B
IWxy,1,F
Information updated
Captured measurement (IWxy,4/IWxy,5)
Current measurement (IWxy,6/IWxy,7),
State of outputs (Ixy,C to Ixy,F),
Measurement/thresh(IWxy,1,4 to IWxy,1,7)
Speed(IWxy,3)
Note : only the data obtained using READBIT and READREG instructions are up to date. Values available at the discrete I/O interface (Ixy,i) and the register interface (IWxy,j) are only updated at the same rate as that of the task in which the module is configured.
___________________________________________________________________________
64
Programming
4
___________________________________________________________________________
4.5-2 Fault processing
The following table enables the status of the module to be determined quickly using the
LEDs and the bits extracted from the register words. These may be accessed using a terminal.
Ixy,S
0
1
IWxy,0, IWxy,1,
6
/
/
8
/
1
A
/
/
3
/
/
9
/
/
LED (1)
F OK
0 1
1 0
Diagnosis module OK module faulty
Action
1
1
1
0
0
/
1
1
/
/
1
/
0
/
/
/
0
1
/
/
/
/
/
1
/
/
/
/
/
1
0 0
0 0
0 0
0 1
0 0 code I/O incorrect (< > 63 or 733) module error terminal block open count overflow too many interrupt requests change module modify I/O configuration read fault bits lock terminal block acknowledge fault
(1) 0 = LED off, 1 = LED lit
Reading fault bits
This string of internal module bits is accessible using the message interface (text block).
When IWxy,0,6 = 1 the fault bits enable faults occuring within the application to be recognized and acknowledged. Bits IWxy,0,4 and IWxy,0,6 go to 0 :
• when the fault disappears, if it has been acknowledged by reading the fault bits,
• when the fault bits are read, if the fault has disappeared.
Wi
Wi+1
F E D C B A 9 8 7 6 5 4 3 2 1 0
1 1 1 1 terminal block(s) open or no 24V power supply input fault encoder power supply fault
___________________________________________________________________________
65
___________________________________________________________________________
Overflow calculation
IWxy,1,3 is set to state 1 on overflow of:
• the distance moved per unit of time measurement with the tachometer function,
• the calculation of the thresholds with hysteresis, if operation with hysteresis was declared in the configuration.
This bit is reset to state 0, on the rising edge of discrete bit Oxy,7 (acknowledgement of faults).
PLC processor fault
When the PLC processor stops or develops a fault, the module can operate in one of 3 modes :
• the outputs of the module are reset to 0 (default mode),
• the outputs assume a pre-defined state (application of fall-back status defined during the configuration),
• totally independent : module continues to function normally.
The choice of operation depends on bit OWxy,0,E and on the option defined during configuration (nibbles FB and FBS, see section 3.2) :
OWxy,0,E
0
1
With fall-back Without fall-back reset outputs to zero
Apply fall-back Normal operation
When bit OWxy,0,E is at state 1, the module is said to be in « non-secure » mode.
When the PLC processor stops or develops a fault, bit IWxy,1,1 is set to 1 by the module.
This is then reset to 0 by a rising edge on bit Oxy,7.
PLC power fault
For a power break > 10ms, but < the power supply reserve (approximately
200 ms) : the module sets the outputs to 0, saves the context, and sets bit IWxy,1,2 to 1.
When the supply returns, the module resumes its normal operation. Bit IWxy,1,2 (which enables the module to determine when a power break occurs) should be reset to 0 (rising edge on Oxy,7).
For a power break > the power supply reserve : the module sets the physical outputs to 0. On return of the supply, it is re-initialized according to the chart described in section 2.3-1.
___________________________________________________________________________
66
Programming
4
___________________________________________________________________________
4.5.3
Complementary requests
In addition to loading the configuration, the PLC processor can exchange various information with the module using the CPL function block.
List of standard request codes
Role of request
Write configuration
Read configuration
TXTi,C TXTi,M TXTi,V No. of
(hex) (hex) (hex) bytes written
40
41 xy63 xy63
FE/FD
71/FD
16/108
0/2
(*)
47 xy63 77/FD 0
No. of bytes read
Module status
0 STOP
16/108 RUN/STOP
4 RUN Read fault bit string
Write application name
Read application name
Read module version
49
4A
0F xy63 xy63 xy63
FE/FD
7A/FD
3F/FD
≤
20
0
0
0
≤
20
27
RUN/STOP
RUN/STOP
RUN/STOP
(*) : with the TSX 47-20 PLC the number of bytes read or written is limited to 30. To compensate for this limitation when reading the configuration, the module also reads the firrst word of data in addition to the request code H’41’ :
Data received
H’41’
H’41’, H’000F
H’41’, H’xxxx
Data sent to
TSX P67/87
Complete config.
TSX P 47-20
Operational mode
Threshold/output configuration
Complete config.
Operational mode
• complete configuration = operational mode + threshold/output configuration,
• the threshold/output configuration always includes the identification word H’000F’ at the header.
• in any mode other than electronic cam mode, the module always sends the operational mode
• with TSX 47-20, if TXTi,L <>2, the module always sends the operational mode.
___________________________________________________________________________
67
___________________________________________________________________________
List of specific request codes
Module status
Role of the request TXTi,C TXTi,M TXTi,V No. of No. of
(hex) (hex) (hex) bytes bytes written read
F7 xy63 F8/FD 4 2 Read the parameters before PWF (power failure)
This table can consist of single or double length words.
• Single length format : 3 words
Wi
Wi + 1
Wi + 2
DISTANCE / TIME
CAPTURED MEAS.
CURRENT MEAS.
RUN/STOP
• Double length format : 5 words
Wi DISTANCE / TIME
CAPTURED MEAS. (Pf) DWi + 1 CAPTURED MEAS. (PF)
DWi + 2 CURRENT MEAS. (PF) CURRENT MEAS. (Pf)
Role of the request TXTi,C TXTi,M TXTi,V No. of No. of
(hex) (hex) (hex) bytes bytes written read
Module status
Read error micro-code F7 xy63 F8/FD 4 2 RUN/STOP
This request enables a parameter error to be identified while loading the configuration.
The transmission table should be initialized to : H’A482’ in Wi+1
H’0100’ in Wi+2
The reception table has the following format and is initialized to 0 before the request is sent :
Wi
X X X X X X X X
F 8 7
Error code
0
___________________________________________________________________________
68
Programming
4
___________________________________________________________________________
List of error codes
18
19
20
21
22
14
15
16
17
.
.
23
37
10
11
12
13
06
07
08
09
Error codes Parameters
00
01
00H
01H no error
FUNCTION (normal operation)
02
03
04
05
02H
03H
04H
05H reserved reserved
TYPE (type of encoder)
LOGIC (combination of inputs)
06H
07H
08H
09H
0AH
0BH
0CH
0DH
TH-MON (mode of monitoring the thresholds) reserved
HYSTER (hysteresis function))
FORCING (output forcing code)
EDGE-ln1 (activation edge for In1)
VAL-OUT (validate physical outputs) reserved
IT-EVENT (choice of source of interrupt)
.
.
0EH FB (operation with fall-back code)
0FH FBS (fall-back state)
10H reserved
11H TACH-PER (tachometer function period)
12H HYS-VAL (hysteresis value)
13H reserved
14H OFFSET (offset value)
15H THRESH CONF INP (header of threshold and associated output table)
16H
25H
.
.
NBT (number of thresholds used)
17H THRESH1 (value of threshold 1)
THRESH15 (value of threshold 15)
___________________________________________________________________________
69
___________________________________________________________________________
___________________________________________________________________________
70
________________________________________________________
Installing and wiring
5
Section 5
___________________________________________________________________________
5.1
Installing the module
Page
72
72
72
73
______________________________________________________________________________________________________
5.2
Wiring 74
74
75
76
___________________________________________________________________________
71
___________________________________________________________________________
5.1-1 Possible locations for the module
The TSX DTM 100 modules can generally be inserted in any rack having a complete bus.
Basic configuration
Basic configuration
TSX 47 20..
TSX 47 300
Slots 0 to 3, no interrupts possible
Slots 0 to 7 : 5 intelligent modules max.
Interrupts possible.
Slots 0 to 7,
Interrupts possible.
Basic configuration
(double rack)
Local extension configuration
(single rack)
Remote extension configuration
(single rack)
Local extension configuration
(double rack)
TSX 67 300
TSX 87 120
TSX 87 200
TSX 87 300
TSX RCE 860
TSX RCF 860
TSX RDE 880
All slots,
Interrupts possible.
(*)
All slots,
Interrupts possible.
(**)
Slots 0 to 7,
Interrupts possible.
(*)
(*) : the TSX 67-30 and TSX 87-10/20 PLCs only generate interrupts in local extension configurations.
(**) : the TSX 67-30 and TSX 87-10/20 PLCs do not support intelligent modules in remote extensions.
_______________________________________________________________________________________
5.1-2 General rules
The TSX DTM 100 module uses a high pass band and it is therefore recommended to avoid all sources of electromagnetic radiation. It is preferable to keep the module away from contactors switching heavy currents, devices receiving or supplying heavy currents and from power supply units.
Warning
In no case should the TSX DTM 100 modules be placed in the upper section of double racks (risk of damage).
___________________________________________________________________________
72
Installing and wiring
5
___________________________________________________________________________
5.1-3 Mechanical interlocking
TSX 47-20 TSX 47-30 and
TSX 67/87 mechanical :
3 digit decimal coding is provided by
3 female mechanical interlocks situated at the rear of the module.
software : entered during configuration of
I/O by means of a TSX T607 or
TSX T407 terminal.
733
63
733
733
___________________________________________________________________________
73
___________________________________________________________________________
5.2
Wiring
The TSX DTM 100 module uses 2 external SUBD connectors for connection :
• a 15 pin SUBD connector to connect discrete I/O and auxiliary power supplies,
• a 25 pin SUBD connector for connecting the absolute encoder.
_______________________________________________________________________________________
5.2-1 Wiring the 15 pin SUBD connector
TSX DTM 100 MODULE
+
24 V
I / O
SENSORS
ACTUATORS
R 1
R 3
-
R 2
R 4
+
24V
ENCODER
OUTPUT
5V OR 24V
ENCODER
SUPPLY
-
+
-
10
9
2
3
7
13
11
4
( * )
15
8
1
12
5
6
14
INP 24V
INP 0V
INP COMMON
In 0
In 1
OUTP. COMMON
00 ➤
01 ➤
02 ➤
03 ➤
ENCODER OUTP.
0V
ENCODER SUPP.
0V
MODULE GROUND
(*) connect the module ground to the cable screen and to the external metallic body of the connector.
Note : the 24V I/O and 24V ENCODER OUTPUT supplies must be separate.
___________________________________________________________________________
74
Installing and wiring
5
___________________________________________________________________________
5.2-2 Wiring the 25 pin SUBD connector
ABSOLUTE ENCODER TSX DTM 100 MODULE
8
21
9
22
19
7
20
10
23
11
16
4
17
5
18
6 B 6
B 7
B 8
B 9
B 10
B 11
B 12
B 1
B 2
B 3
B 4
B 5
B 13
B 14
B 15
B 16
➤ ➤
Strap required to detect terminal block
(*)
24
25
1
2
15
14
0V
ENCODER SUPPLY
ENCODER OUTPUT
ENCODER OUTPUT
TERMINAL C
MODULE GROUND
(*) connect the module ground to the cable screen and to the external metallic body of the connector.
75
___________________________________________________________________________
5.2-3 Principles for connection
In order to protect the signal against external noise induced in both serial and common modes it is advised to take the following precautions :
• Type of cables
Use screened or twisted pair cables having a minimum cross-section of 0.22 mm 2 .
• Screening of cables
Connect cable screens to the PLC ground using the TSX RAC 20 grounding strip which must be fitted to the PLC rack.
• Sensor reference with respect to ground
Use floating sensors (not referenced to ground)
• Cable routing
Keep signal measurement wiring away from discrete I/O cables (especially relay outputs) and from power cables. Avoid parallel routing (spacing
≥
20 cm between cables) and make cable crossings at right angles.
• Connecting the absolute encoder
The encoder connection should be made using screened cable. Wires not used in the cable must be connected to the SENSOR 0V.
The cross section of each wire should be greater than or equal to 0.22 mm 2 (gauge
24) and the parasitic capacitance between wires must not exceed 100pF/m.
The following charts give the maximum length of a cable as a function of the input frequency required :
Frequency (kHz)
40
30
20
24V encoder = 24V
10
24V encoder = 15V
20 40 60 80
➤
100
Length
(m)
___________________________________________________________________________
76
________________________________________________________
Specifications
6
Section 6
___________________________________________________________________________
6.1
Consumption
6.2
I/O characteristics
6.3
Performance
Page
78
79
81
81
81
_______________________________________________________________________________________
6.4
Conditions for input signals 83
83
84
_______________________________________________________________________________________
6.5
Selecting threshold settings 84
86
87
___________________________________________________________________________
77
___________________________________________________________________________
6.1
Consumption
Power for the module is provided by the PLC.
Power supply
5V logic
12V logic
12V power
Maximum consumption
500 mA maximum
30 mA maximum
150 mA maximum
Back-up battery (configuration)
Back-up time
Charging time
40 days at 25
°
C
20 days at 45
°
C
40 hours at 45
°
C
___________________________________________________________________________
78
Specifications
6
___________________________________________________________________________
6.2
I/O characteristics
Characteristics of absolute encoder inputs (B1 to B16)
Static characteristics Values
Admissible voltage 13.5 to 25.2 V
Nominal current at 15V
Nominal current at 24V
Input impedance
Input voltage at state 0
Input voltage at state 1
10 mA
16.5 mA
1.35 to 2 kOhms
≤
(24V ENCODER)-11.7 V
≥
(24V ENCODER)-3.2 V
Dynamic characteristics
Response time for a change to 1
Response time for a change to 0
Inputs B1 toB16
≤
1
µ s
≤
3
µ s
Functional input characteristics (In0 and In1)
Static characteristics Values
Nominal voltage
Nominal current
24 VDC
16.5 mA
Admissible voltage
Input impedance
Voltage at state 1
Current at state 1
19.2 to 30 V
1.36 to 1.56 kOhms
> 11V
> 6 mA
Voltage at state 0
Current at state 0
Line resistance
Leakage resistance
Typical power dissipated per channel
< 5 V
< 2 mA
< 500 Ohms
>30 kOhms
0.43 W
Dynamic characteristics
Response time for a change to 1
Response time for a change to 0
Inputs In0 and In1
≤
250
µ s
≤
250
µ s
___________________________________________________________________________
79
___________________________________________________________________________
Characteristics of transistor outputs O.0 to O.3
Static characteristics Values
Nominal voltage 24 V
Admissible voltage
Maximum current per output
Voltage drop at Imax
Leakage current at state 0
Connection of load
19.2 to 30 V
300 mA
< 0.5 V
< 1 mA common to -ve supply
Dynamic charateristics
Response time for a change to 1
Response time for a change to 0
Outputs O.0 to O.3
100
µ s
350
µ s
Comments : • the 24V power supply for the discrete I/O should be stabilised and not subject to interference (do not use an industrial distributed supply network),
• the 24 V I/O supply should be protected by a fuse,
• the transistor outputs are protected against short circuits.
___________________________________________________________________________
80
Specifications
6
___________________________________________________________________________
6.3
Performance
6.3-1 Processing time for internal module functions
Functions
Acquisition of the measurement
Validation of the acquisition (In0)
Capture of the measurement (In1)
Repetition of the capture
Maximum processing time
1 scan cycle = 950
µ s
1 scan cycle
400
µ s
> 2 ms
Detection of thresh. (with or without hysteresis) 1 scan cycle
Activation/de-activation of the outputs 350
µ s
_______________________________________________________________________________________
6.3-2 Interrupt function
The time for the interrupt task to accept the interrupts for TSX 47-30 and TSX 67/87
PLCs is the sum of the 2 times tic and tip.
tic : time between the change of state of the module input causing the interrupt and the presence of the interrupt signal on the I/O bus.
tic
≤
5ms for the TSX DTM 100 module.
tip : time between the presence of the interrupt signal on the I/O bus and the activation of the interrupt task. This time is identical whatever the location of the module ( base configuration or extension rack) but is dependent on whether remote I/O is used or not (see following table).
___________________________________________________________________________
81
___________________________________________________________________________
Maximum time
No remote I/O With remote I/O (TSX LFS) tip
TSX 47-30
TSX 67-20
TSX 67-30
TSX 87-10
TSX 87-20
TSX 87-30
Basic configuration
1.5 ms
1.5 ms
2.5 ms
2.5 ms
Extension configuration
(1)
-
1.5 ms
-
-
Basic configuration
-
2.2 ms
3.2 ms
3.2 ms
1 ms 1 ms 1.7 ms
(1) Reminder about interrupt on local extension configurations :
• TSX 67-20 and TSX 87-30 : interrupt managed by PLC processor,
• TSX 67-30 and TSX 87-10/20 : interrupt not managed.
Extension configuration
(2)
-
2.2 ms
-
1.7 ms
(2) Reminder about remote optical linking of modules :
• TSX 67-20
• TSX 87-30
: 750 m maximum,
: 1000 m maximum,
• TSX 67-30 and TSX 87-10/20 : no remote intelligent modules
___________________________________________________________________________
82
Specifications
6
___________________________________________________________________________
6.4
Conditions for input signals
To ensure correct operation of the module and thus the correct receipt of data, it is essential to respect the following 2 conditions concerning the speed of change of the measurement :
1. The maximum frequency accepted by the module inputs is 40 kHz,
2. The measurement must not change more than half the encoder distance (i.e. 2 Nbits an encoder with N bits) during 1 cycle (950
µ s).
for
This second rule leads to a theoretical limitation well above that of the hardware capability of the module (F max = 40 kHz) and the mechanical limitations of the encoder.
____________________________________________________________________________________________________
6.4-1 Rotating encoders
Example 1
For a 12 bit encoder, the encoder distance corresponds to 4096 points, for which the maximum speed of rotation is 6000 rpm (or 100 rps).
Application of condition number 2 leads to a maximum variation of the measurement of
2048 points/ms, i.e. a frequency of 2MHz.
The frequency corresponding to the maximum speed of rotation is 4096 x 100, i.e.
400 kHz.
We can see, therefore, that the 2 frequencies are well above the 40kHz frequency limit set by the module.
Example 2
For a 6 bit encoder this corresponds to an encoder distance of 64 points, for which the maximum speed of rotation is 6000 rpm (i.e. 100 rps).
Application of the second condition leads to a maximum variation of the measurement of 32 points/ms i.e. a frequency of 32 kHz, which is less than 40kHz. However, movement of half the encoder distance in 1ms corresponds to a speed of rotation of the encoder of 30000 rpm, a speed well beyond the mechanical capability of the encoder.
Thus, in reviewing the case of a rotating encoder, the practical constraints to be respected do not concern the speed. If we assume that the maximum speed of the encoder is 6000 rpm, the table below provides the speed limit as a function of the number of encoder bits in order to respect the first condition (F max. = 40kHz).
No of points/turn
Maximum speed
< 256 512 1024 2048 4096 8192 16384 32768 65536
6000 4688 2344 1172 586 293 146 73,2 36,6
___________________________________________________________________________
83
___________________________________________________________________________
6.4-2 Linear encoders
➤ length l
➤
➤
V
➤
For a linear encoder of N bits and length l, the application of condition number 2 leads to a maximum speed for cursor movement of :
Vmax
≤
500x l in m
Vmax in m/s
The frequency corresponding to this speed will, in the majority of cases, be greater than
40 kHz.
example : for N = 10 bits , f = 512 kHz
It is, therefore, still the frequency limit of 40 kHz set by the module, which limits the maximum speed of movement :
Vmax < 40000 x l l in m
2 N Vmax in m/s i.e. for N = 10 bits et l = 1m :
Vmax < 40 m/s (speed much greater than the mechanical capability of the encoder.)
____________________________________________________________________
6.5
Selecting threshold settings
To guarantee that crossing of the threshold is detected (measurement acquisition and electronic cam functions), the values given to the thresholds must respect the following conditions :
___________________________________________________________________________
84
Specifications
6
___________________________________________________________________________
6.5-1 Application using the internal processing capabilities of the module
TSX DTM 100
B1
B2
B3
Threshold table
➡
▲
Comparison
B15
B16
O.0
O.1
O.2
O.3
0
The distance between two consecutive thresholds should be such that the time to move is greater than 1 ms (measurement acquisition period).
Ti Ti + 1
➤
E
➤
Rotating encoder
This rule can be expressed as a function of the speed of rotation and of the specification by the following formula :
D > V x
2 N n 1000
D : minimum distance between 2 consecutive thresholds (in encoder points)
V : speed of rotation (in rps) n : number of revolutions (multi-turn encoder)
N : number of bits examples :
• for a single revolution 10 bit encoder turning at 1200 rpm (V = 20 rps, n = 1, 2n = 1024), this means that D
≥
2048 points
• for a 12 bit multi-turn encoder (64 x 64 points) turning at 3000 rpm (V = 50 rps, n = 64,
2n = 4096), means that D
≥
3.2 points
Linear encoder
This rule can be expressed by the following formula :
D > V x
2 N l 1000
D : minimum distance between 2 consecutive thresholds (in encoder points
V : speed of movement (in m/s) l : length of encoder (in m)
N : number of bits
___________________________________________________________________________
85
___________________________________________________________________________
6.5-2 Application requiring processing within the application program
Interrupt task TSX DTM 100
B1
B2
Threshold table
B15
B16
▲ ▲
IT
Comparison
TSX DST 1635
Out 0
Out 1
This is particularly encountered when there are more than 4 outputs to be controlled.
Crossing a threshold generates an interrupt causing the IT task to be activated, which in turn updates the outputs as a function of the threshold crossed.
As for the previous case, the acquisition of the measurement is made every 1ms, but the module cannot generate an interrupt faster than every 5ms.
As a result, the minimum distance between 2 thresholds should be such that the time required to move is greater than 5ms.
Rotating encoder
This rule is expressed as a function of the rotation speed and its direction by the following formula :
D > V x
2 N n 1000
D : minimum distance between 2 consecutive thresholds (in encoder points)
V : speed of rotation (in rps) n : number of turns (multi-turn encoder)
N : number of bits
Linear encoder
This rule is expressed by the following formula :
D > V x
2 N n 1000
D : minimum distance between 2 consecutive thresholds (in encoder points)
V : speed of movement (in m/s)
I : length of encoder (in m)
86
Out 15
Specifications
6
___________________________________________________________________________
6.5-3 Specific conditions for acquisition mode
The additional constraints described here only concern the acquisition mode for
«circular» applications; i.e. those where the measurement supplied by the encoder represents an angle, and where it is possible to go from a value of 2 N -1 to a value of 0
(or vice versa).
Measurement
N
2 -1 0
N
2 -1 measurement change
0
Constraint 1
Crossing a threshold equal to 0 cannot cause an interrupt.
➤ t
Constraint 2
• For a measurement changing in a decreasing sense, the distance between the threshold closest to 0 and the value 0, should be such that the time required to move that distance be greater than 1ms.
• For a measurement changing in an increasing sense, the distance between the threshold closest to 2 N -1 and the value 2 N -1, should be such that the time required to move that distance be greater than 1ms.
This rule can be expressed as a function of the speed of rotation of the encoder and of its specification by the following formula :
D > V x
2 N n 1000
D : minimum distance between 2 consecutive thresholds (in encode
V : speed of revolution (in rps) n : number of turns (muti-turn encoder)
N : number of bits
• The module detects crossing of a threshold when it recognizes that the current measurement is greater than the threshold, while that of the previous scan cycle was less than the threshold (or vice versa).
___________________________________________________________________________
87
___________________________________________________________________________
Measurement
Thresh cycle N cycle N - 1
➤ t
Crossing of threshold detected in cycle N
• For a threshold with a value of 0 the measurement is always
≥
0, and so crossing the threshold cannot be detected.
• For a threshold with a value «close» to 0, crossing the threshold cannot be detected unless the module has made at least one acquisition of a value between 0 and the threshold.
Measurement
N
2 -1
➤ ➤ cycle N - 2 cycle N - 1 cycle N
Measurement
N
2 -1 cycle N - 1 cycle N
Thresh
0
➤ 1 ms ➤ ➤ 1 ms ➤
➤ t
Thresh
0
➤ 1 ms ➤
➤ t
Crossing of threshold detected in cycle N
Crossing of threshold not detected in cycle N
___________________________________________________________________________
88
________________________________________________________
Appendix
7
Section 7
___________________________________________________________________________
7.1
Discrete bits and register words
Page
90
___________________________________________________________________________________________________
7.2
Glossary 93
___________________________________________________________________________________________________
7.3
Index 94
___________________________________________________________________________
89
___________________________________________________________________________
7.1
Discrete bits and register words
F E D C B A 9 8 7 6 5 4 3 2 1 0
Ixy, Oxy,
Ixy,8
Ixy,9
1 = voltage at input In0
Reserved
Ixy,A
Ixy,B
Ixy,C
1 = voltage at input In1
1 = double length format
0 = single length format
1 = output O.0 ON
Ixy,D 1 = output O.1 ON
Ixy,E 1 = output O.2 ON
Ixy,F 1 = output O.3 ON
Oxy,0 1 = validate acqusition
Oxy,1 Reserved
Oxy,2 1 = capture measurement
Oxy,3 1 = validate outputs
Oxy,4 1 = force the outputs
Oxy,5 Reserved
Oxy,6 Reserved
Oxy,7 1 = acknowledge faults
______________________________________________________________________________________________________
Input register words
(words read by PLC processor)
Output register words
(words written by PLC processor)
IWxy,0 Standard status word OWxy,0 Standard command word
IWxy,1 Complementary status word 1 OWxy,1 Reserved
IWxy,2 Complementary status word 2 OWxy,2 Reserved
IWxy,3 Distance moved / time OWxy,3 Threshold 0 (least signif.)
IWxy,4 Captured measurement (least signif.) OWxy,4
IWxy,5 Captured measurement (most signif.) OWxy,5
Threshold 0 (most signif.)
Threshold 1 (least signif.)
IWxy,6 Current measurement (least signif.) OWxy,6 Threshold 1 (most signif.)
IWxy,7 Current measurement (most signif.) OWxy,7 Complementary command word
___________________________________________________________________________
90
Appendix
7
___________________________________________________________________________
Standard status word IWxy,0
F E D C B A 9 8 7 6 5 4 3 2 1 0
Complementary status word 1 IWxy,1
F E D C B A 9 8 7 6 5 4 3 2 1 0
0 to 0 on acknowledgement
1 Reserved
2 1 = reset system messages
3 1 = module available
4 1 = general fault or memorization of fault
5 Reserved
6 1 = specific fault
7 Reserved
8 1 = blocking fault
9 1 = self-tests running
A 1 = terminal block(s) open
B 1 = waiting for configuration
0 = module configured
C 1 = module status RUN
0 = module status STOP
D Reserved
E 1 = non-secure mode
F 1 = physical outputs inhibited
Complementary status word 2 IWxy,2
F E D C B A 9 8 7 6 5 4 3 2 1 0
0
1
2
3
4
5
6
1 = measurement is incrementing
0 = measurement is decrementing
1 = PLC processor fault (Reset when fault
acknowledged or module STOPPED)
1 = power break (reset when fault ack.
or module changes to NCONF)
1 = internal calculation overflow
(reset by acknowledging fault)
1 = current measurement < 2 thresholds
or equal to lower threshold
1 = current measurement between
2 thresholds
1 = current measurement > 2 thresholds
or equal to higher threshold
7 0
8 Reserved
9 1 = Interrupt on waiting
A
1 = Interrupt on crossing threshold 0
(reset by acknowledging interrupt)
B 1 = Interrupt on crossing threshold 1
(reset by acknowledging interrupt)
C 1 = Interrupt on capture input (reset by
acknowleding interrupt)
D Reserved
E
F
1 = Interrupt on validation input
(reset by acknowledging interrupt)
1 = Interrupt on tachometer clock
(reset by acknowledging interrupt)
*
0001 : code 1 = measurement acquisition mode
0100 : code 4 = tachometer mode
0101 : code 5 = electronic cam mode without resident thresholds
1101 : code 13 = electronic cam mode with resident thresholds
(*) in electronic cam mode these bits define the active threshold (immediately below the current measurement)
___________________________________________________________________________
91
___________________________________________________________________________
Standard command words OWxy,0 Complementary command words
OWxy,7
F E D C B A 9 8 7 6 5 4 3 2 1 0 F E D C B A 9 8 7 6 5 4 3 2 1 0
0 1 = mask interrupt
1
2
Reserved
1 = reset system messages to zero
(text block)
Reserved 3
4
5
1 = global validation for all
interrupt sources
Reserved
6 Reserved
7 Reserved
8 Reserved
9 Reserved
A Reserved
B Reserved
C 1 = module goes from STOP to RUN
0 = module goes from RUN to STOP
D Reserved
E 1 = operating in non secure mode
F 1 = force outputs to 0
0
1 3 2 1 0
2
3
4
5 output O.0
output O.1
output O.2
output O.3
Status of transistor outputs when measurement is between 2 thresholds
7 6 5 4
6
7
8
9 output O.0
output O.1
output O.2
output O.3
Status of transistor outputs when measurement < 2 thresholds
B A 9 8
A output O.0
output O.1
output O.2
output O.3
B
C
D
Reserved
Reserved
E Reserved
F Reserved
___________________________________________________________________________
92
Appendix
7
___________________________________________________________________________
7.2
Glossary
Absolute encoder
Captured measurement
CPU
Current measurement
Electronic cam a position sensor providing the absolute position during each revolution (single turn encoder). The coding of the number of turns (multi-turn encoder) if Gray code is used, may be considered as the most significant part of the absolute coding. During a power break, the encoder memorizes the last value read which is the number of turns.
image of the current measurement at a given moment.
Central Processor Unit.
image of the position of the moving object given by the absolute encoder.
analogous to a mechanical cam, a threshold symbolising a virtual raised plate or boss on an axis which activates outputs.
Event
Fall-back
Hysteresis
Interrupt
Mechanical cam change of state of an input causing an interrupt to be generated.
setting of the outputs to states defined during configuration.
an adjustable delay in activating or de-activating the outputs after a threshold is crossed.
a signal sent by the module to the CPU (on the detection of an event) which has the effect of changing the program scan from the current task to the interrupt task.
a raised plate or boss fixed to an axis which actuates a limit switch when a mobile passes over it.
Modulo
Non secure zone of measurement change. Once upper limit is reached, counting starts again.
mode allowing the module to operate when the application program stops or when there is a PLC processor fault.
measurement associated with the displacement.
Position measurement
Single length measurement capacity defined as 15 bits + sign bit
(-32 768 à +32 767).
measurement of speed.
Tachometer function
Threshold pre-defined software boundary, compared with the measurement.
Valid measurement distance set of measurement points within which the measurement may be used.
Validation action authorizing acquisition of the measurement.
___________________________________________________________________________
93
___________________________________________________________________________
7.3
Index
A Absolute encode...........................................................................
Acquisition of the measurement....................................................
Assigning physical outputs............................................................
Activation edge of In1 ...................................................................
B Basic configuration........................................................................
C Cable screening............................................................................
Calculation overflow......................................................................
Capture.........................................................................................
Captured measurement................................................................
Combining functional inputs..........................................................
Comparisons.................................................................................
Complementary requests..............................................................
Configuration coding.....................................................................
Configuration request....................................................................
Current measurement...................................................................
D Discrete bits..................................................................................
Discrete nterface...........................................................................
Distance moved per unit of time ...................................................
Double length................................................................................
E Electronic cam ..............................................................................
Extension configuration.................................................................
F Fault bit string ..............................................................................
Fault bits .......................................................................................
Forcing the outputs.......................................................................
Functional inputs...........................................................................
Functional mode ...........................................................................
G Gray code .....................................................................................
H Hardware configuration.................................................................
Hysteresis.....................................................................................
I I/O register words..........................................................................
Internal battery..............................................................................
Interrupt task (IT) ..........................................................................
Interrupts.......................................................................................
L LED signal lamps..........................................................................
Loading the configuration..............................................................
___________________________________________________________________________
94
Appendix
7
___________________________________________________________________________
M Master task ...................................................................................
Measurement change zone...........................................................
Mechanical interlocking.................................................................
Message interface.........................................................................
Module ground..............................................................................
Module in RUN..............................................................................
Module in STOP............................................................................
Modulo..........................................................................................
N Number of thresholds....................................................................
O Offset ............................................................................................
Operational mode .........................................................................
Output fall-back.............................................................................
Output matrix ................................................................................
Outputs .........................................................................................
P Power break..................................................................................
Power return .................................................................................
R Reading application name ............................................................
Reading configuration...................................................................
Reading error code.......................................................................
Reading module version...............................................................
Register interface..........................................................................
Routing the cables........................................................................
S Self-tests.......................................................................................
Sense of direction.........................................................................
Software configuration..................................................................
SUBD connector...........................................................................
T Tachometer...................................................................................
Tachometer function period..........................................................
Text block......................................................................................
Thresholds....................................................................................
Type of absolute encoder .............................................................
Type of cables...............................................................................
V Validation......................................................................................
W Writing application name...............................................................
Writing configuration.....................................................................
___________________________________________________________________________
95
___________________________________________________________________________
___________________________________________________________________________
96
___________________________________________________________________________________________________
Setting up the hardware
______________________________________________________________________________________________________
LED signal lamps
TSX DTM 100
F
F
OK
Red LED «module faulty»
Green LED «module powered and operating correctly»
O.0 to 0.2 Red LEDs "outputs activated" (4 th not displayed)
OK
In0 and In1Red LEDs "inputs at state 1"
O.0
Discrete I/O and power supply connections
O.1
I / O
PWS
O.2
In0
In1
+
I / O PWS
+
I/O
-
24V
6
7
4
5
8
1
2
3
9
10
11
12
13
14
15
-
+
-
+
24V
5V ou
24V
In 0
In 1
R 0
R 1
R 2
R 3
Encoder output
Encoder power supply
Absolute encoder connections
+
+
ABS
ENCODER
+
Use connector kit TSX CAC 05
ABS ENCODER
1
2
7
8
9
5
6
3
4
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
B1
B2
B3
B4
B5
B6
B7
B8
B9
B10
B11
B12
B13
B14
B15
B16
VDC 0V
Absolute encoder
2
General characteristics
• Slot location: TSX 47-30/67/87 : racks equipped with complete bus.
TSX 47-20 : 4 slots of basic rack
• Mechanical interlock code
• Software interlock code
: 733
: 733 for TSX 47-30/67/87, 63 for TSX 47-20
• Handling power breaks :
- power break>10ms and < than power supply reserve,
. bit IWxy,1,2 is set to 1 (reset to 0 on rising edge of Oxy,7),
. the physical outputs are reset to 0.
- power break > than power supply reserve,
. bit IWxy,1,2 is set to 1,
. the physical outputs are reset to 0,
. the module goes to the initialization state on return of power
In all cases, the software configuration is protected by an internal battery in the module.
_______________________________________________________________________________________________________
Overview of exchanges
______________________________________________________________________________________________________
Absolute encoder
B1
.
.
.
B16
Validation In 0
T
S
I
N
P
U
Capture In 1
Ixy,8 to F Oxy,0 to 7
8 output register words :
OWxy,0 to OWxy,7
OW
Interrupt
Discrete interface
24 V/
300 mA outputs
O.0
O.1
O.2
O.3
T
S
T
P
O
U
➡ ➡
Preprogrammed function selected
Configuration
8 input register words:
IWxy,0 to IWxy,7
Request interpreter
IW
Register interface
Message
Interface
TXT
CPL
___________________________________________________________________________________
Message interface
_____________________________________________________________________________________________________
Role of request
Write configuration
Read configuration
Read fault bits
Write application name
Read application name
Read module version
Read error micro-code
Error codes
Codes Parameters
00H
01H
04H
05H
06H
08H no error
FUNCTION
TYPE
LOGIC
TH-MON
HYS
TXTi,C TXTi,M TXTi,V No of
(hex) (hex) (hex) bytes written
40 xy63 FE/FD 6/108
41
47
49
4A
0F
F7 xy63 xy63 xy63 xy63 xy63 xy63
Codes Parameters
09H
0AH
0BH
0DH
0EH
0FH
FORCING
FIn1
VAL-OUT
IT-EVENT
FB
FBS
71/FD
77/FD
FE/FD
7A/FD
3F/FD
F8/FD
<20
Codes
11H
12H
14H
15H
16H
0/2
0
0
0
4
17H to 25H
No of bytes read
0
Module status
STOP
6/108 RUN/STOP
4
0
RUN
RUN/STOP
<20
27
RUN/STOP
RUN/STOP
2 RUN/STOP
Parameters
TACH-PER
HYS-VAL
OFFSET
THRESH CONF INP
NBT
TH 1to TH 15
3
___________________________________________________________________________________________________
Configuration (operational mode )
__________________________________________________________________________________________________
TYPE
HYSTER
0
1 0
FUNCTION
0
TH-MON LOGIC
VAL-OUT EDGE-In1 FORCING
FBS
0
FB
0 0
IT-EVENT
0
TACH-PER
HYS-VAL
OFFSET
FUNCTION
1 : measurement acquisition mode,
4 : tachometer mode,
5 : electronic cam mode.
TYPE = N o . encoder bits - 1 (3 < TYPE < 15)
LOGIC
0 X 0 X x = 0 : physical input AND PLC proc, x = 1 : physical input OR PLC proc.
Validate/Inhibit
Capture
HYSTER
0 : operation without hysteresis,
1 : operation with hysteresis.
TH-MON
0 : current measurement or distance moved per unit of time,
1 : captured value.
FORCING
X X X X x = 0 : output OFF, x = 1 : output ON.
output O.0
output O.1
output O.2
output O.3
EDGE-In1 (not used in tachometer mode)
0 : input active on rising edge,
1 : input active on falling edge.
VAL-OUT
0 : without PLC processor validation,
1 : with PLC processor validation (bit Oxy,3).
IT-EVENT
0 0 X X 0 X X X x = 0 : no interupt to PLC,
x = 1 : interrupt to PLC.
crossing threshold 0 or crossing threshold (electronic cam) crossing threshold 1 capture event (In1 to 1) validate/inhibit input (In0 to 1) top of clock in tachometer mode
FB
0 : operation without fall-back state,
1 : operation with fall-back state.
FBS
X X X X x = 0 : output OFF x = 1 : output ON output O.0
output O.1
output O.2
output O.3
TACH-PER
HYS-VAL
OFFSET
1 x 10 ms
≤
Period
≤
32767 x 10ms
0
≤
Hysteresis value
≤
(2 Nbits - 1)
- (2 Nbits - 1)
≤
Offset value
≤
+ (2 Nbits - 1)
4
___________________________________________________________________________________________________
Configuration (table of parameters for electronic cam mode)
_________________________________________________________________________________________________________
CWj / Wj
CWj / Wj + 1
CWj / Wj + 2
CWj / Wj + 3
CWj / Wj + 4
OSN0 NBT
OSN1
OSN2
1
THRESH1
0 0
THRESH2
0 0
THRESH3
F
0
0
CWj / Wj OSN0 NBT 1 F
CWj / Wj + 1
CWj / Wj + 2
THRESH1 (least signif.)
THRESH1 (most signif.)
CWj / Wj + 3 OSN1 0 0 0
THRESH2 (least signif.)
THRESH2 (most signif.)
CWj /
Wj + (2xNBT)
OSNn
THRESHn
0 0 0
CWj /
Wj + (3xNBT)
THRESHn (least signif.)
THRESHn (most signif.)
OSNn 0 0 0
NBT 1
≤
NBT
≤
15
OSN0 to OSNn
X X X X x = 0 : output OFF x = 1 : output ON output O.0
output O.1
output O.2
output O.3
THRESH1 to THRESHn
0 < Value of threshold < 2 Nbits -1
____________________________________________________________________________________________________
Transfer characteristics
____________________________________________________________________________________________________
• CPL type text block in transmit/receive
• TXTi,M = H’xy..’ where x = rack N
°
, y = slot in rack,
.. = channel 00 or 63.
• TXTi,C = request code.
• TXTi,V = confirmation sent by the module,
FD = transfer incorrect.
• TXTi,S = number of bytes received during transfer (if transfer OK)
5
___________________________________________________________________________________________________
Addressing discrete bits and register words
___________________________________________________________________________________________________
F E D C B A 9 8 7 6 5 4 3 2 1 0
Ixy, Oxy,
Ixy,8 1 = voltage at input In0
Ixy,9 Reserved
Ixy,A
Ixy,B
Ixy,C
1 = voltage at input In1
1 = double length format
0 = single length format
1 = output O.0 ON
Ixy,D 1 = output O.1 ON
Ixy,E 1 = output O.2 ON
Ixy,F 1 = output O.3 ON
Oxy,0 1 = validate acqusition
Oxy,1 Reserved
Oxy,2 1 = capture measurement
Oxy,3 1 = validate outputs
Oxy,4 1 = force the outputs
Oxy,5 Reserved
Oxy,6 Reserved
Oxy,7 1 = acknowledge faults
Input register words
(words read by PLC processor)
IWxy,0 Standard status word
Output register words
(words written by PLC processor)
OWxy,0 Standard command word
OWxy,1 Reserved IWxy,1 Complementary status word 1
IWxy,2 Complementary status word 2 OWxy,2
IWxy,3 Distance moved / time OWxy,3
IWxy,4 Captured measurement (least signif.) OWxy,4
IWxy,5 Captured measurement (most signif.) OWxy,5
Reserved
Threshold 0 (least signif.)
Threshold 0 (most signif.)
Threshold 1 (least signif.)
IWxy,6 Current measurement (least signif.) OWxy,6 Threshold 1 (most signif.)
IWxy,7 Current measurement (most signif.) OWxy,7 Complementary command word
6
___________________________________________________________________________________________________
Input register words : transmitted by module and read by PLC
___________________________________________________________________________________________________
Standard status word IWxy,0 Complementary status word 1 IWxy,1
F E D C B A 9 8 7 6 5 4 3 2 1 0 F E D C B A 9 8 7 6 5 4 3 2 1 0
0 to 0 on acknowledgement
1 Reserved
2 1 = reset system messages
3 1 = module available
4 1 = general fault or memorization of fault
5 Reserved
6 1 = specific fault
7 Reserved
8 1 = blocking fault
9 1 = self-tests running
A 1 = terminal block(s) open
B 1 = waiting for configuration
0 = module configured
C 1 = module status RUN
0 = module status STOP
D Reserved
E 1 = non-secure mode
F 1 = physical outputs inhibited
0
1
2
3
4
5
6
1 = measurement is incrementing
0 = measurement is decrementing
1 = PLC processor fault (Reset when fault
acknowledged or module STOPPED)
1 = power break (reset when fault ack.
or module changes to NCONF)
1 = internal calculation overflow
(reset by acknowledging fault)
1 = current measurement < 2 thresholds
or equal to lower threshold
1 = current measurement between
2 thresholds
1 = current measurement > 2 thresholds
or equal to higher threshold
7 0
8 Reserved
9 1 = Interrupt on waiting
A 1 = Interrupt on crossing threshold 0
(reset by acknowledging interrupt)
B 1 = Interrupt on crossing threshold 1
(reset by acknowledging interrupt)
C 1 = Interrupt on capture input (reset by
acknowleding interrupt)
D Reserved
E
F
1 = Interrupt on validation input
(reset by acknowledging interrupt)
1 = Interrupt on tachometer clock
(reset by acknowledging interrupt)
*
Complementary status word 2 IWxy,2
F E D C B A 9 8 7 6 5 4 3 2 1 0
0001 : code 1 = measurement acquisition mode
0100 : code 4 = tachometer mode
0101 : code 5 = electronic cam mode without resident thresholds
1101 : code 13 = electronic cam mode with resident thresholds
(*) In electronic cam mode these bits define the active threshold (immediately below the current measurement).
7
___________________________________________________________________________________________________
Output register words : transmiitted by PLC and read by the module
__________________________________________________________________________________________________
Standard command word OWxy,0
F E D C B A 9 8 7 6 5 4 3 2 1 0
Complementary command word
OWxy,7
F E D C B A 9 8 7 6 5 4 3 2 1 0
0 1 = mask interrupt
1
2
3
Reserved
1 = reset system messages to zero
(text block)
Reserved
4
5
1 = global validation for all
interrupt sources
Reserved
6 Reserved
7 Reserved
8 Reserved
9 Reserved
A Reserved
B Reserved
C 1 = module goes from STOP to RUN
0 = module goes from RUN to STOP
D Reserved
E 1 = operating in non secure mode
F 1 = force outputs to 0
0
1 3 2 1 0
2
3 output O.0
output O.1
output O.2
output O.3
4
Status of transistor outputs when measurement is between 2 thresholds
7 6 5 4
5
6
7
8
9 output O.0
output O.1
output O.2
output O.3
Status of transistor outputs when measurement < 2 thresholds
B A 9 8
A output O.0
output O.1
output O.2
output O.3
B
D
E
C Reserved
Reserved
Reserved
F Reserved
8
பதிவிறக்கு
விளம்பரம்