Command Interface

A command started by the CP 243-2 is executed completely regardless of the state of the ASI_COM bit.

The ASI_RESP bit is only reset by the CP 243-2 when the user program has set the ASI_COM bit to ª0º.

Example

The following example in STL applies to a CPU 222 with a CP 243-2 plugged in directly beside it:

The example shows the sequence of the Read_Lists_and_Flags command. Command execution is triggered by the positive edge at input 0.0.

To simplify matters, 224 bytes are always transferred to the CP 243-2 in these examples. When the response is read in from the CP 243-2, 224 bytes are also transferred. This allows each command to be processed regardless of its length.

Table 5-1

OB1 (STL)

 

NETWORK 1

 

 

LD

SM0.1

//If: bit ªFirst Scanº:

 

SI

Q1.7, 1

//PLC_RUN = 1

 

RI

Q.0, 6

//select bank 0

 

LD

I1.1

//If: CP_READY

 

MOVW

16#3000, VW700

//Enter code ªRead_extended_listsº

 

CALL

3

//Then: SBR 3

 

Table 5-2

 

 

 

SBR 3 (STL)

NETWORK 1

//Transfer the command data

LD

I0.0

//If trigger bit

EU

 

//pos. edge

AN

Q1.6

//ASI_COM

AN

I1.6

//ASI_RESP

RI

Q1.0, 6

//Select bank 2

SI

Q1.1, 1

//Select bank 2

BMW VW700, AQW0, 8

//V memory ±> bank

SI

Q1.0, 1

//Select bank 3

BMW VW716, AQW0, 8

//V memory ±> bank

RI

Q1.0, 2

//Select bank 4

SI

Q1.2, 1

//Select bank 4

BMW VW732, AQW0, 8

//V memory ±> bank

5-4

SIMATIC NET CP 243-2 AS-i Master

C79000-G8976-C142/02

Page 72
Image 72
Siemens CP 243-2 installation instructions Example, SBR 3 STL