Synchronizing Measurements or Vision with Yaskawa, Mitsubishi or Panasonic Drives
Overview
Whether you are designing an automated inspection system for LCD displays or stamping items on a conveyor belt you need to synchronize your motion controller with data acquisition or image acquisition hardware performing measurements or vision. Most likely you need to synchronize your motors and drives from vendors such as Yaskawa, Mitsubishi or Panasonic, and with data acquisition and vision hardware from vendors such as National Instruments. In this white paper, you will learn the fundamentals of synchronization, selection of the right hardware components that will directly connect to these popular drives and basics of programming such a system in NI LabVIEW.
Table of Contents
- 1a. Understanding your Synchronization Requirements
- 1b. Understanding Position Compares (Breakpoints)
- 1c. Understanding Position Captures (Triggers)
- 2a. Selecting the Right Motion Controller for Measurements or Vision Synchronization
- 2b. Connecting your Motion Controller to Yaskawa, Mitsubishi or Panasonic drives
- 2c. Interfacing your Motion Controller to a Data Acquisition or Image Acquisition Device
- 3a. Programming Synchronization in LabVIEW - Simple Examples
- 3b. Case Study: Rotating Knife Application
- 4. Summary
1a. Understanding your Synchronization Requirements
You can synchronize NI motion controllers with data acquisition or image acquisition devices using breakpoints (position compares) and triggers (high-speed captures). It is important to understand the synchronization needs of your motion control system to be able to select the right motion controller, data acquisition and image acquisition devices. In scanning applications you typically inspect an object such as a wafer or an LCD display for defects using a camera. The wafer or LCD display rests on an XY stage that moves in two dimensions. The objective of the scan is to cover as much space on the wafer as possible in the shortest amount of time and trigger the camera to take an image at specific points along the scan. In such applications you need, to output a digital signal (called breakpoint) to the trigger line of a camera, to command it to take an image based on a specific position reached by the XY stage. This functionality is called position compares (breakpoints), which can be classified into absolute breakpoints, relative position breakpoints, periodically occurring and buffered breakpoints.
In some cases, it may be necessary to synchronize position with some measurement occurring external to the motion controller. You can think of this conceptually as a conveyor belt application running at a constant velocity. Each time a manufactured item moves down the conveyor belt and breaks a light beam across the belt, a stamp is placed on the item a set distance from the point where the beam is broken. This allows all items to be stamped in the same relative position without necessarily being equally spaced along the conveyor belt. You need to command a move of a specified length relative to the position at which a trigger input is received to perform such a stamping operation. This functionality is called high-speed position captures (triggers), which could be buffered or non-buffered.
1b. Understanding Position Compares (Breakpoints)
A motion controller can be configured to generate a trigger signal or toggle the state of an I/O port when the motor reaches a specified position. This specified position is called a breakpoint and is similar to a switch that is triggered after the motor passes a certain position. To use breakpoints, you must have a board with closed-loop encoder feedback, since the controller needs the encoder position to determine where the breakpoint occurs. You can specify breakpoints for both servo motors and stepper motors. You can use breakpoints as a trigger for another piece of hardware, since it sends a signal to an I/O line. For example, when a motor reaches a certain position, you can use a breakpoint signal to initiate an image capture or a data acquisition operation.
Breakpoints are of five types – absolute, relative, periodic, modulus and buffered.
i. Absolute Breakpoints
Absolute position breakpoints allow you to trigger external activities as the motors reach specified positions. For example, if you need to use an image acquisition device to capture an image from a certain position while the device under test is in continuous motion, the motion controller must be able to trigger the image acquisition device as it reaches those positions. The current position is continuously compared against the specified breakpoint position by the encoder circuitry to produce a latency of less than 100 ns. After a breakpoint triggers, you must re-enable it for the breakpoint to work again. In certain cases, such as buffered and periodic breakpoints, the motion controller automatically re-enables the breakpoints.
ii. Relative Position Breakpoints
Relative position breakpoints trigger events based on a change in position relative to the position at which the breakpoint was enabled. Instead of keeping track of absolute positions and the current position, you can use relative breakpoints to specify the breakpoint relative to the position where the breakpoint is enabled. For example, if you are creating a motion control system to control the two-dimensional movement of a microscope, you might use relative position breakpoints to move the microscope a specific distance in a direction, and then hit a breakpoint that triggers a camera snap. The relative breakpoint is useful in this example because the current position is not important. The application must move the axis a specific number of counts from wherever it is, and then generate a breakpoint.
iii. Periodically Occurring Breakpoints (NI 735x only)
NI-Motion allows you to program the motion controller to generate multiple breakpoints at fixed and exact intervals, regardless of the direction of travel or velocity. There are two ways to create periodically occurring breakpoints using NI-Motion functions, depending on which motion controller you have. For the NI 735x controller, use periodic breakpoints. For NI 739x, NI 734x and NI 733x controllers, use modulo breakpoints.
Periodic breakpoints require that you specify an initial breakpoint and an ongoing repeat period. When enabled, the periodic breakpoints begin when the initial breakpoint occurs. From then on, a new breakpoint occurs each time the axis moves a distance equal to the repeat period, with no re-enabling required. For example, if an axis is enabled at position zero, the initial breakpoint is set for position 100, and the breakpoint period is set at 1,000, then the axis behaves as shown in Figure 1.

