Accessory 84E: User Manual
Accessory 84E: User Manual
Accessory 84E: User Manual
^2 Accessory 84E
^4 3Ax-603927-xUxx
DELTA TAU
Data Systems, Inc.
NEW IDEAS IN MOTION …
DELTA TAU
Single Source Machine Control ……………………………………………..…...………………. Power // Flexibility // Ease of Use
21314 Lassen St. Chatsworth, CA 91311 // Tel. (818) 998-2095 Fax. (818) 998-7807 // www.deltatau.com
ACC-84E User Manual
Copyright Information
© 2018 Delta Tau Data Systems, Inc. All rights reserved.
This document is furnished for the customers of Delta Tau Data Systems, Inc. Other uses are unauthorized
without written permission of Delta Tau Data Systems, Inc. Information contained in this manual may be
updated from time-to-time due to product improvements, etc., and may not conform in every respect to
former issues.
Operating Conditions
All Delta Tau Data Systems, Inc. motion controller products, accessories, and amplifiers contain static
sensitive components that can be damaged by incorrect handling. When installing or handling Delta Tau
Data Systems, Inc. products, avoid contact with highly insulated materials. Only qualified personnel should
be allowed to handle this equipment.
In the case of industrial applications, we expect our products to be protected from hazardous or conductive
materials and/or environments that could cause harm to the controller by damaging components or causing
electrical shorts. When our products are used in an industrial environment, install them into an industrial
electrical cabinet or industrial PC to protect them from excessive or corrosive moisture, abnormal ambient
temperatures, and conductive materials. If Delta Tau Data Systems, Inc. products are directly exposed to
hazardous or conductive materials and/or environments, we cannot guarantee their operation.
ACC-84E User Manual
Safety Instructions
Qualified personnel must transport, assemble, install, and maintain this equipment. Properly qualified
personnel are persons who are familiar with the transport, assembly, installation, and operation of
equipment. The qualified personnel must know and observe the following standards and regulations:
IEC364resp.CENELEC HD 384 or DIN VDE 0100
IEC report 664 or DIN VDE 0110
National regulations for safety and accident prevention or VBG 4
Incorrect handling of products can result in injury and damage to persons and machinery. Strictly adhere
to the installation instructions. Electrical safety is provided through a low-resistance earth connection. It
is vital to ensure that all system components are connected to earth ground.
This product contains components that are sensitive to static electricity and can be damaged by incorrect
handling. Avoid contact with high insulating materials (artificial fabrics, plastic film, etc.). Place the
product on a conductive surface. Discharge any possible static electricity build-up by touching an
unpainted, metal, grounded surface before touching the equipment.
Keep all covers and cabinet doors shut during operation. Be aware that during operation, the product has
electrically charged components and hot surfaces. Control and power cables can carry a high voltage,
even when the motor is not rotating. Never disconnect or connect the product while the power source is
energized to avoid electric arcing.
Table of Contents
INTRODUCTION..........................................................................................................................8
Overview ......................................................................................................................... 8
Compatibility .................................................................................................................... 9
SPECIFICATIONS......................................................................................................................10
Environmental Specifications ........................................................................................ 10
Physical Specifications .................................................................................................. 10
Electrical Specifications................................................................................................. 10
Configuration ................................................................................................................. 10
Agency Approval and Safety ......................................................................................... 12
HARDWARE SETUP .................................................................................................................13
Addressing the ACC-84E .............................................................................................. 13
Signal Format ................................................................................................................ 13
Connections .................................................................................................................. 13
Encoder Specific Connection Information ............................................................................... 15
Table of Contents vi
ACC-84E User Manual
INTRODUCTION
Overview
The ACC-84E Universal Serial Encoder Interface Board provides up to four channels of serial encoders
to be read by the UMAC and Ultralite/MACRO Station controllers. The ACC-84E is part of the UMAC
or MACRO Pack family of expansion cards and these accessory cards are designed to plug into an
industrial 3U rack system. The information from these accessories is passed directly to either the UMAC
or MACRO Station CPU via the high speed JEXP expansion bus. ACC-84E supports different serial
encoder protocols depending on the option ordered. These protocols are programmed into an on-board
FPGA upon manufacturing. Multiple common protocols are supported at the moment and future
developments of additional protocols are feasible. Currently, ACC-84E supports the following protocols:
Each ACC-84E can only support one of the protocols mentioned above for all four channels. If the
customer has two different serial protocols in the system, two separate ACC-84E cards should be used.
Since ACC-84E is strictly a feedback input card, if the feedback is intended to be used as the feedback for
closed loop servo control, the servo command should be sent out to the amplifier using a UMAC axis
interface card depending on the signal and control type required by amplifier. Here is a list of possible
axis interface cards available for UMAC systems:
Up to 12 ACC-84E boards can be connected to one UMAC providing up to 48 channels of serial encoder
feedback. Because each MACRO Station CPU can service only eight channels of servo data, only two
fully populated ACC-84E boards can be connected to the MACRO-Station.
The ACC-84E board will take the data from the serial encoder and process it as up to four 24-bit binary
parallel words depending on protocol specifications. This data can then processed in the UMAC or
MACRO Station encoder conversion table for position and velocity feedback. With proper setup, the
information can also be used to commutate brushless and AC induction motors.
Introduction 8
ACC-84E User Manual
Compatibility
The ACC-84E can be used with any type of CPU available for UMAC systems. These CPUs include:
Introduction 9
ACC-84E User Manual
SPECIFICATIONS
Environmental Specifications
Description Specification Notes
Operating Temperature 0°C to 45°C,
Storage Temperature -25°C to 70°C
Humidity 10% to 95 % non-condensing
Physical Specifications
Description Specification Notes
Length: 16.256 cm (6.4 in.)
Dimensions Height: 10 cm (3.94 in.)
Width: 2.03 cm (0.8 in.)
Weight
DB Connectors DB9 Female UL-94V0
The width is the width of the front plate. The length and height are the dimensions of the PCB.
Electrical Specifications
Description Specification Notes
5V @ 360mA (10%)
ACC-84E Power 5V current requirement mentioned is the consumption
+15V @ 0 A
Requirements of the ACC-84E without any encoders connected.
-15V @ 0 A
Configuration
The ACC-84E can support different serial encoder protocols depending on the selected option. The
following figure shows its part number scheme:
G H I K L
UMAC ACC-84E
3 - 3 9 2 7 A - 0 0 - 0 0 - 2
G H I K L
Plate Options
* If Any Additional Option is required, contact factory for digits K and L (Factory Assigned digits).
Specifications 10
ACC-84E User Manual
Specifications 11
ACC-84E User Manual
Item Description
CE Mark EN61326-1
EMC EN55011 Class A Group 1
EN61000-4-2
EN61000-4-3
EN61000-4-4
EN61000-4-5
EN61000-4-6
Flammability Class UL 94V-0
KC EMI: KN 11
EMS: KN 61000-6-2
사 용 자 안 내 문
한국 EMC적용제품 준수사항
Specifications 12
ACC-84E User Manual
HARDWARE SETUP
The ACC-84E uses expansion port memory locations defined by the type of PMAC (Power, Turbo, or
MACRO) to which it is directly communicating.
Signal Format
The signal format for the encoder is dependent on the particular protocol, but in all protocols, there is a
“strobe” and/or “clock” output from the controller, and a data channel into the processor from the
encoder. The encoder is queried synchronously with the Power/Turbo PMAC’s phase or servo clock, and
the incoming serial data is latched into a memory-mapped register for the processor to read.
Connections
Encoders are connected to the ACC-84E through four 9-pin D-sub connectors. Two connectors on the top
side of the rack for encoders 1 and 2, and two connectors in the bottom side for encoders 3 and 4.
Hardware Setup 13
ACC-84E User Manual
5 4 3 2 1
D-Sub DE9 Female
9 8 7 6
Mating: D-Sub DE9 Male
Hardware Setup 14
ACC-84E User Manual
1 3 5
1
6
2
7
3
8
4
2 4 6
9
5
SDI (Blue/Black)
GND (Black)
BAT-
(Orange/Black)
The previous diagram shows the pin assignment from mating IEEE 1394 Yaskawa Sigma II connector to
ACC-84E encoder input. The Molex connector required for IEEE 1394 can be acquired as receptacle kit
from Molex, 2.00mm (.079") Pitch Serial I/O Connector, Receptacle Kit, Wire-to-Wire, Molex Part
Number: 0542800609.
Hardware Setup 15
ACC-84E User Manual
9 31 +5VDC
5 4 3 2 1
9 8 7 6
4 2
GND
BAT-
MRR
The diagram above shows the pin assignment from mating 3M SCR Receptacle (36110) to ACC-84E
encoder input.
Hardware Setup 16
ACC-84E User Manual
SOFTWARE SETUP
ACC-84E supports multiple protocols and for this reason the setup for each of them will be different. For
each protocol, depending on the CPU type, the setup steps differs slightly, but the general idea regardless
of the protocol is the same.
Position encoders that provide numerical position information in a serial data stream, usually representing
absolute position information, are becoming increasingly popular. ACC-84E is an FPGA-based interface
which is programmed to support different serial protocols. Multiple serial encoder protocols are supported
by ACC-84E.
Software Setup 17
ACC-84E User Manual
Phase
Clock
Used1
t=1 TD1 Xmit1 TD2 Xmit2 Used2
Servo
Clock
The “SEIGATE” FPGA on the ACC-84E UMAC board has a multi-channel setup element that affects all
channels on the IC, and a single-channel setup element for each channel.
This section describes the setup elements for the serial encoder interface in general terms. Detailed
information for each serial encoder protocol can be found in the following reference chapters of the
manual.
Software Setup 18
ACC-84E User Manual
Acc84E[i].SerialEncCtrl is the full-word element that comprises the multi-channel setup for serial
encoder interfaces for the ACC-84E. It is comprised of the following components (which cannot be
accessed as independent elements):
Turbo PMAC/
Hex C
Component Power PMAC Functionality
Digit # Bits
Script Bits
SerialClockMDiv 23 – 16 1–2 31 – 24 Serial clock linear division factor
SerialClockNDiv 15 – 12 3 23 – 20 Serial clock exponent division factor
(Reserved) 11 – 10 4 19 – 18 (Reserved for future use)
SerialTrigClockSel 09 4 17 Serial trigger source select
SerialTrigEdgeSel 08 4 16 Serial trigger source edge select
SerialTrigDelay 07 – 04 5 15 – 12 Serial trigger delay from source edge
SerialProtocol 03 – 00 6 11 – 08 Serial encoder protocol select (read-only)
Software Setup 19
ACC-84E User Manual
The component SerialClockMDiv controls how an intermediate clock frequency is generated from the
IC’s fixed 100 MHz clock frequency. The resulting serial-encoder clock frequency is then generated from
this intermediate clock frequency by the component SerialClockNDiv, described below.
The equation for this intermediate clock frequency fint is:
f int MHz
100
M 1
where M is short for SerialClockMDiv. This 8-bit component can take a value from 0 to 255, so the
resulting intermediate clock frequencies can range from 100 MHz down to 392 kHz.
The component SerialClockNDiv controls how the final serial-encoder clock frequency is generated from
the intermediate clock frequency set by SerialClockMDiv. The equation for this final frequency fser is:
f int MHz
f ser MHz
100
2 N
M 1 * 2 N
where N is short for SerialClockNDiv. This 4-bit component can take a value from 0 to 15, so the
resulting 2N divisor can take a value from 1 to 32,768.
For serial-encoder protocols with an explicit clock signal, the resulting frequency is the frequency of the
clock signal that is output from the ACC-84E’s IC to the encoder. For “self-clocking” protocols without
an explicit clock signal, this frequency is the input sampling frequency, and will be 20 to 25 times higher
than the input bit rate fbit. Refer to the instructions for the particular protocol for details.
The component SerialTrigClockSel controls which Power PMAC clock signal causes the encoder to be
triggered. This single-bit component is set to 0, the encoder will be triggered on the phase clock; if it is set
to 1, the encoder will be triggered on the servo clock. If the encoder feedback is required for commutation
rotor angle feedback, it should be triggered on the phase clock; otherwise it can be triggered on the servo
clock.
The component SerialTrigEdgeSel controls which edge of the clock signal (phase or servo) selected by
SerialTrigClockSel initiates the triggering process. If this single-bit component is set to 0, the triggering
process starts on the rising edge; if it is set to 1, the triggering process starts on the falling edge.
Power PMAC software expects to have the resulting encoder data available to it immediately after the
falling edge of the relevant phase or servo clock signal, which interrupts the processor to initiate the
activity that reads this data. Since minimum delay from trigger to use is desirable, it is better to start the
triggering on rising clock edge if the data can be fully transferred before the falling edge. If this is not
possible, the falling edge should be used to start the triggering process.
It is best to choose the edge that minimizes the delay between the triggering of the encoder and its use by
the Power/Turbo PMAC software. The software will use the received encoder value immediately after the
falling edge of the phase clock for commutation feedback, and immediately after the falling edge of the
servo clock for servo feedback.
If you are using the serial encoder data for commutation feedback, you must trigger using the phase clock
in order to get new data every phase cycle. If there is sufficient time to receive the data in one half of a
phase clock cycle, you should use the rising edge of the phase clock to trigger. For example, at the default
phase clock frequency of 9 kHz, a clock cycle is 110 µsec. If the serial encoder data can be received
within 55 µsec, the rising edge should be used. If not, the falling edge must be used.
If you are only using the serial encoder data for servo, and not commutation, feedback, the servo clock
can be used for the trigger. However, it is still advisable to use the phase clock if possible to minimize the
delay. When using the servo clock, as with the phase clock, use the rising edge if possible for the trigger,
and the falling edge only if required.
Remember that the servo clock signal is low only for one half phase clock cycle. For example, with the
default 9 kHz phase clock and 2.25 kHz servo clock, the servo clock is low for only a half of 110 µsec
phase clock cycle, and the delay from the rising edge to the next falling edge is 385 µsec.
The component SerialTrigDelay specifies the delay from the specified clock edge to the actual start of the
output signal that will trigger the encoder response, in units of the serial encoder clock. A non-zero value
Software Setup 20
ACC-84E User Manual
can be used to minimize the delay between triggering the encoder and its resulting use by the Power
PMAC.
The triggering does not need to start exactly on the specified clock edge. The trigger delay component
SerialTrigDelay specifies the number of 20-microsecond intervals after the specified clock edge before
the triggering of the encoder actually begins. It can take a value of $0 to $F (0 to 15, or 0 to 300
microseconds). Non-zero values can be used to minimize the delay between triggering of the encoder and
the use of its data in the next software cycle.
The component SerialProtocol controls which serial-encoder protocol is selected for all channels of the
IC. This 4-bit component can take a value from 0 to 15. This component is read-only, as it reflects the
protocol interface that was installed in the board at the factory.
The FPGA used here comes with the interface for only a single
serial protocol, which was pre-installed at the factory as specified in
the order. This component of the element is read-only, simply
Note notifying the user which protocol has been installed.
The following table shows the protocol selected for each value of this component (more protocols may be
added):
When used in the Script environment (Both Turbo and Power PMAC), Acc84E[i].SerialEncCtrl is a 24-
bit element. When used in the C environment (Power PMAC Only), it is a 32-bit element, with real data
in the high 24 bits, so its value in the C environment is 256 times greater than its value in the Script
environment.
Software Setup 21
ACC-84E User Manual
SSI Protocol
The following list shows typical settings of Acc84E[i].SerialEncCtrl for an SSI encoder.
SerialClockMDiv: = (100 / fbit) - 1 // Serial clock frequency = bit transmission frequency
SerialClockNDiv: =0 // No further division unless f < 400 kHz
SerialTrigClockSel: =0 // Use phase clock if possible
SerialTrigEdgeSel: =0 // Use rising clock edge if possible
SerialTrigDelay: =0 // Can increase from 0 if possible to reduce latency
SerialProtocol: = $02 // Shows SSI protocol is programmed into IC
For example, for a 2.5 MHz bit transmission rate, SerialClockMDiv = (100 / 2.5) - 1 = 39 ($23) and
Acc84E[i].SerialEncCtrl is set to $230002 for triggering on the rising edge of phase clock without delay.
Hex Digit ($) 2 3 0 0 0 2 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 1 0 0 0 1 1 0 0 0 0 - - 0 0 0 0 0 0 0 0 1 0 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists a few common Serial clock frequency settings used with SSI protocol:
Software Setup 22
ACC-84E User Manual
For example, for a 2.0 MHz bit transmission rate, SerialClockMDiv = (4 / 2) - 1 = 1 ($01) and
Acc84E[i].SerialEncCtrl is set to $010003 for triggering on the rising edge of phase clock without delay.
Hex Digit ($) 0 1 0 0 0 3 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 1 0 0 0 0 - - 0 0 0 0 0 0 0 0 1 1 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists a few common Serial clock frequency settings used with EnDat2.1/2.2 protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Freq. Bit Transmission Freq.
0 ($00) 2 ($2) 25.0 MHz 1.0 MHz
0 ($00) 3 ($3) 12.5 MHz 500 kHz
0 ($00) 4 ($4) 6.25 MHz 250 kHz
In newer version of the EnDat 2.1/2.2 firmware for ACC-84E (Released Feb. 4, 2014) bit 11 is used as backward
compatible switch, which if set allows higher bit transmission frequencies.
The following list shows typical settings of Acc84E[i].SerialEncCtrl based upon the additional clock
switch for an EnDat encoder. The the bit transmission frequency fbit (MHz) is fixed at 1/4 of the external
clock frequency.
SerialClockMDiv: = (25 / fbit) - 1 // Serial clock freq. = 4x bit transmission freq.
SerialClockNDiv: =0 // No further division
SerialDivSelect: =0 // Selects higher clock frequency selection
SerialTrigClockSel: =0 // Use phase clock if possible
SerialTrigEdgeSel: =0 // Use rising clock edge if possible
SerialTrigDelay: =0 // Can increase from 0 if possible to reduce latency
SerialProtocol: = $03 // Shows EnDat protocol is programmed into IC
For example, for a 5.0 MHz bit transmission rate, SerialClockMDiv = (25 / 5) - 1 = 4 ($04) and
Acc84E[i].SerialEncCtrl is set to $040803 for triggering on the rising edge of phase clock without delay.
Hex Digit ($) 0 4 0 8 0 3 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 1 0 0 0 0 1 - 0 0 0 0 0 0 0 0 1 1 - -
Component: SerialClockMDiv SerialClockNDiv DS -- TC TE SerialTrigDelay SerialProtocol
Software Setup 23
ACC-84E User Manual
The following table lists a few common Serial clock frequency settings used with EnDat2.1/2.2 protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Freq. Bit Transmission Freq.
1 ($01) 0 ($0) 50.0 MHz 12.5 MHz
2 ($02) 0 ($0) 33.33 MHz 8.33 MHz
3 ($03) 0 ($0) 25.0 MHz 6.25 MHz
4 ($04) 0 ($0) 20.0 MHz 5.0 MHz
5 ($05) 0 ($0) 16.66 MHz 4.16 MHz
For example, for the standard 4.0 MHz bit transmission rate, a 100 MHz serial clock frequency is used,
and Acc84E[i].SerialEncCtrl is set to $000006 for triggering on the rising edge of phase clock without
delay.
Hex Digit ($) 0 0 0 0 0 6 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 0 0 0 0 0 - - 0 0 0 0 0 0 0 1 1 0 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists the only Serial clock frequency setting used with Yaskawa Sigma II/III/V
protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Frequency
0 ($00) 0 ($0) 100.0 MHz
Software Setup 24
ACC-84E User Manual
Tamagawa Protocol
The following list shows typical settings of Acc84E[i].SerialEncCtrl for a Tamagawa FA-Coder serial
encoder. The serial clock frequency is set 20 times higher than the external clock frequency, which is the
bit transmission frequency fbit, to permit oversampling of the input signal.
SerialClockMDiv: = (5 / fbit) - 1 // Serial clock freq. = 20x bit transmission freq.
SerialClockNDiv: =0 // No further division
SerialTrigClockSel: =0 // Use phase clock if possible
SerialTrigEdgeSel: =0 // Use rising clock edge if possible
SerialTrigDelay: =0 // Can increase from 0 if possible to reduce latency
SerialProtocol: = $07 // Shows Tamagawa protocol is programmed into IC
For example, for a 2.5 MHz bit transmission rate, SerialClockMDiv = (5 / 2.5) - 1 = 1 ($01) and
Acc84E[i].SerialEncCtrl is set to $010007 for triggering on the rising edge of phase clock without delay.
Hex Digit ($) 0 1 0 0 0 7 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 1 0 0 0 0 - - 0 0 0 0 0 0 0 1 1 1 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists the only Serial clock frequency setting used with Tamagawa protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Frequency
1 ($01) 0 ($0) 50.0 MHz
Software Setup 25
ACC-84E User Manual
Panasonic Protocol
The following list shows typical settings of Acc84E[i].SerialEncCtrl for a Panasonic encoder. The serial
clock frequency is set 20 times higher than the external clock frequency, which is the bit transmission
frequency fbit, to permit oversampling of the input signal.
SerialClockMDiv: = (5 / fbit) - 1 // Serial clock freq. = 20x bit transmission freq.
SerialClockNDiv: =0 // No further division
SerialTrigClockSel: =0 // Use phase clock if possible
SerialTrigEdgeSel: =0 // Use rising clock edge if possible
SerialTrigDelay: =0 // Can increase from 0 if possible to reduce latency
SerialProtocol: = $09 // Shows Panasonic protocol is programmed into IC
For example, for a 2.5 MHz bit transmission rate, SerialClockMDiv = (5 / 2.5) - 1 = 1 ($01) and
Acc84E[i].SerialEncCtrl is set to $010008 for triggering on the rising edge of phase clock without delay.
Hex Digit ($) 0 1 0 0 0 8 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 1 0 0 0 0 - - 0 0 0 0 0 0 1 0 0 0 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists the only Serial clock frequency setting used with Panasonic protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Frequency
1 ($01) 0 ($0) 50.0 MHz
Software Setup 26
ACC-84E User Manual
Mitutoyo Protocol
The following list shows typical settings of Acc84E[i].SerialEncCtrl for a Mitutoyo serial encoder. The
serial clock frequency is set 20 times higher than the external clock frequency, which is the bit
transmission frequency fbit, to permit oversampling of the input signal.
SerialClockMDiv: = (5 / fbit) - 1 // Serial clock freq. = 20x bit transmission freq.
SerialClockNDiv: =0 // No further division
SerialTrigClockSel: =0 // Use phase clock if possible
SerialTrigEdgeSel: =0 // Use rising clock edge if possible
SerialTrigDelay: =0 // Can increase from 0 if possible to reduce latency
SerialProtocol: = $09 // Shows Mitutoyo protocol is programmed into IC
For example, for a 2.5 MHz bit transmission rate, SerialClockMDiv = (5 / 2.5) - 1 = 1 ($01) and
Acc84E[i].SerialEncCtrl is set to $010009 for triggering on the rising edge of phase clock without delay.
Hex Digit ($) 0 1 0 0 0 9 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 1 0 0 0 0 - - 0 0 0 0 0 0 1 0 0 1 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists the only Serial clock frequency setting used with Mitutoyo protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Frequency
1 ($01) 0 ($0) 50.0 MHz
Software Setup 27
ACC-84E User Manual
For example, for a 1.0 MHz bit transmission rate, SerialClockMDiv = (100 / 1.0) - 1 = 99 ($63) and
Acc84E[i].SerialEncCtrl is set to $63000B for triggering on the rising edge of phase clock without
delay.
Hex Digit ($) 6 3 0 0 0 B - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 1 1 0 0 0 1 1 0 0 0 0 - - 0 0 0 0 0 0 1 0 1 1 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists a few common Serial clock frequency settings used with BiSS B/C protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Frequency
24 ($18) 0 ($0) 4.0 MHz
99 ($63) 0 ($0) 1.0 MHz
99 ($63) 1 ($1) 500.0 kHz
99 ($63) 2 ($2) 250.0 kHz
Software Setup 28
ACC-84E User Manual
Matsushita Protocol
The following list shows typical settings of Acc84E[i].SerialEncCtrl for a Matsushita serial encoder.
The serial clock frequency is set 20 times higher than the external clock frequency, which is the bit
transmission frequency fbit, to permit oversampling of the input signal.
SerialClockMDiv: = (5 / fbit) - 1 // Serial clock freq. = 20x bit transmission freq.
SerialClockNDiv: =0 // No further division
SerialTrigClockSel: =0 // Use phase clock if possible
SerialTrigEdgeSel: =0 // Use rising clock edge if possible
SerialTrigDelay: =0 // Can increase from 0 if possible to reduce latency
SerialProtocol: = $0C // Shows Matsushita protocol is programmed into IC
For example, for a 2.5 MHz bit transmission rate, SerialClockMDiv = (5 / 2.5) - 1 = 1 ($01) and
Acc84E[i].SerialEncCtrl is set to $01000C for triggering on the rising edge of phase clock without
delay.
Hex Digit ($) 0 1 0 0 0 C - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 1 0 0 0 0 - - 0 0 0 0 0 0 1 1 0 0 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists the only Serial clock frequency setting used with Matsushita protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Frequency
1 ($01) 0 ($0) 50.0 MHz
Software Setup 29
ACC-84E User Manual
Mitsubishi Protocol
The following list shows typical settings of Acc84E[i].SerialEncCtrl for a Mitsubishi serial encoder. The
serial clock frequency is set 20 times higher than the external clock frequency, which is the bit
transmission frequency fbit, to permit oversampling of the input signal.
SerialClockMDiv: = (5 / fbit) - 1 // Serial clock freq. = 20x bit transmission freq.
SerialClockNDiv: =0 // No further division
SerialTrigClockSel: =0 // Use phase clock if possible
SerialTrigEdgeSel: =0 // Use rising clock edge if possible
SerialTrigDelay: =0 // Can increase from 0 if possible to reduce latency
SerialProtocol: = $0D // Shows Mitsubishi protocol is programmed into IC
For example, for a 2.5 MHz bit transmission rate, SerialClockMDiv = (5 / 2.5) - 1 = 1 ($01) and
Acc84E[i].SerialEncCtrl is set to $01000D for triggering on the rising edge of phase clock without
delay.
Hex Digit ($) 0 1 0 0 0 D - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 0 0 0 0 1 0 0 0 0 - - 0 0 0 0 0 0 1 1 0 1 - -
Component: SerialClockMDiv SerialClockNDiv -- -- TC TE SerialTrigDelay SerialProtocol
The following table lists the only Serial clock frequency setting used with Mitsubishi protocol:
SerialClockMDiv SerialClockNDiv Serial Clock Frequency
1 ($01) 0 ($0) 50.0 MHz
Software Setup 30
ACC-84E User Manual
Turbo Channel
Power PMAC
PAMC Base
Channel Control Register 1 (j=0) 2 (j=1) 3 (j=2) 4 (j=3)
Address
ACC84E[0].Chan[j].SerialEncCmd $78C00 Y:$78C00 Y:$78C04 Y:$78C08 Y:$78C0C
ACC84E[4].Chan[j].SerialEncCmd $79C00 Y:$79C00 Y:$79C04 Y:$79C08 Y:$79C0C
ACC84E[8].Chan[j].SerialEncCmd $7AC00 Y:$7AC00 Y:$7AC04 Y:$7AC08 Y:$7AC0C
ACC84E[12].Chan[j].SerialEncCmd $7BC00 Y:$7BC00 Y:$7BC04 Y:$7BC08 Y:$7BC0C
ACC84E[1].Chan[j].SerialEncCmd $78D00 Y:$78D00 Y:$78D04 Y:$78D08 Y:$78D0C
ACC84E[5].Chan[j].SerialEncCmd $79D00 Y:$79D00 Y:$79D04 Y:$79D08 Y:$79D0C
ACC84E[9].Chan[j].SerialEncCmd $7AD00 Y:$7AD00 Y:$7AD04 Y:$7AD08 Y:$7AD0C
ACC84E[13].Chan[j].SerialEncCmd $7BD00 Y:$7BD00 Y:$7BD04 Y:$7BD08 Y:$7BD0C
ACC84E[2].Chan[j].SerialEncCmd $78E00 Y:$78E00 Y:$78E04 Y:$78E08 Y:$78E0C
ACC84E[6].Chan[j].SerialEncCmd $79E00 Y:$79E00 Y:$79E04 Y:$79E08 Y:$79E0C
ACC84E[10].Chan[j].SerialEncCmd $7AE00 Y:$7AE00 Y:$7AE04 Y:$7AE08 Y:$7AE0C
ACC84E[14].Chan[j].SerialEncCmd $7BE00 Y:$7BE00 Y:$7BE04 Y:$7BE08 Y:$7BE0C
Script Hex C
Component Functionality
Bits Digit # Bits
SerialEncCmdWord 23 – 16 1–2 31 – 24 Serial encoder output command
SerialEncParity 15 – 14 3 23 – 22 Serial encoder parity type
SerialEncTrigMode 13 3 21 Serial trigger mode: continuous or one-shot
SerialEncTrigEna 12 3 20 Serial trigger enable
SerialEncGtoB 11 4 19 Serial SSI data Gray-to-binary convert control
SerialEncEna/ 10 4 18 Serial encoder circuitry enable (write)
SerialEncDataReady Serial encoder received data ready (read)
SerialEncStatusBits 09 – 06 4–5 17 – 14 Serial encoder SPI number of status bits
SerialEncNumBits 05 – 00 5–6 13 – 08 Serial encoder bit length control
Software Setup 31
ACC-84E User Manual
The full element can be viewed in the following format. In the Script environment (Both in Turbo and
Power PMAC), it is accessed as a 24-bit element. In the C environment (Only in Power PMAC), it is
accessed as a 32-bit element with the real data in the high 24 bits.
The 8-bit component SerialEncCmdWord is used to define a command value sent to the serial encoder in
a protocol-specific manner. This value can be changed during an application for different functionality,
such as resetting an encoder. Not all protocols require a command value.
The 2-bit component SerialEncParity defines the parity type to be expected for the received data packet
(for those protocols that support parity checking). A value of 0 specifies no parity; a value of 1 specifies
odd parity; a value of 2 specifies even parity. (A value of 3 is reserved for future use.)
The 1-bit component SerialEncTrigMode specifies whether the encoder is to be repeatedly sampled or
just one time. A value of 0 specifies continuous sampling (every phase or servo cycle as set by the multi-
channel element Acc84E[i].SerialEncCtrl); a value of 1 specifies one-shot sampling.
The 1-bit component SerialEncTrigEna specifies whether the encoder is to be sampled or not. A value of
0 specifies no sampling; a value of 1 enables sampling of the encoder. If sampling is enabled with
SerialEncTrigMode at 0, the encoder will be repeatedly sampled (every phase or servo cycle as set by the
multi-channel element Acc84E[i].SerialEncCtrl) as long as SerialEncTrigEna is left at a value of 1.
However, if sampling is enabled with SerialEncTrigMode at 1, the encoder will be sampled just once, and
the ACC-84E’s IC will automatically set SerialEncTrigEna back to 0 after the sampling.
The 1-bit component SerialEncGtoB specifies whether the data returned in SSI protocol undergoes a
conversion from Gray format to numerical-binary format or not. A value of 0 specifies that no conversion
is done; a value of 1 specifies that the incoming data undergoes a Gray-to-binary conversion.
The 1-bit component SerialEncEna / SerialEncDataReady has separate functions for writing to and
reading from the register. When writing to the register, this bit represents SerialEncEna, which enables
the driver circuitry for the serial encoder. This bit must be set to 1 to use any protocol of serial encoder on
the channel. If there is an alternate use for the same signal pins, this bit must be set to 0 so the encoder
drivers do not conflict with the alternate use. Note that you cannot read back the value you have written
to this bit!
When reading from the register, you get the SerialEncDataReady status bit indicating the state of the
serial data reception. It reports 0 during the data transmission indicating that valid new data is not yet
ready. It reports 1 when all of the data has been received and processed. This is particularly important for
slower interfaces that may take multiple servo cycles to complete a read; in these cases, the bit should be
polled to determine when data is ready.
Software Setup 32
ACC-84E User Manual
The 4-bit component SerialEncStatusBits specifies the number of status bits the interface will expect from
the encoder in the SPI protocol. The valid range of settings is 0 to 12.
The 6-bit component SerialEncNumBits specifies the number of data bits the interface will expect from
the encoder in the SSI, EnDat, or BiSS protocol. The valid range of settings for these protocols is 12 – 63.
In other protocols, the number of bits is not specified this way, and this value does not matter, so this
component is usually left at 0.
When used in the Script environment, Acc84E[i].Chan[j].SerialEncCmd is a 24-bit element. When used
in the C environment, it is a 32-bit element, with real data in the high 24 bits, so its value in the C
environment is 256 times greater than its value in the Script environment.
Software Setup 33
ACC-84E User Manual
SSI Protocol
The following list shows typical settings of Acc84E[i].Chan[j].SerialEncCmd for an SSI encoder.
SerialEncCmdWord: =0 // No command word supported for SSI protocol
SerialEncParity: = ?? // Encoder-specific parity check
SerialEncTrigMode: =0 // Continuous triggering
SerialEncTrigEna: =1 // Enable triggering
SerialEncGtoB: = ?? // Encoder-specific data format
SerialEncEna: =1 // Enable driver circuitry
SerialEncStatusBits: =0 // No status bits supported for SSI protocol
SerialEncNumBits: = ?? // Encoder-specific number of position bits returned
For example, for an SSI encoder with 25 position bits in Gray-code format with odd parity,
Acc84E[i].Chan[j].SerialEncCmd would be set to $005C19. (It may report back as $005819 if the data-
ready status bit is not set.)
Hex Digit ($) 0 0 5 C 1 9 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value - - - - - - - - 0 1 0 1 1 1 - - - - 0 1 1 0 0 1 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
Software Setup 34
ACC-84E User Manual
EnDat2.1/2.2 Protocol
The EnDat interface in the ACC-84E supports four 6-bit command codes that are sent directly to the
encoder:
000111 ($07) for reporting position (EnDat2.1)
101010 ($2A) for resetting the encoder (EnDat2.1)
111000 ($38) for reporting position with possible additional information (EnDat2.2)
101101 ($2D) for resetting the encoder (EnDat2.2)
These 6 bits fit at the low end of the 8-bit SerialEncCmdWord command field of
Acc84E[i].Chan[j].SerialEncCmd.
For EnDat2.2 encoders, the ACC-84E (starting 1st quarter 2014) also supports controller requests for
additional information from the encoder through the use of Memory Range Select (MRS) codes. To
implement these, the SerialEncCmdWord command field contains the MRS code. (In this mode, the
ACC-84E sends the 111000 command code – report position with additional information – to the
encoder.)
The following MRS codes are supported in the EnDat2.2 standard:
$40 – Send additional info 1 w/o data content (NOP)
$41 – Send diagnostic values
$42 – Send position value 2 word 1 LSB
$43 – Send position value 2 word 2
$44 – Send position value 2 word 3 MSB
$45 – Acknowledge memory content LSB
$46 – Acknowledge memory content MSB
$47 – Acknowledge MRS code
$48 – Acknowledge test command
$49 – Send test value word 1 LSB
$4A – Send test value word 2
$4B – Send test value word 3 MSB
$4C – Send temperature 1
$4D – Send temperature 2
$4F – Stop sending additional information 1
$50 – Send additional info 2 w/o data contents (NOP)
$51 – Send commutation
$52 – Send acceleration
$53 – Send commutation & acceleration
$54 – Send limit position signals
$55 – Send limit position signals & acceleration
$56 – Currently not assigned
$5F – Stop sending additional information 2
The response from the encoder to specific MRS code data requests from the encoder depends on the
availability of that data in the encoder. The additional information provided from supported MRS codes
will be found in status elements Acc84E[i].Chan[j].SerialEncDataC and SerialEncDataD.
Software Setup 35
ACC-84E User Manual
The following list shows typical settings of Acc84E[i].Chan[j].SerialEncCmd for position reporting
from an EnDat encoder.
SerialEncCmdWord: = {cmd/MRS code} // Command code
SerialEncParity: =0 // No parity check supported for EnDat protocol
SerialEncTrigMode: =0 // Continuous triggering (EnDat2.2)
SerialEncTrigEna: =1 // Enable triggering
SerialEncGtoB: =0 // No Gray code supported for EnDat protocol
SerialEncEna: =1 // Enable driver circuitry
SerialEncStatusBits: =0 // No status bits supported for EnDat protocol
SerialEncNumBits: = {enc spec} // Encoder-specific number of position bits returned
For example, for an EnDat2.2 encoder with 37 position bits, Acc84E[i].Chan[j].SerialEncCmd would be
set to $381425 for continuous position reporting. (It may report back as $381025 if the data-ready status
bit is not set.)
pg 3 8 1 4 2 5 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value - 0 1 1 1 0 0 0 - - 0 1 - 1 - - - - 1 0 0 1 0 1 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
This same encoder can be reset with a command word value of 45 ($2D) sent in one-shot mode with
Acc84E[i].Chan[j].SerialEncCmd set to $2D3425.
Hex Digit ($) 2 D 3 4 2 5 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value - 0 1 0 1 1 0 1 - - 1 1 - 1 - - - - 1 0 0 1 0 1 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
Software Setup 36
ACC-84E User Manual
Acc84E[i].Chan[j].SerialEncCmd would be set to $001400 for continuous position reporting. (It may
report back as $001000 if the ready status bit is not set.)
Hex Digit ($) 0 0 1 4 0 0 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value - - 0 0 0 0 0 0 - - 0 1 - 1 0 0 0 0 0 0 0 0 0 0 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
It is important for user to implement a background process, such as a PLC to check for TimeoutError,
CRC_Error and CodingError bits available in Acc84E[i].Chan[j].SerialEncDataB register to ensure
validity of connection and position data.
Most alarm conditions in Yaskawa Sigma II/III/V encoder are either level fault (non-latching) or are
cleared at cycle power, but absolute encoders have two latching errors (Backup Alarm which is usually
caused by loss/drainage of battery or Encoder Error Alarm which is caused by internal circuit bearkdown in the
encoder) which are not cleared on cycle power and require special instructions transmitted from controller for
clearing them.
Software Setup 37
ACC-84E User Manual
This means that Acc84E[i].Chan[j].SerialEncCmd would be set to $043501 to start a fault reset. (It may
report back as $043101 if the ready status bit is not set.)
Hex Digit ($) 0 4 3 5 0 1 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value - - 0 0 0 1 0 0 - - 1 1 - 1 0 1 0 0 0 0 0 0 0 1 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
The following steps show the procedure for clearing the latched alarms on absolute encoders which the
user/plc should perform in certain order:
1. Write the value $043501 to Acc84E[i].Chan[j].SerialEncCmd.
2. Wait 10 milliseconds.
3. Wait for the trigger-enable component (Script bit 12) of this element to clear.
4. Wait for the busy signal (Script bit 8) of Acc84E[i].Chan[j].SerialEncDataB to clear. If cleared
go to step 7.
5. Clear the command code of this element to $00 by writing $003501 to the element.
6. Repeat steps 2 to 4.
7. Resume continuous position requests by writing $001400 to the element.
Software Setup 38
ACC-84E User Manual
Acc84E[i].Chan[j].SerialEncCmd would be set to $1A1400 for continuous position reporting. (It may
report back as $1A1000 if the ready status bit is not set.)
Hex Digit ($) 1 A 1 4 0 0 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 0 1 1 0 1 0 0 0 0 1 - 1 - - - - 0 0 0 0 0 0 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
If the SerialEncCmdWord component is set to $BA and triggered for 10 consecutive cycles with 40
microseconds interval or more, all latched errors (Overspeed, Counter Overflow, Muti-turn error,
Counting Error II and Battery Error). This should be done in “one-shot” mode, making the element equal
to $BA3400 and triggered for 10 consecutive cycles with 40 microseconds interval or more.
If the SerialEncCmdWord component is set to $C2 and triggered for 10 consecutive cycles with 40
microseconds interval or more, the multi-turn position value in the encoder is reset to 0 and also all
latched errors are cleared. This should be done in “one-shot” mode, making the element equal to $C23400
and triggered for 10 consecutive cycles with 40 microseconds interval or more.
When the reset operation is done, the component should report as $BA2000, $C22000 respectively.
Software Setup 39
ACC-84E User Manual
Panasonic Protocol
The following list shows typical settings of Acc84E[i].Chan[j].SerialEncCmd for a Panasonic serial
encoder.
SerialEncCmdWord: = $2A // Command word for multi-turn position in Panasonic
SerialEncParity: =0 // No parity check supported for Panasonic protocol
SerialEncTrigMode: =0 // Continuous triggering
SerialEncTrigEna: =1 // Enable triggering
SerialEncGtoB: =0 // No Gray code supported for Panasonic protocol
SerialEncEna: =1 // Enable driver circuitry
SerialEncStatusBits: =0 // No status bits supported for Panasonic protocol
SerialEncNumBits: =0 // Fixed number of position bits returned
Acc84E[i].Chan[j].SerialEncCmd would be set to $2A1400 for continuous position reporting. (It may
report back as $2A1000 if the ready status bit is not set.)
Hex Digit ($) 2 A 1 4 0 0 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 1 0 1 0 1 0 0 0 0 1 - 1 - - - - 0 0 0 0 0 0 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
If the SerialEncCmdWord component is set to $52 for single-turn position reporting with alarm code,
Acc84E[i].Chan[j].SerialEncCmd would be set to $521400. (It may report back as $521000 if the data-
ready status bit is not set.) If the SerialEncCmdWord component is set to $52, the encoder ID value is also
reported.
If the SerialEncCmdWord component is set to $4A and triggered for 10 consecutive cycles with 40
microseconds interval or more Counter Overflow and Battery Alarm flags are cleared. This should be
done in “one-shot” mode, making the element equal to $4A3400 and triggered for 10 consecutive cycles
with 40 microseconds interval or more. The register should report as $4A2000 after completion of a
single trigger.
If the SerialEncCmdWord component is set to $F2 and triggered for 10 consecutive cycles with 40
microseconds interval or more, all latched errors are cleared (Overspeed, Counter Overflow, Mutiple
Revolution Error, Count Error II, Battery Alarm and System Down). This should be done in “one-shot”
mode, making the element equal to $F23400 and triggered for 10 consecutive cycles with 40
microseconds interval or more. The register should report as $F22000 after completion of a single trigger.
If the SerialEncCmdWord component is set to $DA and triggered for 10 consecutive cycles with 40
microseconds interval or more, the multi-turn position value in the encoder is reset to 0 (single revolution
data will not be reset) and also all latched errors are cleared (Overspeed, Counter Overflow, Mutiple
Revolution Error, Count Error II, Battery Alarm and System Down). This should be done in “one-shot”
mode, making the element equal to $DA3400 and triggered for 10 consecutive cycles with 40
microseconds interval or more. The register should report as $DA2000 after completion of a single
trigger.
If the SerialEncCmdWord component is set to $7A and triggered for 10 consecutive cycles with 40
microseconds interval or more single revolution data will be reset to 0°±0.35° (MAX). This should be
done in “one-shot” mode, making the element equal to $7A3400 and triggered for 10 consecutive cycles
with 40 microseconds interval or more. Notice that this reset command (all 10) should only be sent when
the encoder is at rest with no movement. Once reset, the single turn zero location is maintained regardless
of connection of external battery after main power source is turned off. The register should report as
$7A2000 after completion of a single trigger.
Software Setup 40
ACC-84E User Manual
Mitutoyo Protocol
The following list shows typical settings of Acc84E[i].Chan[j].SerialEncCmd for a Mitutoyo serial
encoder.
SerialEncCmdWord: = $01 // Command word for position reporting in Mitutoyo
SerialEncParity: =0 // No parity check supported for Mitutoyo protocol
SerialEncTrigMode: =0 // Continuous triggering
SerialEncTrigEna: =1 // Enable triggering
SerialEncGtoB: =0 // No Gray code supported for Mitutoyo protocol
SerialEncEna: =1 // Enable driver circuitry
SerialEncStatusBits: =0 // No status bits supported for Mitutoyo protocol
SerialEncNumBits: =0 // Fixed number of position bits returned
Acc84E[i].Chan[j].SerialEncCmd would be set to $011400 for continuous position reporting. (It may
report back as $011000 if the ready status bit is not set.)
If the SerialEncCmdWord component is set to $89 and sent 8 times, the encoder is reset (equivalent to
power cycle on encoder). This should be done in “one-shot” mode repeated 8 times, making the element
equal to $893400. When the reset operation is done, the component should report as $892000.
If this component is set to $9D, the encoder will report its ID value. This should be done in “one-shot”
mode, and the IC will hold this value in status element Acc84E[i].Chan[j].SerialEncDataC.
Software Setup 41
ACC-84E User Manual
The following list shows typical settings of Acc84E[i].Chan[j].SerialEncCmd for a BiSS C encoder.
SerialEncCmdWord: = $21 // CRC polynomial of x6 + x1 + 1
SerialEncParity: =0 // BiSS-C protocol variant
SerialEncTrigMode: =0 // Continuous triggering
SerialEncTrigEna: =1 // Enable triggering
SerialEncGtoB: =0 // No Gray code supported for EnDat protocol
SerialEncEna: =1 // Enable driver circuitry
SerialEncStatusBits: = {enc spec} // Encoder-specific number of position bits returned
SerialEncNumBits: = {enc spec} // Encoder-specific number of status bits returned
For example, for a BiSS-C encoder with 36 position bits, 2 status bits, and a CRC polynomial of x6 + x1 +
1 (as with the Renishaw ResoluteTM encoders), Acc84E[i].Chan[j].SerialEncCmd would be set to
$2114A4 for continuous position reporting. (It may report back as $2110A4 if the data-ready status bit is
not set.)
Software Setup 42
ACC-84E User Manual
For a BiSS-B encoder with 32 position bits, 4 status bits, an MCD bit, and a CRC polynomial of x4 + x1 +
1 , Acc84E[i].Chan[j].SerialEncCmd would be set to $09D520 for continuous position reporting. (It
may report back as $09D120 if the data-ready status bit is not set.)
Matsushita Protocol
The following list shows typical settings of Acc84E[i].Chan[j].SerialEncCmd for a Matsushita serial
encoder.
SerialEncCmdWord: = $CA // Command word for multi-turn position in Matsushita
SerialEncParity: =0 // No parity check supported for Matsushita protocol
SerialEncTrigMode: =0 // Continuous triggering
SerialEncTrigEna: =1 // Enable triggering
SerialEncGtoB: =0 // No Gray code supported for Matsushita protocol
SerialEncEna: =1 // Enable driver circuitry
SerialEncStatusBits: =0 // No status bits supported for Matsushita protocol
SerialEncNumBits: =0 // first 4 bits represent the Encoder ID
Acc84E[i].Chan[j].SerialEncCmd would be set to $CA1400 for continuous position reporting. (It may
report back as $CA1000 if the ready status bit is not set.)
Hex Digit ($) C A 1 4 0 0 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 1 1 0 0 1 0 1 0 0 0 0 1 - 1 - - - - - - 0 0 0 0 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Reserved EncoderID
Matsushita protocol supports two modes of communication: independent and continuous. In Delta Tau’s
implementation of this protocol, only the independent communication is supported where the ID of the
request packet should match the ID of the encoder.
If the SerialEncCmdWord component is set to $9A for single-turn position reporting (first 16-bits of
single turn data), Acc84E[i].Chan[j].SerialEncCmd would be set to $9A1400. (It may report back as
$9A1000 if the data-ready status bit is not set.)
If the SerialEncCmdWord component is set to $A2 for multi-turn position plus MSB of single turn data
reporting (15 bits of multiple turn data + bit 17 of single turn data), Acc84E[i].Chan[j].SerialEncCmd
would be set to $A21400. (It may report back as $A21000 if the data-ready status bit is not set.)
If the SerialEncCmdWord component is set to $AA for Alarm code data reporting,
Acc84E[i].Chan[j].SerialEncCmd would be set to $AA1400. (It may report back as $AA1000 if the
data-ready status bit is not set.)
If the SerialEncCmdWord component is set to $CA for single-turn + multi-turn + alarm reporting (17-bits
of single turn data+15-bits of multi-turn data + 8bits of alarm data), Acc84E[i].Chan[j].SerialEncCmd
would be set to $CA1400. (It may report back as $CA1000 if the data-ready status bit is not set.)
Software Setup 43
ACC-84E User Manual
If the SerialEncCmdWord component is set to $E2 (Reset I) and triggered for 10 consecutive cycles with
7 microseconds interval or more battery alarm, system down and over speed flags are cleared. This should
be done in “one-shot” mode, making the element equal to $E23400 and triggered for 10 consecutive
cycles with 7 microseconds interval or more. The register should report as $E22000 after completion of a
single trigger.
If the SerialEncCmdWord component is set to $EA (Reset II) and triggered for 10 consecutive cycles with
7 microseconds interval or more, multi-turn data and counter overflow are reset. This reset mode should
only be called when the motor speed is less than 300 RPM. This should be done in “one-shot” mode,
making the element equal to $EA3400 and triggered for 10 consecutive cycles with 7 microseconds
interval or more. The register should report as $EA2000 after completion of a single trigger.
If the SerialEncCmdWord component is set to $B2 and triggered for 10 consecutive cycles with 7
microseconds interval or more single revolution data will be reset to 0° and shaft position will be written
to EEPROM. This should be done in “one-shot” mode, making the element equal to $B23400 and
triggered for 10 consecutive cycles with 7 microseconds interval or more. Notice that this reset command
(all 10) should only be sent when the encoder is at rest with no movement. Once reset, the single turn zero
location is maintained regardless of connection of external battery after main power source is turned off.
The register should report as $B22000 after completion of a single trigger.
If the SerialEncCmdWord component is set to $BA and triggered for 10 consecutive cycles with 7
microseconds interval or more single revolution data will be reset to its initial data and EEPROM data
will be reset. This should be done in “one-shot” mode, making the element equal to $BA3400 and
triggered for 10 consecutive cycles with 7 microseconds interval or more. Notice that this reset command
(all 10) should only be sent when the encoder is at rest with no movement. Once reset, the single turn zero
location is maintained regardless of connection of external battery after main power source is turned off.
The register should report as $BA2000 after completion of a single trigger.
If the SerialEncCmdWord component is set to $F2/$FA and triggered for 10 consecutive cycles with 7
microseconds interval or more, The Encoder ID present in lower 4 bits of
Acc84E[i].Chan[j].SerialEncCmd is written to EEPROM on the encoder. This should be done in “one-
shot” mode, making the element equal to $F23400/$FA3400 and triggered for 10 consecutive cycles with
7 microseconds interval or more. The register should report as $F22000/$FA2000 after completion of a
single trigger.
If the SerialEncCmdWord component is set to $D2/$DA and triggered for 10 consecutive cycles with 7
microseconds interval or more, The Encoder ID stored in EEPROM of the encoder is fored into “S8-
shaft” (111). This should be done in “one-shot” mode, making the element equal to $D23400/$DA3400
and triggered for 10 consecutive cycles with 7 microseconds interval or more. The register should report
as $D22000/$DA2000 after completion of a single trigger.
Software Setup 44
ACC-84E User Manual
The difference between $F2 and $FA is similar to the difference between $D2 and $DA command modes.
The command modes $F2 and D2 despite different functionality, cause the overflow flag to be reflected
in the ea0 status bit. The command modes $FA and DA, prevent the reflection of overflow flag in the ea0
status bit.
Software Setup 45
ACC-84E User Manual
Mitsubishi Protocol
The Mitsubishi encoder has 8 request codes defined for the Request Field transmitted from the controller
to the encoder. To transmit a specific ID code to the encoder, program the SerialEncCmdWord register
with the appropriate Command Code listed below:
$02 – for reporting single-turn data (single-turn data in lower 18 bits of 24-bit word. 18-bit
single-turn data in bits 0 to 17 and bits [18:23] report 0)
$8A – for reporting multi-turn data
$92 – for reporting Encoder-ID
$A2 – for reporting single-turn and multi-turn data (single-turn data in lower 20 bits of 24-bit
word. 18-bit single-turn data in bits 2 to 19 and bits [0:1] and [18:23] report 0)
$2A – for reporting single-turn and multi-turn data (single-turn data in lower 18 bits of 24-bit
word. 18-bit single-turn data in bits 0 to 17 and bits [18:23] report 0)
$32 – for reporting single-turn and multi-turn data (single-turn data in upper 20 bits of 24-bit
word. 18-bit single-turn data in bits 6 to 23 and bits [0:5] report 0)
$BA – for clearing alarms and reporting single-turn data(single-turn data in lower 18 bits of 24-
bit word. 18-bit single-turn data in bits 0 to 17 and bits [18:23] report 0)
$7A – for reporting encoder/motor ID
The following list shows typical settings of Acc84E[i].Chan[j].SerialEncCmd for a Mitsubishi HG type
servo motor’s serial encoder.
SerialEncCmdWord: = $32 // Command word for position reporting in Mitsubishi
SerialEncParity: =0 // No parity check supported for Mitsubishi protocol
SerialEncTrigMode: =0 // Continuous triggering
SerialEncTrigEna: =1 // Enable triggering
SerialEncGtoB: =0 // No Gray code supported for Mitsubishi protocol
SerialEncEna: =1 // Enable driver circuitry
SerialEncStatusBits: =0 // No status bits supported for Mitsubishi protocol
SerialEncNumBits: =0 // Fixed number of position bits returned
Acc84E[i].Chan[j].SerialEncCmd would be set to $321400 for continuous position reporting. (It may
report back as $321000 if the ready status bit is not set.)
Hex Digit ($) 3 2 1 4 0 0 - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value 0 0 1 1 0 0 1 0 0 0 0 1 - 1 - - - - 0 0 0 0 0 0 - -
Component: SerialEncCmdWord Parity TM TE GB Ena Status NumBits
If the SerialEncCmdWord component is set to $BA and triggered for 10 consecutive cycles with 55.5
microseconds interval or more, the ABS lost alarm is cleared. This should be done in “one-shot” mode,
making the element equal to $BA3400 and triggered for 10 consecutive cycles with 55.5 microseconds
interval or more.
If the SerialEncCmdWord component is set to $7A and triggered for 10 consecutive cycles with
222±1.0μsec interval, the encoder/motor ID is sent back from encoder to controller. In order to exit from
this mode, any other mode command ($02,$8A,$92,$A2,$2A,$32) should be triggered for 10 consecutive
cycles with 222±1.0μsec interval after which normal cyclic position reporting could be resumed. This
should be done in “one-shot” mode, making the element equal to $7A3400 and triggered for 10
consecutive cycles with 222 microseconds interval. Once encoder ID is retrieved, any other mode
command (for example $323400) should be triggered for 10 consecutive cycles with 222±1.0μsec interval
to exit the encoder ID reporting mode.
When the reset operation is done, the component should report as $BA2000, $7A2000 respectively.
Software Setup 46
ACC-84E User Manual
Acc84E[i].Chan[j].SerialEncCmd that specifies exactly how the channel’s serial encoder interface will
operate, different data formats will be presented in the data registers. Not all data registers are used in
every protocol.
Software Setup 47
ACC-84E User Manual
Software Setup 48
ACC-84E User Manual
SSI Protocol
For an SSI encoder, Acc84E[i].Chan[j].SerialEncDataA is configured as follows:
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Data P P P P P P P P P P P P P P P P P P P P P P P P
- -
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: Single/Multi-Turn Position
Software Setup 49
ACC-84E User Manual
For the EnDat2.2 protocol, Acc84E[i].Chan[j].SerialEncDataC is used for the first additional
information word if this is requested of the encoder with an MRS code in
Acc84E[i].Chan[j].SerialEncCmd. This register is never used with the EnDat2.1 protocol.
For an EnDat 2.2 encoder, Acc84E[i].Chan[j].SerialEncDataC is configured as follows:
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 7-4 3-0
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 - -
Bit Data W R B A A A A A I I I I I I I I I I I I I I I I
- -
0 0 0 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: WN RM BY MRS Acknowledge Additional Information 1 Word
Software Setup 50
ACC-84E User Manual
The following table provides details of the information and acknowledgement words for each of the MRS
command codes for the 1st additional information word.
For the EnDat2.2 protocol, Acc84E[i].Chan[j].SerialEncDataD is used for the second additional
information word if this is requested of the encoder with an MRS code in
Acc84E[i].Chan[j].SerialEncCmd. This register is never used with the EnDat2.1 protocol.
For an EnDat 2.2 encoder, Acc84E[i].Chan[j].SerialEncDataD is configured as follows:
Software Setup 51
ACC-84E User Manual
The following table provides details of the information and acknowledgement words for each of the MRS
command codes for the 2nd additional information word.
Serial Encoder Data Register D: Additional Information 2
Acknowledgement
Command Byte 1 Byte 2
of MRS Code Information/Type
code [15:8] [7:0]
Bit[20:16], binary
U V W Not assigned
$51 17 Commutation Not assigned
15 14 13 [12:8]
$52 18 Acceleration MSB data LSB data
MSB
LSB
Commutation & U U W Acceleration
$53 19 acceleration
Acceleration data
data
15 14 13 [12:8]
Limit position L1 L2 Not assigned
$54 20 Not assigned
signals 15 14 [13:8]
MSB
Limit position L1 L2 Acceleration LSB
$55 21 signals & data acceleration
Acceleration data
15 14 13 [12:8]
Stop additional
$5F 31 Any Any
information 2
Software Setup 52
ACC-84E User Manual
Software Setup 53
ACC-84E User Manual
Bit
Bit Component Description
Data
[10:0] Cn Compensation Bits Cn represent the bits of “compensation” position, captured on
Position the first index pulse.
21 E0 EB Coding error reported by the encoder
22 E1 CE CRC error detected by the IC
23 E2 TE Timeout error detected by the IC
Software Setup 54
ACC-84E User Manual
Bits Tn represent bits of the returned temperature value (in degrees C); bits An represent bits of the alarm
code.
For an absolute encoder, the alarm-code bits have the following meanings:
Bit Error Name Type Alarm Type Clear Action Notes
8 Backup Battery Alarm Alarm EEPROM RESET command Backup battery was down, internal data was lost
9 Encoder Error Alarm EEPROM RESET command Error in encoder
10 Battery Level Warning Warning Flag - Battery voltage drop
11 Absolute Error Alarm Session Flag Power cycle Possible error in position, if doesn’t get cleared
in one revolution
12 Over Speed Alarm Session Flag Power cycle
13 Overheat Alarm Flag -
14 Reset Complete Warning Session Flag Power cycle Indicates a reset due to RESET command
15 Fixed at “0” Set at zero
For an incremental encoder, the alarm-code bits have the following meanings:
Bit Error Name Type Alarm Type Clear Action Notes
8 Fixed at “1” - - - -
9 Encoder Error Alarm Session Flag Power cycle Error in encoder
10 Fixed at “0” - - - -
11 Position Error Alarm Session Flag Power cycle Possible error in position or Hall sensor
12 Fixed at “0” - - -
13 Fixed at “0” - - -
14 Origin not passed flag Warning - - The origin has not been passed in this session
yet
15 Fixed at “0” Set at zero
The temperature comes back in centigrade units but it rolls over to negative numbers at 215°C. Here is an
example of how to read the information:
if (Temp<=215)
{
Temperature = Temp;
}
Else
{
Temperature = Temp – 256;
}
Software Setup 55
ACC-84E User Manual
Tamagawa Protocol
For a Tamagawa FA-Coder encoder with 17 bits per revolution, Acc84E[i].Chan[j].SerialEncDataA is
configured as follows:
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value S S S S S S S S S S S S S S S S S
- - - - - - - - -
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: Single-Turn Position
Software Setup 56
ACC-84E User Manual
Software Setup 57
ACC-84E User Manual
Panasonic Protocol
For a Panasonic encoder with 17 bits per revolution, Acc84E[i].Chan[j].SerialEncDataA is configured
as follows (if single turn data has more resolution, higher bits include data):
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value S S S S S S S S S S S S S S S S S
- - - - - - - - -
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: Single-Turn Position
The encoder ID and alarm code values are only reported if the SerialEncCmdWord component of
Acc84E[i].Chan[j].SerialEncCmd is set to $52, in which case multi-turn data is not reported.
Software Setup 58
ACC-84E User Manual
Software Setup 59
ACC-84E User Manual
Mitutoyo Protocol
For a Mitutoyo encoder, Acc84E[i].Chan[j].SerialEncDataA is configured as follows:
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value P P P P P P P P P P P P P P P P P P P P P P P P
- -
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: Single/Multi-Turn Position
Software Setup 60
ACC-84E User Manual
Software Setup 61
ACC-84E User Manual
BiSS-B/C Protocol
For a BiSS-B/C encoder, Acc84E[i].Chan[j].SerialEncDataA is configured as follows:
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value P P P P P P P P P P P P P P P P P P P P P P P P
- -
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: Single/Multi-Turn Position
Software Setup 62
ACC-84E User Manual
Matsushita Protocol
For a Matsushita encoder with 17 bits per revolution, Acc84E[i].Chan[j].SerialEncDataA is configured
as follows (if single turn data has more resolution, higher bits include data):
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value M M M M M M M S S S S S S S S S S S S S S S S S
- -
6 5 4 3 2 1 0 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: Multi-Turn Position Single-Turn Position
The encoder ID and alarm code values are only reported if the SerialEncCmdWord component of
Acc84E[i].Chan[j].SerialEncCmd is set to $52, in which case multi-turn data is not reported.
Software Setup 63
ACC-84E User Manual
Software Setup 64
ACC-84E User Manual
Mitsubishi Protocol
Depending on the SerialEncCmdWord in single channel setup register, the single turn data is reported in 3
different modes:
Software Setup 65
ACC-84E User Manual
This method of reporting provides the best contiguous data between single-turn and multi-turn data which
can be very useful in both Turbo and Power PMAC Power-on Servo Position retrieval process using
built-in functionality.
For a Mitsubishi HG- encoder with 16 bits of multi-turn count, Acc84E[i].Chan[j].SerialEncDataB is
configured as follows:
Hex Digit ($) - -
Script Bit # 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -
C Bit # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7-4 3-0
Bit Value M M M M M M M M M M M M M M M M
- - - - - - - - - -
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Component: Multi-Turn Position
Software Setup 66
ACC-84E User Manual
Software Setup 67
ACC-84E User Manual
In the 24-bit ACC-84E, the LSB of the encoder data is generally found in bit 8 on the 32-bit data bus,
with unpredictable values in the lowest 8 bits of the bus. While this low “phantom” data is not known to
affect actual commutation performance in real systems, some users will want to remove this data with an
8-bit “shift right” operation. When this is done, a “shift left” operation must also be done to leave the
MSB of encoder data in bit 31 of the result. For purposes of computing the scale factor, the LSB of the
resulting (post-shift) 32-bit value should be used as the “LSB”.
For the format variable, the LSB of the encoder data is typically found in bit 8 of the 32-bit register, and
only enough bits to cover a single commutation cycle need to be used. (However, it does not hurt to
specify more bits than are required.) It is seldom required to use data from the next register.
EncTable[n].pEnc = Acc84E[i].Chan[j].SerialEncDataA.a
For the format variable, the LSB of the encoder data is typically found in bit 8 of the 32-bit
SerialEncDataA register. If the encoder provides more than 24 bits of absolute position data, the format
element permits data from SerialEncDataB to be used as well. Note, however, that the data in
SerialEncDataA must go all the way to bit 31 for this to work. In protocols such as Tamagawa and
Panasonic, which provide only 17 bits of data in SerialEncDataA and more in SerialEncDataB, the full
absolute position must be assembled in a user algorithm.
Technique 1
NO
Start Here
ST ST
NO YES
Encoder Resolution Encoder Resolution Technique 2
≥ 19 bits ≥ 24 bits
YES
Technique 3
Technique 1
This technique places the Least Significant Bit (LSB) of the serial data in bit 5 of the result
register providing the 5 bits of “non-existent” fraction.
Technique 2
This technique places the LSB of the serial data in bit 0 of the result register, creating no
fractional bits. It requires a dedicated Encoder Conversion Table (ECT) entry for commutation.
Technique 3
This technique processes the data for position similarly to Technique 1, but it requires a dedicated
ECT entry for commutation.
Setup Summary
Encoder Conversion Table Processing:
Process Technique 1 Technique 2 Technique 3
ECT entry for From serial register A, From serial register A, From serial register A,
Servo Loop Feedback 5-bit shift no shift 5-bit shift
From serial register A, From serial register A,
ECT entry for
N/A 18 bits, no shift, 18 bits, no shift,
Commutation Feedback
Offset=ST-18 Offset=ST-18
The position and velocity pointers are then assigned to the “ECT for position” result:
Parameter Technique 1/2/3
Position (Ixx03) @ ECT position result
Velocity (Ixx04) @ ECT position result (typically, with single source feedback)
Technique 1 Example
Channel 1 is driving a 25-bit (13-bit Single-turn, 12-bit Multi-turn) rotary serial encoder, or a linear scale
with similar protocol resolution (13 bits, 1 micron).
Encoder Conversion Table - for position (Technique 1)
Conversion Type: Parallel position from Y word with no filtering
Width in Bits: Single-turn/absolute resolution in bits (e.g. 13 bits)
Offset Location of LSB: leave at zero
Normal Shift (5 bits to the left)
Source Address: serial data register A (see table below)
Remember to click on Download Entry for the changes to take effect.
Typically, the position and velocity pointers are set to the processed data address (e.g. $3502):
I100=1 ; Mtr#1 Active. Remember to activate the channel to see feedback
I103=$3502 ; Mtr#1 position loop feedback address
I104=$3502 ; Mtr#1 velocity loop feedback address
Bit 23: =1 Signed Bits16-21: Number of Bits to read Bits 0-15: reserved
=0 Unsigned (Resolution 25 bits or 011001 ) (always 0)
Binary: 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ixx95
Hex($): 9 9 0 0 0 0
In this mode, PMAC reads and reports 25 bits from the consecutive serial data registers:
Serial Register B Serial Register A
(Ch1 Y:$78C01) (Ch1 Y:$78C00)
25 bits
47 23 0
With the setting of Ixx80=2, the actual position is reported automatically on Power-up. Otherwise, a #1$*
command is necessary to read and report the absolute position.
Example 2: Channel 1 driving an 18-bit (18-bit Single-turn, No Multi-turn) absolute rotary serial
encoder, or a similar protocol resolution (18 bits) linear scale:
I180=2 ; Absolute power-on read enabled
I110=$78C00 ; Absolute power-on position address (ch1 serial data register A)
I195=$120000 ; Parallel Read, 18 bits, Unsigned, from Y-Register –User Input
Bit 23: =1 Signed Bits16-21: Number of Bits to read Bits 0-15: reserved
=0 Unsigned (Resolution 18 bits or 010010 ) (always 0)
Binary: 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ixx95
Hex($): 1 2 0 0 0 0
In this mode, PMAC reads and reports 18 bits from the first serial data register:
Serial Data Register B Serial Data Register A
(Ch1 Y:$78C01) (Ch1 Y:$78C00)
18 bits
47 23 0
With this setting of Ixx80=2, the actual position is reported automatically on Power-up. Otherwise, a
#1$* command is necessary to read and report the absolute position.
The upper two fields in Ixx95 are the only relevant ones. Bits 0
through 15 are reserved and should always be set to 0.
Note
Some serial encoders use an external source for power. Make sure
that this power is applied prior to performing an absolute read on
power-up.
Note
Technique 2 Example
Channel 1 is driving a 37-bit (25-bit Single-turn, 12-bit Multi-turn) rotary serial encoder, or a linear scale
with similar protocol resolution (25 bits, 10 nanometer).
Encoder Conversion Table – for position (Technique 2)
Conversion Type: Parallel position from Y word with no filtering
Width in Bits: Single-turn/absolute resolution in bits (e.g. 25 bits)
Offset Location of LSB: leave at zero
No shifting
Source Address: serial data register A (see table below)
Remember to click on Download Entry for the changes to take effect.
Turbo PAMC Base Address Channel
1 2 3 4
$78C00 Y:$78C00 Y:$78C04 Y:$78C08 Y:$78C0C
$79C00 Y:$79C00 Y:$79C04 Y:$79C08 Y:$79C0C
$7AC00 Y:$7AC00 Y:$7AC04 Y:$7AC08 Y:$7AC0C
$7BC00 Y:$7BC00 Y:$7BC04 Y:$7BC08 Y:$7BC0C
$78D00 Y:$78D00 Y:$78D04 Y:$78D08 Y:$78D0C
$79D00 Y:$79D00 Y:$79D04 Y:$79D08 Y:$79D0C
$7AD00 Y:$7AD00 Y:$7AD04 Y:$7AD08 Y:$7AD0C
$7BD00 Y:$7BD00 Y:$7BD04 Y:$7BD08 Y:$7BD0C
$78E00 Y:$78E00 Y:$78E04 Y:$78E08 Y:$78E0C
$79E00 Y:$79E00 Y:$79E04 Y:$79E08 Y:$79E0C
$7AE00 Y:$7AE00 Y:$7AE04 Y:$7AE08 Y:$7AE0C
$7BE00 Y:$7BE00 Y:$7BE04 Y:$7BE08 Y:$7BE0C
Typically, the position and velocity pointers are set to the processed data address (e.g. $3502). Also, with
technique 2, it is recommended to set the position and velocity scale factors to 1 and the position error
limit to its maximum value:
I100=1 ; Mtr#1 Active. Remember to activate the channel to see feedback
I103=$3502 ; Mtr#1 position loop feedback address
I104=$3502 ; Mtr#1 velocity loop feedback address
I108=1 ; Mtr#1 position-loop scale factor
I109=1 ; Mtr#1 velocity-loop scale factor
I167=8388607 ; Mtr#1 Position Error Limit
Assuming that eight encoders have been configured for position, the first ECT for commutation for the
first motor would be at entry number nine:
Conversion Type: Parallel pos from Y word with no filtering
Width in Bits: 18
Offset Location of LSB: = Singleturn/protocol bits – 18 (e.g. 25-18=7)
No shifting
Source Address: serial data register A (same as position ECT for this motor)
Remember to click on Download Entry for the changes to take effect.
Record the processed data address (e.g. $3512). This is where the
commutation position address Ixx83 will be pointing to. Also, this
will be used in setting up the power-on phasing routine.
Note
Bit 23: =1 Signed Bits16-21: Number of Bits to read Bits 0-15: reserved
=0 Unsigned (Resolution 37 bits or 100101 ) (always 0)
Binary: 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ixx95
Hex($): A 5 0 0 0 0
In this mode, PMAC reads 37 bits from the consecutive serial data registers:
Serial Register B Serial Register A
(Ch1 Y:$78C01) (Ch1 Y:$78C00)
37 bits
47 23 0
With the setting of Ixx80=0, the actual position is not reported automatically on power-up. It will be
reported after scaling (i.e. in PLC, below).
Example 2: Channel 1 driving a 25-bit (25-bit Single-turn, No Multi-turn) absolute rotary serial encoder,
or a similar protocol resolution (25 bits) linear scale:
I180=0 ; Absolute power-on read disabled
I110=$78B20 ; Absolute power-on position address (ch1 serial data register A)
I195=$190000 ; Parallel Read, 25 bits, Unsigned, from Y-Register –User Input
Bit 23: =1 Signed Bits16-21: Number of Bits to read Bits 0-15: reserved
=0 Unsigned (Resolution 25 bits or 011001 ) (always 0)
Binary: 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ixx95
Hex($): 1 9 0 0 0 0
In this mode, PMAC reads 25 bits from the first serial data register:
Serial Data Register B Serial Data Register A
(Ch1 Y:$78C01) (Ch1 Y:$78C00)
25 bits
47 23 0
With the setting of Ixx80=0, the actual position is not reported automatically on power-up. It will be
reported after scaling (i.e. in PLC, below).
The upper two fields in Ixx95 are the only relevant ones. Bits 0
through 15 are reserved and should always be set to 0.
Note
Some serial encoders use an external (not from the Brick) source for
power. Make sure that this power is applied prior to performing an
absolute read on power-up.
Note
Technique 3 Example
Channel 1 is driving a 32-bit (20-bit Single-turn, 12-bit Multi-turn) rotary serial encoder, or a linear scale
with similar protocol resolution (20 bits, 0.1 micron).
Encoder Conversion Table - for position (Technique 3)
Conversion Type: Parallel position from Y word with no filtering
Width in Bits: Single-turn/absolute resolution in bits (e.g. 20 bits)
Offset Location of LSB: leave at zero
Normal Shift (5 bits to the left)
Source Address : serial data register A (see table below)
Remember to click on Download Entry for the changes to take effect.
Turbo PAMC Base Address Channel
1 2 3 4
$78C00 Y:$78C00 Y:$78C04 Y:$78C08 Y:$78C0C
$79C00 Y:$79C00 Y:$79C04 Y:$79C08 Y:$79C0C
$7AC00 Y:$7AC00 Y:$7AC04 Y:$7AC08 Y:$7AC0C
$7BC00 Y:$7BC00 Y:$7BC04 Y:$7BC08 Y:$7BC0C
$78D00 Y:$78D00 Y:$78D04 Y:$78D08 Y:$78D0C
$79D00 Y:$79D00 Y:$79D04 Y:$79D08 Y:$79D0C
$7AD00 Y:$7AD00 Y:$7AD04 Y:$7AD08 Y:$7AD0C
$7BD00 Y:$7BD00 Y:$7BD04 Y:$7BD08 Y:$7BD0C
$78E00 Y:$78E00 Y:$78E04 Y:$78E08 Y:$78E0C
$79E00 Y:$79E00 Y:$79E04 Y:$79E08 Y:$79E0C
$7AE00 Y:$7AE00 Y:$7AE04 Y:$7AE08 Y:$7AE0C
$7BE00 Y:$7BE00 Y:$7BE04 Y:$7BE08 Y:$7BE0C
Typically, the position and velocity pointers are set to the processed data address (e.g. $3502). With
Single-turn or linear resolutions less than 20 bits, the position/velocity scale factors, and position error
limit can be left at default values. But with resolutions of 20 bits or greater, it is recommended to set the
scale factors to 1 and the position error limit to its maximum value:
I100=1 ; Mtr#1 Active. Remember to activate the channel to see feedback
I103=$3502 ; Mtr#1 position loop feedback address
I104=$3502 ; Mtr#1 velocity loop feedback address
I108=1 ; Mtr#1 position-loop scale factor
I109=1 ; Mtr#1 velocity-loop scale factor
I167=8388607 ; Mtr#1 Position Error Limit
Assuming that eight encoders have been configured for position, the first ECT for commutation for the
first motor would be at entry number nine:
Conversion Type: Parallel pos from Y word with no filtering
Width in Bits: 18
Offset Location of LSB = Singleturn/protocol bits – 18 (e.g. 20-18=2)
No shifting
Source Address: Serial data register A (same as position ECT for this motor)
Remember to click on Download Entry for the changes to take effect.
Record the processed data address (e.g. $3512). This is where the
commutation position address Ixx83 will be pointing to. Also, this
will be used in setting up the power-on phasing routine.
Note
The commutation enable, and position address would then be:
I101=1 ; Mtr#1 Commutation enable, from X Register
I183=$3512 ; Mtr#1 Commutation Position Address –User Input
Bit 23: =1 Signed Bits16-21: Number of Bits to read Bits 0-15: reserved
=0 Unsigned (Resolution 32 bits or 100000 ) (always 0)
Binary: 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ixx95
Hex($): A 0 0 0 0 0
In this mode, PMAC reads and reports 32 bits from the consecutive serial data registers:
Serial Data Register B Serial Data Register A
(Ch1 Y:$78C01) (Ch1 Y:$78C00)
32 bits
47 23 0
With the setting of Ixx80=2, the actual position is reported automatically on Power-up. Otherwise, a #1$*
command is necessary to read and report the absolute position.
Example 2: Channel 1 driving a 20-bit (20-bit Single-turn, No Multi-turn) absolute rotary serial encoder,
or a similar protocol resolution (20 bits) linear scale:
I180=2 ; Absolute power-on read enabled
I110=$78C00 ; Absolute power-on position address (ch1 serial data register A)
I195=$140000 ; Parallel Read, 20 bits, Unsigned, from Y-Register –User Input
Bit 23: =1 Signed Bits16-21: Number of Bits to read Bits 0-15: reserved
=0 Unsigned (Resolution 20 bits or 010100 ) (always 0)
Binary: 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ixx95
Hex($): 1 4 0 0 0 0
In this mode, PMAC reads and reports 20 bits from the first serial data register:
Serial Data Register B Serial Data Register A
(Ch1 Y:$78C01) (Ch1 Y:$78C00)
20 bits
47 23 0
With the setting of Ixx80=2, the actual position is reported automatically on Power-up. Otherwise, a #1$*
command is necessary to read and report the absolute position.
The upper two fields in Ixx95 are the only relevant ones. Bits 0
through 15 are reserved and should always be set to 0.
Note
Some serial encoders use an external (not from the Brick) source for
power. Make sure that this power is applied prior to performing an
absolute read on power-up.
Note
The Ixx70 and Ixx71 determine the commutation cycle length for Turbo PMAC.
If number of counts (register LSB) per motor revolution is less than (224 − 1), Ixx70 and Ixx71 can be set
as shown below:
Ixx01 = 3 // Turbo PMAC commutation, commutation feedback from Y-register
If number of counts (register LSB) per motor revolution is greater than (224 − 1) but the number of
counts (register LSB) per electrical cycle is:
a. An Integer
b. Less than (224 − 1)
Ixx70 = 1
Data Shifting
In order for Turbo PMAC CPU to be able to handle rollover of on-going phase position data properly, the
most significant bit (MSB) of the position data must end up in bit 23 of the 24-bit result. In some cases
the data needs to be shifted in order to move the MSB of position data (single turn position data in most
cases) to bit 23 of the 24-resulting register.
ACC-84E Channel
Base Address 1 2 3 4
$78C00 $2F8C00 $2F8C04 $2F8C08 $2F8C0C
$79C00 $2F9C00 $2F9C04 $2F9C08 $2F9C0C
$7AC00 $2FAC00 $2FAC04 $2FAC08 $2FAC0C
$7BC00 $2FBC00 $2FBC04 $2FBC08 $2FBC0C
$78D00 $2F8D00 $2F8D04 $2F8D08 $2F8D0C
$79D00 $2F9D00 $2F9D04 $2F9D08 $2F9D0C
$7AD00 $2FAD00 $2FAD04 $2FAD08 $2FAD0C
$7BD00 $2FBD00 $2FBD04 $2FBD08 $2FBD0C
$78E00 $2F8E00 $2F8E04 $2F8E08 $2F8E0C
$79E00 $2F9E00 $2F9E04 $2F9E08 $2F9E0C
$7AE00 $2FAE00 $2FAE04 $2FAE08 $2FAE0C
$7BE00 $2FBE00 $2FBE04 $2FBE08 $2FBE0C
Motor[x].pAbsPhasePos = Acc84E[i].Chan[j].SerialEncDataA.a
For the format variable, the LSB of the encoder data is typically found in bit 8 of the 32-bit register, and
only enough bits to cover a single commutation cycle need to be used. (However, it does not hurt to
specify more bits than are required.) It is seldom required to use data from the next register.
EncTable[n].pEnc = Acc84E[i].Chan[j].SerialEncDataA.a
For the format variable, the LSB of the encoder data is typically found in bit 8 of the 32-bit
SerialEncDataA register. If the encoder provides more than 24 bits of absolute position data, the format
element permits data from SerialEncDataB to be used as well. Note, however, that the data in
SerialEncDataA must go all the way to bit 31 for this to work. In protocols such as Tamagawa and
Panasonic, which provide only 17 bits of data in SerialEncDataA and more in SerialEncDataB, the full
absolute position must be assembled in a user algorithm.
Based upon the base address selection, the address for each of the global registers and channel specific
registers will change:
MACRO Global Setup 1st Channel 2nd Channel 3rd Channel 4th Channel
UMAC Base Register Setup Setup Setup Setup
address Address Register Register Register Register
Address Address Address Address
$8800 X:$880F X:$8800 X:$8804 X:$8808 X:$880C
$9800 X:$980F X:$9800 X:$9804 X:$9808 X:$980C
$A800 X:$A80F X:$A800 X:$A804 X:$A808 X:$A80C
$B800 X:$B80F X:$B800 X:$B804 X:$B808 X:$B80C
$8840 X:$884F X:$8840 X:$8844 X:$8848 X:$884C
$9840 X:$894F X:$8940 X:$8944 X:$8948 X:$894C
$A840 X:$A84F X:$A840 X:$A844 X:$A848 X:$A84C
$B840 X:$B84F X:$B840 X:$B844 X:$B848 X:$B84C
$88C0 X:$88CF X:$88C0 X:$88C4 X:$88C8 X:$88CC
$98C0 X:$98CF X:$98C0 X:$98C4 X:$98C8 X:$98CC
$A8C0 X:$A8CF X:$A8C0 X:$A8C4 X:$A8C8 X:$A8CC
$B8C0 X:$B8CF X:$B8C0 X:$B8C4 X:$B8C8 X:$B8CC
Each of the global and channel specific setup elements are set up exactly based upon the explanation in
Turbo UMAC CPU section depending on the serial protocol in question.
close
del gat
open plc 1 clear
cmd"clrf"
timer = 100 msec
cmd"msclrf15"
timer = 100 msec
cmd"ms0,mi198=$E8880F" // pointing MI199 to Global Register at X:$880F
timer = 100 msec // $E8 X Unsigned 24 bit, $78 Y Unsiged 24 bit
cmd"ms0,mi199=$63000B" // Writing the value to Global Register
timer = 100 msec
cmd"ms0,mi198=$E88800" // Pointing MI199 to Channel Specific register X:$8800
timer = 100 msec
cmd"ms0,mi199=$2114A0" // Writing the value to Channel Specific register
timer = 100 msec
disable plc 1
close
Once this data is available on the MACRO node, normal 24-bit Y-word parallel read will be used for
reading of corresponding MACRO node, register 0 for on-going position of the axis. It is the user’s
choice whether or not to shift the data.
I8000=$2F8420 // Y-word parallel read from $78420, Node 0, Register 0, No-shift
I8001=$018000 // 24-bit wide read, starting at bit 0
Once the position data is available on the Ultralite side, position and velocity feedback pointers can be
defined for the motors in question.
I103=$3502 // position feedback
I104=$3502 // velocity feedback
Once MI111-MI118 are setup, reading MS{node},MI920 will return the position as a 48-bit value which
can be assigned properly into motor actual position or can be used for establishing the phase reference of
the motor. For examples, please refer to examples discussed in the Turbo UMAC setup section of this
manual.
Commutating Over MACRO with High Resolution Encoders
It is possible to commutate motors with high resolution encoders over the MACRO ring. However, if the
position resolution of encoder is more than 24-bits per revolution, certain measures should be taken since
the automatic transfer of lower 24 bits of position data might not provide sufficient position information
required for commutation and introduce considerable velocity limitations on motor control.
If the encoder on commutated motor has less than 24-bits of resolution per single revolution (at most
16,777,215 counts per electrical cycle), then the data available in register 0 of the node can be used for
commutation purpose and the following setting are sufficient. Here is an example of commutation if the
motor was on node 0.
I101=3 // motor is commutated, commutation data is on Y-memory location
I183=$78420 // Node 0, Register 0
I170=2 // 2-pole pair motor
I171=262144 // 18-bits of resolution per revolution of the motor
If the encoder has 24-bits or more resolution per electrical cycle, then the upper portion of the data
becomes important for commutation purpose. Since the commutation algorithm in PMAC uses a 2048
state Sine table, only the upper 12-bits of data per electrical cycle will be important for PMAC. Since the
ECT entry only reads the lower 24-bits of position data, in order to transfer the upper 24-bits of data
(most significant bits), a separate node should be used. For this purpose, it is suggested that a MACRO
PLC on the MACRO16 CPU be implemented. This PLC will copy the upper 24-bits of data from each of
the channels and copies them to register 0 of corresponding IO nodes of SERVO nodes. This MACRO
PLC should be downloaded to MACRO16 CPU through PERIN32PRO2 software and while in
MACROASCII communication mode.
// Generic Definition
CLOSE
Chan1RegA->Y:$8800,0,24
Chan1RegB->Y:$8801,0,24
Chan2RegA->Y:$8804,0,24
Chan2RegB->Y:$8805,0,24
Chan3RegA->Y:$8808,0,24
Chan3RegB->Y:$8809,0,24
Chan4RegA->Y:$880C,0,24
Chan4RegB->Y:$880D,0,24
Node2Reg0->X:$C0A0,0,24
Node3Reg0->X:$C0A4,0,24
Node6Reg0->X:$C0A8,0,24
Node7Reg0->X:$C0AC,0,24
// 26-bit Encoder
OPEN MACPLCC
Node2Reg0=(Chan1RegB & $000003)*$100000 + Chan1RegA/$8
Node3Reg0=(Chan2RegB & $000003)*$100000 + Chan2RegA/$8
Node6Reg0=(Chan3RegB & $000003)*$100000 + Chan3RegA/$8
Node7Reg0=(Chan4RegB & $000003)*$100000 + Chan4RegA/$8
CLOSE
// 32-bit Encoder
OPEN MACPLCC
Node2Reg0=(Chan1RegB & $0000FF)*$8000 + Chan1RegA/$200
Node3Reg0=(Chan2RegB & $0000FF)*$8000 + Chan2RegA/$200
Node6Reg0=(Chan3RegB & $0000FF)*$8000 + Chan3RegA/$200
Node7Reg0=(Chan4RegB & $0000FF)*$8000 + Chan4RegA/$200
CLOSE
These MACRO PLCs will copy the upper 23-bits of position data from ACC-84E position registers into
Register 0 of MACRO nodes 2, 3, 6 and 7. On the Ultralite side, the commutation parameters need to be
set up accordingly:
I101=1 // motor is commutated, commutation data is on X-memory location
I183=$78420 // Node 2, Register 0, X-memory location
I170=2 // 2-pole pair motor, motor dependent
I171=8388608 // 23-bits of resolution per revolution of the motor
X:$78C0F
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Trigger Trigger
M Divisor N Divisor Reserved Clock Edge Trigger Delay Protocol Code
0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0
6 3 0 1 0 2
Channel 1:X:$78B20
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Gray RxData
Trigger Trigger
Reserved Parity Type Mode Enable
Code to Ready/ Reserved Position Bits
Binary SENC
0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0
0 0 1 4 2 0
As you may have noticed, the encoder conversion table only reads the lower 24 bits of data. This is
acceptable since the data is incremental. Please note that since the data is being read by the encoder
conversion table, as long as ECT has 2 reads in each 24-bit transition, it can handle the roll-over
gracefully and motor position will be updated correctly.
These are Safety parameters, I2T protection. Check motor manufacturer specifications and refer to the
Turbo SRM.
I157= 8025 ; Motor#1 Continuous Current Limit
I158= 2167 ; Motor#1 Integrated Current Limit
I169= 24077 ; Motor#1 Output Command Limit
Please note that since the ECT table data is being used for commutation, it is better to have the Servo
clock set to the same frequency as the Phase clock so the data is available for commutation routines.
If you have your Ixx03 and Ixx04 set up properly to point to the correct ECT entry, you should be able to
observe position feedback in the position window when moving the motor by hand.
Using the PMACTuningPro2, you should be able to tune for the Current-Loop gains:
I161= 0.05 ; Motor#1 Current-Loop Integral gain
I162= 0.01 ; Motor#1 Current-Loop Forward-path proportional gain
I176= 0.5 ; Motor#1 Current-Loop Back-path proportional gain
Motor Phasing. We suggest using the stepper method for rough phasing:
I180= 6 ; Motor#1 Power-up mode
I173= 1200 ; Motor#1 Phase finding output Value
I174= 60 ; Motor#1 Phase finding time
Issue a #1$ from the online command window to phase motor. Completion of phasing routine can be
confirmed by checking the motor status window accessible through View menu in PEWIN32PRO2
software.
Open Loop Test:
1. Issue a #1hmz to zero the position counter in the position window.
2. Issue a #1o1 from the online command window. This will send a 1% command output and
should move the motor slightly.
3. Issue a K to kill motor. If motor has not moved increase the open loop command output by
increments of one until you see counts change in the position window.
4. Repeat steps 1 thru 3 now issuing a negative open loop command #1o-1
5. Positive counts/movement should correspond to a positive open loop command, and negative
movement should correspond to negative commands.
6. If step 5 is a true statement, then skip to PID tuning. Otherwise, the encoder counting direction
doesn’t match the commutation direction. In this case, we can either setup the SSI encoder to
send the position in the opposite direction, or we can set the Ixx70 to the negative value of what
we have setup at the moment.
7. Repeat Open Loop test (steps 1 thru 4) to make sure the commutation is correct.
8. PID tuning: Use PMACTuningPro2 Automatic or Interactive to find the best position-loop gains
for your system.
Absolute phase and power-up/reset position
Absolute Servo Power-On Position Address and Format: Ixx10, Ixx95
To read an SSI encoder for absolute servo position, Ixx10 is set to the address of that channel’s position
register. Ixx95 is set according to the specification of the SSI encoder (how many bits, signed or unsigned
value…etc). The motor offset variable Ixx26 contains the difference between the absolute position and
the resulting motor position (if any).
I110= $78C00 ; Absolute Servo power-on position address
I195= $A00000 ; Signed, 32 bits
X:$78C0F
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Trigger Trigger
M Divisor N Divisor Reserved Clock Edge Trigger Delay Protocol Code
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 3
Channel 1:X:$78C00
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RxData
Trigger Trigger
Reserved Command Code Reserved Mode Enable
Reseved Ready/ Reserved Position Bits
SENC
0 0 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0
0 7 1 4 2 5
Encoder conversion table setup required for EnDat 2.2 encoder connected to the first channel on Acc-84E
at base address set to $78C00 will be as follows:
I8000=$278C00 ; Unfiltered parallel position of location
; Y:$78C00, no shifting
I8001=$18000 ; 24-bit processed result at $3502
I103=$3502 ; position loop feedback address
I104=$3502 ; velocity loop feedback address
Since the number of counts in EnDat 2.2 encoders usually are much higher than normal incremental
encoders, the default settings for position and velocity feedback scale factors (a value of 96) can cause
resolution restrictions on Servo gain settings. It is recommended that the scale factors be set to a smaller
value.
I108=1 ; Motor1 position scale factor required not to saturate the Velocity
I109=1 ; Motor1 velocity-loop scale factor
Assigning values to the control registers should be performed upon power-up/reset in the initialization
PLC.
Open plc 1 Clear
Disable plc 2..31
cmd"wx:$78C0F,$002003" ; Global Control register, 1 MHz Clock setting
cmd"wx:$78C00,$071425" ; Channel 1, read 37 bits
Disable plc 1
Enable plc 2..31
Close
Can be requested with the “Encoder to send position values with additional information” command code.
Then RM status bit in the transmission protocol indicates whether reference run has finished. If this is the
case, position value 2 is available. Until this time, a relative position value is transmitted when position
value 2 is requested.
Power On
Reference
Offset
Reference
Mark
1
RM bit
0
Position Capture
The figure is for incremental rotary encoder with one reference mark, and position value 2 will be the
absolute position relative to the reference mark in one revolution after reaching the first reference mark.
Position value 2 is captured after reaching the first reference mark and written to the actual motor position
register. By setting reference offset as current encoder position, reference mark position will become 0
count position.
Position value 2 can be obtained by sending proper command codes. The structure of position value 2 is
as below.
To obtain position value 2, three command codes need to be sent in sequence and data needs to be read in
sequence. For each command, the data will be sent back in lower two bytes of Serial Encoder Data
Register C as additional information 1 (byte1) and (byte2).
In this example, a Heidenhain ROD 486 encoder with 1024 lines is connected to a EIB 192 with 16384
subdivisions with EnDat 2.2. The feedback from EIB 192 to ACC84E is as a 24-bit encoder
(1024*16384=2^24). ACC-84E is at base address $78C00. The goal is to establish 0 count position after
reaching the first reference mark, and users need to either manually rotate the motor shaft or jog the motor
after enabling the following PLC.
PLC Program:
Disable PLC 3
Close
Since the number of counts in EnDat 2.2 encoders usually are much higher than normal incremental
encoders, the default settings for position and velocity feedback scale factors (a value of 96) can cause
resolution restrictions on Servo gain settings. It is recommended that the scale factors be set to a smaller
value.
I108=1 ; Motor1 position scale factor required not to saturate the Velocity
I109=1 ; Motor1 velocity-loop scale factor
RxDataReady /
Trigger Enable
Trigger Mode
SENC_Mode
Reset Mode
Resereved
Reserved
Reserved
Command Code Encoder Address
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
0 0 1 4 0 0
The setup value can be written to the memory as a part of your start up PLC.
// Yaskawa Feedback Startup Example PLC:
Open PLC 1 clear
Disable PLC2..31
CMD”WX:$78C00,$1400"
CMD”WX:$78C04,$1400"
CMD”WX:$78C08,$1400"
CMD”WX:$78C0C,$1400"
Disable plc1
Close
Channel Specific Control Register Setup for Reset Mode
Yaskawa absolute encoders can generate fault flags which are latched and the only way to reset them is
through this procedure. For a list of possible faults on Yaskawa absolute encoders and where to read
them, please check the following section titled “Alarm Codes.”
To send a RESET command to the encoder, the channel control register needs to be modified a few times.
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RxDataReady /
Trigger Enable
Trigger Mode
SENC_Mode
Reset Mode
Resereved
Reserved
Reserved
Reset Mode
0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 1
0 4 3 5 0 1
NOP
0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0
0 0 3 5 0 1
Position Read
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
0 0 1 4 0 0
Essentially, the following commands are available for any of the channels:
// Yaskawa RESET Commands for channel 1 of ACC-84E with base address of $78C00
CMD”WX:$78C00,$043501"
CMD”WX:$78C00,$003501"
CMD”WX:$78C00,$001400"
This can be done through any of the PLCs. However, there is some handshaking required in order to make
sure the RESET command is completed before the next command is sent down.
The following PLC shows an example on how to do a reset including the handshaking necessary with the
encoder to ensure a proper reset.
// Yaskawa Absolute Encoder RESET Example PLC:
Encoder Conversion Table Setup for on-going servo position and commutation angle:
Channel ECT Line Settings
st
1st Channel 1 Line $200000 + Base Address + $0
2nd Line $020004
2nd Channel 1st Line $200000 + Base Address + $4
2nd Line $020004
st
3rd Channel 1 Line $200000 + Base Address + $8
2nd Line $020004
4th Channel 1st Line $200000 + Base Address + $C
nd
2 Line $020004
Example:
16-bit absolute encoder on channel 1 of ACC-84E with a base address of $78C00:
I8000=$278C00
I8001=$020004
STD0_15->Y:$78C00,4,16
MTD0_3->Y:$78C00,20,4
MTD4_15->Y:$78C01,0,12
MTD0_15->*
1. Tune the current loop on the motor (after setting correct values for Ixx00, Ixx01, Ixx24, Ixx82,
Ixx84, Ixx57, Ixx58, Ixx69 and Ixx66, use the tuning software and tune the current loop i.e.
Ixx61, Ixx62 and Ixx76).
2. Set a positive value (usually 10% of Ixx66) to Ixx79 and set Ixx29=0 and Issue an O0 command
(open loop, zero output).
3. Read the single turn data (for the first channel, the data would be at Y:$78B20,4,16).
4. Set the Ixx79 back to its original value and issue a kill.
5. The following PLC will set up the phase reference.
Encoder Conversion Table Setup for on-going servo position and commutation:
Channel ECT Line Settings
1st Channel 1st Line $200000 + Base Address + $0
2nd Line $021004
st
2nd Channel 1 Line $200000 + Base Address + $4
2nd Line $021004
3rd Channel 1st Line $200000 + Base Address + $8
2nd Line $021004
st
4th Channel 1 Line $200000 + Base Address + $C
2nd Line $021004
Example:
17-bit absolute encoder on channel 1 of ACC-84E with a base address set to $78C00:
I8000=$278C00
I8001=$021004
FirstWord->Y:$78C00,0,24
SecondWord->Y:$78C01,0,4
STD0_16->*
MTD0_15->*
If (STD0_16 !=0)
STD0_16 = (STD0_16^$1FFFF + 1)*-1
Endif
Endif
Mtr1ActPos = ((MTD0_15 * $20000)+ STD0_16) * I108 * 32
disable plc 28
close
(Ixx60) can be used to lower the CPU load and not to face quantization errors on the PID loops if the high
Servo rates cause problems.
Since the output value of the ECT is already shifted left by 5-bits, the value in the Ixx71 would be equal
to 131072 x 32 = 2097152. and Ixx70 would be equal to the number of pole pairs on the motor. Also
Ixx83 should be pointing to the correct ECT entry to read the ongoing position data.
If the user wants to use the absolute feedback for power-on phasing with no motion, a similar approach
would be used. However, the single turn data would be sufficient for phasing the motor.
Here is an example of how to determine the power-on phasing based on absolute data. The following
procedure is only required once. After determining the phase reference value, a power-on PLC would be
sufficient to establish the phase reference and motor will be ready for commutation.
1. Tune the current loop on the motor (after setting correct values for Ixx00, Ixx01, Ixx24, Ixx82,
Ixx84, Ixx57, Ixx58, Ixx69 and Ixx66, use the tuning software and tune the current loop i.e.
Ixx61, Ixx62 and Ixx76).
2. Set a positive value (usually 10% of Ixx66) to Ixx79 and set Ixx29=0 and Issue an O0 command
(open loop, zero output).
3. Read the Single turn data. (for the first channel, the data would be at Y:$78B20,0,24 but you have
to apply the following function on it int ((FirstWord & $1FFFF0) / 16) ).
4. Set the Ixx79 back to its original value and issue a kill.
5. The following PLC will set up the phase reference.
Encoder Conversion Table Setup for on-going servo position and commutation:
Channel ECT Line Settings
1st Channel 1st Line $200000 + Base Address + $0
nd
2 Line $024004
2nd Channel 1st Line $200000 + Base Address + $4
2nd Line $024004
3rd Channel 1st Line $200000 + Base Address + $8
nd
2 Line $024004
4th Channel 1st Line $200000 + Base Address + $C
2nd Line $024004
Example:
20-bit absolute encoder on channel 1 of ACC-84E with a base address set to $78C00:
I8000=$278C00
I8001=$024004
FirstWord->Y:$78C00,0,24
SecondWord->Y:$78C01,0,4
STD0_19->*
MTD0_15->*
If (STD0_19 !=0)
STD0_19 = (STD0_19^$FFFFF + 1)*-1
Endif
Endif
Mtr1ActPos = ((MTD0_15 * $100000)+ STD0_19) * I108 * 32
disable plc 28
close
FirstWord->Y:$78C00,0,24
STD0_19->*
Undetermined Incremental Compensation (11-bits) N Incremental Position in Single Turn (17-bits) Undet. Hall Signals Z
Encoder Conversion Table Setup for on-going servo position and commutation:
Channel ECT Line Settings
1st Channel 1st Line $200000 + Base Address + $0
2nd Line $011006
st
2nd Channel 1 Line $200000 + Base Address + $4
2nd Line $011006
3rd Channel 1st Line $200000 + Base Address + $8
2nd Line $011006
st
4th Channel 1 Line $200000 + Base Address + $C
2nd Line $011006
Example:
17-bit incremental encoder on channel 1 of ACC-84E with base address set to $78C00:
I8000=$278C00
I8001=$011006
The following code is an example on how to do the homing based upon the steps above. It is strongly
recommended that home search moves be conducted at a slow speed.
FirstWord->Y:$78C00,0,24
SecondWord->Y:$78C01,0,24
OriginNotPassed->Y:$78C02,14
cmd “#1k”
endif
while (Secondword & $8FF = 0) ; there is a 2msec delay before inc. comp. is updated
endwhile
Mtr1ActPos = (int ((FirstWord & $8FFFC0) / $40) – (SecondWord & $8FF) * $40 ) * i108 * 32
disable plc 29
close
FirstWord->Y:$78C00,0,24
Halls->*
#define Phase30Deg 1
#define Phase90Deg 5
#define Phase150Deg 4
#define Phase210Deg 6
#define Phase270Deg 2
#define Phase330Deg 3
If (Halls = Phase330Deg)
Mtr1PhasePos = I171 * 330 / 360;
Endif
Mtr1PhaseSrchErr = 0;
disable plc 28
close
Undetermined Incremental Compensation (11-bits) N Incremental Position in Single Turn (13-bits) Undetermined Hall Signals Z
Encoder Conversion Table Setup for on-going servo position and commutation:
Channel ECT Line Settings
1st Channel 1st Line $200000 + Base Address + $0
nd
2 Line $00D00A
2nd Channel 1st Line $200000 + Base Address + $4
2nd Line $00D00A
3rd Channel 1st Line $200000 + Base Address + $8
nd
2 Line $00D00A
4th Channel 1st Line $200000 + Base Address + $C
2nd Line $00D00A
Example:
13-bit incremental encoder on channel 1 of ACC-84E with base address set to $78C00:
I8000=$278C00
I8001=$00D00A
The following code is an example of how to do the homing based upon the steps above. It is strongly
recommended that home search moves be conducted at a slow speed.
#define FirstWord M1000
#define SecondWord M1001
#define OriginNotPassed M1002
FirstWord->Y:$78C00,0,24
SecondWord->Y:$78C01,0,24
OriginNotPassed->Y:$78C02,14
FirstWord->Y:$78C00,0,24
Halls->*
#define Phase30Deg 1
#define Phase90Deg 5
#define Phase150Deg 4
#define Phase210Deg 6
#define Phase270Deg 2
#define Phase330Deg 3
X:$78C0F
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Trigger Trigger
M Divisor N Divisor Reserved Clock Edge Trigger Delay Protocol Code
0 1 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1
6 3 0 0 0 B
Channel 1:X:$78B20
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RxData
Trigger Trigger
CRC_Mask Reserved Mode Enable
Reseved Ready/ Reseved StatusBits Position Bits
SENC
0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 1 0
2 1 1 4 9 A
Assigning values to the control registers should be performed upon power-up/reset in the initialization
PLC.
Encoder conversion table setup required for BiSS-C encoder connected to the first channel on ACC-84E
at base address set to $78C00 will be as follows:
I8000=$2F8B20 ; Unfiltered parallel position of location
; Y:$78B20, no shifting
I8001=$18000 ; 24-bit processed result at $3502
I8002=$2F8B20 ; Unfiltered parallel position of location
; Y:$78B20, no shifting
I8003=$17003 ; 23-bit read starting at bit 2,processed result at $3504
; for commutation
I103=$3502 ; position loop feedback address
I104=$3502 ; velocity loop feedback address
Usually the number of counts in BiSS-C encoders are much higher than normal incremental encoders, the
default settings for position and velocity feedback scale factors (a value of 96) can cause resolution
restrictions on Servo gain settings. It is recommended that the scale factors be set to a smaller value.
I108=1 ; Motor1 position scale factor required not to saturate the Velocity
I109=1 ; Motor1 velocity-loop scale factor
Also, notice that the entries in ECT are not shifting the data. This means LSB of encoder data is 1/32 of a
count as shown in position window. This can be crucial for preventing velocity limitations due to
overflowing velocity registers in PMAC. The maximum velocity acceptable by PMAC is ( 3 (2 1) )
18
or 786431 counts per millisecond. Notice that this can be achieved very easily with a high resolution
encoder. For example, a 26-bit encoder, if the data is shifted so LSB represents a count for PMAC, then
only a maximum velocity of 700 RPM can be achieved. However, if the LSB of position data is used as
1/32 of a count, the maximum speed increases to 22,400 RPM.
3. 218 1 counts per msec
0.011718705 rev per msec = 703.12 RPM
26
2 counts per rev
encoder generates more than 16777215 counts per revolution, we would have a problem setting the Ix71.
In order to overcome this problem, a second entry in encoder conversion table can be utilized. In this
entry, instead of reading the LSB of the position data, the upper 23 bits of data will be read. For example,
in a 26 bit encoder, the second encoder conversion table entry would be set as follows:
I8002=$2F8B20 ; Unfiltered parallel position of location
; Y:$78B20, no shifting
I8003=$17003 ; 23-bit read starting at bit 3; Processed result at $3504
; for commutation
I183=$3504 ; on-going phase position
These settings will cause the ECT to read the upper 23 bits of position information starting at bit 3
26
(23+3=26 bits). Although the encoder generates 2 counts per revolution, the output of ECT for this
entry will only pass the upper 23 bits of data for use in commutation of the motor. The following table
shows a few suggestions depending on the position bits of different encoders.
Encoder Resolution 2nd line
26 bit $17003
32 bit $17009
Setting of Ixx10 causes the PMAC to read the data in the address location as servo position upon
execution of $* or $** command or upon power-on/reset if bit 2 of Ixx80 is set to 1. However, Ixx95
needs to be setup in order to identify how to read the position data from register defined by Ixx10. Since
the data is in parallel format and in Y-memory, bits 16 to 21 of Ixx95 defines the length of the data. For
example:
Position Bits Ixx95 Setting
18 $120000
26 $1A000
32 $200000
No-Shift Position Data
If the position data is not shifted in ECT (which is usually done in order to prevent any velocity
limitations), the LSB of position data reported by encoder equals to 1/32 of a count motor position.
PMAC’s built-in power-on servo position registers (Ixx10 and Ixx95) cannot be used in this case since
these registers expect the LSB to have a value of 1 count and instead a PLC should read the encoder
registers and write the correct position data to actual position of the motor.
Here is an example on how to read the position data from ACC-84E registers and assign them to motor
actual position in a PLC.
CLOSE
DEL GAT
The following procedure explains that finding Ixx75 is done only once per channel while setting up the
machine for the first time, assuming the mechanics and electronics are not to be changed and have not
failed/been replaced or repaired:
1. Set Ixx79=500 and Ixx29=-500 (The sign of value assigned to Ixx79 should match the sign of
Ixx70 and sign of value for Ixx29 is always opposite to Ixx79).
2. Increase these values by increments of 100 until motor is locked in to a position when O0 is
issued. Acceptable range for Ixx79 and Ixx29 is 0 to Ixx57 (continuous current limit).
3. Issue a #nO0, wait for motor to stop moving.
4. Set Ixx29=0, wait for motor to stop moving.
5. Set Mxx71 to zero (see suggested M-variables).
6. Read position data from ECT X-word where Ixx81 and Ixx83 are pointing (use RX command.
For example: RX:$3504).
7. Set Ixx75 to the negative of the value read in step 6 multiplied by Ixx70 modulo Ix71
Ixx75= - Position Read While at Zero Phase Ixx70 % Ixx71
8. Set Ixx79=0.
9. Issue a #nK to kill the motor.
The following examples are for typical encoder resolutions available on BiSS-C protocol:
// Renishaw Resolute Rotary Encoder – 18 Bit
wx:$78C0F,$63000B
wx:$78C00,$211492
I8000=$278C00
I8001=$012000
I8002=$2F8C00
I8003=$012000
I8004=$0
I103=$3502
I104=$3502
I183=$3504
i108=1
i109=1
I171=262144
I170=2 // motor specific
I180=0
I181=$3504
I191=$520000
I110=$78C00
I195=$120000
wx:$78C0F,$63000B
wx:$78C00,$21149A
I8000=$2F8C00
I8001=$018000
I8002=$2F8C00
I8003=$017003
I8004=$0
I103=$3502
I104=$3502
I183=$3504
i108=1
i109=1
I171=8388608
I170=2 // motor specific
I180=0
I181=$3504
I191=$570000
CLOSE
DEL GAT
wx:$78C0F,$63000B
wx:$78C00,$211420
I8000=$2F8C00
I8001=$018000
I8002=$2F8C00
I8003=$017009
I8004=$0
I103=$3502
I104=$3502
I183=$3504
i108=1
i109=1
I171=8388608
I170=2 // motor specific
I180=0
I181=$3504
I191=$570000
CLOSE
DEL GAT
Delta Tau introduced support for this protocol in 1st quarter of 2015 on its ACC-84x FPGA Based Serial
Encoder Interface platform. The implementation of XY2-100 is based upon XY2-100 Serial Link 1
Specification by General Scanning (GSI) and expanded to support 18 and 20 bit data formats.
Signal Description
The XY2-100 Serial Link (or XYZ-100) uses 5 (6 in case of XYZ-100) signals for communication
between the trajectory generation engine (ACC-84x and PMAC) and the scanhead/galvanometer servo
drive.
CLOCK
SYNC
X Y Z DATA D0 P C2 C1 C0 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 P
STATUS S0 P S18 S17 S16 S15 S14 S13 S12 S11 S10 S9 S8 S7 S6 S5 S4 S3 S2 S1 S0 P S18
Clock
The Clock is transmitted by the position data generator (ACC-84x), 20 cycles per frame. Its nominal
frequency is 2MHz. With 2MHz clock and 20 cycles per frame, the position data frame is updated every
10μs.
For most galvanometers, the standard internal controller update rate is 20μs, for smaller galvanometers
the update rate is 10μs, for larger inertias a 40μs update rate may be needed.
ACC-84x implementation of XY2-100 provides capability for changing the clock frequency, which
allows different update rates to scanheads/galvanometers.
Sync
The frame Sync is a single logical "0" pulse, once per frame, transmitted by the position data generator
one clock cycle prior to the first bit of the frame.
X, Y & Z Data
In standard XY2-100 protocol, the X, Y, & Z Data are three 20-bit serial data streams consisting of a
3-bit control code, one 16-bit position word (unsigned, MSB first), and a parity bit (even parity).
ACC-84x implementation of XY2-100 provides capability of transmitting standard 16-bit position data as
described by XY2-100 protocol. In addition, it can transmit 18-bit (compatible with 18-bit Serial Link 2)
and 20-bit (compatible with Canon GM-1000) position data packets. In addition, the variant of the parity
bit (odd or even) can be selected.
Status
The Status data is a 20-bit serial data stream consisting of a 3-bit control code, one 16-bit status
word, and a parity bit (even parity) which is generated by the scanhead/galvanometer servo drive and
read by ACC-84x.
Connections
There are two groups of connections for ACC-84x, depending on the form factor: DE-9 pin connectors
used on ACC-84E and ACC-84S and DA-15 connectors used in Brick family of products.
Unlike serial encoder interface implementations on ACC-84x where the connectors all have the same pin-
outs and supports 4 channels of same encoder protocol, the XY2-100 combines all channels of the ACC-
84x for interfacing with a galvanometer or scanhead. First 3 channel connects are used for interfacing to
XY2-100 device. A differential PWM output with programmable period, duty cycle and pulse count is
provided on the last channel. This output can be used for control of the laser intensity.
Channel
Channel 1 Channel 2 Channel 3 Channel 4
Pin #
1 STATUS– SYNC– CLOCK– PWM–
2 CHX– CHY– CHZ– N.C.
3 N.C. N.C. N.C. N.C.
4 GND GND GND GND
5 GND GND GND GND
6 STATUS+ SYNC+ CLOCK + PWM+
7 CHX+ CHY+ CHZ+ N.C.
8 N.C. N.C. N.C. N.C.
9 +5VDC +5VDC +5VDC +5VDC
8 7 6 5 4 3 2 1
D-Sub DA15 Female
Mating: D-Sub DA15 Male 15 14 13 12 11 10 9
Channel
Channel 1 Channel 2 Channel 3 Channel 4
Pin #
1 A+/SIN+ A+/SIN+ A+/SIN+ A+/SIN+
2 B+/COS+ B+/COS+ B+/COS+ B+/COS+
3 INDEX+ INDEX+ INDEX+ INDEX+
4 +5VDC +5VDC +5VDC +5VDC
5 CHX– CHY– CHZ– N.C.
6 STATUS– SYNC– CLOCK– PWM–
7 2.5V REF 2.5V REF 2.5V REF 2.5V REF
8 PTC PTC PTC PTC
9 A–/SIN– A–/SIN– A–/SIN– A–/SIN–
10 B–/COS– B–/COS– B–/COS– B–/COS–
11 INDEX– INDEX– INDEX– INDEX–
12 GND GND GND GND
13 STATUS+ SYNC+ CLOCK + PWM+
14 CHX+ CHY+ CHZ+ N.C.
15 RES_EXT RES_EXT RES_EXT RES_EXT
Signal Termination
All form factors of ACC-84x, incorporates differential line transceivers suitable for high speed
bidirectional data communication. It is designed for balanced data transmission and complies with both
RS-485 and RS-422 EIA Standards. The transmission line of choice for RS-485 communications is a
twisted pair. Twisted pair cable tends to cancel common-mode noise and also causes cancellation of the
magnetic fields generated by the current flowing through each wire, thereby reducing the effective
inductance of the pair. As with any transmission line, it is important that reflections are minimized. This
can be achieved by terminating the extreme ends of the line using resistors equal to the characteristic
impedance of the line.
In general, termination schematic between ACC-84x and Scan-head/galvanometer servo drive as shown
in the diagram below should be implemented. This document recommends use of double shielded twisted
pair cable for XY2-100 link.
CHX+ CHX+
120Ω 120Ω
Channel 1
CHX- CHX-
CHY+ CHY+
ACC-84x
120Ω 120Ω
Channel 2
CHY- CHY-
SYNC+ SYNC+
SYNC- 120Ω 120Ω SYNC-
CHZ+ CHZ+
120Ω 120Ω
Channel 3
CHZ- CHZ-
CLOCK+ CLOCK+
CLOCK- 120Ω 120Ω CLOCK-
Setup Elements
The multi-channel setup element Acc84E[i].SerialEncCtrl (saved element in Power PMAC only and
non-saved in Turbo PMAC, must be setup in power/initialization PLC) specifies several aspects of the
XY2-100 configuration: trigger enable, the interpolation clock selection and the clock frequency.
The different components of this 24-bit full-word element cannot be accessed as independent elements, so
it is necessary to assemble the full-word value from the values of the individual components. It is easiest
to treat the value as a hexadecimal value, so the individual components can be seen independently.
Acc84E[i].SerialEncCtrl is the full-word element that comprises the multi-channel setup for serial
encoder interfaces for the ACC-84E. It is comprised of the following components (which cannot be
accessed as independent elements):
Turbo PMAC/
Hex C
Component Power PMAC Functionality
Digit # Bits
Script Bits
ClockMDiv 23 – 16 1–2 31 – 24 Clock linear division factor
ClockNDiv 15 – 12 3 23 – 20 Clock exponent division factor
TxEnable 11 4 19 Enables transfer of XY2-100 data
Parity 10 4 18 Selection of parity bit variant
ClockSel 09 4 17 Interpolation clock source select
- 08 4 16 Reserved
ModeSel 07 – 06 5 15 – 14 Transmitted position data resolution select
- 05 – 04 5 13 – 12 Reserved
- 03 – 00 6 11 – 08 Reserved
The components ClockMDiv and ClockNDiv control how the XY2-100 clock frequency is generated from
the IC’s fixed 100 MHz clock frequency. The equation for this clock frequency fXY2 is:
f XY 2 MHz
100
M 1* 2 N
where M is short for ClockMDiv. This 8-bit component can take a value from 0 to 255. N is short for
ClockNDiv. This 4-bit component can take a value from 0 to 15, so the resulting 2N divisor can take a
value from 1 to 32,768. Table below includes the most common settings for M and N dividers.
The component TxEnable controls whether the XY2-100 position data is being transferred to the
scanhead/galvanometer. Setting this bit to 1 enables the driver circuitry for the XY2-100 Clock, Sync and
Data lines. This bit must be set to 1 to command any scanheads/galvanometers. If there is an alternate use
for the same signal pins, this bit must be set to 0 so the drivers do not conflict with the alternate use.
The component ClockSel controls which Power PMAC clock signal is used for capturing the position data
generated by Power PMAC and perform linear interpolation between the received commands. If motor
trajectory is calculated in servo loop, standard for Power PMAC and only choice in Turbo PMAC, then
the ClockSel should be set to 0 to select Servo Loop. In Power PMAC, if bit 3 (value 8) of
Motor[x].PhaseCtrl is set to 1, this motor will close its position/velocity servo loop on the phase
interrupt. This permits some Power PMAC motors, such as those driving “fast-tool servos” or
galvanometers, to close their loops at a substantially higher frequency than other motors in the system. In
this case ClockSel should be set to 1 to allow interpolation between position updates at Phase rate.
The component ModeSel specifies the X, Y and Z position packet format and position resolution. The
ModeSel allows users to select between 16-bit, 18-bit and 20-bit resolution. The following timing
diagrams show the data format of each ModeSel setting:
ModeSel = 00
16-bit data format (XY2-100 Standard, Serial Link)
CLOCK
SYNC
X Y Z DATA D0 P C2 C1 C0 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 P
STATUS S0 P S18 S17 S16 S15 S14 S13 S12 S11 S10 S9 S8 S7 S6 S5 S4 S3 S2 S1 S0 P S18
ModeSel = 01
18-bit data format (Serial Link 2)
CLOCK
SYNC
X Y Z DATA D0 P C0 D17 D16 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 P
STATUS S0 P S18 S17 S16 S15 S14 S13 S12 S11 S10 S9 S8 S7 S6 S5 S4 S3 S2 S1 S0 P S18
ModeSel = 10
20-bit data format
CLOCK
SYNC
X Y Z DATA D1 D0 D19 D18 D17 D16 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
STATUS S0 P S18 S17 S16 S15 S14 S13 S12 S11 S10 S9 S8 S7 S6 S5 S4 S3 S2 S1 S0 P S18
The following list shows typical settings of Acc84E[i].SerialEncCtrl for a 2MHz transfer clock.
SerialClockMDiv: = $18 // Serial clock frequency = bit transmission frequency
SerialClockNDiv: =1
TxEnable: =1 // Enable transmission of XY2-100 position data
Parity: =1 // Odd parity selection
ClockSel: =0 // Servo clock selection for interpolation
ModeSel: = $0 // XY2-100 Serial Link Standard (16-bit) position data
For example, for a 2 MHz bit transmission rate, SerialClockMDiv = 24 ($18) and SerialClockNDiv = 1
($1) Acc84E[i].SerialEncCtrl is set to $181C00 for interpolation based upon Servo clock and odd parity
calculation.
The FPGA always reads full 24-bit registers Acc84E[i].Chan[j].SerialEncCmd, for j equal to 0, 1 and 2,
as signed 24-bit position command for axis X, Y and Z on the rising edge of selected interpolation clock,
set by ClockSel in Acc84E[i].SerialEncCtrl. After reading the update commanded position, firmware
applies a linear interpolation between commanded positions at the frame rate of the XY2-100 update rate
set by components ClockMDiv and ClockNDiv of Acc84E[i].SerialEncCtrl.
After interpolation at frame rate of the XY2-100, depending on the ModeSel component of
Acc84E[i].SerialEncCtrl, upper 16-bit, 18-bit or 20-bits of the commanded position data is transmitted
to the scanhead/galvanometer servo drive.
ModeSel = 00
16-bit data format (XY2-100 Standard, Serial Link)
ModeSel = 01
18-bit data format (Serial Link 2)
ModeSel = 10
20-bit data format
PMAC writes desired position based FPGA reads desired position at rising PMAC Commanded Position
upon commanded trajectory edge of the ClockSel XY2-100 Interpolated Position
ClockSel
Phase/Servo
SYNC
The FPGA always reads full 24-bit registers Acc84E[i].Chan[j].SerialEncCmd, for the last channel with
j=3, and it is used for adjusting the PWM output frequency and duty cycle. The number of pulses
outputted can be controlled using the Acc84E[i].Chan[j].SerialEncDataD register. This PWM output is
not a part of XY2-100 protocol, but it is an added feature to ACC-84x with XY2-100 option. This output
is intended to control a Laser source’s power. It is comprised of the following components:
Turbo PMAC/
Hex C
Component Power PMAC Functionality
Digit # Bits
Script Bits
The component PwmPeriod controls the period duration of the PWM output and it is inversely
proportional to the frequency of the signal. The equation for this PWM output frequency fPWM is:
105
f PWM kHz
16 P
where P is short for PwmPeriod. This 12-bit component can take a value from 2 to 4095 and generates
PWM frequencies ranging from 1526 Hz to 3.125 MHz.
The component DutyCycle controls the positive duty cycle of the PWM+ output signal available on 4th
channel of the ACC-84x and it is independent of the PWM frequency set by PwmPeriod component. The
equation for this PWM duty cycle is:
where D is short for DutyCycle. This 12-bit component can take a value from 0 to 4095 and generates
duty cycles ranging from 0% to 100%.
The following list shows typical settings of Acc84E[i].Chan[3].SerialEncCmd for a 5kHz PWM output
at 25% duty cycle.
DutyCycle: = $400 // $400=1024 setting for 25% duty cycle command (1024/4096)
PwmPeiod: = $4E2 // $4E2(1250) setting for PwmPeriod generates a 5kHz PWM freq.
Status elements of ACC-84E are read only elements where the received data and status flags are written
by FPGA at every frame cycle.
The Acc84E[i].Chan[3].SerialEncDataC is used for setting the On-delay time of the first PWM pulse
from setting time of the Acc84E[i].Chan[3].SerialEncDataD register.
The Acc84E[i].Chan[3].SerialEncDataD is used for commanding and monitoring the number of PWM
pulses.
ACC84E[i].Chan[j].SerialEncDataA
The FPGA always writes full 24-bit registers Acc84E[i].Chan[j].SerialEncDataA, for j equal to 0, 1 and
2, as signed 24-bit interpolated position command for axis X, Y and Z on the falling edge of interpolation
clock (SYNC). This data is purely for use as simulated feedback for PMAC motors as the position loop is
closed in scanhead/galvanometer drive and only access to status bits about the following error is available
under XY2-100 protocol.
The interpolated position is always written as a 24-bit signed integer. Depending on the ModeSel setting,
user should scale the position values reported in this register to represent 16-bit, 18-bit or 20-bit whole
count position data. Although the XY2-100 only receives the upper 16-bit, 18-bit or 20-bits of position
from the 24-bit interpolated values, the sub-counts are essential for proper interpolation and avoiding
round off errors.
The 24-bit registers Acc84E[i].Chan[3].SerialEncDataA is update every frame cycle and it includes the
full status word returned by scanhead/galvanometer servo drive.
The status bit definition based upon XY2-100 Serial Link 1 Specification by General Scanning (GSI) is
defined as below.
ACC84E[i].Chan[j].SerialEncDataC
ACC84E[i].Chan[j].SerialEncDataC with J=0, 1, 2 are not used.
ACC84E[i].Chan[j].SerialEncDataC with J=3 it controls the delay time of the first PWM pulse from
setting time of the Acc84E[i].Chan[3].SerialEncDataD register. This delay ranges from 60 nanoseconds
to 21.06 milliseconds. It is comprised of the following components:
Turbo PMAC/
Hex C
Component Power PMAC Functionality
Digit # Bits
Script Bits
DelayUnits 23 – 12 1- 3 31 – 20 Defines the length of a delay in nanoseconds
Delay 11 – 00 3-6 19 – 08 Defines the number of delays to wait
Only the lower 9 bits of Delay are read, so its maximum value is 511
($1FF).
Note
The component DelayUnits creates a time unit of a configurable length in nanoseconds. The component
Delay determines how many of those lengths of time should be inserted between the first PWM pulse and
the setting time of the Acc84E[i].Chan[3].SerialEncDataD register. The equation for this configurable
delay is:
For example, if a delay of 600 microseconds was desired between each trigger of the
Acc84E[i].Chan[3].SerialEncDataD register and the corresponding PWM pulse, one way it could be
achieved is:
DelayUnits: = $3E6 // 998 in decimal. Each delay will take [(998+2) x 10] = 10000 ns, or 10 microsecond
Delay: = $39 // 57 in decimal. A total of [(57+3)] = 60 delay units will be taken
For a 600 microsecond delay, DelayUnits = 998 ($3E6) and Delay = 57 ($39). This is achieved by setting
Acc84E[i].Chan[3].SerialEncDataC to $3E6039. It should be noted that there may be multiple ways to
achieve a given total delay.
ACC84E[i].Chan[j].SerialEncDataD
ACC84E[i].Chan[j].SerialEncDataD with J=0, 1, 2 are not used.
ACC84E[i].Chan[j].SerialEncDataD with J=3 it controls the number of PWM pulses to be outputted.
The number of PWM pulses desired to be outputted from last channel of ACC-84E with XY2-100
protocol is written to Acc84E[i].Chan[3].SerialEncDataD. Reading this register will return the number
of PWM pulses remaining to be outputted and decrements based upon the PWM duty cycle set using the
Acc84E[i].Chan[3].SerialEncCmd register.
If the value for Acc84E[i].Chan[3].SerialEncDataD is set to a non-zero number (except $FFF or 4095)
which defines the number of PWM pulses desired to be outputted, a PWM signal with frequency and duty
cycle defined by Acc84E[i].Chan[3].SerialEncCmd register is generated. The value in
Acc84E[i].Chan[3].SerialEncDataD is decremented upon each PWM pulse output until its value reaches
0, in which case the PWM output will be stopped automatically. This register can be monitored to
confirm the pulse output completion.
If the value for Acc84E[i].Chan[3].SerialEncDataD is set to its maximum value ($FFF or 4095) an
infinite number of PWM pulses are generated without decrementing this register. This mode can be used
when an unknown number of PWM pulses is required by the application.
The following pointer definitions are used as examples for two ACC-84E used in the same system:
ptr First84PwmMPeriod->u.io:$A00070.8.12;
ptr First84PwmDutyCycle->u.io:$A00070.20.12;
ptr First84PwmDelay->u.io:$A00058.8.12;
ptr First84PwmDelayUnit->u.io:$A00058.20.12;
ptr First84PwmPulseCount->u.io:$A0005C.8.12;
ptr Second84PwmMPeriod->u.io:$A08070.8.12;
ptr Second84PwmDutyCycle->u.io:$A08070.20.12;
ptr Second84PwmDelay->u.io:$A08058.8.12;
ptr Second84PwmDelayUnit->u.io:$A08058.20.12;
ptr Second84PwmPulseCount->u.io:$A0805C.8.12;
open plc 1
// Desired Frequnecy and Duty cycle are set ahead of time
DesiredPwmFreqkHz = 200 ; // kHz
DesiredPwmDutyCycle = 10; // Percent
DesiredPwmDelayUnit = 998; // 10 usec
DesiredPwmDelay = 57; // 600 usec
First84PwmMPeriod = rint( 1E5 / (16 * DesiredPwmFreqkHz) );
First84PwmDutyCycle = rint( DesiredPwmDutyCycle / 100 * 4096 );
First84PwmDelay = rint(DesiredPwmDelay * 1E3);
For the address conversion, tools such as TP2PP, available for download from
http://forums.deltatau.com/showthread.php?tid=238 , can be used.
For a 2 MHz bit transmission rate, SerialClockMDiv = 24 ($18) and SerialClockNDiv = 1 ($1)
Acc84E[i].SerialEncCtrl is set to $181C00 for interpolation based upon Servo clock and odd parity
calculation.
Acc84E[0].SerialEncCtrl = $181C00
EncTable[1].type = 1
EncTable[1].pEnc = Acc84E[0].Chan[0].SerialEncDataA.a
EncTable[1].pEnc1 = Sys.pushm
EncTable[1].index1 = 8
EncTable[1].index2 = 8
EncTable[1].index3 = 0
EncTable[1].index4 = 0
EncTable[1].index5 = 0
EncTable[1].index6 = 0
EncTable[1].ScaleFactor = 1
EncTable[2].type = 1
EncTable[2].pEnc = Acc84E[0].Chan[1].SerialEncDataA.a
EncTable[2].pEnc1 = Sys.pushm
EncTable[2].index1 = 8
EncTable[2].index2 = 8
EncTable[2].index3 = 0
EncTable[2].index4 = 0
EncTable[2].index5 = 0
EncTable[2].index6 = 0
EncTable[2].ScaleFactor = 1
Motor[1].Ctrl=Sys.PosCtrl
Motor[1].pDac = Acc84E[0].Chan[0].SerialEncCmd.a
Motor[1].pEnc = EncTable[1].a
Motor[1].pEnc2 = EncTable[1].a
Motor[1].pAmpEnable = 0
Motor[1].pAmpFault = 0
Motor[1].pLimits = 0
Motor[1].ServoCtrl = 1
Motor[1].pAbsPos = Acc84E[0].Chan[0].SerialEncDataA.a
Motor[1].AbsPosFormat = $01001808
Motor[1].PowerOnMode=4
Motor[1].FatalFeLimit=0
Motor[1].WarnFeLimit=0
Motor[2].Ctrl=Sys.PosCtrl
Motor[2].pDac = Acc84E[0].Chan[1].SerialEncCmd.a
Motor[2].pEnc = EncTable[2].a
Motor[2].pEnc2 = EncTable[2].a
Motor[2].pAmpEnable = 0
Motor[2].pAmpFault = 0
Motor[2].pLimits = 0
Motor[2].ServoCtrl = 1
Motor[2].pAbsPos = Acc84E[0].Chan[1].SerialEncDataA.a
Motor[2].AbsPosFormat = $01001808
Motor[2].PowerOnMode=4
Motor[2].FatalFeLimit=0
Motor[2].WarnFeLimit=0
The following settings are dependent on the selected data length mode:
ModeSel = 00
16-bit data format (XY2-100 Standard, Serial Link)
Motor[1].PosSf = 1/exp2(16)
Motor[1].Pos2Sf = Motor[1].PosSf
Motor[1].AbsPosSf = 1/exp2(8)
Motor[1].MaxPos = exp2(15)-1
Motor[1].MinPos = -exp2(15)
Motor[1].MaxDac = exp2(15)
Motor[2].PosSf = 1/exp2(16)
Motor[2].Pos2Sf = Motor[2].PosSf
Motor[2].AbsPosSf = 1/exp2(8)
Motor[2].MaxPos = exp2(15)-1
Motor[2].MinPos = -exp2(15)
Motor[2].MaxDac = exp2(15)
ModeSel = 01
Motor[1].PosSf = 1/exp2(14)
Motor[1].Pos2Sf = Motor[1].PosSf
Motor[1].AbsPosSf = 1/exp2(6)
Motor[1].MaxPos = exp2(17)-1
Motor[1].MinPos = -exp2(17)
Motor[1].MaxDac = exp2(17)
Motor[2].PosSf = 1/exp2(14)
Motor[2].Pos2Sf = Motor[1].PosSf
Motor[2].AbsPosSf = 1/exp2(6)
Motor[2].MaxPos = exp2(17)-1
Motor[2].MinPos = -exp2(17)
Motor[2].MaxDac = exp2(17)
ModeSel = 10
20-bit data format
Motor[1].PosSf = 1/exp2(12)
Motor[1].Pos2Sf = Motor[1].PosSf
Motor[1].AbsPosSf = 1/exp2(4)
Motor[1].MaxPos = exp2(19)-1
Motor[1].MinPos = -exp2(19)
Motor[1].MaxDac = exp2(19)
Motor[2].PosSf = 1/exp2(12)
Motor[2].Pos2Sf = Motor[1].PosSf
Motor[2].AbsPosSf = 1/exp2(4)
Motor[2].MaxPos = exp2(19)-1
Motor[2].MinPos = -exp2(19)
Motor[2].MaxDac = exp2(19)
Motor[1].MaxSpeed = exp2(15)
Motor[1].InvAMax = 1/exp2(15)
Motor[1].InvDMax = 1/exp2(15)
Motor[1].InvJMax = 1/exp2(15)
Motor[2].MaxSpeed = exp2(15)
Motor[2].InvAMax = 1/exp2(15)
Motor[2].InvDMax = 1/exp2(15)
Motor[2].InvJMax = 1/exp2(15)
In order to prevent this from happening two counter measures should be implemented:
1. User should setup the Motor[x].PowerOnMode register to a value of 4, forcing the read of the
simulated feedback upon power-on/reset.
2. Implement the following code during development of the code where the
Motor[x].PowerOnMode is not active until next power up/reset cycle.
This code breaks the positive feedback for a moment which is sufficient for allowing the
feedback and commanded values for the motor to be equal.
#1..3KILL
EncTable[1].ScaleFactor=0
EncTable[2].ScaleFactor=0
EncTable[3].ScaleFactor=0
Motor[1].HomePos=0
Motor[2].HomePos=0
Motor[3].HomePos=0
Motor[1].Pos=0
Motor[2].Pos=0
Motor[3].Pos=0
EncTable[1].ScaleFactor=1
EncTable[2].ScaleFactor=1
EncTable[3].ScaleFactor=1
Non-linearity of Scanheads
The pin-cushion effect caused by galvanometers, can be corrected using kinematic routines. A typical
configuration of a laser mirror system is shown in isometric view below:
+Ym (A)
+Xt
The forward and inverse-kinematic equations for a basic system of this type are shown in the following
diagram with orthogonal views of the system:
L0
+Yt
+Xm (C)
+Xm (C)
+Xt
L1 L1
+Ym (A)
Laser
Path
Length
L22 Yt 2 L2 L22 Yt 2
+Xt +Yt
Xt Yt
X t L1
L 22 Y t 2 tan 2 C Yt L2 tan 2 A
Y
C tan 1
1 Xt 1
A tan 1 t
L1 L2 Yt
2 2 2
2 L2
Basic Laser Mirror Kinematics
All of the actuators, both for the workpiece holder and for the laser control, are defined as inverse-
kinematic axes in the same coordinate system.
Here is a simple implementation of forward and inverse kinematic routines for a given galvanometer:
The inherent non-linearity of the optics and scanners can be compensated for using PMAC’s built-in 2D
compensation tables. This method requires physical marking and measurement of patterns (mostly
uniformly spaced matrix patterns) in order to calculate the correction tables required for each of the
galvos based upon commanded position of them. This method is especially useful if any optics such as
Flat-field, F-theta or Telecenteric lenses are involved and their non-linearities also need to be
compensated.
1. Select a grid size which covers the full command range for the galvanometer (for example a grid
which covers ±32767 if a 16-bit command is used). For this example, a 3D array called
“CmdTable” is constructed with indexes i,j and k for each of the dimensions. The X and Y galvo
command position for node row i and column j are stored in elements k=1 and k=2 respectively.
2. Program the PMAC to generate the grid points defined above on the work piece, by marking or
etching.
3. Identify the resulting locations on the workpiece (an exaggerated version of resulted matrix is
shown below in red with resulting nodes corresponding to CmdTable entries shown in black
dots).
The X and Yposition of each node should to be measured in engineering units, and stored. In this
example the measured locations are stored in a 3D array called “RawTable”. This array has the
same dimensions as the “CmdTable”:
15
10
-5
-10
-15
-15 -10 -5 0 5 10 15
4. Identify the maximum usable workspace with a rectangular outline. Notice that the compensation
table cannot make corrections for rotation, so the selected rectangle direction should match the
direction of distorted XY field. There are multiple methods for optimizing the best usable area
which are beyond the intended scope of this document. A simple approach in selection of this
area is shown in this example.
15
10
-5
-10
-15
-15 -10 -5 0 5 10 15
5. Generate a table with same dimensions as the “CmdTable” and “RawTable”, called
“BestFitTable” in which the XY coordinates of nodes for the best fit grid are stored. In the picture
above node are shown in blue dots.
The next steps are automated in the code, but explained for reference.
15
10
-5
-10
-15
-15 -10 -5 0 5 10 15
The following example code is written in MATLAB script, but it can be converted to any language with
array support.
%Main Procedure
Res = 32767;
HalfLen = 10;
MeshSize = 21;
hold off;
plot(RawTable(:,:,1),RawTable(:,:,2),'red');
hold on;
plot(RawTable(:,:,1)',RawTable(:,:,2)','red');
xmin = max(RawTable(1:1,:,1));
xmax = min(RawTable(MeshSize:MeshSize,:,1));
ymin = max(RawTable(:,1:1,2));
ymax = min(RawTable(:,MeshSize:MeshSize,2));
x_temp = linspace(xmin,xmax,MeshSize);
y_temp = linspace(ymin,ymax,MeshSize);
BestFitTable = zeros(MeshSize,MeshSize,2);
for i = 1:MeshSize
BestFitTable(:,i,1)=x_temp';
BestFitTable(i,:,2)=y_temp;
end
plot(BestFitTable(:,:,1),BestFitTable(:,:,2),'blue');
plot(BestFitTable(:,:,1)',BestFitTable(:,:,2)','blue');
meshdist = zeros(MeshSize-1,MeshSize-1);
meshid = zeros(MeshSize,MeshSize,2);
for i= 1:MeshSize
for j=1:MeshSize
for m = 1:MeshSize-1
for n = 1:MeshSize-1
meshdist(m,n) = sqrt((BestFitTable(i,j,1)-RawTable(m,n,1))^2+(BestFitTable(i,j,2)-RawTable(m,n,2))^2) + ...
sqrt((BestFitTable(i,j,1)-RawTable(m+1,n,1))^2+(BestFitTable(i,j,2)-RawTable(m+1,n,2))^2) + ...
sqrt((BestFitTable(i,j,1)-RawTable(m+1,n+1,1))^2+(BestFitTable(i,j,2)-RawTable(m+1,n+1,2))^2) + ...
sqrt((BestFitTable(i,j,1)-RawTable(m,n+1,1))^2+(BestFitTable(i,j,2)-RawTable(m,n+1,2))^2) ;
end
end
if (BestFitTable(i,j,1)==RawTable(m,n,1) && BestFitTable(i,j,2)==RawTable(m,n,2))
meshid(i,j,1) = m;
meshid(i,j,2) = n;
else
[MinLen,MinInd]=min(meshdist(:));
[meshid(i,j,1),meshid(i,j,2)] = ind2sub(size(meshdist),MinInd);
end
end
end
Corrected = zeros(MeshSize,MeshSize,2);
for i= 1:MeshSize
for j=1:MeshSize
[Corrected(i,j,1),Corrected(i,j,2)] = PlanarInterpolation( ...
CmdTable(meshid(i,j,1):meshid(i,j,1)+1,meshid(i,j,2):meshid(i,j,2)+1,:), ...
RawTable(meshid(i,j,1):meshid(i,j,1)+1,meshid(i,j,2):meshid(i,j,2)+1,:), ...
BestFitTable(i,j,1), BestFitTable(i,j,2) );
end
end
x1 = ActPos(1,1,1);
y1 = ActPos(1,1,2);
x2 = ActPos(1,2,1);
y2 = ActPos(1,2,2);
x3 = ActPos(2,1,1);
y3 = ActPos(2,1,2);
x4 = ActPos(2,2,1);
y4 = ActPos(2,2,2);
X1 = CmdPos(1,1,1);
Y1 = CmdPos(1,1,2);
X2 = CmdPos(1,2,1);
Y2 = CmdPos(1,2,2);
X3 = CmdPos(2,1,1);
Y3 = CmdPos(2,1,2);
m12=(y2-y1)/(x2-x1);
m13=(y3-y1)/(x3-x1);
m24=(y4-y2)/(x4-x2);
m34=(y4-y3)/(x4-x3);
if (m12==m34)
m1=m12;
else
[xe1,ye1] = LineIntersection(x1,y1,x2,y2,x3,y3,x4,y4);
m1=(ye1-Yinput)/(xe1-Xinput);
end
if (m13==m24)
m2=m13;
else
[xe2,ye2] = LineIntersection(x1,y1,x3,y3,x2,y2,x4,y4);
m2=(ye2-Yinput)/(xe2-Xinput);
end
if (isinf(m1))
x13 = Xinput;
y13 = m13*(x13-x1)+y1;
else
if (isinf(m13))
x13 = x1;
y13 = m1 * (x13 - Xinput) + Yinput;
else
x13 = (m1*Xinput - m13*x1 +y1 - Yinput)/(m1-m13);
y13 = m13*(x13-x1)+y1;
end
end
if (isinf(m2))
x12 = Xinput;
y12 = m12*(x12-x1)+y1;
else
if (isinf(m12))
x12 = x1;
y12 = m2 * (x12 - Xinput) + Yinput;
else
x12 = (m2*Xinput - m12*x1 +y1 - Yinput)/(m2-m12);
y12 = m12*(x12-x1)+y1;
end
end
ratio1 = sqrt((x12-x1)^2+(y12-y1)^2)/sqrt((x2-x1)^2+(y2-y1)^2);
ratio2 = sqrt((x13-x1)^2+(y13-y1)^2)/sqrt((x3-x1)^2+(y3-y1)^2);