show the entry list
Industrial Ethernet S7-300/400 CPs -- Configuring and programming communication -- Using communication blocks
How do you enable the ad-hoc mode when you call the TRCV instruction?
How do you use the blocks for MODBUS/TCP communication over an Industrial Ethernet CP of S7-300 and S7-400 in STEP 7 Professional (TIA Portal)?
How do you copy the CFC chart "Modbus" from the sample project for OPEN MODBUS / TCP into your user project?
What is the difference between the initialization and runtime parameters on the blocks for Modbus TCP?
Why is the status value A090 (hex) output for Modbus TCP although you have entered the correct license?
What are the differences between the licensed version and the downloadable demo version of the blocks for Modbus TCP?
Why is the value A083 (hex) output permanently at the STATUS output parameter of the block for Modbus TCP when the ENQ_ENR=true input parameter has been set?
How is data with variable message length transferred via the TCP protocol and received by an S7-300 station via the Industrial Ethernet CP?
How do you program the function blocks FB14 "GET" and FB15 "PUT" in the S7 program of the S7-300 in order to transfer more than 160 bytes of data?
Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC S7 modules via Industrial Ethernet using the UDP protocol?
Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC S7 modules via Industrial Ethernet using the TCP protocol?
Where can you find sample programs and documentation for communication from SIMATIC S5 modules to SIMATIC S7 modules via Industrial Ethernet using the ISO transport protocol?
How do you program the FC10 "AG_CNTRL"?
Which commands (CMD) of the FC10 "AG_CNTRL" are supported by the IE CPs?
How many communication jobs may be used simultaneously in an S7-300 CPU for S7 communication via a CP343-1?
Which ports are released for Modbus/TCP communication and how many Modbus clients can communicate with a SIMATIC S7 CPU as Modbus server?
Notes on using an instance for multiple connection IDs
Internal call of FC5 (AG_SEND) with FTP client blocks (FC 40-44) for the CP343-1 IT (6GK7 343-1GX11-0XE0)
How do you program the communication blocks FB63 "TSEND", FB64 "TRECV", FB65 "TCON" and FB66 "TDISCON" in order to use the ISO-on-TCP protocol for data exchange by way of the integrated PROFINET interface of a CPU or by way of the CP443-1 Advanced?
How do you program communication blocks FC11 and FC12 for the PROFINET IO device?
Block calls for communications processors in multiple runtime layers
Changing the input parameter of the user blocks "AG_SEND" and "AG_RECV" during the runtime of a job
What should you watch out for if you transfer variables with the data type "REAL" when calling the communication blocks FC5/50 "AG_SEND/AG_LSEND" and FC6/60 "AG_RCV/AG_LRCV"?
What should you pay attention to when using the communication blocks FC53 "AG_SSEND" and FC63 "AG_SRECV"?
What points do you need to remember when calling communication blocks FC5/50 and FC6/60 in the STEP 7 user program of the CPU?
How do you program communication blocks FC11 and FC12 for the PROFINET IO controller?
How do you establish OPEN MODBUS / TCP communication from a SIMATIC S7 and where can you find further information?
How do you program the communication blocks FC50 and FC60?
Error STATUS "0x7000" on function block FC6 / FC60 (AG_SEND) with Send/Receive communication on the S7-400 controller
How do you program the communication blocks FC5 and FC6?
Sample program: S7 communication with the blocks SFB14 ("GET") and SFB15 ("PUT") with S7-400
Sample Program: S7 Communication with blocks FB14 ("GET") und FB15 ("PUT") of the CPU 317-2PN/DP
How do you program communication blocks FB8 "USEND" and FB9 "URCV" for data exchange on the S7-300?
"STATUS = 27" (0x001B) with the loadable S7 communication on the S7-300
How do you program communication blocks FB14 "GET" and FB15 "PUT" for data exchange in the S7 program of an S7-300 CPU?
How do you program communication blocks FB12 "BSEND" and FB13 "BRCV" for data exchange in the S7 program of an S7-300 CPU?
Repeating the "BSEND" job (SFB12) when the "BRCV" block (SFB13) is in the "disabled" state ("EN_R = 0")
How do you program the FC10 "AG_CNTRL"?
Part number:

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.

 Entry ID:22637440   Date:2010-02-19 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Topics
Help
Online Help
Guided Tour