[+] Enlarge Image
Figure 1. Periodic Breakpoint Every 1,000 Counts/Steps
iv. Modulo Breakpoints (NI 739x, NI 734x and NI 733x only)
Modulo breakpoints use a breakpoint window, which defines an area around the current position. The two breakpoints around the current position are always enabled. The breakpoint modulus creates a repeat period for the breakpoints, and the breakpoint position is the offset from absolute zero. For example, to create a breakpoint every 500 counts, set the repeat period to 500 and the breakpoint position to 0. If the breakpoint is enabled when the axis is at 710, the breakpoints at 1000 and 500 are both armed, as shown in Figure 2.

[+] Enlarge Image
Figure 2. Breakpoint Modulus of 500
v. Buffered Breakpoints (NI 735x only)
Buffered breakpoints are a way of implementing absolute or relative breakpoints, in which you create a buffer of breakpoints that you can pre-load into the motion controller. The motion controller automatically arms the next breakpoint in the buffer when the preceding breakpoint triggers. Therefore, enabling breakpoints occurs on a firmware-timed basis, which enables you to use a higher bandwidth.
1c. Understanding Position Captures (Triggers)
Some motion control applications require that you execute a move and record the locations where external triggers happen. For example, you might be aligning two fiber optic cables, in which case the maximum optical power needs to correspond with the alignment position. To align the fibers, the external device that is recording the optical power must trigger the motion controller so that positions and optical power measurements can be synchronized and analyzed. This functionality is known as high-speed capture or trigger inputs. To accomplish this, you must use the high-speed capture functionality of NI motion controllers. The implementation for high-speed capture is divided into the buffered and non-buffered high-speed capture methods.
i. Buffered High-Speed Captures (NI 735x only)
Buffered high-speed capture lets you create a buffer that holds captured positions that you can read asynchronously from the motion controller. The motion controller automatically arms the next high-speed capture, and writes the captured high-speed data into its onboard buffer. The enabling of high-speed capture occurs on a firmware-timed basis, which provides better frequency than the non-buffered high-speed capture method.
ii. Non-Buffered High-Speed Captures
Non-buffered high-speed capture allows you to configure a single high-speed capture event. For multiple high-speed captures, you must re-enable the high-speed capture each time it triggers.
2a. Selecting the Right Motion Controller for Measurements or Vision Synchronization
Table 1 summarizes the synchronization features offered by different NI motion controller families.
Table 1. Synchronization Features on NI Motion Controllers
| Synchronization Feature |
NI 735x High-Performance Stepper/Servo |
NI 734x Mid-Range Stepper/Servo |
NI 733x Low-Cost Stepper |
NI 739x Isolated Pulse Command |
| Position Compares | ||||
| Absolute breakpoints |
Y
|
Y
|
Y
|
Y
|
| Relative breakpoints |
Y
|
Y
|
Y
|
Y
|
| Periodic breakpoints |
Y
|
N
|
N
|
N
|
| Modulus breakpoints |
N
|
Y
|
Y
|
Y
|
| Buffered breakpoints |
Y
|
N
|
N
|
N
|
| Position Captures | ||||
| Non-buffered triggers |
Y
|
Y
|
Y
|
Y
|
| Buffered triggers |
Y
|
N
|
N
|
N
|
2b. Connecting your Motion Controller to Yaskawa, Mitsubishi or Panasonic drives
i. Connecting the NI PCI-7390 Motion Controller
The PCI-7390 is a position (pulse) command stepper motion controller with isolation designed for use with drives that support position (p-) command mode or step (pulse) command input like the Yaskawa Sigma II, Mitsubishi MR-J2S and Panasonic Minas A drives. 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 including 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 PCI-7390 also performs arbitrary and complex motion trajectories through circular, spherical, or helical interpolation. The 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).
The PCI-7390 has accessories specifically designed for direct connectivity to Yaskawa Sigma II, Mitsubishi MR-J2S and Panasonic Minas A drives.
The NI MCA-7790Y accessory kit provides connection between the PCI-7390 and Yaskawa Sigma II series drives. To connect a Yaskawa drive to the PCI-7390, connect a 50-pin cable from the drive to the MCA-7790Y, and connect a SCSI 100-pin cable from the MCA-7790Y to the PCI-7390.

