Page 1
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Preface, Contents User Information Product Overview How the FM 450-1 Counts Installing and Removing the SIMATIC FM 450-1 Wiring the FM 450-1 FM 450-1 Counter Function Assigning Parameters to the Module FM 450-1 Installation and Parameter Assignment Programming the FM 450-1 Programming in M7 with the...
Page 2
Trademarks SIMATIC and SINEC are registered trademarks of SIEMENS AG. Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners. Copyright...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Preface Purpose This manual describes all the steps required for using the FM 450-1 function module effectively. It supports you in learning the functionality of the FM 450-1 quickly and effectively. Contents of This This manual describes the hardware and software of the FM 450-1. It consists Manual of an instructional section and a reference section (appendices).
Page 4
If the manual fails to answer any questions concerning products described in Assistance the manual please contact your Siemens representative at your local Siemens office. You will find the relevant addresses in the ‘SIEMENS Worldwide’ Appendix of the ‘S7-400 and M7-400 Programmable Controllers’ manual.
Page 6
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Contents Starting and Stopping the Counter Channel ......Reading the Counter Value and the Load Value, Scanning and Resetting the Status .
Page 8
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Contents FM 450-1 Counter Function Module viii C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview This Chapter... This chapter gives you an overview of the FM 450-1 function module. You will learn what the FM 450-1 can do. You will become familiar with the application areas of the FM 450-1 through examples.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview What Can the FM 450-1 Do? What Can the The FM 450-1 function module is a high-speed counter module for use in the FM 450-1 Do? S7-400/M7-400 programmable controller. There are two counters on the module and they can operate in the following ranges: 0 to 4,294,967,295 (0 to 2 –...
Page 11
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview Pulse Duration You can specify a pulse duration for the digital outputs of the FM 450-1. The pulse duration specifies how long the relevant digital output is to be set. You can specify a value between 0 and 500 ms for the pulse duration. This value applies for both outputs.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview Application Areas of the FM 450-1 Where Can You The main application area of the FM 450-1 is where signals with high fre- Use the FM 450-1? quencies are counted and high-speed responses have to be triggered to prede- fined counter statuses.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview FM 450-1 Hardware View of Module Figure 1-2 shows the FM 450-1 module with front connector attached. Order number Type plate Version Diagnostics and status LEDs Front connector Labeling strips Figure 1-2 Representation of the FM 450-1 Order Number and The full order number of the FM 450-1 is shown on the rating plate.
Page 14
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview Diagnostics and The FM 450-1 has 16 LEDs that are used both for diagnostics and for indicat- Status LEDs ing the status of the FM 450-1 and its digital inputs and outputs. Table 1-2 gives the labeling, color and function of the LEDs.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview FM 450-1 Software FM 450-1 Software To integrate the FM 450-1 into the S7-400, you require a software package Packages with Parameter assignment screen forms Software for the CPU The software for integrating the FM 450-1 into the M7-400 is described in Chapters 7 and 12.
Page 16
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Product Overview FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ How the FM 450-1 Counts This Chapter... This chapter contains explanations of the most important terms for counting with the FM 450-1. Chapter Section Contents Page Overview Definitions Gate Functions FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ How the FM 450-1 Counts Definitions What is Counting? Counting refers to the process of capturing and summing up events. In the case of the FM 450-1 function module, encoder signals are captured and eva- luated accordingly. Count Range, The FM 450-1 can count up and down.
Page 19
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ How the FM 450-1 Counts Continuous If a counter reaches the upper limit when counting up, and if another count Counting pulse comes, the counter jumps to the lower count limit and starts to add the count pulses again;...
Page 20
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ How the FM 450-1 Counts Periodic Counting In periodic counting, the counter starts from the load value. When the counter reaches the upper limit when counting up, and if a another count pulse comes, it jumps to the load value and starts to add the count pulses again.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ How the FM 450-1 Counts Gate Functions Counting with Many applications require that the count be started or stopped at a defined Gate Functions time depending on other events. This starting and stopping of the count is done in the case of the FM 450-1 via a gate function.
Page 22
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ How the FM 450-1 Counts FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Installing and Removing the FM 450-1 This Chapter... This chapter contains information on installing and removing the FM 450-1. You will learn what you must look out for when installing. You will get notes and hints on configuring and installing an FM 450-1. You will learn, step-by-step, how to install and remove an FM 450-1.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Installing and Removing the FM 450-1 Preparing the Installation Defining the Slots The FM 450-1 function module can, like a signal module, be installed in a central rack or in an expansion unit. Mechanical Manual /1/ describes the possibilities open to you for mechanical installation Configuration and how to proceed when configuring.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Installing and Removing the FM 450-1 Installing and Removing the FM 450-1 Rules No special protection measures (ESD guidelines) are required for installing an FM 450-1. Tools Required You require a 4.5 mm screwdriver for installing and removing the FM 450-1. Installation Proceed as follows to install an FM 450-1: Procedure...
Page 26
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Installing and Removing the FM 450-1 FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 This Chapter... This chapter contains the following information on wiring the FM 450-1: Terminal assignments of the front connector. The function of the connections. Notes on selecting cables. The steps you must execute when wiring the front connector. The status of the module after wiring and switching on the power supply.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Terminal Assignments of the Front Connector Front Connector You connect the count signals, the digital inputs and outputs, the encoder supply and the auxiliary voltage and load voltage via the 48-pin front con- nector.
Page 29
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Front Connector Table 4-1 shows the front connector assignments. Assignments Table 4-1 Front Connector Assignments Con- Name Input/ Function nec- Out- 5 V encoder RS 24 V encoder, 24 V encoder with 24 V initiator tion 422 symmetric...
Page 30
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Table 4-1 Front Connector Assignments, Continued Con- Name Input/ Function nec- Out- 5 V encoder RS 24 V encoder, 24 V encoder with 24 V initiator tion 422 symmetric asymmetric direction level Counter 1 Digital input 1I0 Digital input 1I1...
Page 31
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Auxiliary Voltage Connect a direct voltage of 24 V to the 1L+ and 1M terminals for the voltage 1L+, 1M supply of the 5 V and 24 V encoders. An integral diode protects the module from reverse polarity of the auxiliary voltage.
Page 32
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Table 4-2 Input Filters for 24 V Encoder Signals Features Input Filter 1 Input Filter 2 (Default) Typical input delay 15 s Maximum counting frequency 200 kHz 20 kHz Minimum pulse width of the count 2.5 s 25 s signals...
Page 33
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Note Relays and contactors can be connected direct without external circuitry. The time characteristics of the digital outputs depends on the parameteriza- tion and is explained in more detail in Chapter 9 ‘Setting: Behavior of the Digital Outputs’.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Wiring the Front Connector Cables There are some rules for you to observe when selecting cables: The cables for the digital inputs must be shielded. The cable for the counter signals must be shielded. You must apply the shields of the counter signal cables both at the pulse encoder and in the immediate vicinity of the module via the shield attach- ment, for example.
Page 35
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Terminal 4 (1M) of the front connector must have a low-resistance connec- tion to the ground of the CPU. If you supply the encoder with an external voltage, you must also connect the ground of this external voltage with the ground of the CPU.
Page 36
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Use flexible cables with cross-sections of 0.25 to 1.5 mm. Note If the encoders are supplied via the module, the cable cross-section must be large enough to carry the required voltage to the encoder despite voltage drops over the cable.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 Module Status After Switching On Features The status of the module after the power supply has been switched on and before any data has been transferred, is characterized by the following fea- tures: Counter inputs default for 5 V differential signals, track B not inverted;...
Page 38
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Wiring the FM 450-1 FM 450-1 Counter Function Module 4-12 C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Assigning Parameters to the FM 450-1 This Chapter... In this chapter, you will learn how to install and start parameter assignment screen forms. The parameter assignment screen forms have an integral help function that supports you in parameterizing and starting up the FM 450-1. Chapter Section Contents...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Assigning Parameters to the FM 450-1 Installing and Calling Parameter Assignment Screen Forms Marginal The following conditions apply for transferring parameter assignment data to Conditions the CPU: STEP 7 must be correctly installed on your programming device The programming device must be correctly connected to the CPU The CPU must be in STOP Note...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450-1 This Chapter... This chapter contains all the information necessary for programming the FM 450-1 in the S7-400. For linking the FM 450-1 into a user program, you are provided with STEP 7 blocks that make handling the desired functions easy for you.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450–1 The FC CNT_CTRL Function Prerequisite The data required for the FC CNT_CTRL are stored in a DB on the CPU. The FC CNT_CTRL transfers data cyclically from this DB to the FM and fetches data from the FM.
Page 43
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450–1 Call The FC CNT_CTRL can be called either cyclically or in a time-controlled program once per counter. Calling FC CNT_CTRL in an interrupt program is not permissible. The FC CNT_CTRL call in the STL and LAD methods of representation is given below.
Page 44
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450–1 FC CNT_CTRL Table 6-1 lists the FC CNT_CTRL parameters. Parameters Table 6-1 FC CNT_CTRL Parameters Name Declaration Data Type Meaning The User... The Block... Type DB_NO INPUT BLOCK_DB Number of the data block enters this scans this with the counter data...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450–1 The FC DIAG_INF Function Functionality The FC DIAG_INF function reads data set DS1 from the FM 450-1 and makes it available to you in the DB of the FC CNT_CTRL. The transfer works as follows: If the initiation parameter is set (IN_DIAG = TRUE), DS1 is read out from the FM 450-1.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450–1 Application Example Introduction The example below shows how the FC CNT_CTRL can be used for the func- tions ‘Transfer load value to FM 450-1’ and ‘Start counter’. These functions are representative of all functions here. Explanation +1000;...
Page 47
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450–1 Description of the Table 6-3 lists the symbols used in the example. You define your own symbol Symbols assignments in the S7 Symbol Table. Table 6-3 Symbols in the User Program Symbol Absolute (Example) Comments CHANNEL1...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming the FM 450–1 Technical Specifications of the Blocks Technical Specifications FC CNT_CTRL FC DIAG_INF Block number FC 0 FC 1 Version Assignment in working 438 bytes 186 bytes memory Assignment in load 522 bytes 262 bytes memory Assignment in local data –...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library This Chapter... If you use an FM 350-1, FM 450-1 counter module or an IF 961-CT1 inter- face submodule with a CPU from the M7-300/400 product range, you can create your application in the C programming language.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Overview Overview of the The counter function library offers you functions with which you can do the Functions following: Initialize and parameterize the counter channel Transfer the load value and the comparison values Start and stop the counter channel Control digital inputs and outputs of the counter module Scan and reset the counter status...
Page 51
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Programming All the system functions and standard functions of the M7-300/400 system Environment software are available to you for programming in the Borland C/C++ devel- opment environment in STEP 7. System functions support you in the following, for example: Task management Memory management...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Basic Program Structure Sequence The program structure for the counter module must be adapted to the require- ments of your application. In most cases however, the program will contain the following functions in the sequence given, with most of the functions being optional.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Initializing and Parameterizing the Counter Channel M7CntInit Counter channels are initialized via the M7CntInit function. The M7CntInit Initializing the function must be called once for each counter channel used. It assigns a ‘log- Counter Channel ical’...
Page 54
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Note The parameters valid at any one time cannot be read out using STEP 7. Parameterizing the You can parameterize and reparameterize a counter channel via the user pro- Counter Channel gram using the M7CntPar function.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Transferring the Load Value and Comparison Values Load Value You can specify a starting value, the load value (LoadVal) to the counter channel. The default load value is 0. M7CntLoadDirect The load value can be transferred direct to the counter channel or it can be M7CntLoadPrep...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Control of the Digital Inputs and Outputs Digital Inputs The counter module has the digital inputs START, STOP, RESET (IF 961-CT1 only) and SET. If an operating mode with hardware gate control has been set, you can con- trol the counter module via hardware signals.
Page 57
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Starting and Stopping the Counter Channel Starting the Depending on the operating mode, with hardware or software gate control, Counter Channel there are two methods of starting the counter channel: 1.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Reading the Counter Value and the Load Value, Scanning and Re- setting the Status Scanning The functions listed below are used for scanning information such as Information Counter value Load value and Counter status The counter status can be reset if required.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Processing Interrupts Registering at the Depending on the parameters assigned, the counter module can initiate pro- Interrupt Server cess interrupts and/or diagnostics interrupts. In order to receive process inter- rupts and diagnostics interrupts, the counter channel must be registered with the interrupt server.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Programming in M7 with the Counter Function Library Processing Error Messages Error Messages If an error occurs during execution of a function, the function supplies an error number as a return value. You can determine the exact cause of the er- ror with the help of this error number.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 This Chapter... This chapter contains the checklists for starting up the FM 450-1. These checklists enable you to: check all working steps prior to operating the module avoid operating faults in the module Chapter Section Contents...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 Mechanical Installation Checklist Checklist Use the checklist below to check and document the working steps for me- chanical installation of the FM 450-1. Working Step Options/Procedure Determine slot All slots that are not already occupied or due to be occupied by a power supply module, a CPU or an IM.
Page 63
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 Working Step Options/Procedure Connect 24 V Counter 2: Terminal Name Function encoders Incremental 24 V Encoder supply ground encoder 24 VDC 24 V encoder supply Encoder signal A * Encoder signal B * Encoder signal N * Counter 1: Terminal...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 Parameter Assignment Checklist Checklist Use the checklist below to check and document the working steps for para- meterizing the FM 450-1. Parameterize the FM 450-1 counters one after the other according to the checklist. Working Step Options/Procedure Parameterize the FM...
Page 65
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 Working Step Options/Procedure Parameterize the Signal evaluation Single FM 450 1 FM 450-1 Double Quadruple Frequency and direction (for 24 V encoders) Determine operating mode for counter 1 Continuous counting Without gate With software gate With hardware gate Single counting...
Page 66
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 Working Step Options/Procedure Evaluate zero mark for setting Parameterize the Determine the behavior of the digital outputs for counter 1 FM 450 1 FM 450-1 Output 1Q0 Switch off Active from comparison value 1 to overflow Active from comparison value 1 to underflow Active for ‘Pulse duration’...
Page 67
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 Working Step Options/Procedure Parameterize the Enable digital outputs FM 450 1 FM 450-1 CTRL_DQ0 in DB 1 CTRL_DQ1 in DB 1 Determine load value and comparison values for counter 1 and enter in DB Load value Comparison value 1 Comparison value 2...
Page 68
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Starting Up the FM 450-1 FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands This Chapter... You will find the following in this chapter: An overview of the three operating modes, the different settings and the possible commands and their calls A description of the three operating modes A description of the settings A description of the two commands Marginal conditions and notes you must observe when using these func-...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Definitions Which Operating When you specify one of the three operating modes, you select the function- Modes are ality with which you want to operate the FM 450-1. Table 9-1 gives an over- Available? view of these operating modes.
Page 71
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Which Commands You can influence the count in the FM 450-1 with two commands. Table 9-3 are Available? gives an overview of these commands. Table 9-3 The Commands of the FM 450-1 Name Description Open and close gate...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Basic Information on Calling Operating Modes, Settings and Commands How Do You Select You select the operating modes and settings in the parameter assignment the Operating screen forms of the FM 450-1. Modes and The parameter assignment data are saved automatically on the programming Settings?
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Continuous Counting Definition In this operating mode, the counter of the FM 450-1 counts continuously from the current counter status. If the counter reaches the upper limit when counting up, it jumps to the lower limit and continues to count from there without any pulse losses.
Page 74
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Opening and You open and close the hardware gate of each counter by applying the rele- Closing the vant signals to or removing the signals from the inputs 1I0 and 1I1 (counter Hardware Gate 1) or 2I0 and 2I1 (counter 2).
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Single Counting Definition In this mode, the counter of the FM 450-1 counts once from the load value to the count limit. Selecting the Gate You can select the gate function in this mode. The following possibilities are Function available to you: Software gate...
Page 76
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Opening and You open and close the hardware gate and set the counter to the load value Closing the by applying the relevant signals to or removing the signals from the inputs Hardware Gate 1I0 and 1I1 (counter 1) or 2I0 2I1 (counter 2).
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Periodic Counting Definition In this mode, the counter of the FM 450-1 counts from the load value to the count limit, jumps back to the load value and continues to count. Selecting the Gate You can select the gate function in this mode.
Page 78
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Opening and You open and close the hardware gate and set the counter to the load value Closing the by applying the relevant signals to or removing the signals from the inputs Hardware Gate 1I0 and 1I1 (counter 1) or 2I0 and 2I1 (counter 2).
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Setting: Counting Mode Introduction There is a 32 bit-wide count register on the module. With the count mode, you select whether the module is to count only in the positive range or whether the 32nd bit is interpreted as a sign bit thus allowing negative num- bers to be represented.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Setting: Behavior of the Digital Outputs Introduction You can store two comparison values (comparison value 1 and 2) on the module for each counter. These comparison values are assigned to the two digital outputs (comparison value 1: 1Q0 or 2Q0, comparison value 2: 1Q1 or 2Q1).
Page 81
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Behavior of the For both outputs, you can program one of 6 possible responses to reaching Outputs the comparison value. The various possibilities are shown in the table below. Behavior of the Outputs Switch off Underflow Comparison value...
Page 82
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Marginal If you parameterize the behavior of the digital outputs, you must observe the Conditions following marginal conditions. If... Then..you want to parameterize an output ‘ac- ...you must ensure that the time between tive between comparison value and over- these events is greater than the minimum flow or underflow’...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Setting: Pulse Duration Introduction To adapt to the actuators used in your process (contactors, final control ele- ments, etc.), you can specify the pulse duration during which the outputs are set when a comparison value is reached.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Command: Open and Close Gate Introduction The counters of the FM 450-1 have the following gates: A hardware gate that you can open either with level control or with edge control.
Page 85
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Edge-Controlled Figure 9-5 shows edge-controlled opening and closing of the hardware gate Opening and of counter 1. Closing of the Hardware Gate Counter status Count pulses Input 1I0 Open gate Input 1I1 Close gate Figure 9-5...
Page 86
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Opening and Figure 9-6 shows opening and closing of the software gate of counter 1. Closing the Software Gate Counter status Count pulses SW_GATE Bit set Bit reset Figure 9-6 Opening and Closing of the Software Gate The software gate is opened and closed by setting and resetting the SW_GATE input parameter of the FC CNT_CTRL.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands 9.10 Command: Set Counter Introduction If you want to start or continue the count from a specific value (the load value), you must parameterize the signal that is to be used to set this counter to the load value.
Page 88
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Note Synchronization of a counter with zero mark only makes sense if the gate is open. If you have only enabled one count direction when setting a counter with an external signal, you must note that when the gate is closed the current count direction is saved (frozen).
Page 89
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Single Setting with Figure 9-7 shows single setting of counter 1 with input 1I2. The same applies Input 1I2 (2I2) for counter 2 with input 2I2. In the situation represented, only ENSET_UP is set, that is, the counter is set in the case of up counting.
Page 90
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Setting the If you parameterize setting of a counter with the zero mark of the encoder, Counter with the the relevant counter will be set with the rising edge of the zero mark. Zero Mark Setting is only carried out if input 1I2 (2I2) of the relevant counter is set at the time of the rising edge of the zero mark.
Page 91
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Count pulses Zero mark Input 1I2 ENSET_UP Counter set Counter Counter Counter Counter Counter set not set not set not set not set Figure 9-9 Single Setting of Counter 1 with the Zero Mark Multiple Setting Figure 9-10 shows multiple setting of counter 1 with the zero mark.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands 9.11 Initiating a Process Interrupt Introduction For the individual counters of the FM 450-1, you can set which events are to initiate a process interrupt. For this purpose, parameterize the counter inter- rupts in the parameter assignment screen forms.
Page 93
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands Start Information The temporary variable OB4x_POINT_ADDR is written in the start informa- tion of OB4x. The variable OB4x_POINT_ADDR (bytes 8 to 11) consists of four bytes. The information concerning the event that has initiated the process interrupt is entered in these four bytes.
Page 94
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Operating Modes, Settings, Parameters and Commands FM 450-1 Counter Function Module 9-26 C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation This Chapter... This chapter describes the following: The encoders you can connect to the counters of the FM 450-1. The time sequence of the signals of the different encoders. How the counters of the FM 450-1 can perform multiple evaluations of the encoder signals.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation 10.1 Overview Introduction The count signals that the counters of the FM 450-1 can process are rectangu- lar signals generated either by incremental encoders or pulse encoders. Incremental encoders scan a grating and so generate rectangular electrical pulses.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation 10.2 5 V Differential Signals Incremental The incremental 5 V encoder supplies the differential signals A, A, B, B and 5 V Encoder N, N to the module in accordance with RS 422, where the signals A, B and N are the inverted signals of A, B and N.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation 10.3 24 V Signals 24 V Incremental The incremental 24 V encoder supplies the signals A*, B* and N* in the Encoder same time ratio as the signals A, B and N in the case of the 5 V incremental encoder.
Page 99
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation Table 10-2 Count Direction in Dependence on the Input Parameterization Input Parameterization Terminal B* Count Direction Unswitched Current sourcing 24 V connected Down Current sinking Unswitched Down Short-circuited to ground When selecting the encoder, you must select the ‘Frequency and direction’ parameter.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation 10.4 Pulse Evaluation Introduction The counters of the FM 450-1 can count the edges of the signals. Normally, the edge at A (A*) is evaluated (single evaluation). To achieve a higher reso- lution, you can decide via parameterization whether the signals are to have single, double or quadruple evaluation.
Page 101
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation Quadruple Quadruple evaluation means that the rising and falling edges of A and B are Evaluation evaluated; whether up or down count pulses are generated, depends on the levels of signals A and B. Figure 10-5 shows quadruple evaluation of signals.
Page 102
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Encoder Signals and Their Evaluation FM 450-1 Counter Function Module 10-8 C79000-G7076-C450-01...
www.gkbpx.com 该文档 是极速PDF 编辑器生成 , 如果想去掉该提示,请 访问并下载 : http:// www.jisupdfeditor.com/ DB Assignments DB for the All data belonging to one channel of the module are stored in the DB of the FC CNT_CTRL FC CNT_CTRL. The data structure and the length of the DB are defined by the variable declaration in the FC CNT_CTRL.
Page 104
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ DB Assignments Table 11-1 DB Assignments, Continued Address Variable Data Type Initial Comments Value 26.0 A_BIT0_0 BOOL FALSE Reserved 26.1 BOOL FALSE Test free 26.2 A_BIT0_2 BOOL FALSE Reserved 26.3 A_BIT0_3 BOOL FALSE Reserved 26.4 A_BIT0_4 BOOL FALSE Reserved...
Page 105
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ DB Assignments Table 11-1 DB Assignments, Continued Address Variable Data Type Initial Comments Value 30.0 ACT_LOAD DINT Current load value (read user) 34.0 ACT_CNTV DINT Current count value (read user) 38.0 DA_ERR_W WORD W#16#0 Data error word (read user) 40.0 OT_ERR_B BYTE...
Page 106
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ DB Assignments Table 11-1 DB Assignments, Continued Address Variable Data Type Initial Comments Value 44.0 STS_SET BOOL FALSE Status digital input SET (read user) 44.1 E_BIT2_1 BOOL FALSE Reserved 44.2 STS_STA BOOL FALSE Status digital input START (read user) 44.3 STS_STP BOOL...
Page 107
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ DB Assignments Table 11-1 DB Assignments, Continued Address Variable Data Type Initial Comments Value 55.0 D_BIT1_0 BOOL FALSE DS1 byte 1 bit 0 55.1 D_BIT1_1 BOOL FALSE DS1 byte 1 bit 1 55.2 D_BIT1_2 BOOL FALSE DS1 byte 1 bit 2 55.3 D_BIT1_3...
Page 108
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ DB Assignments Table 11-1 DB Assignments, Continued Address Variable Data Type Initial Comments Value 61.0 GRP_ERR1 BOOL FALSE Group error channel 1 61.1 GRP_ERR2 BOOL FALSE Group error channel 2 61.2 D_BIT7_2 BOOL FALSE DS1 byte 7 bit 2 61.3 D_BIT7_3 BOOL...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ M7 Reference Counter Function Library This Chapter... This chapter contains the descriptions of the functions in alphabetical order as well as the data structures and error codes. It is designed as a reference chapter. Chapter Section Contents Description Page...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.2 M7CntDisableSet Function Disable SET input Syntax #include <m7cnt.h> M7ERR_CODE M7CntDisableSet( M7CNT_LOGCHANNEL LogChannel, BOOL SelSetUp, BOOL SelSetDn): Parameter Meaning LogChannel Logical channel number, detected by M7CntInit SelSetUp Disable SET input for up count direction SelSetDn Disable SET input for down count direc- tion...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.4 M7CntEnableSet Function Enable SET input Syntax #include <m7cnt.h> M7ERR_CODE M7CntEnableSet( M7CNT_LOGCHANNEL LogChannel, BOOL SelSetUp, BOOL SelSetDn) Parameter Meaning LogChannel Logical channel number, detected by M7CntInit SelSetUp Enable SET input for up count direction SelSetDn Enable SET input for down count direc- tion...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.5 M7CntInit Function Initialize counter channel Syntax #include <m7cnt.h> M7ERR_CODE M7CntInit( M7IO_BASEADDR Baddr , UBYTE PType, UBYTE Channel, M7CNT_LOGCHANNEL_PTR pLogChannel); Parameter Meaning Baddr Base address of the interface submodule or the counter module PType I/O type of the counter channel.
Page 115
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ Error Code Meaning M7CNTE_CHANNEL_WRONG The channel number specified when calling the function (Channel parameter) is wrong M7CNTE_PTYPE_WRONG The I/O type specified when calling the function (Ptype parameter) is wrong M7CNTE_TIMEOUT A time overflow has occurred while accessing the counter channel since the counter channel has not responded.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.8 M7CntLoadDirect Function Load Counter Channel Syntax #include <m7cnt.h> M7ERR_CODE M7CntLoadDirect( M7CNT_LOGCHANNEL LogChannel, DWORD LoadVal); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit LoadVal Load value Description The function transfers the load value (LoadVal) specified when the call was made, direct to the counter channel in each case.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.9 M7CntLoadPrep Function Prepare Loading of the Counter Channel Syntax #include <m7cnt.h> M7ERR_CODE M7CntLoadPrep( M7CNT_LOGCHANNEL LogChannel, DWORD LoadVal); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit LoadVal Load value Description The function transfers the load value (LoadVal) specified when the call was made, into the counter-internal load register.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.10 M7CntPar Function Parameterize Counter Channel Syntax #include <m7cnt.h> M7ERR_CODE M7CntPar( M7CNT_LOGCHANNEL LogChannel, M7CNT_PARAM_PTR pCntParam); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit pCntParam Pointer to the structure M7CNT_PARAM with the parameterization data Description The function is called if the current parameters of the counter channel are to...
Page 122
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ See Also Function: M7CntInit Structure: M7CNT_PARAM Example #include <m7cnt.h> M7CNT_LOGCHANNEL LogChannel; M7CNT_PARAM DS128; /*******Initialisierung des DS128def*******/ DS128.IntMask= M7CNT_NO_INT; /*Int. mask bits: no interrupt enabled*/ DS128.EncSel= M7CNT_ENC_5V; /*Receiver select.: 5 V cnt signal*/ DS128.WireBrk= M7CNT_WIRE_NON;...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.11 M7CntRead Function Read Counter Value Syntax #include <m7cnt.h> M7ERR_CODE M7CntRead( M7CNT_LOGCHANNEL LogChannel, DWORD_PTR pActCntV); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit pActCntV Pointer to current counter status Description The current counter status of the counter channel is read and stored in pActCntV.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.12 M7CntReadDiag Function Read Diagnostics Information Syntax #include <m7cnt.h> M7ERR_CODE M7CntReadDiag( M7CNT_LOGCHANNEL LogChannel, M7CNT_DIAGINFO_PTR pDiagInfo); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit pDiagInfo Pointer to M7CNT_DIAGINFO structure with the diagnostics information Description When this function is called, the diagnostics data set DS1 is read and stored in pDiagInfo.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.13 M7CntReadLoadValue Function Read Load Value Syntax #include <m7cnt.h> M7ERR_CODE M7CntReadLoadValue( M7CNT_LOGCHANNEL LogChannel, DWORD_PTR pActLoad); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit pActLoad Pointer to the ActLoad load value Description The function reads the current load value of the counter channel and stores it in pActLoad.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.14 M7CntReadParError Function Read Parameterization Error Syntax #include <m7cnt.h> M7ERR_CODE M7CntReadParError( M7CNT_LOGCHANNEL LogChannel, WORD_PTR pParError); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit pParError Pointer to pParError parameterization er- Description You call this function if you have received a diagnostics interrupt (diagnos- tics byte 0, bit 7=1) due to a parameterization error.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.15 M7CntReadStatus Function Read Counter Status Syntax #include <m7cnt.h> M7ERR_CODE M7CntReadStatus( M7CNT_LOGCHANNEL LogChannel, M7CNT_STATUS pCntStatus); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit pCntStatus Pointer to the M7CNT_STATUS structure with the counter status Description When this function is called, the counter status byte and the status of the in- puts and outputs are read and stored in the M7CNT_STATUS structure.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.16 M7CntResetStatus Function Reset Counter Status Syntax #include <m7cnt.h> M7ERR_CODE M7CntResetStatus( M7CNT_LOGCHANNEL LogChannel, BOOL SelSynr, BOOL SelCmpStatus); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit SelSynr The ‘Counter synchronization reached’ status bit is reset (TRUE) or not reset (FALSE) SelCmpStatus The ‘Zero pass’, ‘Overflow’, ‘Underflow’...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.17 M7CntStart Function Start Counter Channel - for Operating Modes with Software Gate Control Syntax #include <m7cnt.h> M7ERR_CODE M7CntStart(M7CNT_LOGCHANNEL LogChannel); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit Description The counter channel is started via the software gate with this function. The function only works error-free in the counter modes with software gate con- trol.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.18 M7CntStop Function Stop Counter Channel Syntax #include <m7cnt.h> M7ERR_CODE M7CntStop(M7CNT_LOGCHANNEL LogChannel); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit Description The counter channel is stopped with this function. The function is effective in all operating modes with gate control (hardware and software gate control).
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.19 M7CntStopAndRead Function Stop Counter Channel and Read Counter Value Syntax #include <m7cnt.h> M7ERR_CODE M7CntStopAndRead( M7CNT_LOGCHANNEL LogChannel, DWORD_PTR pActCntV); Parameter Meaning LogChannel Logical channel number, detected by M7CntInit pActCntV Pointer to current counter status Description This function stops the counter channel and reads the counter status.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.21 M7CNT_PARAM Function The structure is used for parameterizing the counter channel with the M7CntPar function. Syntax struct { UWORD IntMask; /* Interrupt mask bits */ /* Bit 0: IOpenGate Int. on opening the gate */ /* Bit 1: ICloseGate Int.
Page 134
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ Table 12-1 Detailed Specifications of the Parameterization Data Parameter Meaning Data Value Range Coding Type fault Interrupt mask bits (word 0) BOOL {masked | free} { 0 | 1 } IOpen- Interrupt on opening the inter- Gate nal gate...
Page 135
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ Table 12-1 Detailed Specifications of the Parameterization Data, Continued Parameter Meaning Data Value Range Coding Type fault Zero mark on synchronization BOOL {with zero mark | { 0 | 1 } SynZero without zero mark } BOOL...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.22 M7CNT_STATUS Function The structure is used for status scanning with the M7CntReadStatus function. Syntax struct { unsigned StsSet:1; /* Status: SET input 1 = active */ unsigned :1; /* Filler bit*/ unsigned StsSta:1;...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ 12.23 Error Codes Return Value The success or failure of a function is indicated by the return value. The re- turn value is of the M7ERR_CODE data type. The function supplies the fol- lowing return values: M7CNT_DONE: Function completed successfully...
Page 138
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ Table 12-3 Counter Function Errors Error Code Meaning Remedy M7CNTE_CHANNEL_WRONG –1000 The channel number (Channel pa- Channel = 1 for IF counters and rameter) specified at the call is FM 350-1 wrong Channel = {1/2} for FM 450-1 M7CNTE_PTYPE_WRONG...
Page 139
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ Table 12-4 Parameterization Errors Error Code Meaning Remedy M7CNTE_PAR_ENC_SEL Coding for receiver selection Please change the relevant param- wrong eter of the M7CNT_PARAM* structure or – in the case of the FM 350-1 –...
Page 140
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: M7 Reference Counter Function Library http://www.jisupdfeditor.com/ FM 450-1 Counter Function Module 12-32 C79000-G7076-C450-01...
Page 141
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics This Chapter... Operator errors or incorrect wiring can cause faults that the module must in- dicate to the user. Faults are divided into the following classes on the module: Faults displayed by the diagnostics LEDs that indicate internal and exter- nal module faults.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics 13.1 Fault Indication via the Diagnostics LEDs Where is the Fault If one of the two red diagnostics LEDs lights up, a fault has occurred either Indicated? on the module (internal fault = INTF diagnostics LED) or at the cable con- nections (external fault = EXTF diagnostics LED).
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics 13.2 Initiation of Diagnostics Interrupts What is a If a user program is to respond to an internal or external fault, you can para- Diagnostics meterize a diagnostics interrupt that stops the cyclical program of the CPU Interrupt? and calls the diagnostics interrupt OB (OB82).
Page 144
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics Reading the Data The diagnostics data set DS0 is automatically transferred to the start informa- Set from the tion when the diagnostics OB is called.These four bytes are stored there in Module the local datum (bytes 8 to 11) of OB82. You can read out diagnostics data set DS1 (and so also the contents of DS 0) from the module with the FC DIAG_INF.
Page 145
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics Diagnostics Data The diagnostics data set DS1 consists of 12 bytes. The first 4 bytes are identi- Set DS1 cal with diagnostics data set DS0. Table 13-2 shows the assignments of the remaining bytes. All unlisted bits are insignificant and take the value zero. This data set is entered in DB1 from DW54 by the FC DIAG_INF.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics 13.3 Data Errors When Do Data If new parameters are transferred to the module, the FM 450-1 checks these Errors Occur? parameters. If errors occur during this check, the module signals these data errors.
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics 13.4 Operator Errors When Do Operator Operator errors occur when you operate the module wrongly by setting incor- Errors Occur? rect control signals. Where are the The operator error numbers are entered in DB1 by the FC CNT_CTRL. You Operator Errors can access this data word in your program via the variable identifier Indicated?
Page 148
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Faults and Diagnostics FM 450-1 Counter Function Module 13-8 C79000-G7076-C450-01...
Page 149
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications This Chapter... The technical specifications of the FM 450-1 are listed in this chapter. Chapter Section Contents Page Overview Technical Specifications UL/CSA Approvals The following approvals are available: UL-Recognition-Mark Underwriters Laboratories (UL) to Standard UL 508 CSA-Certification-Mark Canadian Standard Association (CSA) to Standard C 22.2 No.
In accordance with the above-mentioned EU Directive, Article 10, the EU declarations of conformity are held at the disposal of the competent authori- ties at the address below: Siemens Aktiengesellschaft Bereich Automatisierungstechnik AUT E 148 Postfach 1963 D-92209 Amberg...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications Technical Specifications Dimensions and Weight Data on the Counter Signals and the Digital Inputs Dimensions W H D (mm) 25 290 280 and Ouputs (Applies for both Counters) Weight approx. 650 g Counter inputs 5 V Voltages, Currents, Potentials Level In accordance with RS...
Page 152
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Technical Specifications FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Spare Parts Spare Parts Table B-1 lists all spare parts of the FM 450-1 that you can order for this module either additionally or later. Table B-1 Accessories and Spare Parts Parts for the FM 450-1 Order Number Plate block C79459-A1203-C1...
Page 154
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Spare Parts FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ References Supplementary The table below lists all the manuals referred to in this manual. References Title Order Number SIMATIC S7: S7-400/M7-400 Programmable 6ES7 040-0AA01-8AA0 Controllers Hardware and Installation SIMATIC; System Software for S7-300 and Included in package: S7-400 6ES7 810-4BA01-8AR0 System and Standard Functions...
Page 156
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ References FM 450-1 Counter Function Module C79000-G7076-C450-01...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary Asymmetric Asymmetric signals are two pulse trains phase-shifted by 90 degrees and with Signals a zero mark signal if required. Configuration Assignment of modules to mounting racks, slots and addresses. When config- uring the hardware, the user fills in a configuration table under STEP 7. Double Evaluation Double evaluation means that the rising edges of pulse trains A and B are evaluated on an incremental encoder.
Page 158
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Glossary Increments per Increments per encoder revolution specifies the number of increments that an Encoder encoder gives in one revolution. Revolution Initiator An initiator is a simple BERO switch without direction information. It there- fore supplies only a counter signal. Only the rising edges of signal A are counted.
Page 159
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index Symbols Count limits, 2-2 Count range, 2-2 “+/–31 bits” count mode, 9-11 CSA, A-1 “32 bits” count mode, 9-11 Numbers Data errors, 13-6 24 V encoder signals, 4-5 Diagnostic data set DS0, assignments, 13-4 input filter, 1-3, 4-5, 10-5 Diagnostics data set DS1, assignments, 13-5 24 V signals, 10-4 Diagnostics interrupt, 13-2, 13-3...
Page 160
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index Gate stop function, 9-8, 9-10, 9-18 Parameter assignment screen forms calling, 5-2 installing, 5-2 integral help function, 5-2 Periodic counting, 2-4 Hardware gate, 2-5 Process interrupt, 1-2, 9-24 edge-controlled opening and closing, 9-17 enabling, 9-24 level-controlled opening and closing, 9-16 initiate, 9-24 status, 9-17...
Page 161
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index START. Siehe Digital inputs Starting address, 3-2 Version, 1-5 Starting value, 1-2 View of module, 1-5 Status bits, 9-4 Voltage supply, of the encoders, 4-5 STOP. Siehe Digital inputs Symmetric encoders, 10-3 Zero pass, 9-11 UL, A-1 FM 450-1 Counter Function Module Index-3...
www.gkbpx.com 该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Index FM 450-1 Counter Function Module Index-4 C79000-G7076-C450-01...
Page 163
该文档是极速PDF编辑器生成, 如果想去掉该提示,请访问并下载: http://www.jisupdfeditor.com/ Siemens AG AUT E 146 Östliche Rheinbrückenstr. 50 D–76181 Karlsruhe Federal Republic of Germany From: Your Name: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _...
Page 164
Your comments and recommendations will help us to improve the quality and usefulness of our publications. Please take the first available opportunity to fill out this questionnaire and return it to Siemens. Please give each of the following questions your own personal mark within the range from 1 (very good) to 5 (poor).