December 2001 PLC Program Example 7 – 55
34 *+---------------------------------------------------+
35 *| Define PLC outputs |
36 *+---------------------------------------------------+
37 *
38 #type
O0 39 O_1_axis_enable O0
O1 40 O_2_axis_enable O1
O2 41 O_3_axis_enable O2
O3 42 O_4_axis_enable O3
O4 43 O_5_axis_enable O4
44
O7 45 O_1_clamping O7
O8 46 O_2_clamping O8
O9 47 O_3_clamping O9
O10 48 O_4_clamping O10
O11 49 O_5_clamping O11
50
O15 51 O_Spindle_servo_enable O15
52
M991 53 /c O_Gear_Range_1 M &I_gear_range_1
M990 54 /c O_Gear_Range_2 M &I_gear_range_2
30 #else
31 #define /g GLB_IO.Def
32 #endif
33
34
35 *+----------------------------------------------------+
36 *| list of include files |
37 *+----------------------------------------------------+
38
39 #ifdef $280470$
40 USES Initi470.Src
41 #else
42 USES Initi472.Src
43 #endif
44 EXTERN initialization
45
46 USES M_Funct.Src
47 EXTERN M_Function
48
49 USES Ref_Endl.Src
50 EXTERN reference_endswitch
51
52 USES DircBut.Src
53 EXTERN Manuel_button_funcktion
54
55 USES Axis.Src
56 EXTERN NC_Axis
57
58 USES Spindle.Src
59 EXTERN spindle_function
60
61 USES Gear.Src
62 EXTERN Gear_Changing
63
64 USES HelpDiag.Src
65 EXTERN Axis_Supervision
66
67 Uses Softkeys.Src
68 Extern PLC_Soft_keys
69
70 *+----------------------------------------------------+
71 *| PLC-program |
72 *+----------------------------------------------------+
73
74 #ifdef First_PL
0 PS K0 75 PS K+0
1 CM 9002 76 CM 9002
2 L M4203 77 L NP_M4203_error_Modul_9xxx
3 S M4801 78 S PN_error_mod_9002
79 #endif
80
5 L M4172 81 L NP_M4172_1_PLC_after_power_on
6 O M4173 82 O NP_M4172_1_PLC_after_compile
7 O M4174 83 O NP_M4172_1_PLC_after_MP_edit
8 CMT INITIALIZATION 84 CMT initialization
85
10 CM M_FUNCTION 86 CM M_Function
87
PLC program example