7 Programming FCs (Functions) and FBs for S7 Ethernet CPs
A-215
S7-CPs for Industrial Ethernet Configuring and Commissioning
Release 01/2007
C79000-G8976-C182-07
7.5 FC 10 AG_CNTRL
How It Works
With the AG_CNTRL function, you can diagnose connections. When necessary,
you can initialize connection establishment again using the FC.
The following actions are possible by setting commands:
Reading out connection information
Based on status information, you can decide whether or not it would be useful
to reset all or individual connections of the CP.
Resetting configured connections
You can reset individual or all connections of a CP.
The commands of the AG_CNTRL function (FC) are permitted only for
SEND/RECV connections based on the ISO / RFC / TCP / UDP protocols.
Call Interface
Call interface in FBD representation
ACT DONE
AG_CNTRL
ID ERROR
STATUS
BOOL
INT
WORD
BOOL
BOOL
RESULT1 DWORDCMDINT
RESULT2 DWORD
LADDRWORD
Example in STL representation
STL Explanation
call fc 10
ACT := M1.0
ID := MW8
LADDR := W#16#100
CMD := MW6
DONE := M20.1
ERROR := M20.2
STATUS := MW22
RESULT1 := MD24
RESULT2 := MD28
//AG_CNTRL block call
//Job triggered by memory bit
//Connection ID acc. to configuration
//=LADDR 256 dec. in hardware configuration
//=Command ID
//Execution code
//Error code
//Status code
//Job result 1
//Job result 2