Entry type: FAQ, Entry ID: 15020234, Entry date: 04/15/2003
(0)
Rate

Changing the input parameter of the user blocks "AG_SEND" and "AG_RECV" during the runtime of a job

  • Entry
  • Associated product(s)

QUESTION:
Can the input parameter of user blocks for the send/recieve interface be changed during the runtime of a job?

ANSWER:  
The following description applies to all CPs(communication processor) for the automation system S7-300 and S7-400 which support SEND/RECEIVE communication, a service for transferring user data transparently on the level 4 of the OSI reference model.
The current Industrial Ethernet CPs are:

  • 6GK7 443-1EX11-0XE0 (CP 443-1)
  • 6GK7 443-1GX11-0XE0 (CP 443-1 IT)
  • 6GK7 343-1EX20-0XE0 (CP 343-1)

This applies as well to PROFIBUS-CPs which support equivalent FDL communication.

Calling the user blocks
To send and receive the individual data blocks, a certain function is available:

  • FC5 (AG_SEND): Sending data blocks
  • FC6 (AG_RECV): Receiving data blocks

Calling the blocks in the user program of a S7-CPU further on is displayed in the programming language STL:

Figure 1: FC5 (AG_SEND)

Figure 2: FC6 (AG_RECV)

Instruction
If a job has been started with the first call of the block, the red marked input parameter of the blocks may not be changed until

  • block FC5 answers with DONE = 1 or
  • block FC6 answers with NDR = 1 or
  • one of the blocks answers with ERROR = 1

If this instruction is not andhered to, error messages at the user interface or misleading entries in the diagnose buffer may occur:

Errors that may occur when ignoring the instruction

  • In the S7-300 CPs, at the user interface, there appears the error message 0x80B1 that informs that the indication of length (in the parameter LEN) is wrong. This message will then persist.
  • In the S7-400 CPs, sporadically an entry that informs that the connection number x is out of the permitted range of values will appear in the diagnose buffer.

Both of these behaviours can indicate that the instruction has not been adhered to and therefore the input parameters of the user blocks have been altered at runtime.

Note about "AG_LSEND" and "AG_LRECV":
The described facts apply also to the blocks FC50 (AG_LSEND) and FC60 (AG_LRECV) that must be used in older S7 300 groups and for all S7 400 groups for data lengths of more than 240 byte.

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