ANY-parameter type

ivo.maenen

Member
Join Date
Nov 2003
Posts
663
Can somebody give me a clue what his type is about because I can't find any usefull help from Siemens.
 
It's something very similar to when you get the message 'Press any key' on your computer.

Kind regards,
 
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

clipboard01.jpg
 
Last edited:
Now I finally found your help-file. Just a matter of downloading the right manual.One out of many if I can say...
 
No, not quite. Just a case of running the STEP7 menu item 'Help' (I think this appears in some other Windows software as well - it shouldn't be too hard to find) and then doing a search for, oh let me see, try "Any".

Oh, and let's just check out our hard disk. Why, yes! There they are. When you install STEP7, you get all those manuals installed at the same time. There's even a folder full of shortcuts to them called, well I guess it's a bit obscure, "Documentation". And a link to this is in your Start menu.

Poor old Siemens, they've really made it hard for you.

Ken
 

Similar Topics

Good Morning , I know it has been a lot of discussion about the Wall Clock in ControlLogix. I have been looking at the sample program, and...
Replies
6
Views
6,143
Dear friends, The attached picture contains the part of a sample program that confuses me. Input parameter RECV_BUF is an ANY TYPE pointer, and in...
Replies
2
Views
1,810
Hi to all, I'd like to know if is possible and how to write the right data format in the input parameter SRCBLK of SFC20. I know how use the...
Replies
9
Views
5,231
Hello I have problem for using S7 Self Tuning. the output of "TUN_EC" about TI and TD are Time Type but Inputs of modular PID about TI and TD are...
Replies
0
Views
3,010
Hi is it possible to use strings as in/out parameters for an FC block in S7. i am trying to make an FC that searches for a specific code in a...
Replies
2
Views
3,666
Back
Top Bottom