Siemens SIMATIC S7-300 FM 350-1 Manual page 42

Counter
Table of Contents

Advertisement

Programming the FM 350-1
5.2 The function FC CNT_CTL1 (FC 2)
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
You program the transfer in STL as follows:
STL
L
512;
T
CNT_CHAN1.MOD_ADR;
L
P# 512.0;
T
CNT_CHAN1.CH_ADR;
L
16;
T
CNT_CHAN1.U_D_LGTH;
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.
Figure 5-2
42
DB 1
// Module address = 512
// Transfer of module address
// Module address in pointer format
// Transfer of the channel address
// User data length = 16
// Transfer of the user data length
Calling the CNT_CTL1 function
DB with the counter data
Manual, 05/2011, A5E03648639-01
FM 350-1 Counter module

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents