![Siemens SIMATIC S7-300 FM 350-1 Скачать руководство пользователя страница 50](http://html.mh-extra.com/html/siemens/simatic-s7-300-fm-350-1/simatic-s7-300-fm-350-1_manual_1265384050.webp)
Programming the FM 350-1
5.5 Application example
FM 350-1 Counter module
50
Manual, 05/2011, A5E03648639-01
5.5
Application example
Introduction
The example below shows how the CNT_CTL1 function can be used for the functions
`Transfer load value to FM 350-1' and `Start counter'. These functions are representative of
all functions here.
Prerequisites
The load value to be transferred must have been entered in DB 1.
Example for Transferring the Load Value to the FM 350-1 and Starting the Counter
STL
Explanation
L
#1000;
// Enter load value in
T
T CNT_CHAN1.LOAD_VAL;
// DB1 (double integer).
U
TRIGGER;
S
L_DIRECT;
// DIRECT input parameter
R
TRIGGER;
CALL
CNT_CTL1
(
// FC call with the DB 1
DB_NO
:=1,
//Channel
1
SW_GATE
:=SW_GATE
// Control software gate
GATE_STP
:=GATE_STP,
// Stop gate
OT_ERR_A
:=CON_OT_ERR,
// Acknowledge operator error
SET_DO0
:=SET_DO0,
// Set Output DO0
SET_DO1
:=SET_DO1,
// Set Output DO1
OT_ERR
:=OT_ERR,
// Operator error occurred
L_DIRECT
:=L_DIRECT,
// Load new counter value
L_PREPAR
:=L_PREPAR,
// Prepare new counter value
T_CMP_V1
:=T_CMP_V1,
// Load new Comparison value 1
T_CMP_V2
:=T_CMP_V2,
// Load new Comparison value 2
C_DOPARA
:=C_DOPARA,
// Initiate parameter change
RES_SYNC
:=RES_SYNC,
// Delete synchronization status bit
RES_ZERO
:=RES_ZERO);
// Delete zero pass status bit
AN
OT_ERR;
// If no error has occurred,
JC
CONT;
//
CONTinue
// *** Error evaluation START ***
L
CNT_CHAN1.OT_ERR_B;
// Read and display additional
T
DISPLAY;
//
information.
SET
// Generate RLO 1
S
CON_OT_ERR
// Acknowledge error
...
// Further error response
JL
END;
// ***Error evaluation END ***
Содержание SIMATIC S7-300 FM 350-1
Страница 8: ...Table of contents FM 350 1 Counter module 8 Manual 05 2011 A5E03648639 01 ...
Страница 168: ...Encoder signals and their evaluation 8 4 Signal evaluation FM 350 1 Counter module 168 Manual 05 2011 A5E03648639 01 ...
Страница 186: ...Technical data 11 2 Technical data FM 350 1 Counter module 186 Manual 05 2011 A5E03648639 01 ...
Страница 188: ...Replacement parts FM 350 1 Counter module 188 Manual 05 2011 A5E03648639 01 ...
Страница 190: ...References FM 350 1 Counter module 190 Manual 05 2011 A5E03648639 01 ...
Страница 194: ...Glossary FM 350 1 Counter module 194 Manual 05 2011 A5E03648639 01 ...