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