kazTwinCAT 中PLC 编程ST 常⽤功能块的总结
1.前⾔ 使⽤软最好是多创建action,这样编程⽐较清晰,主程序⾥代码⽐较少,实现语⾔我推荐使⽤结构化⽂本(ST)。
2.常⽤功能块①.power VAR:
action:
②.stop
VAR:日语发音词典
action:
③.ret
VAR:
action:power1 : mc_power;power_do : BOOL;
1
2power1( Axis:=axis1 , Enable:=power_do , Enable_Positive:= , Enable_Negative:= , Override:= , BufferMode:= , Options:= , Status=> , Busy=> , Active=> , Error=> , ErrorID=> );1
2
3
45
6
7
8
9
10
11
12
13stop1 : MC_Stop;stop_do : BOOL;
12
stop1( Axis:=axis1 , Execute:=stop_do , Deceleration:= , Jerk:= , Options:= , Done=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> );1
2
34
5
6
7
8
9
10
11
12ret1 :mc_ret;ret_do: BOOL;
1
2
④.jog
VAR:
action:
⑤.move_relative VAR:
action:
⑥.move_absolute VAR:ret1( Axis:=axis1 , Execute:=ret_do , Done=> , Busy=> , Error=> , ErrorID=> );1
2
3
45
6
7
jog1 : MC_Jog;jog_forward,jog_backward : BOOL;1
2jog1( Axis:=axis1 , JogForward:=jog_forward , JogBackwards:=jog_backward , Mode:= , Position:= , Velocity:= , Acceleration:= , Deceleration:= , Jerk:= , Done=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> );1
2
3
45
6
7
8
9
工程英语翻译10
11
12
13
14
15
16move_r1 : MC_MoveRelative;mover_do : BOOL;1
2move_r1( Axis:=axis1 , Execute:=mover_do , Distance:=10000 , Velocity:=100 , Acceleration:= , Deceleration:= , Jerk:= , BufferMode:= , Options:= , Done=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> );1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
action:
⑦.
VAR:
action:
⑧.gear VAR:move_a1: MC_MoveAbsolute;movea_do;1
2move_a1( Axis:=axis1 , Execute:=movea_do , Position:=0 , Velocity:=100 , Acceleration:= , Deceleration:= , Jerk:= , BufferMode:= , Options:= , Done=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> );1
23
4
5
6
7
8
9
10
11
12
13
14
15
16
camin : mc_camin;camout : mc_camout;camin_do: BOOL;camin_out: BOOL;1
2
3
4camin( Master:=axis1 , Slave:=axis2 , Execute:=camin_do , MasterOfft:= , SlaveOfft:= , MasterScaling:= , SlaveScaling:= , StartMode:= , CamTableID:=1 , BufferMode:= , Options:= , InSync=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> );camout( Slave:=axis2, Execute:=camout_do , Options:= , Done=> , Busy=> , Error=> , ErrorID=> );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
action:
⑨.tposition VAR:
action:
⑩.home VAR:
action:gearin2 : MC_GearIn;gearout2 : MC_GearOut;greain_do: BOOL;gearout_do: BOOL;1
2
3
4gearin2( Master:=axis1 , Slave:=axis2 , Execute:=greain_do , RatioNumerator:= 1, RatioD
jeremy什么意思enominator:= 1, Acceleration:= , Deceleration:= , Jerk:= , BufferMode:= , Options:= , InGear=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> );gearout2( Slave:=axis2 , Execute:=gearout_do , Options:= , Done=> , Busy=> , Error=> , ErrorID=> );1
2
34
5
6
7
8
9
10
75gao
11
12
deeplove13
14
15
16
17
18
19
20
21
features
22
23
24
25tpos1: mc_tposition;t _do :BOOL;1
2
tpos1( Axis :=axis1 , Execute:=t_do , Position :=0 , Mode := , Options := , Done=> , Busy=> , Error=> , ErrorID=> );1
2
3
4
5
6
7
8
9
10home1 : mc_home;home_do : BOOL;nsor : BOOL;1
2
拳头产品3
home( Axis:=axis1 , Execute:=home_do , Position:= , HomingMode:= , BufferMode:= , Options:= , bCalibrationCam:=nsor , Done=> , Busy=> , Active=> , CommandAborted=> , Error=> , ErrorID=> );1234567891011121314