
Program
6.5 Technical specifications of the blocks
Counter module FM 450-1
Manual, 02/2014, A5E03648739-02
51
6.4
Example application
Example for the use of the FC CNT_CTRL
The following example is representative for all functions and demonstrates the "Transfer load
value to FM 450-1" and "Start counter" functions to show how the FC°CNT_CTRL can be
applied.
STL
L
+1000;
// Enter load value into
T
KANAL1.LOAD_VAL;
// the DB.
U
INITIATION;
S
LOAD_DIRECT;
// DIRECT input parameters
R
TRIGGER;
CALL
CNT_CTRL, (
// Call the FC with the DB
// Channel 1.
SW_GATE
:=START,
// Control software gate
GATE_STP
:=GATE_STOP,
// Stop GATE
OT_ERR_A
:=ERROR_ACKN,
// Acknowledge operator error
OT_ERR
:=OPERATOR_ERR,
// Operator error occurred
L_DIRECT
:=LOAD_DIRECT,
// Load new counter value
L_PREPAR
:=LOAD_INDIRECT,
// Prepare new counter value
T_CMP_V1
:= COMP1_LOAD
// Load new comparison value 1
T_CMP_V2
:=COMP2_LOAD,
// Load new comparison value 2
RES_SYNC
:=RES_SYNCHRO,
// Delete synchronization status bit
RES_ZERO
:= RES_ZERO);
// Delete "zero crossing" status bit
AN
OPERATOR_ERROR;
// If no error has occurred,
JC
CONT;
// CONTinue
// *** Error evaluation START ***
L
CHANNEL1.OT_ERR_B;
// Read additional information
T
OUTPUT;
// and output.
SET
// Generate RLO 1
S
ERR_ACKN
// Acknowledge error
...
// Further error responses
SPA
END;
// *** Error evaluation END ***
CONT:
...
// Continue with normal processing
AN
LOAD_DIRECT;
// Load direct function is ready
S
START;
// Open software gate
END:
Содержание simatic s7-400 FM 450-1
Страница 8: ...Table of contents Counter module FM 450 1 8 Manual 02 2014 A5E03648739 02 ...
Страница 18: ...Product Overview 1 5 The FM 450 1 software Counter module FM 450 1 18 Manual 02 2014 A5E03648739 02 ...
Страница 40: ...Wiring 4 4 Module status after power is switched on Counter module FM 450 1 40 Manual 02 2014 A5E03648739 02 ...
Страница 54: ...Program 6 5 Technical specifications of the blocks Counter module FM 450 1 54 Manual 02 2014 A5E03648739 02 ...
Страница 102: ...Encoder signals and their evaluation 9 5 Signal evaluation Counter module FM 450 1 102 Manual 02 2014 A5E03648739 02 ...
Страница 114: ...Errors and diagnostics 11 5 Operator error Counter module FM 450 1 114 Manual 02 2014 A5E03648739 02 ...
Страница 120: ...Spare parts Counter module FM 450 1 120 Manual 02 2014 A5E03648739 02 ...
Страница 122: ...References Counter module FM 450 1 122 Manual 02 2014 A5E03648739 02 ...
Страница 126: ...Glossary Counter module FM 450 1 126 Manual 02 2014 A5E03648739 02 ...
Страница 130: ...Index Counter module FM 450 1 130 Manual 02 2014 A5E03648739 02 ...