NI Tutorial 5908

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Document Type: Tutorial NI Supported: Yes Publish Date: Jun 21, 2007

Getting Started Guide: Connect NI LabVIEW to Yaskawa SIGMA II Servo Amplifiers


Overview This document provides step-by-step instructions to setup and program a motion control application using National Instruments (NI) LabVIEW and Yaskawa Sigma II servo amplifier including choosing the right hardware, hardware and software setup and programming. Table of Contents 1. 2. 3. 4. 5. 6. Hardware and Software Requirements Hardware Setup NI PCI-7390 Configuration using NI Measurement and Automation Explorer Configure moves with NI Motion Assistant (Optional) Export to LabVIEW Appendix

Hardware and Software Requirements Controller Hardware and Accessories (National Instruments www.ni.com/motion): 779034-01 779611-01 194604-02 NI PCI-7390, 4-axis position command motion controller with isolation MCA-7790Y, motion interface connection board and cable for Yaskawa Servo Amplifiers 50 Pin cable for connecting MCA-7790Y to Yaskawa Sigma II Servo Amplifier

Servo Amplifier and Motors (Yaskawa www.yaskawa.com): SGDH-##xxx SGDH Sigma II Torque, Speed, or Position controlled servo amplifier 53460-0611 Servo Amplifier Encoder Connector (Yaskawa Number: JZSP-CMP9-1,2)

Motion Control Software (National Instruments - www.ni.com): 776678-09 778553-01 LabVIEW Professional System for Windows NI Motion Assistant for motion controller programming (Optional) NI-MOTION Driver (Included with NI PCI-7390 controller)

Hardware Setup 1. Connect the NI PCI-7390 motion controller to the Yaskawa Sigma II amplifier: The NI MCA-7790Y accessory kit provides connection between the NI PCI-7390 controller and Sigma II series amplifiers from Yaskawa. To connect a Sigma II amplifier to the PCI-7390 controller, connect a 50-pin cable from the amplifier (PN: 194604-02) to the MCA-7790Y, and connect a SCSI 100-pin cable from the MCA-7790Y to the NI PCI-7390 (included with the MCA-7790Y). Refer to Figure 1 below.

1/9

www.ni.com

[+] Enlarge Image Figure 1: NI 7390 Connected to a Yaskawa Sigma II Amplifier Note: The MCA-7790Y requires a 24 volt power supply that connects to the positive and GND screw terminals. a. Provide power to the Sigma II amplifier: For basic applications you can power the Yaskawa Sigma II by connecting the main power pins to an AC power source, refer to Figure 2. For advanced power options such as filtering, alarm shut off, or three-phase power connectivity consult the Sigma II User Manual (www.yaskawa.com) section 3.3.2.

Figure 2: Yaskawa Sigma II Basic Power Connections

b. Connect a Servo Motor to the Yaskawa Sigma II amplifier: The Yaskawa Sigma II then needs to be connected to a three phase brushless servo motor via the phase pins U, V, and W as shown in Figure 3 below. For encoder feedback the CN2 connector on the Yaskawa Amplifier can be connected to a motor using the Servo Amplifier Connector Part Number: 53460-0611.

2/9

www.ni.com

[+] Enlarge Image Figure 3: Yaskawa Sigma II Basic Servo Connections

2. Yaskawa Sigma II Configuration: Configure the Yaskawa Sigma II amplifier for Position Control Mode 1. 2. 3. 4. 5. Press the MODE/SET button on the display until it reads PnXXX. Use the Data/Enter, up, and down buttons to set the display to: Pn000. Hold down the DATA/Enter button for 1 second until the display reads: n.XXXX. Use the DATA/Enter, up, and down buttons to set the display to: n.0010. Hold down the DATA/Enter button for 1 second to set the Parameter value.

Note: This puts the Sigma II into Position Mode which allows the position commands to come from the Pulse Pin (CN1-7) and the Sign Pin (CN1-11). Note:ForusewithNIPCI7390andLabVIEWtheSigmaIIneedstobeusedinPositionControlMode.Speedandtorquemodesarenotavailablethroughthisinterface.Tooptimizeperformance, sometuningoftheamplifiermayberequired,referencetheSigmaIIUser'sManual(Chapter6)foradditionalinformation.

NI PCI-7390 Configuration using NI Measurement and Automation Explorer 1. Import "Yaskawa 7390 Settings.xml" file into Measurement and Automation Explorer: You can import the attached Yaskawa7390Settings.xml file into Measurement and Automation Explorer to automatically configure the NI PCI 7390 (enables Axis 1).

[+] Enlarge Image Figure 4: NI Measurement and Automation Explorer Import Yaskawa Motion Settings

If you do not use this file, the steps in the Appendix section Manual Yaskawa Configuration Steps will help you setup the configuration manually.

2. Measurement and Automation Explorer Configuration: After importing the Yaskawa settings file you will need to set the encoder resolution, motor resolution, and the polarity that corresponds to the type of motor you are using. Most encoders are given by either two parameters i. Lines per revolution

3/9

www.ni.com

ii. Steps or Counts per revolution A quadrature encoder produces 4 counts (states) per line of resolution, so if the encoder resolution is given in lines/revolution, then you can multiply that by a factor of 4 to get your encoder counts per revolution. The following adjustments need to be made to your configuration: 1. Adjust the Encoder counts per revolution setting under Encoder Settings to the correct values for your encoder for each affected axis 2. Adjust the Stepper steps per revolution setting under Axis Configuration: Stepper Settings Tab to the correct values for your motor. Since Servo motors do not have a Steps per Revolution this parameter is used to setup the correct ratio that will allow your motor to operate correctly. For most motors you will need to set this parameter to of the Encoder Counts per Revolution. 3. Adjust the Stepper Polarity under Axis Configuration: Stepper Settings Tab to allow positive position commands to move your motor in what you consider the positive direction of motion.

