Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 16 of 50

Festo Software Tools: Statement list and Ladder diagram for SF 3, FST 200 Manual, pages 151 to 160

Pages 151 to 160 of 496

The original document is the PDF (3.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Festo FPC-202

Page 151

FST 200-STL

4. Programming in the statement list

Fig. 4.13: Calling a function module Here you first press the ENTER key. The default entry is function module no. 0. You may select a different function module by overwriting this. When you press the ENTER key, you will see in this window a module form for the module selected. This includes the module designation and displays the parameters this module requires. If the library file contains no information under the module number specified, you will see the following message in the comment line

Module form not available

9610a

4-55

Page 152

FST 200-STL

4. Programming in the statement list

The structure of the input fields is also shown in Fig. 4.13. Select these fields with the cursor keys. The TAB key will always take you to the next input field. Field: Module designation This field will show the module designation if the module number entered above is valid. Field: Comment This field is provided for you to enter any comment on this module. In this case this would be the comment in the STL program. Field: Parameters In these fields you should enter the parameters that the corresponding function module requires. These parameters may be any operands, or even texts in particular modules (these are known as string parameters, see the relevant description). If you wish to enter a string parameter, you must first select function F2 in the relevant line. The input field then expands to the full width of the window and you are able to enter the string.

4-56

9610a

Page 153

FST 200-STL

4. Programming in the statement list

Field: Parameter designation These fields each show the designation of the particular function parameters. When you enter the individual parameters, you have the opportunity to include the operand last entered in the allocation list. This procedure functions as already described in section 4.2.4.

Including the module call in the STL program Select function F1 once you have entered all the required parameters. The window then disappears and the function module will be included in the STL program. This will cause your input to be inserted in the statement list format after the program line in which the cursor is located. Example: STEP Label IF THEN SET ... IF THEN

NOP ... I1.0 CFM5 WITH V100 WITH FW0 WITH R7

...

9610a

4-57

Page 154

FST 200-STL

4. Programming in the statement list

4.5.2 Program modules (CMPnn) The program modules are subprograms which you can create yourself within the FST software. They are treated like programs and have the same command set as the Festo statement list. Create program module If you wish to write a program module, you must enter a B under Type when you create a new program (see section 4.1.1). This specifies that this new program will be saved to the current project directory as a module. The module number depends on the controller you are using. Please note the following table.

4-58

Controller type

Number of program modules

SF 3

0 to 15

9610a

Page 155

FST 200-STL

4. Programming in the statement list

When you are entering a program, it makes no difference whether you are writing an STL program or a program module. The following details are, however, important, and must be taken into account. • A second program module may not be called from within a program module. • The calling program is halted at the current position while the program module is being processed until the program module processing is completed. • Jump instructions are permitted. They may not, however, generate endless loops. • The program close command PSE may not be entered here (it leads to an endles loop).

9610a

4-59

Page 156

FST 200-STL

4. Programming in the statement list

Parameter passing You may pass parameters to the program module from the calling program. This is done with the WITH instruction, followed by a constant or a multi-bit operand. These module parameters are stored in the special function units (FUs). The following table shows the assignment of the parameters to the special function units and the number of parameters per controller type. Parameter

SF 3

Parameter 1 Parameter 2 Parameter 3 .. Parameter 6 Parameter 7 .. Parameter 16

FU32 FU33 FU 34 .. FU37 FU38 .. FU47

This administration is handled by the controller and there is no need to specify it separately.

4-60

9610a

Page 157

FST 200-STL

4. Programming in the statement list

You should work with these module parameters within the module in place of the operands or constants. Only in this way will your module be universally applicable, and not bound to fixed specifications, such as FW3.

If you only work with the corresponding multi-bit operands inside the module, you will have a fixed assignment and the module may only be applied to a particular case.

9610a

4-61

Page 158

FST 200-STL

4. Programming in the statement list

Calling a program module: A program module is always called within the execution statement of an STL program. The procedure is as described in section 4.5.1. The only difference is that you should overwrite with MP the FM in the CFM item in the first line of the parameter input window. You will then see the following window (see Fig. 4.14).

Fig. 4.14: Calling a program module Field: Number Here you should enter the number of the program module. Make sure that it coincides with the number you entered when you were creating the program module.

4-62

9610a

Page 159

FST 200-STL

4. Programming in the statement list

Field: Comment This field is provided for you to write in any comment you wish for this program module. Field: Parameters You enter the parameters in these fields. These parameters may be any operands, or even texts in particular modules (these are known as string parameters, see the relevant description). You must take account of the sequence you specified at the time of creating the program module when you are entering the parameters. Including the module call in the STL program Select function F1 once you have entered all the required parameters. The window then disappears and the program module will be included in the STL program. This will cause your input to be inserted in the statement list format after the program line in which the cursor is located. Example: STEP Label IF THEN IF THEN

SET OTHRW ... ...

NOP CMP1 I1.0 CMP5 WITH V100 WITH FW0 WITH R7 O1.0

Here program module no. 1 is called without parameters. Program module no. 5 requires three parameters. These are assigned to the special function units as described above.

9610a

4-63

Page 160

FST 200-STL

4.6

4. Programming in the statement list

Allocation list You may create an allocation list for any project. An allocation list lists all the operands which address the controller-specific resources from the user program. It may, thus, contain: • Absolute operands • Symbolic operands • Operand comments. Absolute operands Absolute operands are inputs which address directly the controller hardware specified or the internal operating system (eg: O1.0, T7, etc.). Appendix A.1.2 lists all the absolute operands you can use in your controller with their addresses. Symbolic operands You select symbolic operands according to their task and give them a name such that the function is immediately understandable from its designation (e.g.: MOTOR_ON). The designation of a symbolic operand must differ from that of an absolute operand. The program would identify an absolute operand entered as a symbolic operand as the former.

4-64

9610a