|
D := TEST(1.3, 3.4); (* sample calling program, here C will default to 3.14 *) E := TEST(1.3, 3.4, 6.28); (* here C will be given a new value *) ....
FUNCTION TEST : REAL VAR_INPUT A, B : REAL; C : REAL := 3.14159; END VAR TEST := (A + B) / C;
END_FUNCTION
Figure 19.23 Declaration of a Function
19.3 SUMMARY
plc st -19.20
1. PRACTICE PROBLEMS
2. PRACTICE PROBLEM SOLUTIONS
1. ASSIGNMENT PROBLEMS
2. 1. Write logic for a traffic light controller using structured text.
3. SEQUENTIAL FUNCTION CHARTS
plc sfc -20.1
Topics:
* Describing process control SFCs
* Conversion of SFCs to ladder logic
Objectives:
* Learn to recognize parallel control problems.
* Be able to develop SFCs for a process.
* Be able to convert SFCs to ladder logic.
20.1 INTRODUCTION
All of the previous methods are well suited to processes that have a single state active at any one time. This is adequate for simpler machines and processes, but more complex machines are designed perform simultaneous operations. This requires a controller that is capable of concurrent processing -this means more than one state will be active at any one time. This could be achieved with multiple state diagrams, or with more mature techniques such as Sequential Function Charts.
Sequential Function Charts (SFCs) are a graphical technique for writing concurrent control programs. BACK | NEXT Easy Access To All Pages 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|