Interface to the User Program in the S7-200 CPU

2.5Access to the Analog Input and Output Words

Principle

Using a bank-select mechanism, the 8 analog input words and the 8 analog output words can be switched to 64 different analog input areas (banks) and 64 different analog output areas (banks) on the CP 243-2.

Each of these banks is 8 words long.

Advantage

This bank-select mechanism has the advantage that the analog data area of 8 words available for the expansion module is increased according to the number of banks.

Access in the User Program

The switchover to the various banks is made using bits BS0±BS5 in the control byte of the CP 243-2 (see Section 2.3.4).

The bank select bits are binary coded and select banks as shown below:

BS5

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

BS4

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

1

1

1

1

1

1

1

BS3

BS2

BS1

BS0

 

 

 

 

 

 

0

0

0

0

 

0

0

0

1

 

 

0

0

1

0

 

 

0

0

1

1

 

 

0

1

0

0

 

 

0

1

0

1

 

 

0

1

1

0

 

 

0

1

1

1

 

 

1

0

0

0

 

 

1

0

0

1

 

 

1

0

1

0

 

 

1

0

1

1

 

 

1

1

0

0

 

 

1

1

0

1

 

 

1

1

1

0

 

 

1

1

1

1

 

 

0

0

0

0

 

 

0

0

0

1

 

 

0

0

1

0

 

 

0

0

1

1

 

 

0

1

0

0

 

 

0

1

0

1

 

 

0

1

1

0

 

 

0

1

1

1

 

 

1

0

0

0

 

 

1

0

0

1

 

 

 

 

 

 

Bank No.

Bank 0 selected Bank 1 selected Bank 2 selected Bank 3 selected Bank 4 selected Bank 5 selected Bank 6 selected Bank 7 selected Bank 8 selected Bank 9 selected Bank 10 selected Bank 11 selected Bank 12 selected Bank 13 selected Bank 14 selected Bank 15 selected Bank 16 selected Bank 17 selected Bank 18 selected Bank 19 selected Bank 20 selected Bank 21 selected Bank 22 selected Bank 23 selected Bank 24 selected Bank 25 selected

2-16

SIMATIC NET CP 243-2 AS-i Master

C79000-G8976-C142/02

Page 42
Image 42
Siemens CP 243-2 Access to the Analog Input and Output Words, Principle, Advantage, Access in the User Program, Bank No