Detailed description2.14 Programming tips with STEP 7Basic logic functions: PLC basic program solution line (P3 sl)256 Function Manual, 11/2006, 6FC5397-0BP10-2BA0FUNCTION FC 99: VOID CommentT #typ;L W [AR1,P#2.0]; //Retrieve amountT #Amount;L W [AR1,P#4.0]; //Retrieve DB numberT #dbchr;L D [AR1,P#6.0]; //Offset part of pointerLAR1 ;OPEN DB [#dbchr]; //Open DB of variablesL B [AR1,P#0.0]; //Retrieve byte value using ANY2.14.3.3 Use of POINTER and ANY in FB if POINTER or ANY is available as parameterDescription of FunctionsFB 99 has inputs parameters that are defined as POINTER or ANY.The example shows a body program via which the subcomponents of the POINTER or ANYcan be accessed. In this case, the DB parameterized with POINTER or ANY is opened andthe address offset stored as a crossarea pointer in address register AR1, thus allowingaccess to data elements of variables (generally structures and arrays) that are addressed viathe POINTER, ANY.This access operation is described at the end of the relevant program sequence in theexample. With data type ANY, it is also possible to execute a check or branch when thevariable is accessed based on the data type and the number of elements involved.Example in FB, if POINTER or ANY are present as parametersFUNCTIONBLOCK FB 99 CommentVAR_INPUTRow : BYTE ;Convert : BOOL ; //Activate numerical conversionAddr: POINTER; //Points to variableAddr1 : ANY ;END_VARVAR_TEMPdbchr : WORD ;Number: WORD ;type : BYTE ;END_VARBEGINNETWORKTITLE =//POINTER