[+] Enlarge Image
Figure 3. NI 7390 Connected to a Yaskawa Sigma II Drive
The NI MCA-7790M accessory provides connection between the PCI-7390 and Mitsubishi J2S series drives. To connect a Mitsubishi drive to the PCI-7390, connect two 20-pin cables from the drive to the MCA-7790M, and connect a SCSI 100-pin cable from the MCA-7790M to the PCI-7390.

[+] Enlarge Image
Figure 4. NI 7390 Connected to a Mitsubishi J2S Drive
The NI MCA-7790P accessory provides connection between the PCI-7390 and Panasonic MINAS A series drives. To connect a Panasonic drive to the PCI-7390, connect a 50-pin cable from the drive to the MCA-7790P, and connect a SCSI 100-pin cable from the MCA-7790P to the PCI-7390.

[+] Enlarge Image
Figure 5. NI 7390 Connected to a Panasonic Minas A Drive
ii. Connecting the NI 733x, NI 734x or NI 735x Motion Controllers
To connect the NI 733x, NI 734x or NI 735x motion controllers to Yaskawa, Mitsubishi or Panasonic drives, configure the drive in position (pulse) command mode, and the motion controller in open loop stepper mode. Use the NI 7764 or NI 7774 universal machine interfaces to wire the motion I/O (including step and direction, limits, drive enable) from the motion controller to the drive.
2c. Interfacing your Motion Controller to a Data Acquisition or Image Acquisition Device
In order to input signals from sensors or output breakpoints to external devices such as cameras you need to have digital input or output lines in your system that are synchronized with your motion controller. NI motion controllers have built-in lines for trigger inputs or breakpoint outputs. In many cases, you need an additional data acquisition device for digital lines with signal conditioning. For example, you may synchronize your motion controller with an Industrial M Series NI 6230 analog and digital I/O board or you may want to route breakpoints directly to trigger lines on the NI 8254R image acquisition board. In this section, you will learn how to use breakpoint outputs or trigger inputs on the motion controller or how to route these signals directly through the real-time system integration bus.
i. Breakpoint (Position Compare) Output Lines on Motion Controller
You can use breakpoint output lines for position compare provided on your NI motion controller to interface with devices such as cameras being triggered for taking images. You can program a breakpoint output to transition when the associated encoder value equals the breakpoint position. You can use a breakpoint output to directly control actuators or as a trigger to synchronize data acquisition or other functions in the motion control system. You can program breakpoints as either absolute, modulo, or relative position. Breakpoint outputs can be preset to a known state so that the transition when the breakpoint occurs can be low to high, high to low, or toggle.
For example, the PCI-7390 provides four optically isolated breakpoint or position compare outputs on the board itself. The breakpoint outputs are driven by TTL buffers that feature 24 mA, sink and source current capability that you can connect to any device that can be triggered by a 5V signal.
ii. Trigger (Position Capture) Input Lines on Motion Controller
You can use trigger input lines for position capture provided on your NI motion controller to interface with devices such as digital sensors taking measurements. When enabled, an active high-speed position capture input causes instantaneous position capture (<250 ns latency) of the corresponding encoder count value. You can use this high-speed position capture functionality for applications ranging from simple position tagging of sensor data to complex camming systems with advance / retard positioning and registration. An available position mode on the motion controller is to move an axis relative to a captured position.
For example, the PCI-7390 provides four optically isolated trigger inputs. You can connect the trigger input directly to a sourcing output device or a TTL driver. The polarity of the trigger input is programmable in software as high level, low level, rising edge, or falling edge. You do not need an additional data acquisition device if you use the trigger lines on the motion controller for position captures.
iii. Real-Time System Integration Bus (RTSI)
RTSI is a dedicated high-speed digital bus designed to facilitate system integration by low-level, high-speed, real-time communication between National Instruments devices. Many applications, such as scanning and alignment, synchronize measurements made with DAQ devices and IMAQ devices with position and velocity. This synchronization requires high speeds with low latencies. Using RTSI, the NI motion controller can share high-speed digital signals with DAQ devices, IMAQ devices, digital I/O, or other NI motion devices with no external cabling and without consuming bandwidth on the host bus. The RTSI bus also has built-in switching, so you can route signals to and from the bus on-the-fly using software. In addition to the breakpoint and high speed capture signals, you can route encoder pulses over the RTSI lines, which serves as a way to trigger an external device on every change in the encoder channels. You can route phase A, phase B, and the index pulse of the encoder over RTSI.
For example, the PCI-7390 motion controller allows you to use up to eight RTSI trigger lines as sources for trigger inputs, or as destinations for breakpoint outputs and encoder signals. Breakpoint outputs are output-only signals that generate an active high pulse of 200 ns duration, as shown in Figure 4-17. Encoder and Index signals are output-only signals across RTSI that are the digitally-filtered versions of the raw signals coming into the controller. If you are using the RTSI bus for motion I/O or generic digital I/O, all signals are passed through unaltered. The PCI-7390 uses a ribbon cable to connect to other RTSI-capable PCI devices.
3a. Programming Synchronization in LabVIEW - Simple Examples
i. Position Compare Breakpoints in LabVIEW

