Professional Documents
Culture Documents
Industry Online Support International Language Contact Help Support Request Site Explorer Search in Online Support
How do you determine the frequency of a pulse sequence and speeds? Share this Page:
Entry Associated product(s)
mySupport Cockpit
Fig. 01
2 There you select the high-speed counter "HSC" from the configuration catalog.
Then click on "Next >".
Fig. 02
3 Leave the mode set to "0" for single-phase up/down counting and select a counter (e.g. "HC4").
Fig. 03
Note:
Please refer to Table 01 for selecting the high-speed counter.
4 Leave the settings for the subprograms, counter presettings, counter value and counting direction.
Click on "Next".
Fig. 04
5 In the next window, also leave the presetting,
and do not set a check mark for "Interrupt on Current Value equal Preset Value (CV = PV)".
Fig. 05
6 Close the Instructions Wizard with the "Finish" button.
Fig. 06
Table 02
No. Description
1 In network 1 of the operation block use the initialization bit SM0.1 to call the initialization block generated by the Instructions Wizard for the high-speed
counter.
Fig. 07
2 In network 2 you cyclically call (SM0.0) the "Frequency" block from the library with the same name in the list.
Fig. 08
Enable the function via the connection of the "Active" input (when disabled, the "Hz" parameter outputs the value "0").
Address the "Counter" with the counter selected with the Instructions Wizard.
Address the IN-OUT parameter "Hz" with a free double-word (Format: REAL) for displaying the frequency measured in Hertz.
The "Trigger" output provides a pulse signal for optional recording of the frequency characteristic via the Data Log function (see Step 5).
3 The "Frequency" library needs 16 bytes in the global variable memory. For this you specify an address via "File" -> "Library Memory Allocation...".
Fig. 09
4 Via the "Symbol Table" view you get to symbolic addressing of the "Frequency" library. The "Time_interval" symbol defines the measuring interval in
seconds for the frequency calculation. The default setting is an interval time of 1 second, but you can change this.
Fig. 10
5 As an option, in network 3 of the sample project "Frequency", the Data Log function is incorporated for capturing the frequency time on a memory
module. Via the AND operation of the "Active" and "Trigger" signals, when you activate the "Frequency" block, each frequency is recorded at the
intervals of the "Time_interval" set.
Fig. 11
Note:
The Data Log function is executed via the Data Log Wizard and the values recorded can be read out via the S7-200 Explorer.
More information on the Data Log function is available in the SIMATIC S7-200 Video Tutorial (Entry ID: 30839030 ).
Table 03
n = 60 * f / p
-1
n = Speed in minutes
f = Frequency in Hz
p = Number of pulses required for one motor revolution
Download:
The download "frequency.zip" contains the following files:
File Description
"frequency.mwl" library - contains the "Frequency" block (see Table 03, Step 2)
"frequency.mwp" project - sample project for this FAQ
"tspeed01.mwp" project - alternative implementation of this task via a cycle-independent time interrupt (setting range: 1 to 255 ms
Frequency.zip ( 11 KB )
Note:
Information on inserting libraries in STEP 7 Micro/WIN is available in Entry ID: 16689345
Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and
continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a
concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Automation Technology Automation Systems Industrial Automation Systems SIMATIC Software for SIMATIC Controller STEP 7 V5.x
STEP7 basic software and editors STEP 7 - Micro / WIN
Automation Technology Automation Systems Industrial Automation Systems SIMATIC Software for SIMATIC Controller STEP 7 V5.x
Options for programming and design SIMATIC MicroComputing
Rate entry
You want to discuss in our forum and exchange experiences with other users
Go to the Forum