Chapter 7 Function Block and Library *. The data type of the symbol of the VAR_IN_OUT class in a function block in a project for an AH/AS series PUC module can be POINTER. The caller can send the device address to the function block through the symbol whose data type is POINTER. Please refer to the following section for more information. Please refer to the function blocks below. FB_Var is the pin of the function block, and P_Var is the operand that the superior POU (caller) assigns to FB_Var. The data type of P_Var and that of FB_Var must conform to the basic principle described below.
However, in order to make the writing of a program more convenient, ISPSoft provides some special principles. As long as the data type of P_Var and that of FB_Var conform to one of the special principles, the system will regard the data types as legal data types even if the data types does not conform to the basic principle. The basic principles below is supported by DVPxxMC and AS5xx series. Basic principle for the general data types The data type of P_Var must be the same as the data type of FB_Var. Special principles for the general data types (Please refer to the following table.) 1.
If either the data type of P_Var or the data type of FB_Var is WORD, DWORD, or LWORD, the data type of the other symbol can be WORD, DWORD, LWORD, INT, DINT, LINT, REAL, or LREAL. If this condition is met, the data length of P_Var can be larger than or equal to the data length of FB_VAR. 2. If the data type of P_Var is STEP, the data type of FB_Var can be BOOL. The state of the step in the caller will be used in the function block. 7-9 Model Types AS/AH/DVP Data type FB Var (function block) _ WORD DWORD LWORD INT DINT LINT REAL LREAL BOOL P VAR _ (caller) WORD DWORD LWORD INT DINT LINT P VAR _ (caller) REAL LREAL BOOL STEP