[+] Enlarge Image
Figure 6. Single Position Breakpoint in LabVIEW
Refer to Figure 7 for an example of how to route this breakpoint using RTSI. After the breakpoint is routed through RTSI, the trigger appears on both the RTSI line and the breakpoint line on the Motion I/O connector.

[+] Enlarge Image
Figure 7. Single Position Breakpoint with RTSI using LabVIEW
ii. Position Capture Triggers in LabVIEW

[+] Enlarge Image
Figure 8. High-speed Capture using LabVIEW
3b. Case Study: Rotating Knife Application
i. Application Description
The purpose of this application is to cut a web with a rotating knife. The blade must cut precisely between labels on the web. Because the web material can stretch under certain conditions, it is not enough to cut the web at constant length, because the length of each label can vary. To accomplish this task, the web is marked one time per cycle at the required cutting location. The motion controller reads this mark using a sensor and performs the necessary correction. To simplify this example, assume that the length of the cut is equal to the circumference of the knife. Under ideal conditions, the mark should be read when the blade is at position A, as shown in Figure 16-1. Therefore, the motor should move one revolution without any correction before causing the cut.

Figure 9. Rotating Knife
ii. Solution
The rotary knife is electronically geared to the web with a gear ratio of 1:1, which ensures that at the time of cut, the speed of the web and the knife is the same. The speed of each must be the same to make a clean cut without stretching the web. Also, under ideal conditions, the web and rotating knife move the exact same distance. For example, the length of the cut might be one revolution, which is equal to 2,000 counts. The sensor reading the mark is connected to one of the high-speed capture lines on the motion controller. Because the elasticity of the web material results in varying label lengths, the mark can be read before the blade is at position A or after it is at position A. The application must correct the position where the blade of the rotary knife should be when the high-speed capture occurs. This correction must occur after the blade has crossed position A so that the current cut is not damaged. To accomplish this goal, mark the correction point to be at position B, as shown in Figure 16-1.

Figure 10. Algorithm for Rotating Knife Application
iii. Implementation in LabVIEW

[+] Enlarge Image
Figure 11. Rotating Knife Application using LabVIEW
4. Summary
For adding measurements or vision to your drives and motors from Yaskawa, Mitsubishi or Panasonic,
- understand your synchronization requirements
- select the right motion controller (NI 7390 for direct connectivity, NI 735x for high-performance synchronization), and
- program your application in LabVIEW that tightly integrates NI-Motion (for motion), NI-IMAQ (for vision) and NI-DAQmx (for measurements) driver software.
Reader Comments | Submit a comment »
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/).
