Download Compiled Math and Lo..
Transcript
• CONFIGURING MATH AND LOGIC • Program Files and Procedures • • P ROGRAM F ILES AND P ROCEDURES Program files consist of one or more procedures. Procedures within a program file can be totally unrelated in functionality as they are individually invoked by the predefined trigger or a function call embedded in another procedure. All procedures within a program must be defined as either IML or CML procedures. The Math and Logic editor, located within the Configuration Explorer environment, is used to create and modify the program files and associated procedures using the C-type programming language standards. If you use another editor, validate the procedures you write with the Math and Logic editor. Program files provide the FactoryLink user the ability to control the interactions FactoryLink tasks. The convention for program file naming is the name must be in lower case and have the .prg extension. Program file names are not referenced in any tables. Note: In FactoryLink versions before the 7.0 release, the program file name matched the eight-character name of a procedure within the program file. This restriction is no longer applicable. All procedures must be listed in the Math and Logic Triggers Information table. If a procedure is not listed in the Math and Logic Triggers table it will never be invoked regardless of the method used to invoke it. The IML task uses this table to locate and load IML procedures. The CML compiling process at startup also uses this table. Procedure names are case sensitive. Ensure that the naming of the procedures is always consistent to avoid errors. As global variables (tags) and triggers are defined they are added to FactoryLink reference lists (see Figure 1-9.) These variables are available to all FactoryLink tasks. Local variables are defined in the procedure, not in any of the tables, are only available to the procedures or program files dependent on the type of declaration. 18 / FactoryLink Task Configuration Reference