The text of a manual · part 41 of 50
Festo Software Tools: Statement list and Ladder diagram for SF 3, FST 200 Manual, pages 401 to 410
Pages 401 to 410 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 401
FST 200-STL
Appendix A
One-bit expression:
LOAD
Multi-bit comparison
Bit assignment
EXOR expression
Bit assignment
AND OR EXOR
Bit-assignment:
9610a
TO
Settable bit operand
SHIFT
Output Flag
A-15
Page 402
FST 200-STL
Appendix A
Multi-bit expression:
SI
LOAD
Base term
Word assignment
* / + AND OR EXOR
SI (specific information):
BID DEB CPL INV ROL ROR SHL SHR SWAP
A-16
9610a
Page 403
FST 200-STL
Appendix A
Word assignment:
TO
Output word Flag word Counter word Counter preselection Register Function unit Error word Timer word Timer preselection
INC
Operand reference Flag word Register Counter word Counter preselection Timer word Timer preselection Counter
Count command:
DEC
Module call:
CFM
Module number
WITH
Word operand
CMP
9610a
A-17
Page 404
FST 200-STL
Appendix A
Word operand:
Operand reference Input word Output word Flag word Timer word Timer preselection Counter word Counter preselection Register Function unit Error word Constant
Settable bit operand:
Operand reference Output Flag Timer function Counter
Timer function (only compiler version):
Timer WITH
A-18
Time specification: 0-655.35 s, with a maximum of 2 decimal places
9610a
Page 405
FST 200-STL
A.4
Appendix A
Sample program This sample program allows you to follow the input of a statement list program. When you have finished, print it out, load it in the controller and test it out using the statement list status indicator.
The following control program is only partly suited for a real-life application. Only seven inputs have been used to prevent it from becoming too complex. Furthermore, some of the necessary functions have been summarized or simply assigned appropriate default values. A.4.1 Structure of the control program The example program consists of two STL programs: • A program for controlling the process (P0) with - Initialization - Branching (set-up or automatic mode) - Automatic mode program - Set-up program, • A program for EMERGENCY-STOP monitoring (P7). The process represented is a simplified drilling device.
9610a
A-19
Page 406
FST 200-STL
Appendix A
A.4.2 Process control (P0) Initialization (step 1) This sets the flashing frequency for the EMERGENCYSTOP indicator (0.5 sec) and the counter preselection for the number of workpieces (10). At the same time, the display of the counter reading is reset to 0, the flag for workpiece present is set and the monitoring program activated. Process control and monitoring program will now run in pseudoparallel operation, i.e. multitasking will occur. Branch Set-up - Automatic mode (step 2) This step causes the program to branch. The program branches and continues execution at step 20 or step 10 depending on the position of the Set-up - Automatic mode switch. The program halts at this step if the EMERGENCY OFF switch has been operated. Automatic mode program (step 10-14) Feed and ejection of the workpiece are replaced by the assumption that a workpiece is present. If the Start switch is pressed (in step 2), the clamping cylinder extends to grip the workpiece. Once the clamping cylinder has reached its end position, the drilling device is advanced in simplified representation. (Caution, this is a double-acting cylinder). Once it has reached its end position, it returns immediately to its normal position. The counter value of the counter for the number of pieces will be incremented by one. The clamping cylinder now also returns to its start position. The procedure begins from the start again, until ten workpieces have been machined. In this case, initialization is called again.
A-20
9610a
Page 407
FST 200-STL
Appendix A
Set-up program (step 20 - 21) The Set-up program returns the machine to its normal position and clears the Start and Automatic mode displays. The system is then re-initialized. A.4.3 Monitoring program This program checks whether or not the EMERGENCYSTOP button has been pressed during each task. In the event of an EMERGENCY STOP, the flash output is activated by having its content continuously negated. A second output indicates the EMERGENCY-STOP condition by a steady light. You may now decide from the branch, whether the process (P0) should be run again from the start or whether the process should continue at the point of interruption.
9610a
A-21
Page 408
FST 200-STL
A.5
Appendix A
Allocation listing The allocation listing shows the assignment of the control and display elements to the inputs and outputs. O0.0 O0.1 O0.2 O0.3 O0.4 O0.5 O0.6 O0.7 I0.0 I0.1 I0.2 I0.3 I0.4 I0.5 I0.6 I0.7 F0.0 P0 P7 T0 TP0 C0 CP0 CW0
A-22
Start indicator AUTOMATIC indicator EMERGENCY-STOP indicator Flash output for EMERGENCY STOP Clamping cylinder (0=retracted) Drilling device retract Drilling device advance 1=Set-up / 0=Automatic mode Start button EMERGENCY STOP button (0=pressed) Retract clamping cylinder Extend clamping cylinder Drilling operation normal position Drilling operation end position 1=Workpiece present Process Monitoring Flash frequency Lamp on time Counter for number of pieces Number of pieces default Number of pieces monitoring
9610a
Page 409
FST 200-STL
A.6
Appendix A
Program listing Process (P0)
0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034
Step 1 IF THEN
LOAD TO LOAD TO SET LOAD TO SET SET
(1) NOP V50 TP0 V10 CP0 C0 CW0 OW1 F0.0 P7
"Initialization
’Lamp on time ’Number of pieces default ’Counter for number of pieces ’Number of pieces monitoring "Counter reading display ’1=Workpiece present ’EMERGENCY STOP monitoring
===================================== Step 2 (2) "Branch (Set-up - Automatic mode) THEN RESET O0.0 ’Start display RESET O0.1 ’Automatic mode display IF I0.0 ’1=Set-up / 0=Automatic mode AND I0.1 ’Start button AND N O0.2 ’EMERGENCY STOP display THEN SET O0.0 ’Start display JMP TO 20 IF N I0.0 ’1=Set-up / 0=Automatic mode AND I0.1 ’Start button AND N O0.2 ’EMERGENCY STOP display THEN SET O0.0 ’Start display SET O0.1 ’Automatic mode display JMP TO 10 ===================================== Step 10 (3) "Automatic mode program IF O0.2 ’EMERGENCY STOP display THEN JMP TO 2 IF F0.0 ’Start button AND N O0.2 ’EMERGENCY STOP display THEN SET O0.5 ’Clamping cylinder (0=retracted) =====================================
9610a
A-23
Page 410
FST 200-STL
0035 0036 0037 0038 0039 0040 0041 0042
Step 11 IF THEN IF THEN
Appendix A
JMP TO AND N RESET SET
(4) O0.2 2 I0.4 O0.2 O0.6 O0.7
’EMERGENCY STOP display ’Clamping cylinder extended ’EMERGENCY STOP display ’Drilling device retracted ’Advance drilling device
===================================== 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069
A-24
Step 12 IF THEN IF THEN
JMP TO AND N RESET SET CP LOAD TO
(5) O0.2 2 I0.6 O0.2 O0.7 O0.6 C0 CW0 OW1
’EMERGENCY STOP display ’Drilling process end position ’EMERGENCY STOP display ’Drilling device advance ’Retract drilling device ’Counter for number of pieces ’Number of pieces monitoring
===================================== Step 13 (6) IF O0.2 ’EMERGENCY STOP display THEN JMP TO 2 IF I0.5 ’Drilling process normal position AND N O0.2 ’EMERGENCY STOP display THEN RESET O0.5 ’Clamping cylinder (0=retracted) ===================================== Step 14 (7) IF O0.2 ’EMERGENCY STOP display THEN JMP TO 2 IF I0.3 ’Clamping cylinder retracted AND F0.0 ’1=Workpiece present AND N O0.2 ’EMERGENCY STOP display AND C0 ’Counter for number of pieces THEN JMP TO 10 IF N C0 ’Counter for number of pieces
9610a