Entry type: FAQ, Entry ID: 22637440, Entry date: 02/19/2010
(0)
Rate

How do you program the FC10 "AG_CNTRL"?

  • Entry
  • Associated product(s)

Requirements
The FC10 "AG_CNTRL" is supported by the following Industrial Ethernet CPs.
 

Order number Firmware version Entry ID
CP343-1
6GK7343-1EX21-0XE0 as of V1.0.17 Delivery release: 20750998
Manual: 22259495
6GK7343-1EX30-0XE0 as of V2.0.16 Manual: 24485272
CP343-1 Lean
6GK7343-1CX10-0XE0 as of V2.1 Firmware update V2.1: 32599720
Manual: 23643456
CP343-1 Advanced
6GK7343-1GX21-0XE0 as of V1.0.24 Delivery release: 22037563
Manual: 22261695
6GK7343-1GX30-0XE0 as of V1.0.23 Manual: 28017299
CP443-1
6GK7443-1EX20-0XE0 as of V1.0.26 Delivery release: 26685738
Manual: 27013386
CP443-1 Advanced
6GK7443-1EX40-0XE0 as of V2.2 Firmware update: V2.2: 22008900
6GK7443-1EX41-0XE0 as of V1.0.24 Manual: 23643789
6GK7443-1GX20-0XE0 as of V2.0 Manual: 28011203

Instructions
The block FC10 "AG_CNTRL" is included in the current SIMATIC_NET_CP library. The current library is available for downloading in Entry ID: 9061353. In this entry there is also a description of how to install the library correctly.

If you have installed SIMATIC_NET_CP library, then open the library in the SIMATIC Manager via the menu "File > Open".

You will find the FC10 for the S7-300 in the SIMATIC_NET_CP library under "CP 300 > Blocks".
You will find the FC10 for the S7-400 in the SIMATIC_NET_CP library under "CP 400 > Blocks".

Copy the FC10 "AG_CNTRL" from the SIMATIC_NET_CP library and insert it in your S7 program.

The FC10 "AG_CNTRL" block has 4 input parameters.
 

Input parameters Description
ACT Activation of the block
ID Connection number

Note
The connection number is to be taken from the configuration in NetPro.

LADDR Module starting address

Note
The module starting address is to be taken from the Hardware Configuration.

CMD Command to the FC10 "AG_CNTRL"

The FC10 "AG_CNTRL" block has 5 output parameters.
 

Output parameters Description
DONE The state parameter indicates that the order has been executed error-free.
ERROR Error display
STATUS Status display
RESULT1 Feedback according to command to the FC10 "AG_CNTRL"
RESULT2 Feedback Part 2 according to command to the FC10 "AG_CNTRL"

Note
Output parameter RESULT2 is evaluated only for S7-400.

The figure below illustrates a sample call for the FC10:


Fig. 01

The table below contains some calls to the FC10 with various commands:
 

No. Procedure
1

Call with CMD=1 (CN_STATUS - connection status). This command delivers the status of the connection which has been selected with the ID.


Fig. 02

The output parameter RESULT1 has the following value:
0111 0000 0001 0111 (bin)

The value of output parameter RESULT1 is evaluated bit by bit.

Bit 0 - 3: Displays for Send direction

  • Connection reserved for Send and Receive jobs
  • Send job being processed
  • Previous Send job completed positively

Bit 4 - 7: Displays for Receive direction

  • Connection reserved for Send and Receive jobs
  • No Receive job being processed
  • No information available on the previous Receive job

Bit 8 - 11: Displays for FETCH/WRITE

  • No FETCH connection
  • No WRITE connection
  • Job status OK
  • No job running

Bit 12 - 15: General CP information

  • Connection is established
  • CP in RUN
  • The FC10 has not yet made a connection reset or the reset ID has been canceled.

Bit 16 - 31: Reserved for later extensions

2

Call with CMD=2 (CN_RESET - connection reset). This command resets the connection which has been selected with the ID.


Fig. 03

The output parameter RESULT1 has the following value:
0000 0001 (hex), i.e. the Reset job has been transferred successfully to the CP

In order to test the connection abort, another request is now executed straight away with CMD=1.


Fig. 04

The output parameter RESULT1 now has the following value:
0100 0000 0001 1001 (bin)

The value of output parameter RESULT1 is evaluated bit by bit.

Bit 0 - 3: Displays for Send direction

  • Connection reserved for Send and Receive jobs
  • No Send job being processed
  • Previous Send job completed negatively

Bit 4 - 7: Displays for Receive direction

  • Connection reserved for Send and Receive jobs
  • No Receive job being processed
  • No information available on the previous Receive job

Bit 8 - 11: Displays for FETCH/WRITE

  • No FETCH connection
  • No WRITE connection
  • Job status OK
  • No job running

Bit 12 - 15: General CP information

  • Connection has been disconnected
  • CP in RUN
  • The FC10 has not yet made a connection reset or the reset ID has been canceled.

Bit 16 - 31: Reserved for later extensions

3 Call with CMD=3 (CN_STATUS_ALL - all connections status). This command supplies the status for all connections (established/disconnected) in the RESULT1/2 parameters (a total of 8 bytes of group information). The parameter ID must be set to "0" (is checked for 0).


Fig. 05

The output parameter RESULT1 has the following value:
0111 (bin), i.e. the connections with IDs 1, 2 and 3 are established.

Note

  • All the feedback values supplied are only conclusive if the corresponding SEND/RECEIVE block has been called beforehand for the connection under consideration.
  • You can find the complete description of the block and the evaluation of the parameters in the Online Help for STEP 7, as well as in the manual "Functions (FC) and Function Blocks (FB) for SIMATIC NET S7-CPs Programming Manual". in Entry ID: 30564821.
  • Information on which commands (CMD) the above-mentioned IE CPs support is available in Entry ID: 33414377.

Error details
Detailed error description
Help us to improve Online Support.
The page requested cannot be displayed. Please contact the webmaster.
Contact to webmaster