Cut from the Step7 help file
Format of the Parameter Type ANY
STEP 7 stores the parameter type ANY in 10 bytes. When constructing a parameter of the type ANY, you must ensure that all 10 bytes are occupied because the called block evaluates the whole contents of the parameter. If, for example, you specify a DB number in byte 4, you must also explicitly specify the memory area in byte 6.
STEP 7 manages the data of elementary and complex data types differently from the data for parameter types.
ANY Format for Data Types
For elementary and complex data types STEP 7 stores the following data:
Data types
Repetition factor
DB number
Memory area in which the information is stored
Start address of the data
The repetition factor identifies a quantity of the indicated data type to be transferred by the parameter type ANY. This means you can specify a data area and also use arrays and structures in conjunction with the parameter type ANY. STEP 7 identifies arrays and structures as a number (with the help of the repetition factor) of data types. If, for example, 10 words are to be transferred, the value 10 must be entered for the repetition factor and the value 04 must be entered for the data type.
The address is stored in the format Byte.Bit where the byte address is stored in bits 0 to 2 of byte 7, in bits 0 to 7 of byte 8, and in bits 3 to 7 of byte 9. The bit address is stored in bits 0 to 2 of byte 9.
With a null pointer of the type NIL all bytes from byte 1 are assigned 0.
So basically you declare the any variable in the following way if you want 5 bools starting at DB6.dbx0.0
P#DB6.DBX 0.0 BOOL 5
Or in this way if you want 5 word's starting at MW 6
P#M 6.0 WORD 5