3.4 Sample Program 3: Phase Control with an Electronic Shaft
3-53
3
3.4.3 Program Details
(1) H06.01 Drawing
The H06.01 grandchild drawing controls phase control (electronic shaft) operation.
メインプログラム 位置制御1(電子シャフト)処理
P00118 H06.01
########## 位置制御1(電子シャフト)処理 ##########
########## 電子シャフト運転指令 ##########
0000
NL-1
0000
電子シャフト起動PB
DB000010
STORE
1軸モーションコマンド
Source 00025
Dest OW8008
WORK
DB000050
2軸SV_ON中
IB80801
電子シャフト開始
DB000001
電子シャフト停止
DB000002
ゼロ速
DB000003
電子シャフト開始
DB000001
0009
NL-1
0002
0013
NL-1
0003
0015
NL-1
0004
0017
NL-1
0005
0019
NL-1
0006
0021
NL-1
0007
0022
NL-1
0008
0024
NL-1
0009
STORE
2軸モーションコマンド
Source 00025
Dest OW8088
STORE
1軸モーションコマンド
Source 00000
Dest OW8008
STORE
2軸モーションコマンド
Source 00000
Dest OW8088
電子シャフト停止
DB000002
0004
NL-1
0001
########## モーションコマンド発行 ##########
モーションコマンド:25〔位相制御〕設定
1軸SV_ON中
IB80001
電子シャフト運転指令
DB000000
電子シャフト運転指令
DB000000
1軸目モーションコマンド0
DB000010
1軸目モーションコマンド0
DB000018
電子シャフト運転指令
DB000000
WORK
DB000050
電子シャフト開始
DB000001
モーションコマンド:0〔NOP〕設定
########## S字加減パラメータ設定 ##########
########## 電子シャフト運転速度設定切替シーケンス ##########
電子シャフト速度設定
電子シャフト停止
DB000002
EXPRESSION
S字加減パラメータ設定
DB000200 =true;
DB000201 =true;
DB00022 =30000.0;
DB00024 =0.1;
DB00026 =0.1;
DB00030 =0.01;
DB00032 =0.01;
速度指令単位に倍長整数型レジスタを使用する。この為、直線加減速指令2(SLAU:S字加減速器)命令の実数型を適用する。
電子シャフト運転指令
DB000000
電子シャフト運転指令
DB000000
STORE
S字加減速器入力
Source DL00010
Dest DF00012
STORE
S字加減速器入力
Source 0.000
Dest DF00012
Main Program Phase Control 1 (Electronic Shaft)
##########Electronic Shaft Operation Command##########
Electronic shaft startup PB
Axis 1 motion command 0
S-curve accelerator/decelerator input
Phase Control 1 (Electronic Shaft)
Axis 1 SV_ON
Electronic shaft operation command
Axis 1 motion command
Electronic shaft opera-
tion command
Electronic shaft start
Motion command 0 (NOP) setting
Zero speed
Electronic shaft stop
Electronic shaft operation command
S-curve acceleration/deceleration setting
Axis 2 SV_ON
Axis 1 motion command 0
Electronic shaft opera-
tion command
Motion Command Issued
Motion command 25 (phase control) setting
Electronic shaft start
Axis 2 motion command
Electronic shaft stop
Axis 1 motion command
Axis 2 motion command
Electronic shaft stop
S-curve Acceleration/deceleration Setting
Electronic Shaft Operation Speed Setting Switching Sequence
A double-length integer register is used for speed reference unit. Therefore, a real number is used for the linear accelerator/decelerator 2 (SLAU: S-curve accelerator/decelerator) instruction.
Electronic shaft speed setting
Electronic shaft opera-
tion command
S-curve accelerator/decelerator input
Electronic shaft start
DB000200 =true;
DB000201 =true;
DF00022 =30000.0;
DF00024 =0.1;
DF00026 =0.1;
DF00030 =0.01;
DF00032 =0.01;