Differences between revisions 17 and 33 (spanning 16 versions)
Revision 17 as of 2017-10-05 18:33:30
Size: 1070
Editor: AyakaShoda
Comment:
Revision 33 as of 2017-10-16 12:19:07
Size: 3045
Editor: KousekiMiyo
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
This system is to control the stepper motor of GAS and IP in VIS suspension using the KAGRA DGS network.
 * If you control with serial in local place, please see the manual written by Sekiguch [JGW-xxx].
 * In this system, anyone control stepper motor with medm screen via EPICS channels managed by PCAS (Potable Channel Access Server).
 * 2017/10/13 : medm screen is not yet.
Line 3: Line 7:
== DriverList == == How to use ==
Run the PCAS to activate the EPICS channels for stepper motor control.
 * PCAサーバは、各EPICSチャンネルの値の変更に応じて指定のコマンドを送るためのもの
 * なので起動しないと、ボタンを押してもコマンドが送れずモータが動作しない。
 * 起動をするには、MEDM画面からボタンを押すだけ(の予定)
Line 5: Line 13:

== Configuration ==
[[attachment:configuration|{{attachment:スクリーンショット 2017-05-01 19.20.17.png|latest sensitivity curve|width="600"}}]]
After activate, control the stepper motor using the medm screen
 * 速度を設定する。デフォルトでxxx。
 * ステップを設定する。デフォルトでxxx。
 * 動かす。FWDで正転、REVで反転。
Line 10: Line 19:
ユーザがTelnetでコマンドを送信するには,(1)Nport5150のRS485-Ethernet変換の設定(2)TMCM6110の環境設定が必要である。
=== Nport5150の設定 ===
[[attachment:configuration|{{attachment:SerialSetting.png|latest sensitivity curve|width="900"}}]]
[[attachment:configuration|{{attachment:スクリーンショット 2017-05-01 19.20.17.png|latest sensitivity curve|width="500"}}]]
Line 14: Line 21:
[[attachment:configuration|{{attachment:NportSetting.png|latest sensitivity curve|width="900"}}]] === Nport5150 ===
Serial setting
 * Baudrte : 9600
 * DataBit : 8
 * StopBit : 1
 * Parity : None
 * FIFO : Enable
Line 16: Line 29:
[[attachment:configuration|{{attachment:NetworkSetting.png|latest sensitivity curve|width="900"}}]] Network setting
 * IPaddress : 10.68.150.xx (Please change the IP address according to where you want to use it.)
 * Netmask : 255.255.0.0
 * Gateway : 10.68.10.1
 * IP Configuration : Static
Line 18: Line 35:
Please change the IP address according to where you want to use it. Operation Mode setting
Change the operation mode from "Real COM Mode" to "TCP Server Mode"
 * choose ’TCP Server Mode’
 * port : 4001
Line 24: Line 45:
(At point at 17/10/5) コマンド送信はPythonのソケット通信ライブラリを使って実装、ライブラリ化した。
 * モータドライバ側はBinaryでコマンドを受け付けるので注意が必要。設定すればASCIIでも可。
 * バイナリコマンドを直接socketで送りつけるPythonコードがあったので、それを使う。
 * それ改変して、最小限動かすのに必要な関数を集めたPythonクラス ’KAGRA_stepper’ を用意した。
 * 実際のモータを動かすための設定ファイルを用意した。(モータの配線、IPの自由度へのマトリックス)
Line 26: Line 51:
- Go to the directory: /kagra/Dropbox/Subsystem/VIS/TypeBp/Script/steppingmotor/ (On 17/10/5)
Line 28: Line 53:
- start ipython * Go to the directory: /kagra/Dropbox/Subsystem/VIS/TypeBp/Script/steppingmotor/
Line 30: Line 55:
- in ipython, type the command as follows. * start ipython

* in ipython, type the command as follows.
{{{
from Trinamic_control6110 import *
driver = Trinamic_control6110()
driver.connectTCP('your ip address', 4001)
driver.reconnect()
}}}
and if it says '...ok', the motors are replying. If error occurs, try to restart the motor drivers as well as Nport. Just turn off and on the power.

* In order to move it,
{{{
driver.setTargetPosition(step,motor_number)
}}}
Insert the relative step in to the 'step', and insert the motor number into 'motor_number.'

Overview

This system is to control the stepper motor of GAS and IP in VIS suspension using the KAGRA DGS network.

  • If you control with serial in local place, please see the manual written by Sekiguch [JGW-xxx].
  • In this system, anyone control stepper motor with medm screen via EPICS channels managed by PCAS (Potable Channel Access Server).
  • 2017/10/13 : medm screen is not yet.

How to use

Run the PCAS to activate the EPICS channels for stepper motor control.

  • PCAサーバは、各EPICSチャンネルの値の変更に応じて指定のコマンドを送るためのもの
  • なので起動しないと、ボタンを押してもコマンドが送れずモータが動作しない。
  • 起動をするには、MEDM画面からボタンを押すだけ(の予定)

After activate, control the stepper motor using the medm screen

  • 速度を設定する。デフォルトでxxx。
  • ステップを設定する。デフォルトでxxx。
  • 動かす。FWDで正転、REVで反転。

Setup

latest sensitivity curve

Nport5150

Serial setting

Network setting

  • IPaddress : 10.68.150.xx (Please change the IP address according to where you want to use it.)
  • Netmask : 255.255.0.0
  • Gateway : 10.68.10.1
  • IP Configuration : Static

Operation Mode setting Change the operation mode from "Real COM Mode" to "TCP Server Mode"

  • choose ’TCP Server Mode’
  • port : 4001

TMCM6110の設定

Do not use in ASCII mode. Use binary mode.

How to control the motors from python script

コマンド送信はPythonのソケット通信ライブラリを使って実装、ライブラリ化した。

  • モータドライバ側はBinaryでコマンドを受け付けるので注意が必要。設定すればASCIIでも可。
  • バイナリコマンドを直接socketで送りつけるPythonコードがあったので、それを使う。
  • それ改変して、最小限動かすのに必要な関数を集めたPythonクラス ’KAGRA_stepper’ を用意した。
  • 実際のモータを動かすための設定ファイルを用意した。(モータの配線、IPの自由度へのマトリックス)

(On 17/10/5)

* Go to the directory: /kagra/Dropbox/Subsystem/VIS/TypeBp/Script/steppingmotor/

* start ipython

* in ipython, type the command as follows.

from Trinamic_control6110 import *
driver = Trinamic_control6110()
driver.connectTCP('your ip address', 4001)
driver.reconnect()

and if it says '...ok', the motors are replying. If error occurs, try to restart the motor drivers as well as Nport. Just turn off and on the power.

* In order to move it,

driver.setTargetPosition(step,motor_number)

Insert the relative step in to the 'step', and insert the motor number into 'motor_number.'

KAGRA/Subgroups/DGS/Projects/StepperMotor (last edited 2022-08-02 16:57:38 by satoru.ikeda)