Entry type: FAQ, Entry ID: 15262983, Entry date: 03/25/2008

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"?

  • Entry
  • Associated product(s)

Configuration Notes:
Make sure when calling the communication blocks FC5/50 "AG SEND/AG_LSEND" and FC6/60 "AG_RCV/AG_LRCV" that only the data type BYTE is in the ANY pointer for the input parameters SEND and RECV.

If, for example, you wish to transfer a variable of the data type "REAL" with FC5 "AG_SEND" and declare the ANY pointer at the "SEND" input parameter as follows:

  •  P#DB1.DBX0.0 Byte 4,

then this ANY pointer is converted by STEP 7 into its symbolic address, i.e. the ANY pointer points to the data type REAL in the data block (DB) specified. The data types BYTE, WORD and DWORD are permitted for the ANY pointer at the "SEND" input parameter. However, the data type REAL is used in this example, i.e. the data to be transferred is not interpreted correctly. The ERROR output parameter of FC5 is set.

Fig. 01: Symbolic name of the ANY pointer

Increase the value of the ANY pointer at the "SEND" input parameter by at least 1 byte to prevent the symbolic display of the ANY pointer.

The declaration now looks like this:

  • P#DB1.DBX0.0 Byte 5

Fig. 02: ANY pointer with a length greater than the value to be sent

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