= KAGRA VIS Operations Manual - Setup and Use of Stepper Motor Drivers = [[../|Back to Operation Manual main page]] The stepper motor chassis designed by Kamiizumi-san has a TMCM-6110 driver card and a NPort® 5150A serial-Internet interface. See [[http://gwdoc.icrr.u-tokyo.ac.jp/cgi-bin/private/DocDB/ShowDocument?docid=5365| D1605365]]. Sekiguchi-san has written a [[attachment:140708_TMCM_v1.pdf| document]] in Japanese - this page is an English version of the good bits plus a bit extra specific to KAGRA. Miyo-kun has written Python drivers and is managing the list of IP assignments. See [[KAGRA/Subgroups/DGS/Projects/StepperMotor]] == Old Manual Setup == Download and install the [[http://www.moxa.com/support/download.aspx?d_id=1317|NPort Administrator program]] on a Windows PC. (Windows running under Parallels on a Mac also works if the network is set to "bridged" mode for whatever built-in or other LAN port is used, e.g., "Belkin USB-C LAN (Bridged)".) Ask around for and install the TMCM-PC.exe program (it doesn't seem to be available any longer from the [[https://www.trinamic.com/support/software/|website]] - TMCM-IDE is ''not'' what you want). Connect the stepper motor driver chassis to ±24 V power and turn it on. Check that the relay switch on the back is set to "on" and that the LEDs "NPort 5150A" and "TMCM 6110" are lit. Connect an Ethernet cable between the PC and the LAN port on the back of the chassis. == About the software: == 1. Run the NPort Administrator program with administrator privileges: [[attachment:nport21.png|{{attachment:nport21.png||width=600}}]] 2. Press the Search button. The NPort 5151 should appear in the list with a generic IP address like 198.168.127.200. '''If a password is required to unlock the NP5150 device, the assword is by default: moxa'''. [[attachment:NPort Administrator-Configuration.png|{{attachment:NPort Administrator-Configuration.png||width=600}}]] Note: Setting the IP number can be done either from the NPort Administrator program, or from the built-in web-server, by going to `http://198.168.127.200` in a web browser. The following steps show how to do it from the NPort Administrator program and in the Appendix it is explained how to do the same in the web-server. 3. Select the connected device and press the Configure button. Click on Network Tab and click on Modify to change the IP Address (Acording to [[KAGRA/Subgroups/DGS/Projects/StepperMotor|Stepper Motor IP Adress]] ) , Netmask and others parameters according to: * Netmask : 255.255.0.0 * Gateway : 10.68.10.1 * IP Configuration : Static [[attachment:Assign_IP_NPort.png|{{attachment:Assign_IP_NPort.png||width=600}}]] 4. Click on Serial Tab and click on Modify and Settings to change the Baud Rate, Interface to RS-482-2-wire, and others parameters as: * Baudrate : 9600 * DataBit : 8 * StopBit : 1 * Parity : None * FIFO : Enable [[attachment:Assign_Serial_NPort.png|{{attachment:Assign_Serial_NPort.png||width=600}}]] 5. Click on Operating Mode Tab and click on Modify and Settings to select the Real COM mode. '''Or (now the usual case) to 'TCP Server Mode' and port : 4001 if you want to move the Stepper Motors Using ipython''' ([[KAGRA/Subgroups/DGS/Projects/StepperMotor|here]]). [[attachment:Assign_COM_NPort.png|{{attachment:Assign_COM_NPort.png||width=600}}]] TCP Mode: [[attachment:NPort_TCP_mode.png|{{attachment:NPort_TCP_mode.png||width=600}}]] If you want to move the Stepper Motors Using TMCL Software, please follow the next steps: 6. Go back to NPort Administrator and click on the COM Mapping. If there is no port in the list, click Add to add a port. [[attachment:nport23.png|{{attachment:nport23.png||width=600}}]] Note: You can also add the ports from the list or manually writing the IP address. [[attachment:nport23_11.png|{{attachment:nport23_11.png||width=400}}]] 7. After selecting the port, the COM Port will appear with a “+” symbol and that means the changes have not been applied yet. [[attachment:nport24.png|{{attachment:nport24.png||width=600}}]] Note: After pressing the Apply button, the “+” symbol will disappear. 8. Start TMCL with administrator privileges. 9. Select the Connection tab and set the same connection port that was selected before. [[attachment:tmcl1.png|{{attachment:tmcl1.png||width=600}}]] 10. Click the Direct Mode icon and if the motor is connected the following window will appeard and the software will detect the module automatically (TMCM-6110 in this case). Then by selecting a command from here is possible to control the motor by executing the command. [[attachment:tmcl11.png|{{attachment:tmcl11.png||width=600}}]] Note: If the motor is not connected or if the serial port has a different configuration the software will not be able to detect it automatically, so it will ask about the Module Type. [[attachment:tmcl12.png|{{attachment:tmcl12.png||width=600}}]] 11. Select the instructions to move or to stop the motor. [[attachment:tmcl12_1.png|{{attachment:tmcl12_1.png||width=600}}]] Note: If the motor is not connected the software will show the following window. [[attachment:tmcl13.png|{{attachment:tmcl13.png||width=600}}]] == Appendix == Setting the parameters through the web-server: i) Select the connected device and open the web browser. Please note that you can not make settings from the web browser unless you have administrator privileges: [[attachment:NPort Web Console ‎- Welcome.png|{{attachment:NPort Web Console ‎- Welcome.png||width=600}}]] ii) Click on Network Settings to change the IP Address, Netmask and others parameters. [[attachment:nport22_1.png|{{attachment:nport22_1.png||width=600}}]] iii) Click on Serial Settings to change the Baud Rate, Interface to RS-482-2-wire, and others parameters. [[attachment:nport22_2.png|{{attachment:nport22_2.png||width=600}}]] iv) Click on Operating Settings and select the Real COM mode. [[attachment:nport22_3.png|{{attachment:nport22_3.png||width=600}}]]