[+] Enlarge Image Figure 5: MAX Encoder Settings

The above adjustments set up the formula the driver will use to calculate position based on the ratio between encoder counts per revolution and motor steps per revolution. When in stepper or P-Command mode you always send your move commands in steps not counts.

Configure moves with NI Motion Assistant (Optional) NI Motion Assistant is a motion control prototyping utility that will help you develop your motion control application quickly. You will use interactive menus to configure your moves. The following steps will guide you to configure a simple 1 axis straight line move using NI Motion Assistant. 1. Launch NI Motion by selecting Motion Assistant from the National Instruments directory in the Start Menu. 2. Choose AddStep on the right side of the application and choose StraightLineMove.

4/9

www.ni.com

[+] Enlarge Image Figure 6: NI Motion Assistant Add Step

3. Select 1D for the number of axis at the bottom and then choose the axis you would like to control.

[+] Enlarge Image Figure 7: NI Motion Assistant Configure Step

4. Click on the Position tab in the StepSetup section at the bottom of the Motion Assistant. Enter the amount of steps or revolutions you would like the motor to move. 5. Finally, click the Run button in the toolbar at the top to execute the move.

5/9

www.ni.com

[+] Enlarge Image Figure 8: NI Motion Assistant Set Position and Run

Export to LabVIEW Once you have prototyped your moves using NI Motion Assistant export the moves to LabVIEW for further development of your motion control system. Go to the Tools Menu and click Generate Code >> GenerateLabVIEWDiagram (as shown in Figure 10 below).

[+] Enlarge Image Figure 9: NI Motion Assistant Generate LabVIEW Code

An example block diagram can be seen in Figure 11 below. The code is simply executed by clicking the run arrow in the menu bar at the top of LabVIEW.

6/9

www.ni.com

[+] Enlarge Image Figure 10: LabVIEW Block Diagram of Motion Assistant Code

You should now have successfully built a LabVIEW application to move a servo motor through a Yaskawa Sigma II Motor Drive. You are now ready to develop advanced applications! For additional information visit: ni.com/motion and www.yaskawa.com

Appendix NI PCI 7390 Motion Controller:

Figure 11: NI PCI 7390 The National Instruments PCI-7390 is a position (pulse) command stepper motion controller with isolation designed for use with amplifiers that accept position (p-) command mode or step (pulse) command input. The NI PCI-7390 has accessories specifically designed for direct connectivity to Yaskawa Sigma II amplifiers. The PCI-7390 provides fully programmable motion control for up to four independent or coordinated axes of motion. It features dedicated motion I/O for limit and home switches and additional I/O for general-purpose functions such as in-position, inhibit input/drive alarm, and servo ready. You can use the PCI-7390 controller for point-to-point and straight-line vector moves. The NI PCI-7390 also performs arbitrary and complex motion trajectories through circular, spherical, or helical interpolation. The NI PCI-7390 uses quadrature encoders for position and velocity feedback (closed-loop only) and provides advanced encoder functions such as trigger (position capture) and breakpoint (position compare). Yaskawa SGDH Sigma II Motor Amplifier:

7/9

www.ni.com

Figure 12: SGDH Sigma II Motor Amplifier The Yaskawa Sigma II Amplifier is a servo motor control solution for automation needs, that cover 30 watts to 55 kW motor output, and input voltages of 110, 230 and 480 VAC. The Sigma II amplifier can be set to torque, speed, or position control and utilizes serial encoder technology to automatically recognize Sigma II rotary and linear servomotors. Advanced algorithms provide high performance tuning and suppression of machine resonance. A built-in keypad and serial port allow easy set-up and monitoring of the servo system.

Manual Yaskawa Configuration Steps: 1. The first step in the software configuration is to open up NIMeasurementandAutomationExplorer found in the National Instruments directory on your PC. In Measurement and Automation Explorer traverse to DevicesandInterfaces >> NIMotionDevices >> PCI7390 >> DefaultSettings so you can now configure the 4 axis of the NI PCI 7390.

2. In the AxisConfiguration settings for the axis you would like to configure click on the StepperSettings tab in the lower middle part of the screen. i. Set the Stepper Loop Mode to P-Command ii. Choose ActiveLoworActiveHigh for the stepperpolarity based on how your motor and drive configuration. iii. Note the Pull In Tries parameter is ignored for P-Command mode. iv. Set the Stepper Steps per revolution to the encoder and motor ratio needed.

[+] Enlarge Image Figure 13: NI MAX Axis Configuration Stepper Settings

3. Disable any axis that you are not going to use by expanding each axis that you are not going to use, click on AxisConfiguration, and choose Disabled (see Figure 5 below). You can now setup an axis for movement.

8/9

www.ni.com

[+] Enlarge Image Figure 14: NI MAX Axis Configuration Settings

4. Once the settings are in place you can download the settings to the NI PCI 7390 by clicking the Initialize button at the top. You can now test communication to the amplifier by choosing the Interactive sub tree and clicking on 1-DInteractive. Select the correct axis and enter the amount of steps or revolutions you would like to move in the TargetPosition parameter. Click the Start button at the top to execute the motor movement. If the move is successful then the Moveiscomplete status line, under the AxisStatus section, will turn green.

[+] Enlarge Image Figure 15: NI MAX 1-D Interactive Motion Control

Downloads yaskawa7390settings.xml

Legal This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE ( http://ni.com/legal/termsofuse/unitedstates/us/).

9/9

www.ni.com

You might also like