^1 USER MANUAL ^2 PMAC2 ^3 Programmable Multi-Axis Control ^4 3Ax-602413-xUxx ^5 April 15, 2004 Single Source Machine Control Power // Flexibility // Ease of Use 21314 Lassen Street Chatsworth, CA 91311 // Tel. (818) 998-2095 Fax. (818) 998-7807 // www.deltatau.
Copyright Information © 2003 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. To report errors or inconsistencies, call or email: Delta Tau Data Systems, Inc.
PMAC2 User Manual Table Of Contents INTRODUCTION .......................................................................................................................................................1 PMAC Overview.......................................................................................................................................................1 Flexibility....................................................................................................................................
PMAC2 User Manual Debugging ..........................................................................................................................................................30 Establishing Basic Current Loop Operation............................................................................................................31 Purpose...............................................................................................................................................................
PMAC2 User Manual Parameter Setup.......................................................................................................................................................58 Parameters to Set Up Global Hardware Signals................................................................................................58 Parameters to Set Up Per-Channel Hardware Signals ......................................................................................59 Parameters to Set Up Basic Motor Operation.
PMAC2 User Manual Hardware Characteristics ..................................................................................................................................81 Suggested M-Variables .......................................................................................................................................81 Direction Control................................................................................................................................................
PMAC2 User Manual Figures Figure Number Figure Title Page Number Figure 1 PMAC2 Block Diagram .............................................................................................................................1 Figure 2 PMAC2 Gate Array IC...............................................................................................................................2 Figure 3 PMAC2 Gate Array IC Clock Control .......................................................................................
PMAC2 User Manual vi Table of Contents
PMAC2 User Manual INTRODUCTION PMAC Overview The Delta Tau Data Systems, Inc. Programmable Multi-Axis Controller2 (PMAC2) is a family of highperformance servo motion controllers capable of commanding up to eight axes of motion simultaneously with a high level of sophistication. Through the power of a Digital Signal Processor (DSP), PMAC2 offers a price/performance ratio for multi-axis control that was not previously available.
PMAC2 User Manual 6 ENCODER 1 OUTPUT1 A,B,C FLAG 1 ADCIN1 A,B ENCODER 2 OUTPUT2 A,B,C FLAG 2 ADCIN2 A,B ENCODER 3 OUTPUT3 A,B,C FLAG 3 ADCIN3 A,B ENCODER 4 OUTPUT4 A,B,C FLAG 4 ADCIN4 A,B ENCODER/FLAG STATUS & CONTROL OUTPUT/ADCIN CONTROL 9 2 3 9 2 3 9 2 3 9 2 24-Bit DATA BUS 6 2 6 2 6 2 6 2 2 6-Bit ADDRESS BUS Figure 2 PMAC2 Gate Array IC Configuration for a Task PMAC2 is configured for a particular application by choice of the hardware set (through options and accessories), config
PMAC2 User Manual Manual Layout This manual provides a quick step-by-step guide for the beginner setting up a typical system, as well as explaining how to use the various features available on PMAC2. It is organized by subject (safety, I/O, servos, trajectories, etc.) to allow quick access by the area of concern. The subjects are ordered by the typical sequence of events a user will go through to set up a system.
PMAC2 User Manual PMAC2 General Purpose I/O Use: This section describes the JIO port’s 32 discrete digital I/O lines and provides information for configuring them individually for input or output using an inverting or noninverting format. Using the Position Compare Feature on PMAC2: This section explains the position compare feature on PMAC2 and describes how it provides a very fast and very accurate compare output function based on the actual position counter.
PMAC2 User Manual Technical Support Delta Tau is happy to respond to any questions or concerns regarding PMAC. Contact the Delta Tau Technical Support Staff by the following methods: By Telephone For immediate service, you can contact the Delta Tau Technical Support Staff by telephone Monday through Friday. The support line hours and telephone numbers are listed below. By FAX and E-Mail FAX or E-Mail a request or problem overnight and it will be dealt with on the following business day.
PMAC2 User Manual 6 Introduction
PMAC2 User Manual BASIC MOTOR SETUP ON PMAC2 Controlling Motors PMAC2 has many modes for controlling motors. A major part of the initial setup of a PMAC2 is the hardware and software configuration to specify a specific mode of operation.
PMAC2 User Manual I901 (I997 for an Ultralite) controls the phase clock frequency for the card, the rate at which commutation and current-loop updates are done, by specifying the divide-down from MaxPhase. I902 (I998 for an Ultralite) controls the servo clock frequency for the card, the rate at which command position interpolation and the position/velocity servo algorithms are executed.
PMAC2 User Manual The most important of these variables are I9n0 and I9n6. I9n0 specifies the encoder decode for channel n, quadrature or pulse-and-direction, including the direction sense. I9n6 specifies which output signal modes are used for Channel n: DAC for analog control, PWM (pulse width modulation) for direct powerblock control, and/or PFM (pulse frequency modulation) for stepper motor control.
PMAC2 User Manual 24 Data ADC Input Value A ADC Shift Register A ADC Input Value B ADC Shift Register B ADCINA ADCINB 6 Address ADC Frequency Control ADCCLK * ADC Strobe Control * ADCSTROBE PHASE CLOCK that one register controls * Indicates all ADC input channels on IC Figure 6 PMAC2 Gate Array IC Input Channel Parameters to Set up Motor Operation Each Motor x has setup I-variables to permit specific software configuration of that motor’s control algorithms.
PMAC2 User Manual OUTPUT1 A,B,C CLOCK CONTROL ADCIN1 A,B MACRO RING READ REGISTERS (48) ENCODER/FLAG1 6 2 12 8 8 MACRO RING SHIFT REGISTERS OUTPUT2 A,B,C ADCIN2 A,B 6 2 DEDICATEDHARDWARE USE OF I/O PINS 2 12 MACRO RING WRITE REGISTERS (48) ENCODER/FLAG2 OUTPUT/ADCIN CONTROL 2 MACRO RING STATUS & CONTROL ENCODER/FLAG STATUS & CONTROL 2 I/O & PIN USE CONTROL GENERAL I/O 24-Bit DATA BUS 2 60 GENERALPURPOSE USE OF I/O PINS 7-Bit ADDRESS BUS Figure 7 DSP Gate Command Output Registers Po
PMAC2 User Manual 12 Basic Motor Setup on PMAC2
PMAC2 User Manual SETTING UP PMAC2 FOR DIRECT PWM CONTROL One of PMAC2’s important new features is the ability to close motor current loops digitally. That is, the current control loop is closed by using digital computation operating on numerical values in registers rather than by using analog processing operating on voltage levels with op-amps.
PMAC2 User Manual In a motor, there are three frames of reference that are important. The first is the stator frame, which is fixed on the non-moving part of the motor, called the stator. In a brushless motor, the motor armature windings are on the stator, so they are fixed in the stator frame. The second frame is the rotor frame, which is referenced to the mechanics of the moving part of the motor, called the rotor. This frame, of course, rotates with respect to the stator.
PMAC2 User Manual Magnetization Current Ix77 ' Id I a' Direct Current Command + DAC - dq Torque Command from Position/ Velocity Servo ' Iq va PWM Ia to abc Va PI Phase A Current Loop I b' Quadrature Current Command + DAC Vb PI - vb PWM E Ib Q Phase B Current Loop - - Vc - vc PWM + Balance Loop PMAC AMPLIFIER Figure 8 PMAC/PMAC2 Commutation with Analog Current Loop Digital Loops in the Field Frame In an system with a digital current loop, it is possible to close the cu
PMAC2 User Manual Hardware Setup The connection between PMAC2 and the direct PWM digital amplifier is almost always made through an interface board. Typically, this interface board works for 2 axes, connecting with a short 100-strand flat cable to one of PMAC2’s machine connectors. The interface board has connectors to the amplifiers, to the position feedback sensors, and to any flags used (overtravel limits, home, etc.).
PMAC2 User Manual where n is the PMAC2 channel number. While each channel has its own pins for the clock and strobe outputs, the signals are actually common for 4 channels (1-4 and 5-8). PWM/ADC Phase Matching The current data brought back into PMAC2’s Phase A input must be for the motor phase commanded by PMAC2’s Phase A PWM output, whatever this phase is called on the motor and drive.
PMAC2 User Manual 117,964.8kHz I 900 = int − 1 4 * PWMFreq(kHz) The frequency should be set within the specified range for the drives controlled by PMAC2. Too high a frequency can lead to excessive drive heating due to switching losses; too low a frequency can lead to lack of responsiveness, excess acoustic noise, possible physical vibration, and excessive motor heating due to high current ripple. I906 controls the PWM frequency of machine interface channels 5-8 by the same equation.
PMAC2 User Manual I10 tells the PMAC2 interpolation routines how much time there is between servo clock cycles. It must be changed any time I900, I901, or I902 is changed. I10 can be set according to the formula: I 10 = 640 (2 * I 900 + 3)(I 901 + 1)(I 902 + 1) 9 Hardware Clock Frequency Control: I903, I908 I903 determines the frequency of four hardware clock signals use for machine interface channels 1-4; I907 does the same for machine interface channels 5-8.
PMAC2 User Manual Commutation Enable: Ix01 Ix01 is set to 1 to instruct PMAC2 to perform the phase commutation for this motor. If PMAC2 is performing the digital current loop closure, it must also perform the phase commutation for the motor.
PMAC2 User Manual PWM Scale Factor: Ix66 Ix66, the PWM Scale Factor, scales the output command values so that they use the PWM circuitry effectively. The result of the current-loop calculations is a fractional value between -1.0 and +1.0. This value is multiplied by Ix66 before between written to a PWM command register, where it is digitally compared to a PWM up/down counter moving between I900+1 and -I900-2 (between I906+1 and -I906-2 for channels 5-8).
PMAC2 User Manual If a non-zero value of Ix77 magnetization current will be used, for induction motor control or for field weakening of a permanent-magnet brushless motor, then Ix69 should be replaced in the above equation by . In early testing, it may be desirable to set Ix69 to an artificially low value to prevent accidental overcurrent commands into the motor. Continuous Current Limit: Ix57 Ix57 specifies the continuous current limit for the motor/drive system for I2T protection.
PMAC2 User Manual For commutation with digital current loops, the proper setting of Ix72 is unrelated to the polarity of the encoder counter. This is different from commutation with an analog current loops, in which the polarity of Ix72 (less than or greater than 128) must match the encoder counter polarity.
PMAC2 User Manual If there is only a permanent magnet field, the armature current reading can either be fed into ADC A or ADC B, with Ix82 telling PMAC2 which one is used. If ADC A is used, the serial digital input for ADC B (+signal only) should be tied to GND so a zero feedback value is forced (alternately a background PLC can periodically zero the direct current integrator register).
PMAC2 User Manual Testing PWM and Current Feedback Operation Warning: On many motor and drive systems, potentially deadly voltage and current levels are present. Do not attempt to work directly with these high voltage and current levels unless you are fully trained on all necessary safety procedures. Low-level signals on PMAC2 and interface boards can be accessed much more safely.
PMAC2 User Manual To allow reliable user access to these values, PMAC2 copies the input values into image registers in RAM automatically, where they can safely be read at any time. PMAC2 copies one pair per phase interrupt, updating all eight channels every eight phase cycles.
PMAC2 User Manual PWM Output and ADC Input Connection First enable the amp, then apply a very small positive command value to Phase A and a very small negative command value to Phase B with the on-line commands: M114=1 ; Enable amplifier M102=I900/50 M104=-I900/50 M107=0 ; A positive, B negative, C zero Caution: Make sure before any PWM commands are applied to the drive and motor in this fashion that the resulting current levels are within the continuous current rating of both drive and motor.
PMAC2 User Manual Current Loop Polarity Check Observe the signs of the ADC register values in M105 and M106. These two values should be of approximately the same magnitude and must be of the opposite sign from each other. (Again, remember that these readings will appear noisy. Observe the base value underneath the noise.) If M105 is positive and M106 is negative, the sign of the PWM commands matches the sign of the ADC feedback values.
PMAC2 User Manual • For synchronous motors (and possibly for induction motors), the physical change in rotor position between the initial Step 1 and the return to Step 1 (mark the rotor if necessary) should be equal to 1 pole pair. On a 2-pole motor, it should be one full mechanical revolution. On a 4-pole motor, it should be one-half mechanical revolution. On a 6-pole motor, it should be one-third mechanical revolution. On an 8-pole motor, it should be one-fourth mechanical revolution.
PMAC2 User Manual Example: The following table shows the results for a sample run of this test.
PMAC2 User Manual Establishing Basic Current Loop Operation Once the proper operation of the PMAC2 PWM output circuits have been established, the PMAC2 ADC input circuits, and all of the drive and motor circuitry between them, close the current loop. The PMAC Executive Program V3.2 and newer have both autotuning and interactive tuning procedures for the digital current loop. Most people will use one or both of these procedures to tune the current loop.
PMAC2 User Manual Preparation To prepare PMAC2 for this test: • Set Ix00 for all other motors to 0 to de-activate them. • Set Ix01 for all other motors to 0 to turn off the commutation (these make sure PMAC2 has enough calculation time to gather data fast enough). • Set I902 to 0 for divide-by-1 to make servo update rate equal to phase update rate (this permits PMAC2 to gather data every phase update).
PMAC2 User Manual SETTING UP PMAC2 FOR SINE-WAVE OUTPUT CONTROL How to Set up the Commutation Scheme This section explains how to set up the commutation scheme if PMAC2 is performing the commutation for a motor, but not the digital current loop. In this mode, PMAC2 outputs two phase current commands to the amplifier, usually as analog voltages through digital-to-analog converters (DACs). In the steadystate, these voltages are a sinusoidal function of time, so this mode is often called sine-wave output.
PMAC2 User Manual Supplemental Flags The Acc-8E can accept hall-effect signals for power-on phase information through its supplemental flag connector on the U, V, and W flags. Other Signals The Acc-8E has AC Opto isolator inputs for overtravel limit, home, and user flag inputs. PMAC2 Parameter Setup Parameters to Set Up Global Hardware Signals Several parameter that set up global and multi-channel hardware operation must be set for proper operation of the analog sine-wave commutation mode.
PMAC2 User Manual Hardware Clock Frequency Control: I903, I907 I903 determines the frequency of four hardware clock signals use for machine interface channels 1-4; I907 does the same for machine interface channels 5-8. These can probably be left at the default values. The four hardware clock signals are SCLK (encoder sample clock), PFM_CLK (pulse frequency modulator clock, DAC_CLK (digital-to-analog converter clock), and ADC_CLK (analog-to-digital converter clock).
PMAC2 User Manual Command Output Address: Ix02 Ix02 instructs PMAC2 where to place its output commands for Motor x by specifying the address. The default values of Ix02 use the DAC registers A and B for Machine Interface Channel n, where n=x, by specifying the address of DAC register A. Ix02 seldom needs to be changed from the default value for DAC applications. Usually the values used are shown in the DAC Command Output Addresses table.
PMAC2 User Manual Establishing Basic Output Operation A quick test can establish basic operation of the commutation outputs, the drive and motor, and the feedback. The test uses the output offset variables Ix29 and Ix79 to force current directly into the particular phases and drive the motor like a stepper motor.
PMAC2 User Manual 38 Setting Up PMAC2 for Sine-Wave Output Control
PMAC2 User Manual SETTING UP PMAC2 COMMUTATION (DIRECT PWM OR SINE WAVE) Operation of the Digital Current Loops By this point, proper operation of the digital current loops should be established for direct PWM control, or basic operation should be established for analog sine-wave control. The commutation I-variables Ix70 and Ix71 (commutation cycle size), Ix72 (commutation phase angle), and Ix83 (commutation feedback address) should already be set properly.
PMAC2 User Manual Correcting Polarity Mismatch, Synchronous and Asynchronous Motors To correct a commutation polarity mismatch, there are two possible options: • Reverse the feedback direction sense by changing I9n0. However, this changes the direction sense of the axis, which may not be tolerable. • Reverse the output direction sense. For analog sine-wave output, this can be done by changing Ix72, for example from 171 to 85, or by exchanging two phase leads between amplifier and motor.
PMAC2 User Manual The Y-memory portion of this register has only fractional information, so we will use only the X-memory portion. Its units are (counts*Ix70). The registers are shown in table 5-1.
PMAC2 User Manual Direction Balance Fine Phasing Test Typically, the stepper motor phasing test will establish a phase reference to within 1 or 2 degrees. This is adequate for many purposes, but for complete optimization of the motor phase reference, it is necessary to perform another test. This test, described below, finds the best phase reference by making sure that key performance measures are the same in both directions.
PMAC2 User Manual Using the Test Results for Absolute Sensor This test is only useful when we match the super-accurate phase position to an absolute position sensor or the index pulse of an incremental sensor. With an absolute sensor, assign an M-variable to the sensor register, and add this to the Watch window. For example: M175->TWR:0,0 ; Abs. pos. of 1st resolver on 1st Acc-8D Opt 7 R/D Make sure the motor is completely at rest.
PMAC2 User Manual Preparation Define M-variables to the hall-effect or equivalent inputs. Suggested definitions for Channel 1 are: M124->X:$C000,20 M125->X:$C000,21 M126->X:$C000,22 M127->X:$C000,23 M128->X:$C000,20,4 ; ; ; ; ; Channel Channel Channel Channel Channel 1 1 1 1 1 W flag V flag U flag T flag (not usually hall-effect) TUVW as a 4-bit value Make these definitions and add these variables to the Watch window (delete other variables no longer being monitored).
PMAC2 User Manual It is advisable to create a table listing the values of M124 through M128 for each position. The following table is a typical position table for these values.
PMAC2 User Manual Offset = HEZ %360 o * 64 360 o The offset computed here should be rounded to the nearest integer. In our example, this comes to: Offset = 60 o % 360 o 60 o ∗ 64 = ∗ 64 = 10.667 ≈ 11 = 0 Β hex 360 o 360 o The test showed that the hall-effect sensors were in the reversed direction, not standard, so bit 22 is set to one. With bit 23 (a value of 8 in the first hex digit) set to 1 to specify hall effect sensing, the first two hex digits of Ix81 become $CB.
PMAC2 User Manual M171=I171*3/12 P170=1 ENDIF IF (M128&7=3) M171=I171/12 P170=1 ENDIF IF (M128&7=0 OR M128&7=7) P170=0 ENDIF IF (P170=1) CMD#1J/ ELSE CMD#1K ENDIF DISABLE PLC 1 CLOSE ; Set phase angle to 90 deg ; Phasing OK flag ; Hall Effect State 6 (60 to 0 deg)? ; Set phase angle to 30 deg ; Phasing OK flag ; Invalid states ; Phasing not OK ; Phasing OK? ; Enable motor ; Not OK; disable motor ; So program will not repeat Note: Ix75 is not used for the phase position offset in this method.
PMAC2 User Manual When properly phased, a positive O-command should cause movement in the positive direction; a negative O-command should cause movement in the negative direction. If the opposite results are received, there will be a dangerous runaway condition when the servo loop is closed.
PMAC2 User Manual If the stepper motor phasing search is done outside of the power-on/reset cycle, the phasing search algorithm will also fail if an amplifier fault or overtravel limit condition is detected. PMAC2 will set the phasing-search-error bit and disable the servo loop. If done inside the power-on/reset cycle, PMAC2 cannot detect these errors automatically, but the search will likely fail due to lack of movement.
PMAC2 User Manual The time between typing the commands would provide sufficient delay for settling into position. The following PLC program is a good starting point for variants on the stepper-motor phasing search method. Extensions to this program could be to phase two gantry motors simultaneously or to step out of a position limit. This example uses Ix73 and Ix74 as they would be used in the automatic stepper-motor phasing search method.
PMAC2 User Manual What To Do Next Once the appropriate steps in this section have been taken, the motor’s commutation and current loop should be operating correctly. The motor should turn in both directions with O-commands; positive Ocommands should cause the motor position to count in the positive direction, and negative O-commands should cause the motor position to count in the negative direction.
PMAC2 User Manual 52 Setting Up PMAC2 Commutation (Direct PWM or Sine Wave)
PMAC2 User Manual SETTING UP PMAC2 FOR VELOCITY OR TORQUE CONTROL Single Output Command If PMAC2 is not performing the commutation for a motor, it provides a single output command value for the motor. Usually this output represents either a velocity command or a torque (force, or current magnitude) command, and typically this output is encoded as an analog signal voltage level.
PMAC2 User Manual The servo clock frequency is determined by the settings of I900, I901, and I902. I900 determines the frequency of the MaxPhase clock signal from which the actual phase clock and servo clock signals are derived. It also determines the PWM cycle frequency for Channels 1 to 4. To generate any PWM signals on Channels 1-4, refer to the Using PMAC2 for Direct PWM Control section for details and use I901 to select how the PHASE clock is derived from MaxPhase.
PMAC2 User Manual Parameters to Set Up Per-Channel Hardware Signals For each machine interface channel n (n = 1 to 8) used for analog outputs, a few I-variables must be set up properly. Encoder Decode Control: I9n0 I9n0 must be set up to decode the feedback encoder properly. Almost always a value of 3 or 7 is used to provide times-4 (x4) decode of a quadrature encoder (four counts per encoder line).
PMAC2 User Manual When using the Type 1 MACRO protocol commonly found on multi-axis MACRO components such as the Delta Tau Compact MACRO Station, use the Ix02 values shown in in the following table.
PMAC2 User Manual SETTING UP PMAC2 FOR PULSE-AND-DIRECTION CONTROL Pulse-And-Direction Format Input The PMAC2 is capable of commanding stepper-motor drives that require pulse-and-direction format input, or stepper-replacement servo drives that require this format.
PMAC2 User Manual Signal Timing The PULSEn and DIRn signals are driven from the internal PFM_CLK signal, whose frequency is controlled by I903 or I907 (see below). The width of the pulse is controlled by the PFM_CLK frequency and I904 or I908 (see below). The output on PULSEn can be high-true (high during pulse, low otherwise) or low-true, as controlled by I9n7; the default is high-true. The polarity of the DIRn is controlled by I9n8. PULSEn and DIRn signals can only change on the rising edge of PFM_CLK.
PMAC2 User Manual The PFMCLK/addition frequency sets a lower limit on the pulse frequency as well – an absolute limit of one eight-millionth of the addition frequency (without dithering). The default frequency of approximately 10 MHz can provide a useful range of about 1 Hz to 1 million Hz, and is suitable for a wide variety of applications, especially with microstepping drives. For full or half step drives, the PFMCLK/addition frequency will probably be set considerably lower – to the approximately 1.
PMAC2 User Manual Encoder Decode Control: I9n0 I9n0 controls the source of the position feedback signal and how it is decoded. Values of 0 to 7 set up for an external signal wired into PMAC, with the different values in this range determining how the signal is decoded. One of these values should be used if you have a real feedback sensor; typically 3 or 7 for 'times-4' decode of a quadrature encoder signal.
PMAC2 User Manual However, if the output pulse train is used for simulated feedback, it is best to process the counts without any sub-count interpolation. This will prevent the PMAC from trying to position between pulses and create dithering. In the PMAC Executive program Encoder Table Configure window, change the entry from Incremental with 1/T Interpolation to Incremental with No Interpolation. If writing directly to the memory location of the table, change the format byte from $00 to $C0.
PMAC2 User Manual Output (Frequency) Limit: Ix69 Ix69 controls the maximum pulse frequency for a given PFMCLK frequency. At the maximum Ix69 value of 32,767, the maximum pulse frequency is one-half of PFMCLK (this would require that the pulse width set by I904 or I908 be only 1 PFMCLK cycle). Typically a maximum frequency substantially below this is wanted.
PMAC2 User Manual Integration mode Ix34 is irrelevant if Ix33 is set to zero. If Ix33 is used, setting Ix34 to 1 turns on the integral gain only when the commanded velocity is zero; setting Ix34 to 0 turns it on all of the time. Acceleration Feedforward Gain: Ix35 Typically, the acceleration feedforward gain term Ix35 is set to zero, because the electronic loop has no inertia to overcome.
PMAC2 User Manual 3. Assign an M-variable to the output command register pointed to by Ix02, double-checking to be sure that that this address is one of the Output Command C registers that can drive a PFM circuit. For example, define M102->Y:$C004,8,16,S to look at the Output Command Register 1C. Now monitor the M-variable in the Executive program's Watch window or in the Terminal window as you issue O commands. The value should change.
PMAC2 User Manual USING PMAC2 WITH MACRO INTERFACE The PMAC2 controller supports the MACRO ring interface to drives and motors. MACRO (Motion and Control Ring Optical) is a fiber-optic or copper ring network between controllers such as PMAC2, and drives and I/O modules. Its key features are a very high data rate of 125 Mbits/sec, and a very simple protocol that makes its use almost transparent to the control software.
PMAC2 User Manual The second hex digit specifies which packet will cause a sync lock when received by this PMAC2. The sync lock performs two important functions. On MACRO stations other than the synchronizing master, it forces synchronization of the phase clock. On all MACRO stations, it can be used to verify ring integrity – on PMAC2, I1001 is used for this.
PMAC2 User Manual Ring Cycle Frequency Control The MACRO ring communications cycle is started on the phase clock interrupt of the synchronizing master. The phase clock frequency is set in two steps; first the MaxPhase’ clock frequency is set, the phase clock is created by dividing down the MaxPhase clock. The MaxPhase clock frequency is set by I992 on a PMAC2 Ultralite (or I900 on regular PMAC2) according to the formula: MaxPhase( kHz ) = 117 ,964.
PMAC2 User Manual However, in the Type 1 MACRO protocol, it is the same in all modes. The following table contains the required setup word for each node in each operational mode.
PMAC2 User Manual WY:$0720,$28C0A0,$FFFFFF WY:$0722,$28C0A4,$FFFFFF WY:$0724,$28C0A8,$FFFFFF WY:$0726,$28C0AC,$FFFFFF WY:$0728,$28C0B0,$FFFFFF WY:$072A,$28C0B4,$FFFFFF WY:$072C,$28C0B8,$FFFFFF WY:$072E,$28C0BC,$FFFFFF ; ; ; ; ; ; ; ; Node Node Node Node Node Node Node Node 0 conversion 1 conversion 4 conversion 5 conversion 8 conversion 9 conversion 12 conversion 13 conversion The results from this conversion are in the following registers: Node Address Node Address Node 0: Node 1: Node 4: Node 5:
PMAC2 User Manual Flag Address I-variables: Ix25 When bit 18 of Ix25 is set to 1, PMAC2 will expect that the flag register be a MACRO auxiliary register. If a MACRO auxiliary node n is used for the flag register, then bit n of I1000 must be set so PMAC2 performs auxiliary node update functions for the node.
PMAC2 User Manual When commutating across the MACRO ring with Type 1 protocol, the commutation position feedback appears in the 24-bit register for the node, with a count appearing in Bit 5, having a value of 32. Therefore it appears to PMAC2 to be 32 times bigger than it really is. The commutation cycle size is specified on PMAC2 as the ratio Ix71/Ix70.
PMAC2 User Manual 72 Using PMAC2 with MACRO Interface
PMAC2 User Manual SETTING UP PMAC2 FOR MLDT FEEDBACK PMAC2 can provide direct interface to magnetostrictive linear displacement transducers (MLDTs), such as MTS's Temposonics brand. MLDTs can provide absolute position information in rugged environments; they are particularly well suited to hydraulic applications.
PMAC2 User Manual Hardware Setup The PULSEn output that is commonly used to command stepper drives is used as the excitation signal for the MLDT; typically, the CHAn input that is part of encoder feedback is used to accept the response. These outputs and inputs are on PMAC2’s JMACH connectors. Usually these are connected to the sensors thru one of the Acc-8 family of interface boards; alternatively, a customized interface can be used.
PMAC2 User Manual To produce the desired pulse output frequency, the following formula can be used (assuming a 16-bit Mvariable definition): OutputFreq( kHz ) = Mn07 PFMCLK _ Freq( kHz ) 65 ,536 or: Mn07 = 65 ,536 * OutputFreq( kHz ) PFMCLK _ Freq( kHz ) Note: The servo update time for the motor using the MLDT should be at least as high as the output time set here (the servo frequency should be as low or lower than the output frequency).
PMAC2 User Manual MLDT Feedback Select: I9n0 For proper decoding of the MLDT signal, I9n0 for Channel n must be set to 12. With this setting, the pulse timer is cleared to zero at the falling edge of the output pulse. It then counts up at 117.96 MHz until a rising edge on the return pulse is received, at which time the timer's value is latched into a memorymapped register that the processor can read.
PMAC2 User Manual WY:$0729,$30C018,$07FFFF,32 WY:$072C,$30C000,$07FFFF,32 WY:$072F,$30C008,$07FFFF,32 WY:$0732,$30C010,$07FFFF,32 WY:$0735,$30C018,$07FFFF,32 ; ; ; ; ; Parallel Parallel Parallel Parallel Parallel read read read read read of of of of of Timer Timer Timer Timer Timer 4 5 6 7 8 The resulting values from these conversions are in the following registers: Channel 1 Channel 2 Channel 3 Channel 4 Channel 5 Channel 6 Channel 7 Channel 8 X:$0722 X:$0725 X:$0728 X:$072B X:$072E X:$0731 X:$0734
PMAC2 User Manual Scaling the Feedback Units Motor Units For a motor set up with MLDT feedback, a count is one increment (LSB) of the timer. The physical length of this increment, which is the resolution of the measurement, is dependent on the speed of the return pulse in the MLDT, and the frequency of the timer in the PMAC2. The speed of the return pulse varies from device to device, but is always approximately the inverse of 0.35 µsec/mm, or 9.0 µsec/inch. The frequency of the timer is 117.96 MHz.
PMAC2 User Manual PMAC2 GENERAL PURPOSE I/O USE JIO Port The JIO port has 32 discrete digital I/O lines for general purpose use. The lines are configurable by byte for input or output (on the DSPGATE2 I/O IC, the lines are individually configurable for input or output, but the buffer ICs are only byte-configurable), and individually configurable for inverting or noninverting format. Hardware Characteristics When configured as an output, each line has a 5V CMOS totem-pole driver.
PMAC2 User Manual M28->Y:$C081,4 M29->Y:$C081,5 M30->Y:$C081,6 M31->Y:$C081,7 ; ; ; ; I/O28 I/O29 I/O30 I/O31 Data Data Data Data Line; Line; Line; Line; J3 J3 J3 J3 Pin Pin Pin Pin 29 30 31 32 Direction Control The direction control bit for each of these I/O bits is in the corresponding bit in the matching X register. For example, the direction control bit for I/O03 is located at X:$C080,3; the direction control bit for I/O30 is located at X:$C081,6.
PMAC2 User Manual Multiplexer Port (JTHW) The JTHW multiplexer port has 16 discrete digital I/O lines for general purpose use. The lines are configurable by byte for input or output (on the DSPGATE2 I/O IC, the lines are individually configurable for input or output, but the buffer ICs are only byte-configurable), and individually configurable for inverting or non-inverting format. Hardware Characteristics When configured as an output, each line has a 5V CMOS totem-pole driver.
PMAC2 User Manual In addition, the bi-directional buffer IC for each byte has a direction control line accessible as a software control bit. These control lines and bits must match the ASIC direction bits. In the PC-bus versions of the PMAC2, the buffer direction control bits are at PMAC2 address Y:$E800, with bits 4 and 5 controlling the two bytes of the JTHW port. A bit value of 0 specifies input; 1 specifies output.
PMAC2 User Manual The -12V and matching +12V supply voltages are available on the J1 connector to supply the analog circuitry providing the signals. The +12V supply is not used by PMAC2; it is merely passed through to the J1 connector for convenience. If use of this supply is desired, it must either come from the bus supply through PMAC2’s bus connector, or from TB1. Multiplexing Principle Only one pair of analog-to-digital converter registers is available to the PMAC2 processor at any given time.
PMAC2 User Manual PMAC2 Address X Word Upper 12 Bits X Word Lower 12 Bits Y Word Upper 12 Bits Y Word Lower 12 Bits $0708 $0709 $070A $070B $070C $070D $070E $070F 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ANAI08 ANAI09 ANAI10 ANAI11 ANAI12 ANAI13 ANAI14 ANAI15 ANAI00 ANAI01 ANAI02 ANAI03 ANAI04 ANAI05 ANAI06 ANAI07 Suggested M-variable definitions for the configuration words are: M990->X:$0708,0,24,U M991->X:$0709,0,24,U M992->X:$070A,0,24,U M993->X:$070B,0,24,U M994->X:$070C,0,24,U M995->X:$070D,0,24,U M
PMAC2 User Manual M1000->Y:$0708,0,12,U M1001->Y:$0709,0,12,U M1002->Y:$070A,0,12,U M1003->Y:$070B,0,12,U M1004->Y:$070C,0,12,U M1005->Y:$070D,0,12,U M1006->Y:$070E,0,12,U M1007->Y:$070F,0,12,U M1008->Y:$0708,12,12,U M1009->Y:$0709,12,12,U M1010->Y:$070A,12,12,U M1011->Y:$070B,12,12,U M1012->Y:$070C,12,12,U M1013->Y:$070D,12,12,U M1014->Y:$070E,12,12,U M1015->Y:$070F,12,12,U ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ANAI00 ANAI01 ANAI02 ANAI03 ANAI04 ANAI05 ANAI06 ANAI07 ANAI08 ANAI09 ANAI10 ANAI11 ANAI12 ANAI13 AN
PMAC2 User Manual Motor variables Ix03 and Ix04 should contain the addresses of these resulting values to use the ADC values for position- and velocity-loop feedback, respectively. Absolute Power-On Position PMAC2 can use these ADC inputs for absolute power-on position using the Ix10 variable. Ix10 is told to read the image register for the analog input as a 12-bit parallel input.
PMAC2 User Manual USING THE POSITION COMPARE FEATURE ON PMAC2 Software-Configurable Hardware Registers The position compare feature on PMAC2 provides a very fast and very accurate compare output function based on the actual position counter. This feature has been significantly enhanced from PMAC1. The position compare function is implemented in software-configurable hardware registers in the DSPGATE1 ASIC.
PMAC2 User Manual Principle of Operation When the encoder counter value matches the value in either Channel n’s Compare A Register or Compare B Register, the compare output n is toggled from the existing state; either from 0 to 1, or from 1 to 0. The toggling occurs on the transition from not-equal to equal in either direction. In addition, when the counter becomes equal with one of the compare registers, the other register is immediately incremented by the amount in the Auto-Increment register.
PMAC2 User Manual M108=1000 M109=1010 M110=0 M112=0 M111=1 {Command to start the move} ; ; ; ; ; Set front end compare in A Set back end compare in B No auto-increment Prepare initial value of 0 Enable direct write (resets immediately to zero) Setting Up for Multiple Pulse Outputs By using the auto-increment feature, it is possible to create multiple compare pulses with a single software setup operation.
PMAC2 User Manual The home capture offset is a 24-bit signed integer, expressed in counts. It is best accessed with a 24-bit signed M-variable.
PMAC2 User Manual USING THE PMAC2 TO INTERRUPT THE HOST COMPUTER Programmable Interrupt Controller (PIC) The PC versions of the PMAC2 have a built-in programmable interrupt controller (PIC) that can be used to let PMAC2 interrupt the host computer over the PC bus. Any of eight signals on PMAC2 can be used for these interrupts. The PIC is similar, but not identical, to the 8259 PIC on the PMAC1 and in the PC. Interrupt Controller Structure The PIC appears as four 8-bit registers in the I/O space of the PC.
PMAC2 User Manual Interrupt Mask Control Register (Base+10) This register permits the PC to mask out interrupt signals that the user does not want to interrupt the PC. Writing a 1 to a bit in this register enables the corresponding signal to interrupt the PC; writing a 0 to a bit in this register disables (masks out) that signal. Note that this polarity is the opposite of an 8259 PIC used on PMAC1 or in the PC.
PMAC2 User Manual M112=1 M111=1 ; Prepare to set EQU1 high ; Enable writing of M112 value to EQU1 ; (M111 is self-clearing) To clear EQU1 in advance of the next interrupt, the code is: M112=0 M111=1 ; Prepare to set EQU1 low ; Enable writing of M112 value to EQU1 ; (M111 is self-clearing) If I56 and I58 are both set to 1 to enable DPRAM ASCII communications with interrupts, PMAC2 will generate an interrupt automatically on the EQU1 line each time it has loaded a response line into the DPRAM ASCII respon