Programming the FM 350-1
5.2 The function FC CNT_CTL1 (FC 2)
FM 350-1 Counter module
42
Manual, 05/2011, A5E03648639-01
Example
The following contains an example of how you can implement the transfer of the module
address, the channel address, and the length of the user data to the DB in OB 100.
The symbol table contains the following assignments for this example:
CNT_CHAN1
DB 1
DB with the counter data
You program the transfer in STL as follows:
STL
L
512;
// Module address = 512
T
CNT_CHAN1.MOD_ADR;
// Transfer of module address
L
P# 512.0;
// Module address in pointer format
T
CNT_CHAN1.CH_ADR;
// Transfer of the channel address
L
16;
// User data length = 16
T
CNT_CHAN1.U_D_LGTH;
// Transfer of the user data length
Call
The CNT_CTL1 function can be called in the cycle or alternatively in a time-controlled or
isochronous interrupt OB. Calling in an event-driven interrupt program is not permitted.
The CNT_CTL1 function call in the STL and LAD notations is given below.
ಯ&17B&7/ರ
'%B12
6:B*$7(
*$7(B673
27B(55
27B(55B$
/B',5(&7
/B35(3$5
7B&03B9
7B&03B9
&B'23$5$
&$//
&17B&7/
(1
(12
'%B12
27B(55
6:B*$7(
*$7(B673
27B(55B$
/B',5(&7
/B35(3$5
7B&03B9
7B&03B9
5(6B6<1&
5(6B=(52
5(6B6<1&
5(6B=(52
6(7B'2
6(7B'2
&B'23$5$
6(7B'2
6(7B'2
67/UHSUHVHQWDWLRQ
/$'UHSUHVHQWDWLRQ
Figure 5-2
Calling the CNT_CTL1 function
Содержание 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 ...