Home

Magellan Motion Processor Programmer`s Command Reference

image

Contents

1. Syntax SetVelocity axis velocity GetVelocity axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units velocity signed 32 bits 2 to 237 1 1 218 counts cycle microsteps cycle Packet SetVelocity Structure 0 axis 11h 15 12 11 8 7 0 First data word write velocity high order part 31 16 Second data word write velocity low order part 15 0 GetVelocity 0 axis 4Bh 15 12 11 8 7 0 First data word read velocity high order part 31 16 Second data word read velocity low order part 15 0 Description SetVelocity loads the maximum velocity buffer register for the specified axis GetVelocity returns the contents of the maximum velocity buffer register Scaling example To load a velocity value of 1 750 counts cycle multiply by 65 536 giving 114 688 and load the resultant number as a 32 bit number giving 0001 in the high word and CO00h in the low word Numbers returned by GetVelocity must correspondingly be divided by 65 536 to convert to units of counts cycle Restrictions SetVelocity may not be issued while an axis is in motion with the S curve profile SetVelocity is not valid in Electronic Gear profile mode The velocity cannot be negative except in the Velocity Contouring profile mode SetVelocity is a buffered command The value set using this command will not take eff
2. ReadBuffer bufferlD DC Brush Brushless DC Microstepping Pulse amp Direction Name Type Range bufferlD unsigned 16 bits 0 to 31 Type Range data signed 32 bits 2 to 23151 ReadBuffer 0 C9h 15 8 7 0 First data word write 0 bufferlD 15 5 4 0 Second data word read data high order part 31 16 Third data word read data low order part 15 0 ReadBuffer returns the 32 bit contents of the location pointed to by the read buffer index in the specified buffer After the contents have been read the read index is incremented by 1 If the result is equal to the buffer length set by SetBufferLength the index is reset to zero 0 The read index is automatically changed at the completion of a trace when in rolling trace mode PMDresult PMDReadBuffer PMDAxisInterface axis intf PMDuintl6 bufferID PMDint32 data Dim data as Long Data MagellanObject ReadBuffer bufferID Set GetBufferReadlndex p 95 WriteBuffer p 193 Set GetBufferStart p 96 Set GetBufferLength p 93 Magellan Motion Processor Programmer s Command Reference 67 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API see ReadlO 83h ReadlO address DC Brush Brushless DC Microstepping Pulse amp Direction Name Type Range address unsigned 16 bits 0 to 255 Type Range data u
3. Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 None InitializePhase 0 axis 7TAh 15 12 11 8 7 0 InitializePhase initializes the phase angle for the specified axis using the mode Hall based or algorithmic specified by the SetPhaselnitializationMode command Warning If the phase initialization mode has been set to algorithmic then after this command is sent the motor may suddenly move in an uncontrolled manner PMDresult PMDInitializePhase PMDAxisInterface axis intf MagellanAxis InitializePhase GetPhaseCommand p 50 Set GetCommutationMode p 101 Magellan Motion Processor Programmer s Command Reference MultiUpdate 5Bh o Syntax MultiUpdate mask Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding mask None 0 Axis1 Mask 1 Axis2 Mask 2 Axis3 Mask 4 Axis4 Mask 8 Returned data None Packet MultiUpdate Structure 0 5Bh 15 8 7 0 Data write 0 mask 15 4 3 0 Description MultiUpdate causes an update to occur on all axes whose corresponding bit is set to 1 in the mask argument After this command is executed all axes which are selected using the mask will perform an Update The paramater groups that are copied from their buffered versions into the corresponding run time registers is determined by the update mask of each axis as shown in the table below Group Command Parameter
4. Motor Types Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 range 0 4 98 Msteps sec 1 0 622 5 ksteps sec 4 0 155 6 ksteps sec 6 0 38906 steps sec 8 Packet SetStepRange Structure 0 axis CFh 15 12 11 8 7 0 Data write 0 range 15 4 3 0 GetStepRange 0 axis CEh 15 12 11 8 7 0 Data read 0 range 15 4 3 0 Description SetStepRange sets the maximum pulse rate frequency for the specified axis For example if the desired maximum pulse rate is 200 000 pulses second the SetStepRange 6 command should be issued GetStepRange returns the maximum pulse rate frequency for the specified axis Restrictions The MC55110 and the MC58110 have a maximum step range of 100 ksteps which cannot be changed SetStepRange must be called before any moves are made and must not be called after any moves have been made C Motion API PMDresult PMDSetStepRange PMDAxisInterface axis intf PMDuinti16 range PMDresult PMDGetStepRange PMDAxisInterface axis intf PMDuinti16 range VB Motion API Dim range as Short MagellanAxis StepRange range range MagellanAxis StepRange See Magellan Motion Processor Programmer s Command Reference 171 SetStopMode buffered DOh GetStopMode D1h O a Syntax SetStopMode axis mode GetStopMode axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance E
5. Syntax Clearlnterrupt axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Packet ClearInterrupt Structure 0 axis 4Ch 15 12 11 8 7 0 Description ClearInterrupt resets the HostInterrupt signal to its inactive state If interrupts are still pending the HostInterrupt line will return to its active state within one chip cycle See Set GetSampleTime p 161 for information on chip cycle timing This command is used after an interrupt has been recognized and processed by the host it does not affect the Event Status register The ResetEventStatus command should be issued prior to the Clearlnterrupt command to clear the condition that generated the interrupt The Clearlnterrupt command has no effect if it is executed when no interrupts are pending When communicating using CAN this command resets the interrupt message sent flag When an interrupt is triggered on an axis a single interrupt message is sent and no further messages will be sent by that axis until this command is issued When serial or parallel communication is used the axis number is not used Restrictions For products without a HostInterrupt line this command is still applicable to the CAN communications For products without a HostInterrupt line or CAN communications this command is not used C Motion API PMDresult PMDClearInterrupt PMDAxisInterface axis int
6. Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 type Brushless DC 3 phase 0 Brushless DC 2 phase 1 Microstepping 3 phase 2 Microstepping 2 phase 3 Pulse amp Direction 4 DC Brush 7 Packet SetMotorType Structure 0 axis 02h 15 12 11 8 7 0 Data write 0 type 15 3 2 0 GetMotorType 0 axis 03h 15 12 11 8 7 0 Data read 0 type 15 3 2 0 Description SetMotorType sets type of motor being driven by the selected axis This operation sets the number of phases for commutation on the axis as well as internally configuring the motion processor for the motor type The following table describes each motor type and the number of phases to be commutated Motor type Commutation Brushless DC 3 phase 3 phase Brushless DC 2 phase 2 phase Microstepping 3 phase 3 phase Microstepping 2 phase 2 phase Pulse amp Direction None DC Brush None GetMotorType returns the configured motor type for the selected axis Restrictions The motor type should only be set once for each axis either via the motor configuration word during device startup or immediately after reset using SetMotorType Once it has been set it should not be changed Executing SetMotorType will reset many variables to their motor type specific default values Not all motor types are available on
7. read position low order part 15 0 GetCommandedPosition returns the commanded position for the specified axis Commanded position is the instantaneous position value output by the trajectory generator This command functions in all profile modes PMDresult PMDGetCommandedPosition PMDAxisInterface axis intf PMDint32 position Dim position as Long position MagellanAxis CommandedPosition GetCommandedAcceleration p 35 GetCommandedVelocity p 37 Magellan Motion Processor Programmer s Command Reference GetCommandedVelocity 1Eh Syntax GetCommandedVelocity axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Returned data Type Range Scaling Units velocity signed 32 bits 2 to 2 1 Ae counts cycle microsteps cycle Packet GetCommandedvVelocity Structure 0 axis 1Eh 15 12 11 8 7 0 First data word read velocity high order part 31 16 Second data word read velocity low order part 15 0 Description GetCommandedVelocity returns the commanded velocity value for the specified axis Commanded velocity is the instantaneous velocity value output by the trajectory generator Scaling example If a value of 1 234 567 is retrieved using this command FFEDh in high word 2979h in low word then this corresponds to 1 234 567 65 536 18 8380 counts cycle veloc
8. write event 15 0 Second data word read action 15 0 Description SetEventAction configures what actions will be taken by the axis in response to a given event The action can be either to modify the operating mode by disabling some or all of the loops or in the case of all loops remaining on to perform an abrupt or smooth stop The Abrupt Stop action can be done with or without a clearing of the position error Magellan Motion Processor Programmer s Command Reference 121 SetEventAction cont 48h GetEventAction 49h Xu UU Description When through SetEventAction one of the events causes an action the event bit in the Event Status cont register must be cleared prior to returning to operation For trajectory stops this means that the bit must be cleared prior to performing another trajectory move For changes in operating mode this means that the bit must be cleared ptior to restoring the operating mode either by RestoreOperatingMode or SetOperatingMode An exception is the Motion Error event which only needs to be cleared in Event Status if its action is Abrubt Stop or Smooth Stop If it causes changes in operating mode the operating mode can be restored without clearing the bit in Event Status first GetEventAction gets the action that is currently programmed for the given event with the exception of the Immediate event which cannot be read back Atlas For the Current Foldback event this comma
9. Restrictions C Motion API PMDresult PMDSetActualPosition PMDAxisInterface axis intf PMDint32 position PMDresult PMDGetActualPosition PMDAxisInterface axis intf PMDint32 position Magellan Motion Processor Programmer s Command Reference 79 SetActualPosition cont ADh 37h GetActualPosition fy VB Motion API Dim position as Long MagellanAxis ActualPosition position position MagellanAxis ActualPosition see GetPositionError p 51 Set GetActualPositionUnits p 81 AdjustActualPosition p 22 Magellan Motion Processor Programmer s Command Reference 80 SetActualPositionUnits BEh GetActualPositionUnits BFh Syntax SetActualPositionUnits axis mode GetActualPositionUnits axis Motor Types Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mode Counts 0 Steps 1 Packet SetActualPositionUnits Structure 0 axis BEh 15 12 11 8 7 0 Data write 0 mode 15 1 0 GetActualPositionUnits 0 axis BFh 15 12 11 8 7 0 Data read 0 mode 15 1 0 Description SetActualPositionUnits determines the units used by the Set GetActualPosition AdjustActualPosition and GetCaptureValue for the specified axis It also affects the trace variable Actual Position When set to Counts position units are in encoder counts When set to Steps position units are in steps microsteps The step position i
10. 20 Magellan Motion Processor Programmer s Command Reference 4 Instruction Reference 6 4 1 How to Use This Reference The instructions ate arranged alphabetically except that all Set Get pairs for example SetVelocity and GetVelocity are described together Each description begins on a new page and most occupy no more than a single page Each page is organized as follows Name The instruction mnemonic is shown at the left its hexadecimal code at the right Syntax The instruction mnemonic in bold and its required arguments in italic are shown with all arguments separated by spaces Buffered Certain parameters and other data written to the motion processor are buffered That is they are not acted upon until the next Update or MultiUpdate command is executed These parameters are identified by the word buffered in the instruction heading Motor Types The motor types to which this command applies Supported motor types are printed in black unsupported motor types for the command are greyed out Arguments There are two types of arguments encoded field and numeric Encoded field arguments are packed into a single 16 bit data word except for axis which occupies bits 8 9 of the instruction word The name of the argument in italic is that shown in the generic syntax Instance in italic is the mnemonic used to represent the data value Encoding is the value assigned to the field for that instance For numeric
11. Trajectory Acceleration Deceleration Gear Ratio Jerk Position Profile Mode Stop Mode Velocity ClearPositionError Position Servo Derivative Time Integrator Sum Limit Kaff Kd Ki Kp Kvff Kout Motor Command Current Loops Integrator Sum Limit Ki Kp Each axis will be updated in turn from the lowest numbered to the highest If an error occurs during the update of an axis for example a move into an active limit switch then that update will be aborted the error code returned and no higher numbered axes will be updated The InstructionError bit of the event status register for each axis may be tested to discover which axis had an update failure Magellan Motion Processor Programmer s Command Reference 63 o MultiUpdate cont 5Bh Atlas This command does not require any additional Atlas communication It may cause an Atlas update by using the update bit in the Atlas torque command see Akas Digital Amplifier Complete Technical Reference for more information Restrictions C Motion API PMDresult PMDMultiUpdate PMDAxisInterface axis intf PMDuint16 mask VB Motion API MagellanObject MultiUpdate in mask see GetEventStatus p 43 Update p 192 Set GetUpdateMask p 188 64 Magellan Motion Processor Programmer s Command Reference NoOperation 00h Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API See NoOperatio
12. Update p 192 172 Magellan Motion Processor Programmer s Command Reference SetSynchronizationMode F2h GetSynchronizationMode F3h Syntax SetSynchronizationMode mode GetSynchronizationMode Motor Types DC Brush Brushless DC Microstepping Arguments Name Instance Encoding mode Disabled 0 Master 1 Slave 2 Packet SetSynchronizationMode Structure 0 F2h 15 8 7 0 Data write 0 mode 45 2 1 0 GetSynchronizationMode 0 F3h 15 8 7 0 Data read 0 mode 15 2 1 0 Description SetSynchronizationMode sets the mode of the pin used for the synchronization of the internal timer across multiple motion ICs In the Disabled mode the pin is configured as an input and is not used In the Master mode the pin outputs a synchronization pulse that can be used by slave nodes or other devices to synchronize with the internal chip cycle of the master node In the Slave mode the pin is configured as an input and a pulse on the pin synchronizes the internal chip cycle When the synchronization mode is set to either Master or Slave the internal time counter will be set to zero This feature is intended to allow synchronization of updates across processors by using time breakpoints GetSynchronizationMode returns the value of the synchronization mode Restrictions Ifthe motion processor is configured as a slave and any axis is configured for pulse amp direction output multi chi
13. C Motion API PMDresult PMDSetPhasePrescale PMDAxisInterface axis intf PMDuinti16 scale PMDresult PMDGetPhasePrescale PMDAxisInterface axis intf PMDuint16 scale VB Motion API Dim scale as Short MagellanAxis PhasePrescale scale scale MagellanAxis PhasePrescale see 152 Magellan Motion Processor Programmer s Command Reference SetPosition buffered 10h GetPosition AAh Syntax SetPosition axis position GetPosition axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units position signed 32 bits 2 to 23154 unity counts microsteps Packet SetPosition Structure 0 axis 10h 15 12 11 8 7 0 First data word write position high order part 31 16 Second data word write position low order part 15 0 GetPosition 0 axis 4Ah 15 12 11 8 7 0 First data word read position high order part 31 16 Second data word read position low order part 15 0 Description SetPosition specifies the trajectory destination of the specified axis It is used in the Trapezoidal and S curve profile modes GetPosition reads the contents of the buffered position register Restrictions SetPosition is a buffered command The value set using this command will not take effect until the next Update or MultiUpdate command with the Trajectory Upda
14. For use with DC brush or brush less DC with external commutation it outputs in PWM or DAC compatible format For use with two phase or three phase brushless DC motots it outputs in PWM or DAC compatible format For use with pulse amp direction step motors it outputs in pulse amp direction format and for use with microstepping step motors it outputs PWM or DAC compatible formats The MC58000 Series also supports output to PMD Atlas digital amplifiers using an SPI bus DC brush three phase brushless DC and two phase microstep motors are supported Atlas amplifiers may be configured and controlled by using Magellan commands A single Magellan controller may simultaneously use both Atlas and non Atlas output modes for different axes MC55000 Series MC55420 MC55320 MC55220 MC55120 MC55110 This series outputs pulse amp direction sig nals for use with step motors Magellan ION This single chip motion processor is specifically designed to work with the ION family of digital drives It provides one axis of control with an additional auxiliary axis of encoder input It controls either a DC brush motor a three phase brushless motor or a step motor Compared to the MC50000 it has additional amplifier control features such as digital current control and overtemperature sense The Magellan ION is only available embedded in the ION Digital Drive it is not sold as a separate motion processor device Magellan Motion Processor Programmer
15. If it is desired that the trace begin when bit 7 of the Activity Status register for axis 2 goes to 0 then the trace start is loaded as follows A 1 is loaded for axis number a 3 is loaded for condition a 7 is loaded for bit number and a 0 is loaded for state The actual data word sent to the motor processor is 0731h Atlas No additional Atlas communication is performed for these commands but Atlas trace parameters may have to be set by addressing an Atlas amplifier directly Magellan trace start is signaled to Atlas by using the trace bit in each Atlas torque command See A as Digital Amplifier Complete Technical Reference for more detail Restrictions C Motion API Not all trace start conditions are available in all products See the product uset s guide PMDresult PMDSetTraceStart PMDAxisInterface axis intf PMDAxis traceAxis PMDuint8 condition PMDuint8 triggerBit PMDuint8 triggerState PMDresult PMDGetTraceStart PMDAxisInterface axis intf PMDAxis traceAxis PMDuint8 condition PMDuint8 triggerBit PMDuint8 triggerState 178 Magellan Motion Processor Programmer s Command Reference SetTraceStart cont B2h GetTraceStart B3h VB Motion API MagellanObject TraceStartSet in triggerAxis in condition in triggerBit in triggerState out triggerAxis out condition out triggerBit out triggerState MagellanObject TraceStartGet see Set GetBufferLength p 93 GetTraceCount
16. Set GetEncoderToStepRatio Set Get encoder count to step ratio 120 Motor Output GetActiveMotorCommand Read the active motor command value 27 Set GetMotorCommand Set Get direct value to motor output register read buffered motor 137 output command Set GetMotorType Set Get motor type for axis 140 Set GetOutputMode Set Get the motor output mode 144 Set GetPWMFrequency Set Get the PWM output frequency 159 Set GetDrivePWM Set Get PWM parameters 116 Set GetStepRange Set Get the allowable range in KHz for step output generation 171 Set GetCurrentFoldback Set Get the maximum continuous operating current for I Current 106 Foldback Set GetCurrent Set Get parameters for holding current 102 Set GetMotorLimit Set Get motor output limit 139 Set GetMotorBias Set Get the motor bias applied outside of position loop 136 Operating Mode Event and Update Control Set GetOperatingMode Set Get static Operating Mode of the axis 142 RestoreOperatingMode Restore the Current Operating Mode to the static Operating Mode 76 GetActiveOperatingMode Get the Active Operating Mode of the axis 28 MultiUpdate Forces buffered command values to become active for multiple axes 63 Update Forces buffered command values to become active 192 Set GetUpdateMask Set Get mask for what loops are updated by update command 188 Set GetEventAction Set Get the response of the axis to an event 121 Postion Servo Lo
17. VB Motion API Dim index as Long MagellanObject BufferWriteIndex bufferID index index MagellanObject BufferWriteIndex bufferID see Set GetBufferLength p 93 Set GetBufferReadlndex p 95 Set GetBufferStart p 96 98 Magellan Motion Processor Programmer s Command Reference SetCANMode 12h GetCANMode 15h Syntax SetCANMode mode GetCANMode Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Encoding mode unsigned 16 bits see below Packet SetCANMode Structure 0 12h 15 8 7 0 Data write transmission rate 0 nodelD 15 13 12 7 6 0 GetCANMode 0 15h 15 8 7 0 Data read transmission rate 0 nodelD 15 13 12 7 6 0 Description SetCANMode sets the CAN 2 0B communication parameters for the motion processor After completion of this command the motion processor will respond to a CAN receive message addressed to 600h nodelD CAN responses are sent to 580h nodelD The CAN transmission rate will be as specified in the transmission rate parameter Note that when this command is used to change to a new nodeID the command response for this command will be sent to the new nodeID The following table shows the encoding of the data used by this command Bits Name Instance Encoding 0 6 CAN NodelD Address 0 0 Address l Address 127 127 7 12 Reserved 13 15 Transmission Rate 1 000 000 baud 0 800 000 l
18. parameter value value MagellanAxis BusVoltageLimits parameter see Set GetFaultOutMask p 123 GetBusVoltage p 32 GetDriveFaultStatus p 40 ClearDriveFaultStatus p 23 GetEventStatus p 43 ResetEventStatus p 74 Magellan Motion Processor Programmer s Command Reference 115 SetDrivePWM 23h GetDrivePWM 24h E o Syntax SetDrivePWM parameter value GetDrivePWM parameter Motor Type DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding parameter Limit 0 Type Range Scaling value 16 bit unsigned see below Packet SetDrivePWM Structure 0 23h 15 8 7 0 write 0 parameter 15 8 7 0 write value 15 0 GetDrivePWM 0 24h 15 8 7 0 write 0 parameter 15 8 7 0 read value 15 0 Description SetDrivePWM sets parameters used for controlling amplifier PWM output The PWM Limit register limits the maximum PWM duty cycle and hence the effective output voltage The range is from 0 to 2 2 corresponding to 100 PWM modulation GetDrivePWM returns the parameters set by SetDriveP WM Atlas These commands are relayed to an attached Atlas amplifier C Motion API PMDresult PMDSetDrivePWM PMDAxisInterface axis intf PMDuint16 option PMDuint16 value PMDresult PMDGetDrivePWM PMDAxisInterface axis intf PMDuint16 option PMDuinti16 value VB Motion API MagellanAxis DrivePWM in parameter out value 116 Magellan Motion Processor Progr
19. phase Phase A 0 Phase B 1 Phase C 2 Returned data Type Range Scaling Units command signed 16 bits 2 to 255 1 100 25 96 output Packet GetPhaseCommand Structure 0 EAh 15 12 11 8 7 0 First data word write 0 phase 15 2 1 0 Second data word read command 15 0 Description GetPhaseCommand returns the value of the commutated phase command for phase A B or C of the specified axis These are the phase command values directly output to the current loop or motor after commutation Scaling example If a value of 4 489 is retrieved EE77h for a given axis and phase then this corresponds to 4 489 100 32 767 13 7 of full scale output Restrictions Phase C is only valid when the motor type has been set for a 3 phase commutation This command has no meaning when current control mode is set to FOC whether or not the current loops are enabled When the current control mode is set to Phase A B current loops the values are the inputs to the current loops When current loops are disabled the value is the motor output command C Motion API PMDresult PMDGetPhaseCommand PMDAxisInterface axis intf PMDuinti16 phase PMDint16 command VB Motion API Dim command as Short command MagellanAxis PhaseCommand phase see SetCurrentControlMode p 104 50 Magellan Motion Processor Programmer s Command Reference GetPositionError 99h Syntax GetPositionError axis Mo
20. 1 Derivative 2 Biquad1 Input 3 Biquad2 Input 4 Returned data Type Range Scaling value signed 32 bits see below Packet GetPositionLoopValue Structure 0 axis 55h 15 12 11 8 7 0 First data word write node 15 0 Second data word read value high order part 31 16 Third data word read value low order part 15 0 Description GetPositionLoopValue is used to find the value of a node in the position loop See the product user s guide for more information on the location of each node in the position loop processing Though the data returned is signed 32 bits regardless of the node the range and format varies depending on the node as follows Node Range Scaling Units Integrator Sum 22 to 23 1 unity counts or microsteps cycles Integrator Contribution _23 to 23 100 Kout 2 Output Derivative 25 to 25 unity counts or microsteps cycles Biquad Input 2 to 25 unity counts or microsteps Biquad2 Input 2 to 25 unity counts or microsteps Restrictions C Motion API PMDresult PMDGetPositionLoopValue PMDAxisInterface axis intf PMDuint16 node PMDint32 value VB Motion API Dim value as Long value MagellanAxis PositionLoopValue node see Set GetPositionLoop p 155 52 Magellan Motion Processor Programmer s Command Reference GetSignalStatus A4h Syntax GetSignalStatus axis
21. 7 0 write 0 parameter 15 8 7 0 value high order parameter read 15 8 7 0 read value low order parameter 15 0 Description SetFeedbackParameter sets parameters used to configure position feedback devices Encoder modulus is a 32 bit parallel encoder modulus its least significant 16 bit word is identical with the parameter set by SetEncoderModulus The Encoder Modulus sets the parallel word range for the specified axis when 32 bit parallel word feedback is used The modulus determines the range of the connected device For multi turn systems this value is used to determine when a position wrap condition has occurred The value provided should be one half of the actual range of the axis For example if the parallel word input is used with an SSI encoder which has 24 bits of resolution then the total range is 16777216 and a value of 8388608 should be used as the encoder modulus GetFeedbackParameter returns the value of parameters set by SetFeedbackParameter Magellan Motion Processor Programmer s Command Reference 125 SetFeedbackParameter cont 21h GetFeedbackParameter 22h B Lu C Motion API PMDresult PMDSetFeedbackParameter PMDAxisInterface axis intf PMDuint8 parameter PMDuint32 value PMDresult PMDGetFeedbackParameter PMDAxisInterface axis intf PMDuint8 parameter PMDuint32 value VB Motion API MagellanAxis FeedbackParameter in parameter out value see SetEncoderModulus p 117
22. Dim data as Short MagellanObject IO address data see ReadlO p 68 194 Magellan Motion Processor Programmer s Command Reference 5 Instruction Summary Tables 5 1 Descriptions by Functional Category Breakpoints and Interrupts Page Set GetBreakpointUpdateMask Set Get mask for what is updated by breakpoint action update 89 Clearlnterrupt Reset interrupt 24 Set GetBreakpoint Set Get breakpoint type 86 Set GetBreakpointValue Set Get breakpoint comparison value 91 GetlnterruptAxis Get the axes with pending interrupts 49 Set GetlnterruptMask Set Get interrupt mask 132 Motor Phase and Commutation Set GetCommutationMode Set Get the commutation phasing mode 101 Set GetPhaseAngle Set Get current commutation phase angle 146 GetPhaseCommand Get the motor output command for a given phase A B or C 50 Set GetPhaseCorrectionMode Set Get phase correction mode 147 Set GetPhaseCounts Set Get number of encoder counts per commutation cycle 148 Set GetPhaselnitializeMode Set Get phase initialization method 149 Set GetPhaselnitializeTime Set Get the time parameters for algorithmic phase initialization 150 Set GetPhaseOffset Set Get phase offset value 151 Set GetPhasePrescale Set Get commutation prescaler mode 152 InitializePhase Perform phase initialization procedure 62 Current Loops Set GetCurrentControlMode Set Get current loop mode PhaseA B or FOC
23. Microstepping Pulse amp Direction Arguments Name Type Range Units bufferlD unsigned 16 bits 0 to 31 address unsigned 32 bits 0 to 2 1 double words Packet SetBufferStart Structure 0 COh 15 8 7 0 First data word write 0 bufferlD 15 5 4 0 Second data word write address high order part 31 16 Third data word write address low order part 15 0 GetBufferStart 0 Cth 15 8 7 0 First data word write 0 bufferlD 15 5 4 0 Second data word read address high order part 31 16 Third data word read address low order part 15 0 Description SetBufferStart sets the starting address for the specified buffer in double words of the buffer in the memory block identified by bufferlD Note The SetBufferStart command resets the buffers read and write indexes to 0 The GetBufferStart command returns the starting address for the specified bufferlD Restrictions The buffer start address plus the buffer length cannot exceed the memory size of the product See the product user s guide C Motion API PMDresult PMDSetBufferStart PMDAxisInterface axis intf PMDuintl16 buff erID PMDuint32 address PMDresult PMDGetBufferStart PMDAxisInterface axis intf PMDuintl6 buff erID PMDuint32 address 96 Magellan Motion Processor Programmer s Command Reference SetBufferStart cont COh GetBufferStart Cth VB Motion API Dim address as Long MagellanObject BufferStart
24. Mode 0 YES Trajectory Velocity 0 YES Trajectory Magellan Motion Processor Programmer s Command Reference Reset cont 39h o Default Value Buffered RAM Buffer Buffer Length 0 Magellan NO 0180h ION Buffer Read Index 0 NO Buffer Start 0 NO Buffer Write Index 0 NO Safety Positive Limit Event Action 8 NO Negative Limit Event Action 8 NO Motion Error Event Action motor dependent NO Current Foldback Event Action 7 NO OvervoltageThreshold see ION Digital Drive User s Manual NO Undervoltage Threshold see ION Digital Drive User s Manual NO OvertemperatureThreshold see ION Digital Drive User s Manual NO FaultOut Mask 0600h NO Continuous Current Limit see ION Digital Drive User s Manual Energy Limit see ION Digital Drive User s Manual Status Registers and AxisOut Indicator AxisOut Source Axis 0 NO AxisOut Register 0 NO AxisOut Selection Mask 0 NO AxisOut Sense Mask 0 NO Signal Sense motor dependent NO Traces Trace Mode 0 NO Trace Period l NO Trace Start 0 NO Trace Stop 0 NO Trace Variables all are 0 NO Miscellaneous Update Mask OBh NO CAN Mode C000h see Notes NO Serial Port Mode 0004h see Notes NO Magellan Motion Processor Programmer s Command Reference 71 o Reset cont 39h The motor type dependent default values are listed in the following tables Brushless DC Brushless DC Variable DC Brush
25. Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Returned data Type see below unsigned 16 bits Packet GetSignalStatus Structure 0 axis A4h 15 12 11 8 7 0 Data read 0 0 15 14 13 12 1 10 9 8 7 8 5 4 3 2 1 O0 Description GetSignalStatus returns the contents of the Signal Status register for the specified axis The Signal Status register contains the value of the various hardware signals connected to each axis of the motion processor The value read is combined with the Signal Sense register see SetSignalSense p 167 and then returned to the user For each bit in the Signal Sense register that is set to 1 the corresponding bit in the GetSignalStatus command will be inverted Therefore a low signal will be read as 1 and a high signal will be read as a 0 Conversely for each bit in the Signal Sense register that is set to 0 the corresponding bit in the GetSignalStatus command is not inverted Therefore a low signal will be read as 0 and a high signal will be read as a 1 All of the bits in the GetSignalStatus command are inputs except for AxisOut and FaultOut The value read for these bits is equal to the value output by the AxisOut and FaultOut mechanisms See SetAxisOutMask p 84 and SetFaultMask p 123 for more information The bit definitions are as follows Description Bit Number Description Bit Number Encoder A
26. PMDSetupAxisInterface PCI amp hAxis PMDAxisl 0 initialize handle to the second axis PMDCopyAxisInterface amp hAxis2 amp hAxis PMDAxis2 The above is an example of initializing communication using the parallel communication interface Each interface c source file contains an example of initializing the interface Once the axis handle has been initialized any of the motion processor commands can be executed The header file C Motion h includes the function prototypes for all motion processor commands as implemented in C Motion See this file for the required parameters for each command For information about the operation and pur pose of each command see Chapter 4 Instruction Reference Many functions require additional parameters Some standard values are defined by C Motion and can be used with the appropriate functions See PMDtypes h for a complete list of defined types An example of calling one of the C Motion functions with the pre defined types is shown below PMDSetBreakpoint amp hXAxis PMDBreakpoint PMDAxis2 PMDBreakpointActionAbruptStop PMDBreakpointActualPositionCrossed In a few cases commands must be directed explicitly to the Atlas amplifier associated with a Magellan control axis examples are the GetVersion and Reset commands In order to do so an axis handle must be opened for the Atlas amplifier itself to do so for axis 2 the following call may be used PMDAxisHandle hAxis2 hAtlas2 PMDGetAt
27. Restrictions This is a buffered command The new value set will not take effect until the next Update or MultiUpdate command is entered with the Trajectory Update bit set in the update mask These commands are used with the Trapezoidal and Velocity Contouring profile modes They are not used with the Electronic Gear or S curve profile mode Note If deceleration is set to zero 0 then the value specified for acceleration SetAcceleration will automatically be used to set the magnitude of deceleration C Motion API PMDresult PMDSetDeceleration PMDAxisInterface axis intf PMDuint32 deceleration PMDresult PMDGetDeceleration PMDAxisInterface axis intf PMDuint32 deceleration VB Motion API Dim deceleration as Long MagellanAxis Deceleration deceleration deceleration MagellanAxis Deceleration see Set GetAcceleration p 77 Set GetPosition p 153 Set GetVelocity p 190 MultiUpdate p 63 Update p 192 110 Magellan Motion Processor Programmer s Command Reference SetDefault 89h GetDefault 8Ah Syntax SetDefault axis variable value GetDefault axis variable Motor Type DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 variable CanMode 0 SerialPortMode485 1 Type Range Scaling value 32 bits see below Packet SetDefault Structure 0 axis 89h 15 12 11 8 7 0 First data word write variable 15 0 Second data word wr
28. SPIXmt pin transmits data on the falling edge of the SPIClock signal FallingEdgeDelay 3 Falling edge with phase delay The SPIClock signal is inactive high The SPIXmt pin transmits data one half cycle ahead of the falling edge of the SPIClock signal Atlas No additional Atlas communication is performed for these commands When using Atlas output the SPI mode must be zeto Restrictions SPI output is only available when the motor type is DC brush and only in some products See the product user s guide C Motion API PMDresult PMDSetSPIMode PMDAxisInterface axis intf PMDuint1l6 mode PMDresult PMDGetSPIMode PMDAxisInterface axis intf PMDuintl6 mode VB Motion API Dim mode as Short MagellanObject SPIMode mode mode MagellanObject SPIMode see SetOutputMode p 144 Magellan Motion Processor Programmer s Command Reference 169 SetStartVelocity 6Ah GetStartVelocity 6Bh Syntax SetStartVelocity axis velocity GetStartVelocity axis Motor Types Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units velocity unsigned 32 bits 0 to 291 1 1 276 steps cycle microsteps cycle Packet SetStartVelocity Structure 0 axis 6Ah 15 12 11 8 7 0 First data word write velocity high order part 31 16 Second data word write velocity low order part 15 0 GetStartVelocity 0 axis 6Bh 15 1
29. SetJerk loads the Jerk register in the parameter buffer for the specified axis GetJerk reads the contents of the Jerk register Scaling example To load a jerk value rate of change of acceleration of 0 012345 counts cycle or steps cycle multiply by 2 or 4 294 967 296 In this example this gives a value to load of 53 021 371 decimal which corresponds to a high word of 0329h and a low word of OABBh when loading each word in hexadecimal Restrictions SetJerk is a buffered command The value set using this command will not take effect until the next Update or MultiUpdate command with the Trajectory Update bit set in the update mask This command is used only with the S curve profile mode It is not used with the Trapezoidal Velocity Contouring or Electronic Gear profile modes C Motion API PMDresult PMDSetJerk PMDAxisInterface axis intf PMDuint32 jerk PMDresult PMDGetJerk PMDAxisInterface axis intf PMDuint32 jerk VB Motion API Dim jerk as Long MagellanAxis Jerk jerk jerk MagellanAxis Jerk see Set GetAcceleration p 77 Set GetDeceleration p 110 Set GetPosition p 153 Set GetVelocity p 190 MultiUpdate p 63 Update p 192 134 Magellan Motion Processor Programmer s Command Reference SetMotionCompleteMode EBh GetMotionCompleteMode ECh Syntax SetMotionCompleteMode axis mode GetMotionCompleteMode axis Motor Types DC Brush Bru
30. The values read by GetPositionLoop are the buffered settings C Motion API PMDresult PMDSetPositionLoop PMDAxisInterface axis intf PMDuinti16 parameter PMDint32 value PMDresult PMDGetPositionLoop PMDAxisInterface axis intf PMDuinti16 parameter PMDint32 value VB Motion API Dim value as Long MagellanAxis PositionLoop parameter value value MagellanAxis PositionLoop parameter see Update p 192 Set GetUpdateMask p 188 MultiUpdate p 63 Set GetBreakpointUpdateMask p 89 GetPositionLoopValue p 52 Magellan Motion Processor Programmer s Command Reference 157 SetProfileMode buffered AOh GetProfileMode Ath 4h c UU Syntax SetProfileMode axis mode GetProfileMode axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mode Trapezoidal 0 Velocity Contouring 1 S curve 2 Electronic Gear 3 Packet SetProfileMode Structure 0 axis A0h 15 12 11 8 7 0 Data write 0 mode 15 32 0 GetProfileMode 0 axis Ath 15 12 11 8 7 0 Data read 0 mode 15 32 0 Description SetProfileMode sets the profile mode for the specified axis GetProfileMode returns the contents of the profile mode register for the specified axis Restrictions SetProfileMode is a buffered command The value set using this command will not take effect until the next Update or MultiU
31. all products See the product user s guide C Motion API PMDresult PMDSetMotorType PMDAxisInterface axis intf PMDuint8 type PMDresult PMDGetMotorType PMDAxisInterface axis intf PMDuint8 type 140 Magellan Motion Processor Programmer s Command Reference SetMotorType cont 02h GetMotorType 03h VB Motion API Dim type as Short MagellanAxis MotorType type type MagellanAxis MotorType see Reset p 69 Magellan Motion Processor Programmer s Command Reference 141 SetOperatingMode 65h GetOperatingMode 66h md a Syntax SetOperatingMode axis mode GetOperatingMode axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling mode unsigned 16 bit see below Packet SetOperatingMode Structure 0 axis 65h 15 12 11 8 7 0 First data word write mode 15 0 GetOperatingMode 0 axis 66h 15 12 11 8 7 0 First data word read mode 15 0 Description SetOperatingMode configures the operating mode of the axis Each bit of the mode configures whether a feature loop of the axis is active or disabled as follows Name Bit Description Axis Enabled 0 0 No axis processing axis outputs in reset state axis active Motor Output Enabled 0 axis motor outputs disabled axis motor outputs enabled Current Control Enabled 2 0 axis current control bypassed axis cu
32. axis 53h 15 12 11 8 7 0 First data word read temperature 15 0 GetTemperature gets the most recent temperature reading from the temperature sensor s monitoring the axis This command is relayed to an attached Atlas amplifier GetTemperature is only available in products equipped with temperature sensors If axis has more than one temperature sensot the temperature returned will be the average value of all sensor readings PMDresult PMDGetTemperature PMDAxisInterface axis intf PMDintl16 temperature Dim temperature as Short temperature MagellanAxis Temperature Get SetOvertemperatureLimit p 145 Magellan Motion Processor Programmer s Command Reference 55 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API see A GetTime 3Eh GetTime DC Brush Brushless DC Microstepping Pulse amp Direction None Name Type Range Scaling Units time unsigned 32 bits 0 to 2 1 unity cycles GetTime 0 3Eh 15 8 7 0 First data word read time high order part 31 16 Second data word read time low order part 15 0 GetTime returns the number of cycles which have occurred since the motion processor was last reset The time per cycle is determined by SetSampleTime Time stops advancing when no axes are enabled PMDresult PMDGetTime PMDAxisInterface axis intf PMDuint32 time
33. be sign extended or zeroed When motor type see SetMotorType p 140 is set to Pulse and Direction and the encoder source is set to Loopback the step output is internally fed back into the quadrature counters This allows for position capture of the step position when a physical encoder is not present When the encoder source is set to Pulse and Direction then Magellan expects the incoming position encoding to correspond to a pulse amp direction encoding scheme rather than a quadrature encoding scheme This feature is most commonly used with electronic gear mode so that the Magellan processor can be driven by a motion controller that outputs pulse amp direction signals GetEncoderSource returns the code for the current type of feedback 118 Magellan Motion Processor Programmer s Command Reference SetEncoderSource cont DAh GetEncoderSource DBh Restrictions A Loopback source is only supported for pulse amp direction motors Loopback is not supported in single chip versions MC58110 amp MC55110 A source value of None is typically only used with microstepping and pulse amp direction motors Not all products suppott all types of encoders See the product user s guide When using a parallel word encoder with the MotorType set to Pulse amp Direction or MicroStepping the SetCountToStepRatio command must be used prior to this command C Motion API PMDresult PMDSetEncoderSource PMDAxisInterface axis intf PMDuintl6 sour
34. bits 2 to 23154 1 21 counts cycle microsteps cycle GetCommandedAcceleration 0 axis A7h 15 12 11 8 7 0 First data word read acceleration high order part 31 16 Second data word read acceleration low order part 15 0 GetCommandedAcceleration returns the commanded acceleration value for the specified axis Commanded acceleration is the instantaneous acceleration value output by the trajectory generator Scaling example If a value of 114 688 is retrieved using this command then this corresponds to 114 688 65 536 1 750 counts cycle acceleration value PMDresult PMDGetCommandedAcceleration PMDAxisInterface axis intf PMDint32 acceleration Dim acceleration as Long acceleration MagellanAxis CommandedAcceleration GetCommandedPosition p 36 GetCommandedVelocity p 37 Magellan Motion Processor Programmer s Command Reference 35 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API see o GetCommandedPosition 1Dh GetCommandedPosition axis DC Brush Brushless DC Microstepping Pulse amp Direction Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units position signed 32 bits 2 to 2 1 unity counts microsteps GetCommandedPosition 0 axis 1Dh 15 12 11 8 7 0 First data word read position high order part 31 16 Second data word
35. directly to Atlas even if directed to Magellan separate means that a command may be directed either to Atlas or Magellan and combined means that a com mand directed to Magellan may result in a command being sent to Atlas as well MC58000 Command IMC55000 MC58s000 Atlas ION Breakpoints and Interrupts Set GetBreakpointUpdateMask Y Y Y Clearlnterrupt Y Y Y Set GetBreakpoint Y Y Y Set GetBreakpointValue Y Y Y GetInterruptAxis Y Y Y Set GetlnterruptMask Y Y Y Motor Phase and Commutation Set GetCommutationMode Y Set GetPhaseAngle GetPhaseCommand Set GetPhaseCorrectionMode Set GetPhaseCounts Set GetPhaselnitializeMode Set GetPhaselnitializeTime Set GetPhaseOffset Set GetPhasePrescale InitializePhase pass through stepper only lt lt lt lt lt lt lt lt lt lt lt lt lt Current Loops Set GetCurrentControlMode pass through Set GetCurrentLoop pass through GetCurrentLoopValue pass through Set GetFOC pass through GetFOCValue pass through lt x lt lt lt Digital Servo Filter ClearPositionError Y GetPositionError Y Set GetPositionLoop GetPositionLoopValue Set GetPositionErrorLimit Y Set GetAuxiliaryEncoderSource lt x lt lt lt lt lt lt lt lt lt lt 198 Magellan Motion Processor Programmer s Command Reference Instructio
36. disabled e g immediately after power up or reset C Motion API PMDresult PMDSetDefault PMDAxisInterface axis intf PMDuintl16 variable PMDuint32 value PMDresult PMDGetDefault PMDAxisInterface axis intf PMDuintl6 variable PMDuint32 value VB Motion API MagellanAxis DefaultSet in variable in value MagellanAxis DefaultGet in variable out value see Reset p 69 112 Magellan Motion Processor Programmer s Command Reference SetDriveCommandMode 7Eh GetDriveCommandMode 7Fh Syntax SetDriveCommandMode GetDriveCommandMode Motor Type DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Encoding mode 16 bit unsigned see below Packet SetDriveCommandMode Structure 0 7Eh 15 8 7 0 write mode 15 0 GetDriveCommandMode 0 7Fh 15 8 7 0 read mode 15 0 Description SetDriveCommandMode is used to change the command format for drive motor torque Currently it may be used to put an attached Atlas amplifier into pulse and direction input mode by using a mode value of 14h After setting an Atlas amplifier to pulse and direction mode it will not be possible for Magellan to communicate with it except by electrically connecting the Magellan pulse and direction outputs and changing the Magellan output mode SetDriveCommandMode does not change Magellan output mode GetDriveCommandMode returns the current Atlas command mode see 74 as Digital Amplifier Complete Tech
37. enabled SetOperatingMode command The source determines whether the master axis commanded position as determined by the trajectory generator will be used to drive the slave axis or whether the master axis encoder position will be used to drive the slave GetGearMaster returns the value for the geared axes and position soutce Restrictions Magellan Motion Processor Programmer s Command Reference 129 SetGearMaster cont AEh GetGearMaster AFh eee az 2qEE C Motion API PMDresult PMDSetGearMaster PMDAxisInterface axis intf PMDAxis masterAxis PMDuint8 source PMDresult PMDGetGearMaster PMDAxisInterface axis intf PMDAxis masterAxis PMDuint8 source VB Motion API MagellanAxis GearMasterSet in masterAxis in source MagellanAxis GearMasterGet out masterAxis out source see Set GetGearRatio p 131 130 Magellan Motion Processor Programmer s Command Reference SetGearRatio buffered 14h GetGearRatio 59h Syntax SetGearRatio s aveAxis ratio GetGearRatio s aveAxis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding slaveAxis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units ratio signed 32 bits 2 to 271 1 1 2 6 SlaveCts MasterCts Packet SetGearRatio Structure 0 slaveAxis 14h 15 12 11 8 7 0 First data word write ratio high order part 31 16 Second data word write rati
38. in node out value see Set GetCurrentLoop p 108 Set GetCurrentControlMode p 104 Set Get Current Foldback p 106 Magellan Motion Processor Programmer s Command Reference 39 o GetDriveFaultStatus 6Dh Syntax GetDriveFaultStatus axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 Returned Data Type status unsigned 16 bits see below Packet GetDriveFaultStatus Structure 0 axis 6Dn 15 12 11 8 7 0 First data word read 0 0 15 7 6 5 4 3 2 1 0 Description GetDriveFaultStatus reads the Drive Fault Status register which contains a bitmap showing all hard faults that have occurred since the Drive Fault Status register was last cleared In the ION product this register is kept in non volatile memory so that a record of hard faults is retained even through power cycles which will be done upon any hard fault event The table below shows the bit definitions of the Drive Fault Status register Name Bit Overcurrent Fault Ground Fault External Logic Fault Atlas Operating Mode Mismatch Internal Logic Fault Overvoltage Fault Undervoltage Fault Atlas Disabled by Enable Signal Atlas Current Foldback Overtemperature Fault non Atlas Atlas Detected SPI Checksum Error 10 Atlas Watchdog Timeout II Reserved 12 Reserved 13 Magellan Det
39. matches the units and scaling of the position loop integrator sum For example a constant position error of 100 counts which is present for 256 cycles will result an an integra tor sum of 100 256 25 600 PID Integrator Gain has scaling of 1 256 Thus a setting of 256 corresponds to unity integrator gain From the above example this would make the integrator sum of 25 600 create a contribution to the PID output of 25 600 PID Output Gain is a scaling factor applied to the output of the digital servo filter with units of output Its default value is 65 535 or approximately 100 output To set the scaling to for example 50 of output PID Output Gain would be set to 32 767 e The biquad coefficients configure the two biquad output filters If both filters are enabled their outputs are chained filter1 followed by filter2 If filter1 is disabled for an axis filter2 is also disabled for that axis regardless of user setting of Biquad2 Enable Filter The signed co efficients and unsigned scalar K combine to implement the following equation for each filter Y Kx B xX B xX _ tB2x X 2 t4 x Y 1X4 X Y 5 Where Y is the filter output at cycle n and X is the filter input at cycle n Restrictions Set GetPositionLoop are buffered commands All parameters set are buffered and will not take effect until an update is done on the position loop through Update command MultiUpdate command or update action on breakpoint
40. multiple Magellan Motion Processors Can be easily linked to any C C application C Motion callable functions are broken into two groups those callable functions that encapsulate motion processor specific commands and those callable functions that encapsulate product specific capabilities The motion processor specific commands are detailed in Chapter 4 Instruction Reference They ate the primary com mands that you will use to control the major motion features including profile generation servo loop closure motor output signal generation PWM and analog breakpoint processing trace operations and many other functions Each Magellan Motion Processor command has a C Motion command of the identical name but prefaced by the let ters PMD For example the Magellan command SetPosition is called PMDSetPosition 2 2 C Mlotion Versions To provide more efficient compiled code for the environments in which different C Motion based programs are likely to be used two separate implementations of C Motion are provided Version 4 x for host programs that communicate with PRP devices and for C Motion Engine programs Version 3 x for all other PMD Magellan products including non PRP ION modules non CME Prodigy cards and Magellan Motion Processors Both of these C Motion versions share the same calling sequences for all Magellan commands however they may not be mixed in the same program and they do not share the same mecha
41. object which contains the communication objects for serial and IXXAT CAN interfaces CommunicationSerial and CommunicationCAN VB Motion includes the following features Motion processor and Axis objects The ability to communicate to multiple PMD motion processors Supports PCI ISA serial and CAN IXXAT interfaces 3 2 Files The following table describes the example projects that are included with VB Motion to provide a starting point for your custom motion software project Project Description AllCommands Demonstrates the syntax for all available ION or Magellan commands CANIO Demonstrates how to setup a connection to the CAN interface PCIIO Demonstrates how to setup a connection to the PCI interface SeriallO Demonstrates how to setup a connection to the serial interface in point to point mode Magellan Motion Processor Programmer s Command Reference 17 4 VB Motion 18 3 3 Using VB Motion In order to access the VB Motion objects they must first be declared Add this line when using the serial interface Dim commSerial As PMDUserLib CommunicationSerial Add this line when using the CAN interface Dim commCAN As PMDUserLib CommunicationCAN Add this line when using the PCI interface Dim commPCI As PMDMPLib CommunicationPCI Add this line when using the ISA interface Dim commlSA As PMDMPLib CommunicationlSA The standard motion processor objects Dim magellanObj As PMDMPLib M
42. p 57 Set GetTraceMode p 174 Set GetTracePeriod p 176 Set GetTraceStop p 180 Magellan Motion Processor Programmer s Command Reference 179 SetTraceStop B4h GetTraceStop Bbh miu a Syntax SetTraceStop triggerAxis condition triggerBit triggerState GetTraceStop Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding triggerAxis Axis1 0 Axis2 1 Axis3 2 Axis4 3 condition Immediate 0 Next Update 1 Event Status 2 Activity Status 3 Signal Status 4 Drive Status 5 triggerBit Status Register Bit 0 to 15 triggerState tS Triggering State of the Bit 0 value 0 1 value 1 Packet SetTraceStop Structure 0 B4h 15 8 7 0 Data write 0 tS triggerBit condition triggerAxis 15 13 12 1 8 7 4 3 0 GetTraceStop 0 B5h 15 8 7 0 Data read 0 tS triggerBit condition triggerAxis 15 13 12 1 8 7 4 3 0 Description SetTraceStop sets the condition for stopping the trace The Immediate condition requires no axis to be specified and the trace will stop upon execution of this instruction The other four conditions require an axis to be specified and when the condition for that axis is attained the trace will stop When a status register bit is the trigger the bit number and state must be included in the argument The trace is stopped when the indicated bit reaches the specified state 0 or 1 GetT
43. relayed to an attached Atlas amplifier Restrictions This command is only available on products that support digital current control Values of Continuous Current Limit greater than the factory setting for maximum continuous current are not allowed C Motion API PMDresult PMDSetCurrentFoldback PMDAxisInterface axis intf PMDuinti16 parameter PMDuint1l6 value PMDresult PMDGetCurrentFoldback PMDAxisInterface axis intf PMDuinti16 parameter PMDuint16 value VB Motion API Dim value as Short MagellanAxis CurrentFoldback parameter valu value MagellanAxis CurrentFoldback parameter see GetEventStatus p 43 ResetEventStatus p 74 GetDriveStatus p 42 RestoreOperatingMode p 76 GetActiveOperatingMode p 28 Magellan Motion Processor Programmer s Command Reference 107 SetCurrentLoop buffered 73h GetCurrentLoop 74h OP a M Syntax SetCurrentLoop axis phase parameter value GetCurrentLoop axis phase parameter Motor Types DC Brush Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 phase Phase A 0 Phase B 1 Both A and B 2 parameter Proportional Gain KpCurrent 0 Integrator Gain KiCurrent 1 Integrator Sum Limit ILimitCurrent 2 Type Range Scaling value unsigned 16 bits see below Packet SetCurrentLoop Structure 0 axis 73h 15 12 11 8 7 0 First data word write 0 phase parameter 15 12 11 8 7 0 Second da
44. s Command Reference 7 a The Magellan Family 1 2 Magellan Motion Processor Products The following table presents a feature summary of the products in the Magellan Motion Processor product family MC58000 Series MC55000 Series Magellan ION of axes 1 2 3 4 1 2 3 4 Motor types supported DC brush brushless DC Pulse amp Direction DC brush brushless DC Microstepping step step motor Microstepping step motor motor Pulse amp Direction step motor Microstepping motor Output format PWM DAC Pulse amp Pulse amp Direction PWM internal to drive Direction Parallel communication Serial communication i id id CAN 2 0B communication T i i Incremental encoder input y y Parallel word device input Y s Index amp Home signals K Position capture d Y Y Directional limit switches d PWM output d amplifier is internal Parallel DAC output Y SPI DAC output d Pulse amp direction output d Atlas SPI output x Digital current control n Field oriented control Under overvoltage sense i Current foldback Y Trapezoidal profiling Y Y A Velocity profiling Y Y d S curve profiling Y Y Y Electronic gearing Y Y Y On the fly changes Y Y Y PID position servo loop Y Y Y Dual biquad filters Y Y Dual encoder loop INR multi axis y configurations only Programmable derivative sampling time d Feedforward accel amp vel Y v Data trac
45. send a command directly see Aas Digital Amplifier Complete Technical Reference for more detail Restrictions This command is only available on products that include a FaultOut pin Depending on the product all of the specified bits in Event Status may not be available In addition to the FaultOut mask on the Event Status register the FaultOut pin is driven by a mask on the Drive Fault Status register bits 4 2 1 and 0 which cannot be changed and is internally ORed with the FaultOut mask on Event Status C Motion API PMDresult PMDSetFaultOutMask PMDAxisInterface axis intf PMDuint16 mask PMDresult PMDGetFaultOutMask PMDAxisInterface axis intf PMDuinti16 mask VB Motion API Dim mask as Short MagellanAxis FaultOutMask mask mask MagellanAxis FaultOutMask see Set GetinterruptMask p 132 124 Magellan Motion Processor Programmer s Command Reference SetFeedbackParameter 21h GetFeedbackParameter 22h Syntax SetFeedbackParameter parameter value GetFeedbackParameter parameter value Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding parameter Encoder Modulus 0 Type Range Scaling value 32 bit unsigned see below Packet Structure SetFeedbackParameter 0 21h 15 8 7 0 write 0 parameter 15 8 7 0 value high order parameter write 15 8 7 0 write value low order parameter 15 0 GetFeedbackParameter 0 22h 15 8
46. setting a new breakpoint condition SetBreakpoint command Failure to do so will likely result in unexpected behavior Depending on the product features not all bits of all registers are supported See the product user s guide C Motion API PMDresult PMDSetBreakpointValue PMDAxisInterface axis intf PMDuinti16 breakpointID PMDint32 value PMDresult PMDGetBreakpointValue PMDAxisInterface axis intf PMDuinti16 breakpointID PMDint32 value VB Motion API Dim value as Long MagellanAxis BreakpointValue breakpointID value value MagellanAxis BreakpointValue breakpointID see Set GetBreakpoint p 86 92 Magellan Motion Processor Programmer s Command Reference SetBufferLength C2h GetBufferLength C3h Syntax SetBufferLength bufferlD length GetBufferLength bufferlD Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Range bufferlD unsigned 16 bits 0 to 31 length unsigned 32 bits 1 to 299 1 Packet SetBufferLength Structure 0 C2h 15 8 7 0 First data word write 0 bufferlD 15 5 4 0 Second data word write ength high order part 31 16 Third data word write length low order part 15 0 GetBufferLength 0 C3h 15 8 7 0 First data word write 0 bufferlD 15 5 4 0 Second data word read length high order part 31 16 Third data word read length low order part 15 0 Description SetBufferL
47. source PMDresult PMDGetCaptureSource PMDAxisInterface axis intf PMDuintl16 source VB Motion API Dim source as Short MagellanAxis CaptureSource source source MagellanAxis CaptureSource see GetCaptureValue p 33 100 Magellan Motion Processor Programmer s Command Reference SetCommutationMode E2h GetCommutationMode E3h Syntax SetCommutationMode axis mode GetCommutationMode axis Motor Types Brushless DC Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 mode Sinusoidal 0 Hall based 1 Packet SetCommutationMode Structure 0 axis E2h 15 12 11 8 7 0 Data write 0 mode 31 1 0 GetCommutationMode 0 axis E3h 15 12 11 8 7 0 Data read 0 mode 31 1 0 Description SetCommutationMode sets the phase commutation mode for the specified axis When set to Sinusoidal as the motor turns the encoder input signals are used to calculate the phase angle This angle is in turn used to generate sinusoidally varying outputs to each motor winding When set to Hall based the Hall effect sensor inputs are used to commutate the motor windings using a six step or trapezoidal waveform method When using FOC current control this command is used to define the method used for motor phase determination GetCommutationMode returns the value of the commutation mode Restrictions C Motion API PMDresult PMDSetCommutationMode PMDAxisIn
48. the sample time Restrictions This command affects the cycle time for all axes on multi axis configurations This command cannot be used to set a sample time lower than the required minimum cycle time for the current configuration Attempting to do so will set the sample time to the required minimum cycle time as specified in the previous table C Motion API PMDresult PMDSetSampleTime PMDAxisInterface axis intf PMDuint32 time PMDresult PMDGetSampleTime PMDAxisInterface axis intf PMDuint32 time VB Motion API Dim time as Long MagellanAxis SampleTime time time MagellanAxis SampleTime See 162 Magellan Motion Processor Programmer s Command Reference SetSerialPortMode SBh GetSerialPortMode 8Ch Syntax SetSerialPortMode mode GetSerialPortMode Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Encoding mode unsigned 16 bits see below Packet SetSerialPortMode Structure 0 axis 8Bh 15 8 7 0 Data write multi drop address 0 protocol stop bits parity transmission rate 15 11 10 9 8 7 6 5 4 3 0 GetSerialPortMode 0 axis 8Ch 15 8 7 0 Data read multi drop address 0 protocol stop bits parity transmission rate 15 11 10 9 8 7 6 5 4 3 0 Description SetSerialPortMode sets the configuration for the asynchronous serial port It configures the timing and framing of the serial port o
49. to an angle of 500 2 000 360 90 degrees phase angle at the index mark Restrictions Before the first index capture has occurred GetPhaseOffset will return 1 C Motion API PMDresult PMDSetPhaseOffset PMDAxisInterface axis intf PMDinti16 offset PMDresult PMDGetPhaseOffset PMDAxisInterface axis intf PMDint16 offset VB Motion API Dim offset as Short MagellanAxis PhaseOffset offset offset MagellanAxis PhaseOffset See Magellan Motion Processor Programmer s Command Reference 151 SetPhasePrescale E6h GetPhasePrescale E7h Seas a _ i o 0 ES Syntax SetPhasePrescale axis scale GetPhasePrescale axis Motor Types Brushless DC Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 scale Off 0 1 64 1 1 128 2 1 256 3 Packet SetPhasePrescale Structure 0 axis E6h 15 12 11 8 7 0 Data write 0 scale 15 2 1 0 GetPhasePrescale 0 axis E7h 15 12 11 8 7 0 Data read 0 scale 15 2 1 0 Description SetPhasePrescale controls scaling of the encoder counts before they are used to calculate a commutation angle for the specified axis When operated in the pre scale mode the motion processor can commutate motors with a high number of counts per electrical cycle such as motors with very high accuracy encoders SetPhasePrescale Off removes the scale factor GetPhasePrescale returns the value of the scaling mode Restrictions
50. value will be clipped to the specified motor command limit For example if the motor limit was set to 1 000 and the servo filter determined that the current motor output value should be 1 100 the actual output value would be 1 000 Conversely if the output value was 1 100 then it would be clipped to 1 000 This command is useful for protecting amplifiers motors or system mechanisms when it is known that a motor command exceeding a certain value will cause damage GetMotorLimit reads the motor limit value Scaling example If it is desired that a motor limit of 75 of full scale be established then this register should be loaded with a value of 75 0 32 767 100 24 576 decimal This corresponds to a hexadecimal value of 06000h Restrictions This command only affects the motor output when the position loop or trajectory generator is enabled When the motion processor is in open loop mode this command has no effect C Motion API PMDresult PMDSetMotorLimit PMDAxisInterface axis intf PMDuint16 limit PMDresult PMDGetMotorLimit PMDAxisInterface axis intf PMDuinti16 limit VB Motion API Dim limit as Short MagellanAxis MotorLimit limit limit MagellanAxis MotorLimit see Set GetMotorBias p 136 Set GetMotorCommand p 137 Set GetOperatingMode p 142 Magellan Motion Processor Programmer s Command Reference 139 SetMotorType 02h GetMotorType 03h AR e Syntax SetMotorType axis type GetMotorType axis
51. when breakpoint has been triggered Capture Received 3 Set to when a position capture has occurred Motion Error 4 Set to when a motion error has occurred Positive Limit 5 Set to when the axis has entered a positive limit switch Negative Limit 6 Set to when the axis has entered a negative limit switch Instruction Error 7 Set to when an instruction error has occurred Disable 8 Set to when disable due to user Enable line has occurred Overtemperature Fault 9 Set to when overtemperature condition has occurred Drive Exception 10 An drive event occurred causing output to be disabled This bit is used on ION products to indicate a bus voltage fault and with an attached Atlas amplifier to indicate any disabling drive event Commutation error n Set to when a commutation error has occurred Current Foldback 12 Set to when current foldback has occurred 13 Reserved not used may be 0 or Breakpoint 2 14 Set to when breakpoint 2 has been triggered 15 Reserved not used may be 0 or Atlas This command does not require any additional Atlas communication all of the required data is transmitted in the Atlas SPI Status Word received when sending torque commands In the case of Drive Exception more precise information may be obtained by using the GetDriveFaultStatus command It should be noted that the Overtemperature event bit is not used for Atlas axes Magellan Motion Processor Programmer s Co
52. 0 0 0 15 7 6 5 4 3 2 1 0 Description GetDriveStatus reads the Drive Status register for the specified axis All of the bits in this status word are set and cleared by the motion processor They are not settable or clearable by the host The bits represent states or conditions in the motion processor that are of a transient nature Name Bit s Description 0 Reserved not used may be 0 or In Foldback l Set to when the unit is in the current foldback state the output current is limited by the foldback limit Overtemperature 2 Set to when the overtemperature condition is present 3 Reserved not used may be 0 or In Holding 4 Set to when the unit is in the holding current state the output current is limited by the holding current limit Overvoltage 5 Set to when the overvoltage condition is present Undervoltage 6 Set to when the undervoltage condition is present Atlas Disabled 7 The attached Atlas amplifier is disabled by an inactive Enable signal 8 11 Reserved not used may be 0 or Output Clipped 12 Atlas output is limited because it has reached 100 or the Drive PWM limit or the current loop integrator limit Atlas not connected 15 The output mode is Atlas but SPI communication has not been established Atlas This command does not require any additional Atlas communication all of the required data is transmitted in the Atlas SPI Status Word received when s
53. 0 Hall B 8 Encoder B l Hall C 9 Encoder Index 2 AxisOut 10 Capture Input 3 Reserved 11 12 Positive Limit 4 Enable In 13 Negative Limit 5 FaultOut 14 AxisIn 6 Reserved 15 Hall A 7 Atlas Note that the Enable In and FaultOut signals are vot the Atlas signals In order to read the Atlas amplifier signal status the command must be directed to Atlas Restrictions Depending on the product some signals may not be present See the product user s guide In ION products when the capture source is set to Index the Encoder Index input will be present as both the Encoder Index and the Capture Input bits Magellan Motion Processor Programmer s Command Reference 53 o GetSignalStatus cont A4h C Motion API PMDresult PMDGetSignalStatus PMDAxisInterface axis intf PMDuinti16 status VB Motion API Dim status as Short status MagellanAxis SignalStatus see GetActivityStatus p 29 GetEventStatus p 43 GetSignalSense p 167 54 Magellan Motion Processor Programmer s Command Reference GetTemperature 53h Syntax Motor Types Arguments Returned Data Packet Structure Description Atlas Restrictions C Motion API VB Motion API See GetTemperature axis DC Brush Brushless DC Microstepping Pulse amp Direction Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units temperature signed 16 bits 2 to 215 1 29 G GetTemperature 0
54. 000 when KiCurrent is 10 means that the maximum contribution to the output is 1000 x 10 10 000 out of 2 1 or approximately 30 5 The phase argument can be used to set the operating parameters for the A and B loops independently In most cases the A and B loops will not require different operating parameters so SetCurrentLoop can be used with a phase of 2 which sets both the A and B loops in a single API command For GetCurrentLoop a phase of 2 is not valid Atlas These commands will be relayed to an attached Atlas amplifier Restrictions Set GetCurrentLoop are buffered commands All parameters set are buffered and will not take effect until an update is done on the current loop through Update command MultiUpdate command or update action on breakpoint The values read by GetCurrentLoop are the buffered settings This command is only supported in products that include digital current control and when the current control mode is Phase A B C Motion API PMDresult PMDSetCurrentLoop PMDAxisInterface axis intf PMDuint8 phase PMDuint8 parameter PMDuintl6 value PMDresult PMDGetCurrentLoop PMDAxisInterface axis intf PMDuint8 phase PMDuint8 parameter PMDuintli6 value VB Motion API MagellanAxis CurrentLoopSet in phase in parameter in value MagellanAxis CurrentLoopGet in phase in parameter out value see Update p 192 Set GetUpdateMask p 188 MultiUpdate p 63 Set GetBreak
55. 104 Set GetCurrentLoop Set Get a parameter for the PhaseA B current loops 108 GetCurrentLoopValue Get the instantaneous value of a node in the PhaseA B current loops 38 Set GetFOC Set Get a parameter for the FOC current control 127 GetFOCValue Get the instantaneous value of a node in the FOC current control 45 Digital Servo Filter ClearPositionError Set position error to 0 25 GetPositionError Get actual position error 51 Set GetPositionLoop Set Get a parameter for the Digital Servo Loop 155 GetPositionLoopValue Get the current value of a node in the Digital Servo Loop 52 Set GetPositionErrorLimit Set Get the maximum position error limit 154 Set GetAuxiliaryEncoderSource Controls the dual encoder loop feature 82 Encoder AdjustActualPosition Sums the specified offset with the actual encoder position 22 Set GetActualPosition Set Get the actual encoder position 79 Set GetActualPositionUnits Set Get the unit type returned for the actual encoder position 81 GetActualVelocity Get the actual encoder velocity 31 Set GetCaptureSource Set Get the capture source 100 GetCaptureValue Get current axis position capture value and reset the capture 33 Magellan Motion Processor Programmer s Command Reference 195 e Instruction Summary Tables Encoder Set GetEncoderModulus Set Get the full scale range of the parallel word encoder 117 Set GetEncoderSource Set Get the encoder type 118
56. 12 11 8 7 0 First data word read voltage 15 0 GetBusVoltage gets the most recent bus voltage reading from the axis This command is relayed to any connected Atlas amplifier GetBusVoltage is only available in products equipped with bus voltage sensors PMDresult PMDGetBusVoltage PMDAxisInterface axis intf PMDuinti16 voltage Dim voltage as Short voltage MagellanAxis BusVoltage Get SetDriveFaultParameter p 114 Magellan Motion Processor Programmer s Command Reference GetCaptureValue 36h Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VBI Motion API see GetCaptureValue axis DC Brush Brushless DC Microstepping Pulse amp Direction Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units position signed 32 bits 23 to 23 1 unity counts microsteps GetCaptureValue 0 axis 36h 15 12 11 8 7 0 First data word read position high order part 31 16 Second data word read position low order part 15 0 GetCaptureValue returns the contents of the position capture register for the specified axis This command also resets bit 9 of the Activity Status register thus allowing another capture to occur If actual position units is set to steps the returned position will be in units of steps PMDresult PMDGetCaptureValue PMDAxisInterfac
57. 126 Magellan Motion Processor Programmer s Command Reference SetFOC buffered F6h GetFOC F7h Syntax SetFOC axis loop parameter value GetFOC axis loop parameter Motor Types Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 loop Direct D 0 Quaarature Q 1 Both D and Q 2 parameter Proportional Gain KpDQ 0 Integrator Gain KiDQ 1 Integrator Sum Limit ILimitDQ 2 Type Range Scaling value unsigned 16 bits see below Packet SetFOC Structure 0 axis F6h 15 12 11 8 7 0 First data word write 0 loop parameter 15 12 11 8 7 0 Second data word write value 15 0 GetFOC 0 axis F7h 15 12 11 8 7 0 First data word write 0 loop parameter 15 12 11 8 7 0 Second data word read value 15 0 Description Set GetFOC is used to configure the operating parameters of the FOC Current control See the product uset s guide for more information on how each parameter is used in the current loop processing The value written read is always an unsigned 16 bit value with the parameter specific scaling shown below Parameter Range Scaling Units Proportional Gain KpDQ 0 to 2 1 1 64 gain Integrator Gain KiDQ Oto 25 1 1 256 gain cycles Integrator Sum Limit ILimitDQ 0 to 2 1 1 100 current cycles A setting of 64 for KpDQ corresponds to a gain of 1 Thatis an error signal of 30 maximum current will cause the proporti
58. 17 33 USING VB MOtIOD aoi eoe eet DH RAT Me er CUR ah RR TER a ces 18 34 Prodigy Motion Card Specific Commands e cece eee e cence 19 4 Instruction Reference seeeeeee rette done divisis Rv 21 4 1 How to Use This Reference esses 21 5 Instruction Summary Tables eese seas 195 5 1 Descriptions by Functional Category cee cece eect ence ee eeees 195 5 2 Command Support by Product cee cece cece ete enn n 198 5 3 Alphabetical Listing cece cece cece nee e II 201 5 4 Numerical listing zo osos desee tede eed deese ese deed 204 5 5 Magellan Compatibility sese 206 Magellan Motion Processor Programmer s Command Reference V a Table of Contents This page intentionally left blank vi Magellan Motion Processor Programmer s Command Reference 1 The Magellan Family Q This manual provides a Programmer s Command Reference for the Magellan Family of Motion Processors from PMD including the MC58000 Series DC brush brushless DC microstepping and step motor the MC55000 Series pulse amp direction step motor motion processors and the Magellan ION motion processor In addition Magellan processors are used in a number of card level products including the Prodigy PCI and Prodigy PC 104 motion cards If you are using one of these card or module level products the exact motion processor type can be determined from the corresponding User s Man
59. 2 11 8 7 0 First data word read velocity high order part 31 16 Second data word read velocity low order part 15 0 Description SetStartVelocity loads the starting velocity register for the specified axis The start velocity is the instantaneous velocity at the start and at the end of the profile GetStartVelocity reads the value of the starting velocity register Scaling example To load a starting velocity value of 1 750 steps cycle multiply by 65 536 giving 114 688 and load the resultant number as a 32 bit number giving 0001 in the high word and CO00h in the low word Values returned by GetStartVelocity must correspondingly be divided by 65 536 to convert them to units of counts cycle Restrictions SetStartVelocity is only used in the Velocity Contouring and Trapezoidal profile modes C Motion API PMDresult PMDSetStartVelocity PMDAxisInterface axis intf PMDuint32 velocity PMDresult PMDGetStartVelocity PMDAxisInterface axis intf PMDuint32 velocity VB Motion API Dim velocity as Long MagellanAxis StartVelocity velocity velocity MagellanAxis StartVelocity see Set GetVelocity p 190 Set GetAcceleration p 77 Set GetDeceleration p 110 Set GetPosition p 153 170 Magellan Motion Processor Programmer s Command Reference SetStepRange CFh GetStepRange CEh Syntax SetStepRange axis range GetStepRange axis
60. 3 phase 2 phase Actual Position Units 0 0 0 Commutation Mode 0 0 Encoder Source 0 0 0 Motion Error Event Action 5 5 5 Output Mode I Magellan 2 2 2 ION Phase Correction Mode l l PWM Frequency kHz 20 20 20 SPI Mode 0 Phase Counts l Holding Delay F Signal Sense 0 backwards 0 backwards 0 compatible compatible 0800h 0800h Atlas Atlas compatible compatible Microstepping Microstepping Pulse amp Variable 3 phase 2 phase Direction Actual Position Units Commutation Mode 0 0 Encoder Source 2 2 3 Motion Error Event Action 0 0 0 Output Mode 2 Magellan 2 ION Phase Correction Mode PWM Frequency kHz 20 80 Magellan 20 ION SPI Mode Phase Counts 256 256 Holding Delay 32767 32767 20 Signal Sense 0 0 0800h Notes All axes supported by the motion processor are enabled at reset In some products CAN Mode and Serial Port Mode defaults are defined at reset by a parallel bus read In ION products the reset defaults for CAN Mode and the Serial Port Mode used for RS485 can be over ridden using the SetDefault command See the ION Digital Drive Users Manual See Set GetSampleTime p 161 for more information regarding SampleTime Atlas The Magellan reset command does not cause any attached Atlas amplifiers to be reset When Magellan re connects to any such Atlas amplifiers it will check their motor types set their operating mode and set t
61. 500 000 2 250 000 3 125 000 4 50 000 5 20 000 6 10 000 7 Restrictions C Motion API PMDresult PMDSetCANMode PMDAxisHandle axis handle PMDuint8 nodeID PMDuint8 transmission rate PMDresult PMDGetCANMode PMDAxisHandle axis handle PMDuint8 nodeID PMDuint8 transmission rate VB Motion API CommunicationCAN CANModeSet in nodeID in transmission rate See Magellan Motion Processor Programmer s Command Reference 99 SetCaptureSource D8h GetCaptureSource D9h 4 B B Syntax SetCaptureSource axis source GetCaptureSource axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 source Index 0 Home 1 High Speed Capture 2 Packet SetCaptureSource Structure 0 axis D8h 15 12 11 8 7 0 Data write 0 source 15 32 0 GetCaptureSource 0 axis D9h 15 12 11 8 7 0 Data read 0 source 15 3 2 0 Description SetCaptureSource determines which of three signals Index Home or High Speed Capture is used to trigger the capture of the actual axis position for the specified axis GetCaptureSource returns the capture signal source for the selected axis Restrictions High Speed Capture is not available as a capture source in all products See the product user s guide C Motion API PMDresult PMDSetCaptureSource PMDAxisInterface axis intf PMDuintl6
62. 6 DriveNVRAM axis option value Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 option NVRAM mode 0 Erase NVRAM 1 Write 2 Block Write Begin 3 Block Write End 3 Skip 8 Type Range value unsigned 16 bit see below DriveNVRAM 0 axis 30h 15 12 11 8 7 0 wite 2 opio 15 0 write ot 15 0 The DriveNVRAM command is used to erase and re program the non volatile RAM used for initialization on Atlas amplifiers For information on use please see the Azas Digital Amplifier Complete Technical Reference When performing write or erase operations Atlas will be unable to communicate over the SPI bus for varying periods of time In order to verify that Atlas is capable of processing a new command the Atlas Not Connected bit of the Drive Status register should be polled after each erase or write operation The DriveNVRAM commands should be sent to a Magellan axis rather than directly to an Atlas axis because in that case Magellan can do a better job of maintaining this drive status bit This command is always relayed to an attached Atlas amplifier Once put in NVRAM mode an Atlas amplifier will accept only a restricted set of commands and will not accept torque commands PMDresult PMDDriveNVRAM PMDAxisInterface axis intf PMDuintl6 option PMDuinti16 value Magellan Motion Processor Programmer s Command Reference GetActiveMotorCommand 3Ah Syntax Motor Types
63. 7 0 First data word write 0 bufferID 15 5 4 0 Second data word write index high order part 31 16 Third data word write index low order part 15 0 GetBufferReadIndex 0 C7h 15 8 7 0 First data word write 0 bufferlD 15 5 4 0 Second data word read index high order part 31 16 Third data word read index low order part 15 0 Description SetBufferReadIndex sets the address of the read index for the specified bufferlD GetBufferReadlndex returns the current read index for the specified buffer ID Restrictions If the read index is set to an address beyond the length of the buffer the command will not be executed and will return host I O error code 7 buffer bound exceeded C Motion API PMDresult PMDSetBufferReadIndex PMDAxisInterface axis intf PMDuint16 bufferID PMDuint32 index PMDresult PMDGetBufferReadIndex PMDAxisInterface axis intf PMDuint16 bufferID PMDuint32 index VB Motion API Dim index as Long MagellanObject BufferReadIndex bufferID index index MagellanObject BufferReadIndex bufferID see Set GetBufferLength p 93 Set GetBufferStart p 96 Set GetBufferWritelndex p 98 Magellan Motion Processor Programmer s Command Reference 95 SetBufferStart COh GetBufferStart Cth E an ce aes Syntax SetBufferStart bufferlD address GetBufferStart bufferlD Motor Types DC Brush Brushless DC
64. ANMode I2h 99 GetCaptureSource D9h SetCaptureSource D8h 100 GetCaptureValue 36h 33 GetChecksum F8h 34 GetCommandedAcceleration A7h 35 GetCommandedPosition IDh 36 GetCommandedVelocity Eh 37 GetCommutationMode E3h SetCommutationMode E2h 101 Magellan Motion Processor Programmer s Command Reference 201 e Instruction Summary Tables 202 Instruction Code Instruction Code Page GetCurrent 5Fh SetCurrent 5Eh 102 GetCurrentControlMode 44h SetCurrentControlMode 43h 104 GetCurrentFoldback 42h SetCurrentFoldback 4lh 106 GetCurrentLoop 74h SetCurrentLoop 73h 108 GetCurrentLoopValue 7h 38 GetDeceleration 92h SetDeceleration 91h 110 GetDefault 8Ah SetDefault 89h 111 GetDriveCommandMode 7Fh SetDriveCommandMode 7Eh 113 GetDriveFaultParameter 60h SetDriveFaultParameter 62h 114 GetDriveFaultStatus 6Dh 40 GetDrivePWM 24h SetDrivePWM 23h 116 GetDriveStatus OEh 42 GetEncoderModulus 8Eh SetEncoderModulus 8Dh TTY GetEncoderSource DBh SetEncoderSource DAh 118 GetEncoderToStepRatio DFh SetEncoderToStepRatio DEh 120 GetEventAction 49h SetEventAction 48h 121 GetEventStatus 3lh 43 GetFaultOutMask FCh SetFaultOutMask FBh 123 GetFeedbackParameter 22h SetFeedbackParameter 21h 125 GetFOC F7h SetFOC F6h 127 GetFOCValue 5Ah 45 GetGearMaster AFh SetGearMaster AEh 129 GetGearRatio 59h SetGearRatio 14h 131 GetlnstructionErro
65. Arguments Returned data Packet Structure Description Atlas Restrictions C Motion API VB Motion API see GetActiveMotorCommand axis DC Brush Brushless DC Microstepping Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units command signed 16 bits 2 5 to 215 4 100 25 96 output GetActiveMotorCommand 0 axis 3Ah 15 12 11 8 7 0 Data read command 15 GetActiveMotorCommand returns the value of the motor output command for the specified axis This is the input to the commutation or FOC current control Its source depends on the motor type as well as the operating mode of the axis For brushless DC and DC brush motors If position loop is enabled itis the output of the position servo filter If trajectory generator is enabled without the position loop it is the output of the trajectory generator If both trajectory generator and position loop are disabled it is the contents of the motor output command registet For microstepping motors It is the contents of the motor output command register subject to holding current reduction PMDresult PMDGetActiveMotorCommand PMDAxisInterface axis intf PMDint16 command Dim command as Short command MagellanAxis ActiveMotorCommand Set GetMotorCommand p 137 Set GetOperatingMode p 142 GetActiveOperatingMode p 28 Magellan Motion Processor Programmer s Command Referen
66. BreakpointValue 91 99h GetPositionError 51 D8h SetCaptureSource 100 AOh SetProfileMode 158 D9h GetCaptureSource 100 Alh GetProfileMode 158 DAh SetEncoderSource 118 A2h SetSignalSense 167 DBh GetEncoderSource 118 A3h GetSignalSense 167 DEh SetEncoderToStepRatio 120 A4h GetSignalStatus 53 DFh GetEncoderToStepRatio 120 A5h GetlnstructionError 47 EOh SetOutputMode 144 A6h GetActivityStatus 29 Elh GetlnterruptAxis 49 A7h GetCommandedAcceleration 35 E2h SetCommutationMode 101 A8h SetTrackingWindow 187 E3h GetCommutationMode 101 A9h GetTrackingWindow 187 E4h SetPhaselnitializeMode 149 AAh SetSettleTime 165 E5h GetPhaselnitializeMode 149 ABh GetSettleTime 165 E6h SetPhasePrescale 182 ACh Clearlnterrupt 24 E7h GetPhasePrescale 152 ADh GetActualVelocity 31 E8h SetPhaseCorrectionMode 147 AEh SetGearMaster 129 E9h GetPhaseCorrectionMode 147 AFh GetGearMaster 129 EAh GetPhaseCommand 50 BOh SetTraceMode 174 EBh SetMotionCompleteMode 135 Blh GetTraceMode 174 ECh GetMotionCompleteMode 135 B2h SetTraceStart 177 EFh ReadAnalog 66 B3h GetTraceStart 177 F2h SetSynchronizationMode 173 B4h SetTraceStop 180 F3h GetSynchronizationMode 173 B5h GetTraceStop 180 F5h AdjustActualPosition 22 B6h SetTraceVariable 183 F6h SetFOC 127 B7h GetTraceVariable 183 F7h GetFOC 127 B8h SetTracePeriod 176 F8h GetChecksum 34 B9h GetTracePeriod 176 F9h SetUpdateMask 188 BAh GetTraceStatus 58 FAh GetUpdateMask 188 BBh GetTraceCount 57 FBh SetFaultOutMask 123 BCh SetSettleWindow 166 FCh GetF
67. D_W32SERIAL_INTERFACE use this for a standard serial interface under Win9x NT 2000 XP define PMD PCI INTERFACE use this for a standard PCI parallel interface under Win9x NT 2000 XP By customizing the base interface functions C Motion can be ported to virtually any hardware platform An example would be a memory mapped IO scheme that uses the parallel interface This would be built using the PMDPar c h soutce files as a basis The Magellan Motion Processor Developer s Kit board and the Prodigy PCI Motion Card use the PCI interface chip provided by PLX Technology To fully understand the interface mechanism or to write your own interface software you can download the PLX SDK More information on the functionality and features can be found on the PLX web site http www plxtech com in the software development kits area Magellan Motion Processor Programmer s Command Reference C Motion rN C Motion is a set of functions that encapsulate the motion processor command set Every command has as its first parameter an axis handle The axis handle is a structure containing information about the interface to the motion processor and the axis number that the handle represents Before communicating to the motion processor the axis handle must be initialized using the following sequence of commands the axis handles PMDAxisHandle hAxis hAxis2 I open interface to PMD processor and initialize handle to axis one
68. Dim time as Long time MagellanObject Time Set GetSampleTime p 161 Magellan Motion Processor Programmer s Command Reference GetTraceCount BBh Syntax GetTraceCount Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments None Returned data Name Type Range Scaling Units count unsigned 32 bits 0 to 2 1 unity samples Packet GetTraceCount Structure 0 BBh 15 8 7 0 First data word read count high order part 31 16 Second data word read count low order part 15 0 Description GetTraceCount returns the number of points variable values stored in the trace buffer since the beginning of the trace Restrictions If the trace mode is set to rolling and the buffer wraps GetTraceCount returns the number of samples in the filled buffer C Motion API PMDresult PMDGetTraceCount PMDAxisInterface axis intf PMDuint32 count VB Motion API Dim count as Long count MagellanObject TraceCount see ReadBuffer p 67 Set GetTraceStart p 177 Set GetTraceStop p 180 Set GetBufferLength p 93 Magellan Motion Processor Programmer s Command Reference 57 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API see o GetTraceStatus BAh GetTraceStatus DC Brush Brushless DC Microstepping Pulse amp Direction None Name Type see below unsi
69. Disable Current Loop amp Higher Modules Disable Motor Output amp Higher Modules Abrupt Stop with Position Error Clear UNO o 40 0 trigger None Greater Or Equal Commanded Position Lesser Or Equal Commanded Position Greater Or Equal Actual Position Lesser Or Equal Actual Position Commanded Position Crossed Actual Position Crossed Time Event Status Activity Status Signal Status Drive Status WrFOANnNoanRWN O zx Packet SetBreakpoint Structure 0 axis D4h 15 12 11 8 7 0 First data word write 0 breakpointID 15 1 0 Second data word write trigger action sourceAxis 15 8 7 4 3 0 86 Magellan Motion Processor Programmer s Command Reference SetBreakpoint cont D4h GetBreakpoint D5h Packet GetBreakpoint Structure 0 axis D5h cont 15 12 11 8 7 0 First data word write 0 breakpointID 15 1 0 Second data word read trigger action sourceAxis 15 8 7 4 3 0 Description SetBreakpoint establishes a breakpoint for the specified axis to be triggered by a condition or event on sourceAxis which may be the same as or different from axis Up to two concurrent breakpoints can be set for each axis each of which may have its own breakpoint type and compatison value The breakpointlD field specifies which breakpoint the SetBreakpoint and GetBreakpoint commands will address The six position breakpoints and the Time breakpoint are threshold triggered the breakpo
70. Encoding variablelD unsigned 8 bit see below Value Type Range Scaling 32 bit see below GetTraceValue 0 28h 15 8 7 0 write 0 15 8 7 0 read Value high order part 15 0 read Value low order part 15 0 GetTraceValue returns a single sample of any trace variable without using the trace mechanism The vatiableID encoding is the same as for SetTraceVariable The use of this command does not change ot depend upon any of the trace parameters PMDresult PMDGetTraceValue PMDAxisInterface axis intf PMDuint8 variable PMDuint32 value MagellanAxis TraceValue in variable out value PMDSetTraceVariable p 183 Magellan Motion Processor Programmer s Command Reference 59 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions o GetVersion SFh GetVersion DC Brush Brushless DC Microstepping Pulse amp Direction None Name Type version unsigned 32 bits GetVersion 0 8Fh 15 8 7 0 First data word read product family motor type number of axes special chips 31 28 27 24 23 20 19 18 17 16 Second data word product major read customization code version version minor version 15 8 7 6 5 4 3 0 GetVersion returns product information encoded as shown in the preceding packet structure diagram Individual data fields are encoded as defined in the following table Name Descri
71. Miagellan Motion Processor Programmer s Command Reference gt PMD Performance Motion Devices Inc 80 Central Street Boxborough MA 01719 Revision 3 0 June 2014 NOTICE This document contains proprietary and confidential information of Performance Motion Devices Inc and is pro tected by federal copyright law The contents of this document may not be disclosed to third parties translated copied or duplicated in any form in whole or in part without the express written permission of PMD The information contained in this document is subject to change without notice No part of this document may be reproduced or transmitted in any form by any means electronic or mechanical for any purpose without the express written permission of PMD Copyright 1998 2014 by Performance Motion Devices Inc Atlas Magellan ION Magellan ION Pro Motion C Motion and VB Motion are trademarks of Performance Motion Devices Inc Magellan Motion Processor Programmer s Command Reference Warranty PMD warrants performance of its products to the specifications applicable at the time of sale in accordance with PMD s standard warranty Testing and other quality control techniques are utilized to the extent PMD deems necessary to support this warranty Specific testing of all parameters of each device is not necessarily performed except those mandated by government requirements Performance Motion Devices Inc PMD reserves the
72. PI VB Motion API see Name Bit s Description In motion 10 Set to when the trajectory generator is executing a profile In Positive Limit Set to when the positive limit switch is active In Negative Limit 12 Set to when the negative limit switch is active Profile Segment 13 15 When the profile mode is S curve it contains the profile segment number l 7 while profile is in motion and contains a value of 0 when the profile is at rest This field is undefined when using the Trapezoidal and Velocity Contouring profile modes PMDresult PMDGetActivityStatus PMDAxisInterface axis intf PMDuinti16 status Dim status as Short status MagellanAxis ActivityStatus GetEventStatus p 43 GetSignalStatus p 53 GetDriveStatus p 42 Magellan Motion Processor Programmer s Command Reference GetActualVelocity ADh Syntax GetActualVelocity axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Returned Data Type Range Scaling Units actual velocity signed 32 bits 2 to 271 1 1 2 counts cycle Packet GetActualVelocity Structure 0 axis ADh 15 12 41 8 7 0 First data word read actual velocity high order part 31 16 Second data word read actual velocity low order part 15 0 Description GetActualVelocity reads the value of the actual velocity for the spec
73. PMDGetPhaseInitializeTime PMDAxisInterface axis intf PMDuint16 time VB Motion API Dim time as Short MagellanAxis PhaseInitializeTime time time MagellanAxis PhaseInitializeTime see InitializePhase p 62 Set GetPhaselnitializeMode p 149 150 Magellan Motion Processor Programmer s Command Reference SetPhaseOffset 76h GetPhaseOffset 7Bh Syntax SetPhaseOffset axis offset GetPhaseOffset axis Motor Types Brushless DC Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units offset unsigned 16 bits 0 to2 1 unity counts Packet SetPhaseOffset Structure 0 axis 76h 15 12 11 8 7 0 Data write offset 15 0 GetPhaseOffset 0 axis 7Bh 15 12 11 8 7 0 Data read offset 15 0 Description SetPhaseOffset sets the offset from the index mark of the specified axis to the internal zero phase angle This command will have no immediate effect on the commutation angle but will have an effect once the index pulse is encountered The settable range of phase offset is 0 to 32 767 GetPhaseOffset returns the value of the phase offset To convert counts to a phase angle in degrees divide by the number of encoder counts per electrical cycle and multiply by 360 For example if a value of 500 is specified using SetPhaseOffset and the counts per electrical cycle value has been set to 2 000 SetPhaseCounts command this corresponds
74. PMDGetTraceVariable PMDAxisInterface axis intf PMDuint16 variableNumber PMDAxis traceAxis PMDuint8 variableID Magellan Motion Processor Programmer s Command Reference 185 SetTraceVariable cont B6h GetTraceVariable B7h uu o VB Motion API MagellanObject TraceVariableSet in variableNumber in traceAxis in variableID variableNumber MagellanObject TraceVariableGet in out traceAxis out variableID see SetTracePeriod p 176 SetTraceStart p 177 SetTraceStop p 180 186 Magellan Motion Processor Programmer s Command Reference SetTrackingWindow A8h GetTrackingWindow A9h Syntax SetTrackingWindow axis window GetTrackingWindow axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units window unsigned 16 bits Oto2 6 1 unity counts Packet SetTrackingWindow Structure 0 axis A8h 15 12 11 8 7 0 Data write window 15 0 GetTrackingWindow 0 axis A9h 15 12 11 8 7 0 Data read window 15 0 Description SetTrackingWindow sets boundaries for the position error of the specified axis If the absolute value of the position error exceeds the tracking window the tracking indicator bit 2 of the Activity Status register is set to 0 When the position error returns to within the window the tracking
75. PMDpar h PMDpar c Parallel interface functions PMDW32ser h PMDW 32ser c Windows serial communication interface functions PMDutil h PMDutil c General utility functions PMDtrans h PMDtrans c Generic transport interface functions PMDecode h Defines the PMD Magellan and C Motion error codes PMDocode h Defines the control codes for Magellan commands PMDtypes h Defines the basic types required by C Motion PMDCAN h PMDCAN c CAN interface command data transfer functions PMDIXXATCAN h CAN interface for IXXAT VCI Virtual Can Interface API PMDIXXATCAN c CAN interface for IXXAT VCI Virtual Can Interface API v2 x PMDIXXATCAN3 c CAN interface for IXXAT VCI Virtual Can Interface API v3 x Vci2 h XatXXReg h Xatdynl h IXXAT VCI v2 x include files IXXAT h IXXAT VCI v3 x include files PLX h PLX Technology PCI include files PMDcommon c Miscellaneous procedures PMDdevice h PMDconio c Console I O redirector PMDdiag h PMDdiag c Diagnostic functions PMDpar h PMDpar c Parallel I O via Windows driver 2 4 Using C Mlotion C Motion can be linked to your application code by including the above C source files in your application Then for any application source file that requires access to the motion processor include C Motion h In addition the re quired interfaces need to be defined as shown below Only the required interfaces need to be included define PM
76. PhaseCorrectionMode axis mode GetPhaseCorrectionMode axis Motor Types Brushless DC Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mode Disable 0 Enable 1 Packet SetPhaseCorrectionMode Structure 0 axis E8h 15 12 11 8 7 0 Data write 0 mode 15 1 0 GetPhaseCorrectionMode 0 axis E9h 15 12 11 8 7 0 Data read 0 mode 15 1 0 Description SetPhaseCorrectionMode sets the phase correction mode for the specified axis to either 0 disabled ot 1 enabled When phase correction is enabled the encoder Index signal is used to update the commutation phase angle once per motor revolution This ensures that the commutation angle will remain correct even if some encoder counts are lost due to electrical noise or due to the number of encoder counts per electrical phase not being an integer GetPhaseCorrectionMode returns the phase correction mode Restrictions C Motion API PMDresult PMDSetPhaseCorrectionMode PMDAxisInterface axis intf PMDuint16 mode PMDresult PMDGetPhaseCorrectionMode PMDAxisInterface axis intf PMDuint16 mode VB Motion API Dim mode as Short MagellanAxis PhaseCorrectionMode mode mode MagellanAxis PhaseCorrectionMode see GetPhaseCommand p 50 InitializePhase p 62 Set GetPhaseCounts p 148 Magellan Motion Processor Programmer s Command Reference 147 SetPhaseCounts 75h GetPhaseCounts 7Dh DD Ee Synta
77. agellanAxis MotionCompleteMode see Set GetSettleTime p 165 Set GetSettleWindow p 166 Magellan Motion Processor Programmer s Command Reference 135 SetMotorBias OFh GetMotorBias 2Dh MH Syntax SetMotorBias axis bias GetMotorBias axis Motor Types DC Brush Brushless DC Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units bias signed 16 bits 215 fo 2 1 100 25 output Packet SetMotorBias Structure 0 axis OFh 15 12 11 8 7 0 Data write bias 15 0 GetMotorBias 0 axis 2Dh 15 12 11 8 7 0 Data read bias 15 0 Description SetMotorBias sets the output bias of the digital servo filter for the specified axis GetMotorBias reads the value of the bias of the digital servo filter Scaling example If it is desired that a motor bias value of 2 5 of full scale be placed on the servo filter output then this register should be loaded with a value of 2 5 32 768 100 819 decimal This corresponds to a loaded hexadecimal value of 0FCCDh Restrictions C Motion API PMDresult PMDSetMotorBias PMDAxisInterface axis intf PMDintl6 bias PMDresult PMDGetMotorBias PMDAxisInterface axis intf PMDintl6 bias VB Motion API Dim bias as Short MagellanAxis MotorBias bias bias MagellanAxis MotorBias see Set GetMotorCommand p 137 Set GetMotorLimit p 139 136 Magellan Motion P
78. agellanObject Dim boardObj As PMDMPLib MagellanBoard Dim axisObj As PMDMPLib MagellanAxis Before communicating to the motion processor the communication object must be initialized using the following se quence of commands Set commSerial New PMDUserLib CommunicationSerial commSerial BaudRate 57600 Connect to COMI commSerial HostCOM The above is an example of initializing communication using the serial communication interface Once the communi cation object has been initialized create a Magellan object and a reference to one or more of the axes Create an instance of the Magellan object Set magellanObj New MagellanObject Attach the serial driver magellanObj SetupCommunication commSerial Connect the events interface magellanObj EventListenerRegister Me Get axis Set axis magellanObj Axes PMD_AXIS_ 1 Once the Magellan objects have been initialized any of the motion processor commands can be executed PMDM PLib contains all motion processor methods and properties The property names are the same as listed in this manual but without the Get or Set prefix The method names are the same as listed in this manual but with the Get or Set prefix moved to a suffix i e GetBreakpoint gt BreakpointGet When a property is accessed the associated Get or Set command is sent to the processor to retrieve or send the data Each property or method will throw an exception if an erro
79. all features to be exercised Other Documents ION Digital Drive User s Manual How to install and configure ION Digital Drives Prodigy PCI Motion Card User s Guide How to install and configure the Prodigy PCI motion board Prodigy PC 104 Motion Card User s Guide How to install and configure the Prodigy PC 104 motion board Prodigy CME Standalone User s Guide How to install and configure the Prodigy CME standalone motion board Prodigy CME Machine Controller User s Guide How to install and configure the Prodigy CME machine controller motion board iv Magellan Motion Processor Programmer s Command Reference LLL 4A Table of Contents 1 The Magellan Family 25 45 51 ern 0 05005 EIE E EAS SyT epe os 7 1 1 Family Summary ssesesessleeee eene hee 7 12 Magellan Motion Processor Products eee eee en cece ene en ees 8 2 C Motion esi 5 6 5 5 5206 die aie rry e ntina REPRE EC odie Since E hie dieses 11 2 1 fiere oli CTO sister vat sant van atg E E eae ant ed ena N 11 2 2 File easdem Ur ER EE EN PF AMOR E biden Pte Ag id ec bedtanonse anand 11 23 Using C MOTON iiir coiere her rk me Raga hehe RE FEE Ye EE REP neues 12 24 Prodigy Motion Card Specific Commands ce cece ee eeeeeees 14 3 VB Motion siess sseoi ih LE reset n en Rune RP EROR Re i 0 17 3 1 InttodUction en i dte per eee de pur dee eee d tunt UR ed 17 3 2 Files dacEeecibeecerbeenibse emit pE tete ri nitet REPE DAN e diea
80. ammer s Command Reference SetEncoderModulus 8Dh GetEncoderModulus 8Eh Syntax SetEncoderModulus axis modulus GetEncoderModulus axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units modulus unsigned 16 bits Oto27 1 unity counts Packet SetEncoderModulus Structure 0 axis 8Dh 15 12 11 8 7 0 Data write modulus 15 0 GetEncoderModulus 0 axis 8bh 15 12 11 8 7 0 Data read modulus 15 0 Description SetEncoderModulus sets the parallel word range for the specified axis when parallel word feedback is used The modulus determines the range of the connected device For multi turn systems this value is used to determine when a position wrap condition has occurred The value provided should be one half of the actual range of the axis For example if the parallel word input is used with a linear potentiometer connected to an external A D Analog to Digital converter which has 12 bits of resolution then the total range is 4 096 and a value of 2 048 should be loaded with this command GetEncoderModulus returns the encoder modulus Restrictions A value for encoder modulus is only required when the encoder source is set to parallel C Motion API PMDresult PMDSetEncoderModulus PMDAxisInterface axis intf PMDuinti16 modulus PMDresult PMDGetEncoderModul
81. amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 breakpointID Breakpoint1 0 Breakpoint2 1 Type Scaling mask unsigned 16 bit bitmask Packet SetBreakpointUpdateMask Structure 0 axis 32n 15 12 11 8 7 0 First data word write 0 breakpointID 15 1 0 Second data word write mask 15 0 GetBreakpointUpdateMask 0 axis 33h 15 12 11 8 7 0 First data word write 0 breakpointID 15 1 0 Second data word read mask 15 0 Description SetBreakpointUpdateMask configures what loops are updated upon the update action of a breakpoint If the bitmask for a given loop is set in the mask the operating parameters for that loop will be updated from the buffered values when the breakpoint is hit and update is the breakpoint action Each breakpoint has its own update mask The bitmask encoding is given below Name Bit s Description Trajectory 0 Set to to update trajectory from buffered parameters Position Loop Set to to update position loop from buffered parameters 2 Reserved Current Loop 3 Set to to update current loop from buffered parameters 4 15 Reserved For example if the update mask for breakpoint 1 is set to hexadecimal 0001h and the action for breakpoint 1 is set to update the trajectory for the given axis will be updated from its buffered parameters when breakpoint 1 is hit Magellan Motion Processor Programmer s Command Reference 89 SetBreakpointUpdateM
82. arguments the parameter value the type signed or unsigned integer and the range of acceptable values are given Numeric arguments may require one or two data words For 32 bit arguments the high order part is transmitted first Packet Structure This is a graphic representation of the 6 bit words transmitted in the packet the instruction which is identified by its name followed by 2 or 3 data words Bit numbers are shown directly below each word For each field in a word only the high and low bits are shown For 32 bit numeric data the high order bits are numbered from 16 to 31 the low order bits from 0 to 15 The hex code of the instruction is shown in boldface Argument names are shown in their respective words or fields For data words the direction of transfer read or write is shown at the left of the word s diagram Unused bits are shaded All unused bits must be 0 in data words and instructions sent written to the motion processor In the case of a Magellan controlling an Atlas amplifier an axis field with bit 5 set is used to indicate that a command should be passed directly to the Atlas connected to the axis indicated by the lower 4 axis bits and the result returned Description Describes what the instruction does and any special information relating to the instruction Atlas Describes any communication to an associated Atlas amplifier as a result of the instruction Atlas operation is quite transpa
83. ask cont 32h GetBreakpointUpdateMask 33h Oy a Description The Current Loop bit applies regardless of the active current control mode When it is set a cont breakpoint action of update will update either the active FOC parameters or the active digital current loop parameters depending on which Current Control mode is active GetBreakpointUpdateMask gets the update mask for the indicated breakpoint Restrictions The Current Loop bit is only valid for products that include a current loop C Motion API PMDresult PMDSetBreakpointUpdateMask PMDAxisInterface axis intf PMDuintl16 breakPointID PMDuinti16 mask PMDresult PMDGetBreakpointUpdateMask PMDAxisInterface axis intf PMDuinti16 breakPointID PMDuint16 mask VB Motion API Dim mask as Short MagellanAxis BreakpointUpdateMask breakpointID mask mask MagellanAxis BreakpointUpdateMask breakpointID see Set GetBreakpoint p 86 Set GetUpdateMask p 188 90 Magellan Motion Processor Programmer s Command Reference SetBreakpointValue D6h GetBreakpointValue D7h Syntax SetBreakpointValue axis breakpointlD value GetBreakpointValue axis breakpointlD Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 breakpointID Breakpoint1 0 Breakpoint2 1 value see below Packet SetBreakpointValue Structure 0 axis D6h 15 12 11 8 7 0 First
84. ata word write position high order part 31 16 Second data word write position low order part 15 0 GetActualPosition 0 axis 37h 15 12 11 8 7 0 First data word read position high order part 31 16 Second data word read position low order part 15 0 Description SetActualPosition loads the position register encoder position for the specified axis At the same time the commanded position is replaced by the loaded value minus the position error This prevents a servo bump when the new axis position is established The destination position see SetPosition p 153 is also modified by this amount so that no trajectory motion will occur when the Update instruction is issued In effect this instruction establishes a new reference position from which subsequent positions can be calculated It is commonly used to set a known reference position after a homing procedure Note For axes configured as pulse amp direction or microstepping motor types actual position units determines if the position is specified and returned in units of counts or steps Additionally for these motor types the position error is zeroed when the SetActualPosition command is sent SetActualPosition takes effect immediately it is not buffered GetActualPosition reads the contents of the encoder s actual position register This value will be accurate to within one cycle as determined by Set GetSampleTime
85. ation buffered 90h GetAcceleration ACh Syntax SetAcceleration axis acceleration GetAcceleration axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units acceleration unsigned 32 bits Oto2 1 1 218 counts cycle microsteps cycle Packet SetAcceleration Structure 0 axis 90h 15 12 11 8 7 0 First data word write acceleration high order part 31 16 Second data word write acceleration low order part 15 0 GetAcceleration 0 axis 4Ch 15 12 11 8 7 0 First data word read acceleration high order part 31 16 Second data word read acceleration low order part 15 0 Description SetAcceleration loads the maximum acceleration buffer register for the specified axis This command is used with the Trapezoidal Velocity Contouring and S curve profiling modes GetAcceleration reads the maximum acceleration buffer register Scaling example To load a value of 1 750 counts cycle multiply by 65 536 given 114 688 and load the resultant number as a 32 bit number giving 0001 in the high word and C000h in the low word Values returned by GetAcceleration must correspondingly be divided by 65 536 to convert to units of counts cycle ot steps cycle Magellan Motion Processor Programmer s Command Reference 77 SetAc
86. ationSerial SerialPortModeSet in baud in parity in stopBits in protocol in multidropID See 164 Magellan Motion Processor Programmer s Command Reference SetSettleTime AAh GetSettleTime ABh Syntax SetSettleTime axis time GetSettleTime axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units time unsigned 16 bits 0 to2 1 unity cycles Packet SetSettleTime Structure 0 axis AAh 15 12 11 8 7 0 Data write time 15 0 GetSettleTime 0 axis ABh 15 12 11 8 7 0 Data read time 15 0 Description SetSettleTime sets the time in number of cycles that the specified axis must remain within the settle window before the Axis Settled indicator in the Activity Status register is set GetSettleTime returns the value of the settle time for the specified axis Restrictions C Motion API PMDresult PMDSetSettleTime PMDAxisInterface axis intf PMDuint16 time PMDresult PMDGetSettleTime PMDAxisInterface axis intf PMDuint16 time VB Motion API Dim time as Short MagellanAxis SettleTime time time MagellanAxis SettleTime see Set GetMotionCompleteMode p 135 Set GetSettleWindow p 166 GetActivityStatus p 29 Magellan Motion Processor Programmer s Command Reference 165 SetSettleWindow BCh GetSettleWindow BDh ee Syn
87. atus 43 73h SetCurrentLoop 108 32h SetBreakpointUpdateMask 89 74h GetCurrentLoop 108 33h GetBreakpointUpdateMask 89 75h SetPhaseCounts 148 34h ResetEventStatus 74 76h SetPhaseOffset 151 36h GetCaptureValue 33 77h SetMotorCommand 137 37h GetActualPosition 79 7Ah InitializePhase 62 39h Reset 69 7Bh GetPhaseOffset 151 3Ah GetActiveMotorCommand 27 7Ch GetPhaselnitializeTime 150 3Bh SetSampleTime 161 7Dh GetPhaseCounts 148 3Ch GetSampleTime 161 7Eh SetDriveCommandMode 113 3Eh GetTime 56 7Fh GetDriveCommandMode 113 40h GetBusVoltage 32 82h WritelO 194 4lh SetCurrentFoldback 106 83h ReadlO 68 42h GetCurrentFoldback 106 84h SetPhaseAngle 146 204 Magellan Motion Processor Programmer s Command Reference Instruction Summary Tables 2 Code Instruction Page Code Instruction Page 43h SetCurrentControlMode 104 89h SetDefault 111 8Ah GetDefault 111 C7h GetBufferReadIndex 95 8Bh SetSerialPortMode 163 C8h WriteBuffer 193 8Ch GetSerialPortMode 163 C9h ReadBuffer 67 8Dh SetEncoderModulus 117 CEh GetStepRange 171 8Eh GetEncoderModulus 117 CFh SetStepRange 171 8Fh GetVersion 60 DOh SetStopMode 172 90h SetAcceleration 77 Dih GetStopMode 172 91h SetDeceleration 110 D4h SetBreakpoint 86 92h GetDeceleration 110 D5h GetBreakpoint 86 97h SetPositionErrorLimit 154 D6h SetBreakpointValue 21 98h GetPositionErrorLimit 154 D7h Get
88. atus register for axis 2 goes to 0 then the trace stop is loaded as follows A 1 is loaded for axis number a 3 is loaded for condition a 7 is loaded for bit number and a 0 is loaded for state The actual data word sent to the motor processor in this case is 0731h Atlas No additional Atlas communication is performed for these commands but Atlas trace parameters may have to be set by addressing an Atlas amplifier directly Magellan trace stop is signaled to Atlas by using the trace bit in each Atlas torque command See Azas Digital Amplifier Complete Technical Reference for more detail Restrictions C Motion API Not all trace stop conditions are available in all products See the product user s guide PMDresult PMDSetTraceStop PMDAxisInterface axis intf PMDAxis traceAxis PMDuint8 condition PMDuint8 triggerBit PMDuint8 triggerState PMDresult PMDGetTraceStop PMDAxisInterface axis intf PMDAxis traceAxis PMDuint8 condition PMDuint8 triggerBit PMDuint8 triggerState Magellan Motion Processor Programmer s Command Reference 181 SetTraceStop cont B4h GetTraceStop B5h 4 T VB Motion API MagellanObject TraceStopSet in triggerAxis in condition in triggerBit in triggerState MagellanObject TraceStopGet out triggerAxis out condition out triggerBit out triggerState see GetTraceCount p 57 Set GetTraceStart p 177 GetTraceStatus p 58 182 Magellan M
89. atus values Activity Status 2wordmask boolean status values Signal Status 2 word mask boolean status values Drive Status 2 word mask boolean status values For level triggered breakpoints the high order part of value is the selection mask and the low order word is the sense mask For each selection bit that is set to 1 the corresponding bit of the specified status register is conditioned to cause a breakpoint when it changes state The sense mask bit determines which state causes the break If it is 1 the corresponding status register bit will cause a break when it is set to 1 If it is 0 the status register bit will cause a break when it is set to 0 For example assume it is desired that the breakpoint type will be set to Event Status and that a breakpoint should be recognized whenever the motion complete bit bit 0 of Event Status register is set to 1 or the commutation error bit bit 11 of Event Status register is set to 0 In this situation the high and low words for value would be high word 0801h and low word 0001h GetBreakpointValue returns the breakpoint value for the specified breakpointID Two completely separate breakpoints are supported each of which may have its own breakpoint type and comparison value The breakpointlD field specifies which breakpoint the SetBreakpointValue and GetBreakpointValue commands will address Restrictions Always load the breakpoint comparison value SetBreakpointValue command before
90. aultOutMask 123 BDh GetSettleWindow 166 BEh SetActualPositionUnits 81 BFh GetActualPositionUnits 81 COh SetBufferStart 96 Clh GetBufferStart 96 C2h SetBufferLength 93 C3h GetBufferLength 93 C4h SetBufferWritelndex 98 C5h GetBufferWritelndex 98 Magellan Motion Processor Programmer s Command Reference 205 e Instruction Summary Tables Code Instruction Page Code Instruction Page C6h SetBufferReadlndex 95 C7h GetBufferReadlndex 95 5 5 Magellan Compatibility Below are commands from Magellan v1 x that have been replaced superseded by new commands in Magellan v2 x Old Command Old Code Nevv Command Set GetBiquadCoefficient 04h 05h Set GetPositionLoop GetDerivative 9Bh GetPositionLoopValue Set GetDerivativeTime 9Ch 9Dh Set GetPositionLoop GetHostlOError A5h GetlnstructionError name change only Getlntegral 9Ah GetPositionLoopValue Set GetIntegrationLimit 95h 96h Set GetPositionLoop Set GetKaff 93h 94h Set GetPositionLoop Set GetKd 27h 52h Set GetPositionLoop Set GetKi 26h 5 h Set GetPositionLoop Set GetKout 9Eh 9Fh Set GetPositionLoop Set GetKp 25h 50h Set GetPositionLoop Set GetKvff 2Bh 54h Set GetPositionLoop Set GetAutoStopMode D2h D3h Set GetEventAction Set GetMotorMode DCh DDh Set GetOperatingMode RestoreOperatingMode Set GetAxisOutSource EDh EEh Set GetAxisOutMask Set GetAxisMode 87h 88h Set GetOperatingMode Set GetLimitSwitchMode 80h 8 1h Set GetEventAc
91. bufferID address address MagellanObject BufferStart bufferID see Set GetBufferLength p 93 Set GetBufferReadlndex p 95 Set GetBufferWritelndex p 98 Magellan Motion Processor Programmer s Command Reference 97 SetBufferWritelndex C4h GetBufferWritelndex C5h E o Syntax SetBufferWritelndex bufferlD index GetBufferWritelndex bufferlD Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Range Scaling Units bufferlD unsigned 16 bits 0 to 31 unity index unsigned 32 bits 0 to buffer unity double words length 1 Packet SetBufferWritelndex Structure 0 C4h 15 8 7 0 First data word write 0 bufferlD 15 4 3 0 Second data word write index high order part 31 16 Third data word write index low order part 15 0 GetBufferWritelndex 0 C5h 15 8 7 0 First data word write 0 bufferlD 15 4 3 0 Second data word read index high order part 31 16 Third data word read index low order part 15 0 Description SetBufferWritelndex sets the write index for the specified bufferlD GetBufferWritelndex returns the write index for the specified bufferlD Restrictions C Motion API PMDresult PMDSetBufferWriteIndex PMDAxisInterface axis intf PMDuint16 bufferID PMDuint32 index PMDresult PMDGetBufferWriteIndex PMDAxisInterface axis intf PMDuintl16 bufferID PMDuint32 index
92. case axis would be 0 Axis I sourceAxis would be 1 Axis2 sourceRegister would be 1 Event Status selectionMask would be 0801h commutation error and motion complete and senseMask would be 0001h GetAxisOutMask returns the mapping of the AxisOut pin of axis Depending on the product features some bits may not be supported See the product user s guide PMDresult PMDSetAxisOutMask PMDresult PMDGetAxisOutMask MagellanAxis AxisOutMaskSet MagellanAxis AxisOutMaskGet PMDAxisInterface axis intf PMDAxis sourceAxis PMDuint8 sourceRegister PMDuintl6 selectionMask PMDuintl6 senseMask PMDAxisInterface axis intf PMDAxis sourceAxis PMDuint8 sourceRegister PMDuintl6 selectionMask PMDuintl6 senseMask in sourceAxis in sourceRegister in selectionMask in senseMask out sourceAxis out sourceRegister out selectionMask out senseMask 85 SetBreakpoint D4h GetBreakpoint D5h lc MM i Syntax SetBreakpoint axis breakpointlD sourceAxis action trigger GetBreakpoint axis breakpointID Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 breakpointlD Breakpoint1 Breakpoint2 O sourceAxis Axis1 Axis2 Axis3 Axis4 wWwNnN oO action None Update Abrupt Stop Smooth Stop Reserved 4 Disable Position Loop amp Higher Modules
93. ce 27 o GetActiveOperatingMode 57h Syntax GetActiveOperatingMode axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Returned Data Type mode unsigned 16 bits bit field Packet GetActiveOperatingMode Structure 0 axis 57h 15 12 11 8 7 0 First data word read mode 15 0 Description GetActiveOperatingMode gets the actual operating mode that the axis is currently in This may or may not be the same as the static operating mode as safety responses or programmable conditions may change the Active Operating Mode When this occurs the Active Operating Mode can be changed to the programmed static operating mode using the RestoreOperatingMode command The bit definitions of the operating mode are given below Name Bit Description Axis Enabled 0 0 No axis processing axis outputs in Reset state axis active Motor Output Enabled l 0 axis motor outputs disabled axis motor outputs enabled Current Control Enabled 2 0 axis current control bypassed axis current control active 3 Reserved Position Loop Enabled 4 0 axis position loop bypassed axis position loop active Trajectory Enabled 5 0 trajectory generator disabled trajectory generator enabled 6 15 Reserved When the axis is disabled no processing will be done on the axis and the axis outputs will be at their reset sta
94. ce PMDresult PMDGetEncoderSource PMDAxisInterface axis intf PMDuintl6 source VB Motion API Dim source as Short MagellanAxis EncoderSource source source MagellanAxis EncoderSource see Set GetEncoderModulus p 117 Magellan Motion Processor Programmer s Command Reference 119 SetEncoderToStepRatio DEh GetEncoderToStepRatio DFh Oy a Syntax SetEncoderToStepRatio axis counts steps GetEncoderToStepRatio axis Motor Types Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units counts unsigned 16 bits 1 to 2 1 unity counts steps unsigned 16 bits 1 to 21 unity microsteps Packet SetEncoderToStepRatio Structure 0 axis DEh 15 12 11 8 7 0 First data word write counts Second data word write steps 15 0 GetEncoderToStepRatio 0 axis DFh 15 12 11 8 7 0 First data word read counts Second data word read steps 15 0 Description SetEncoderToStepRatio sets the ratio of the number of encoder counts to the number of output steps per motor rotation used by the motion processor to convert encoder counts into steps Counts is the number of encoder counts per full rotation of the motor Steps is the number of steps output by the motion processor per full rotation of the motor Since this command sets a ratio the parameters do not have to be for a full rotation as long as they corr
95. celeration cont buffered 90h GetAcceleration ACh uu Restrictions SetAcceleration may not be issued while an axis is in motion with the S curve profile SetAcceleration is not valid in Electronic Gear profile mode SetAcceleration is a buffered command The value set using this command will not take effect until the next Update or MultiUpdate command with the Trajectory Update bit set in the update mask C Motion API PMDresult PMDSetAcceleration PMDAxisInterface axis intf PMDuint32 acceleration PMDresult PMDGetAcceleration PMDAxisInterface axis intf PMDuint32 acceleration VB Motion API Dim acceleration as Long MagellanAxis Acceleration acceleration acceleration MagellanAxis Acceleration see Set GetDeceleration p 110 Set GetJerk p 134 Set GetPosition p 153 Set GetVelocity p 190 MultiUpdate p 63 Update p 192 78 Magellan Motion Processor Programmer s Command Reference SetActualPosition 4Dh GetActualPosition 37h Syntax SetActualPosition axis position GetActualPosition axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units position signed 32 bits 2 to 29154 unity counts microsteps Packet SetActualPosition Structure 0 axis 4Dh 15 12 11 8 7 0 First d
96. cycles PID Proportional Gain Kp 0 to 25 1 unity gain PID Integrator Gain Ki 0 to 25 1 1 256 gain cycles PID Derivative Gain Kd 0 to 25 1 unity gain cycles PID Integrator Limit Ilimit 0 to 27 I unity count cycles PID Derivative Time I to 25 unity cycles PID Output Gain Kout 0 to 2 5 1 100 2 output Biquadl Enable Filter Oto l O disable zenable Biquadl CoefficientBO 2 5 to 25 unity Biquadl CoefficientB I 2 to 25 unity Biquad CoefficientB2 2 to 2 5 unity Biquadl CoefficientA I 2 to 2 5 unity Biquadl CoefficientA2 2 to 2 unity Biquadl CoefficientK 0 to 25 1 unity Biquad2 Enable Filter Oto l O disable enable Biquad2 CoefficientBO 2 5 to 25 unity Biquad2 CoefficientB I 2 5 to 2 5 unity Biquad2 CoefficientB2 2 to 25 unity Biquad2 CoefficientA I 2 to 2 5 unity Biquad2 CoefficientA2 2 5 to 2 5 unity Biquad2 CoefficientK 0 to 25 1 unity 156 Magellan Motion Processor Programmer s Command Reference SetPositionLoop cont buffered 67h GetPositionLoop 68h Many of these parameters are self descriptive However below are some additional comments on the use of specific parameters PID Derivative Time has units of cycles This is the sample time of the axis as configured by SetSampleTime For example if set to 10 the derivative term will be computed every 10 cycles of the axis position loop PID Integrator Limit has units of count cycles and scaling of unity This
97. d is a buffered command The value set using this command will not take effect until the next Update or MultiUpdate command with the Position Loop Update bit set in the update mask C Motion API PMDresult PMDSetMotorCommand PMDAxisInterface axis intf PMDint16 command PMDresult PMDGetMotorCommand PMDAxisInterface axis intf PMDint16 command Magellan Motion Processor Programmer s Command Reference 137 SetMotorCommand cont buffered 11h GetMotorCommand 69h My VB Motion API Dim command as Short MagellanAxis MotorCommand command command MagellanAxis MotorCommand see SetCurrent p 102 Set GetMotorBias p 136 Set GetMotorLimit p 139 Set GetOperatingMode p 142 MultiUpdate p 63 Update p 192 138 Magellan Motion Processor Programmer s Command Reference SetMotorLimit 06h GetMotorLimit 07h Syntax SetMotorLimit axis limit GetMotorLimit axis Motor Types DC Brush Brushless DC Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units limit unsigned 16 bits 0102 1 100 2 output Packet SetMotorLimit Structure 0 axis 06h 15 12 11 8 7 0 Data write limit 15 0 GetMotorLimit 0 axis 07h 15 12 11 8 7 0 Data read limit 15 0 Description SetMotorLimit sets the maximum value for the motor output command allowed by the digital servo filter of the specified axis Motor command values beyond this
98. d when in the holding state This limit is applied as an additional limit to the motor limit so the lower of the two will affect the true limit The Holding Delay is in units of trajectory generator cycles with unity scaling and a range of 0 to 2 2 It defines the wait time between ending a move and switching to the holding current limit That is there will be a delay of Holding Delay trajectory cycles after Motion Complete after which the In Holding bit in the Drive Status register will be set and the motor command will be limited by the Holding Motor Limit When the Holding Delay is set to 2 1 its default the axis will never go into holding current 102 Magellan Motion Processor Programmer s Command Reference SetCurrent cont bEh GetCurrent bFh Description The Drive Current is in units of maximum current with a scaling of 100 255 Its range is 0 to cont 2 5 1 It defines the value used for the active motor command when driving a step motor that is when not in a holding state This setting is used by Atlas amplifiers driving step motors It is not used by ION amplifiers which use SetMotorCommand instead GetCurrent gets the indicated holding current parameter These commands were documented as SetCurrent and GetCurrent in previous versions of this manual The name has been changed for clarity but the command remains backwards compatible Atlas When setting Holding Current or Drive Current this command will b
99. data word write 0 breakpointID 15 1 0 Second data word write value high order part 31 16 Third data word write value low order part 15 0 GetBreakpointValue 0 axis D7h 15 12 11 8 7 0 First data word write 0 breakpointlD 15 1 0 Second data word read value high order part 31 16 Third data word read value low order part 15 0 Description SetBreakpointValue sets the breakpoint comparison value for the specified axis For the position and time breakpoints this is a threshold comparison value Magellan Motion Processor Programmer s Command Reference 91 SetBreakpointValue cont D6h GetBreakpointValue D7h oy a B B Description The value parameter is interpreted according to the trigger condition for the selected breakpoint cont see SetBreakpoint p 86 The data format for each trigger condition is as follows Breakpoint Trigger Value Type Range Units Greater Or Equal Commanded Position signed 32 bit 2 to 23 counts Lesser Or Equal Commanded Position signed 32 bit 2 to 23 counts Greater Or Equal Actual Position signed 32 bit 23 to 23 counts Lesser Or Equal Actual Position signed 32 bit 23 to 23 counts Commanded Position Crossed signed 32 bit 23 to 23 _ counts Actual Position Crossed signed 32 bit 23 to 23 counts Time unsigned 32 bit 0 to 222 cycles Event Status 2 word mask boolean st
100. dle read_value This function reads the value of the signals DigitalOut0 7 and returns them in the low order 8 bits of read value PMDMBSetAmplifierEnable axis handle mask write value This function writes to the 4 amplifier enable signals AmpEnablel 4 using mask and write value When a appears in mask the corresponding bit position in write value is written to the corresponding signal The val ues for mask and write value are all 0 shifted that is they are stored in the lowest order 4 bits PMDMBGetAmplifierEnable axis handle read value This function reads the values of AmpEnable l 4 and returns them in the low order 4 bits of read value PMDMBSetDACOutputEnable axis handle write_value This function sets the DACOutputEnable status A written value of enables DAC output while a written value of 0 disables DAC output PMDMBGetDACOutputEnable axis_handle read_value This function reads the value of the DACOutputEnable function A value of indicates DAC output enabled a value of 0 indicates DAC output disabled PMDMBSetWatchDog axis handle This function writes to the correct value to the watchdog register so that for the next 104 milliseconds the card will not be reset by the watchdog circuitry Magellan Motion Processor Programmer s Command Reference C Motion rN C Mlotion function Arguments Function description PMDMBGetResetCause axis_handle This functio
101. e Scaling Units position signed 32 bits 23 to 231 1 unity counts microsteps Packet AdjustActualPosition Structure 0 axis F5h 15 12 11 8 7 0 First data word write position high order part 31 16 Second data word write position low order part 15 0 Description The position specified as the parameter to AdjustActualPosition is summed with the actual position register encoder position for the specified axis This has the effect of adding or subtracting an offset to the current actual position At the same time the commanded position is replaced by the new actual position value minus the position error This prevents a servo bump when the new axis position is established The destination position see SetPosition p 153 is also modified by this amount so that no trajectory motion will occur when a trajectory update is performed In effect this command establishes a new reference position from which subsequent positions can be calculated It is commonly used to set a known reference position after a homing procedure On axes configured for stepping and microstepping motors the position error is zeroed by this command AdjustActualPosition takes effect immediately it is not buffered Restrictions C Motion API PMDresult PMDAdjustActualPosition PMDAxisInterface axis intf PMDint32 position VB Motion API MagellanAxis AdjustActualPosition in position see GetPositionError p 51 GetActualVeloci
102. e axis intf PMDint32 position Dim position as Long position MagellanAxis CaptureValue Set GetCaptureSource p 100 Set GetActualPositionUnits p 81 GetActivityStatus p 29 Magellan Motion Processor Programmer s Command Reference 33 o GetChecksum F8h Syntax GetChecksum Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments None Returned data Name Type checksum unsigned 32 bits Packet GetChecksum Structure 0 F8h 15 8 7 0 First data word read checksum high order part 31 16 Second data word read checksum low order part 15 0 Description GetChecksum reads the chips internal 32 bit checksum value The return value is dependent on the silicon revision number of the motion processor Restrictions C Motion API PMDresult PMDGetChecksum PMDAxisInterface axis intf PMDuint32 checksum VB Motion API Dim checksum as Long checksum MagellanObject Checksum see 34 Magellan Motion Processor Programmer s Command Reference GetCommandedAcceleration A7h Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API see GetCommandedAcceleration axis DC Brush Brushless DC Microstepping Pulse amp Direction Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units acceleration signed 32
103. e diagnostics Y v v Motion error detection 7 p requires encoder Axis settled indicator x EA p requires encoder Analog input Y Y Programmable bit output Y v v Software invertible signals Y v v User defined I O Y v External RAM support Y Y Multi chip synchronization Y 8 Magellan Motion Processor Programmer s Command Reference The Magellan Family Lp MC58s000 Series MC55000 Series Magellan ION Chipset configurations MC58420 4 axes 2 ICs MC58320 3 axes 2 ICs MC58220 2 axes 2 ICs MC58120 I axis 2 ICs MC581 0 I axis IC MC55420 4 axes 2 ICs MC55320 3 axes 2 ICs MC55220 2 axes 2 ICs MC55120 I axis 2 ICs MC55110 I axis IC Magellan ION sold as part of ION drive only Motion processor developer s kit p n s DK58420 4 axes 2 ICs DK581 10 laxis IC DK55420 4 axes 2 ICs DK55110 I axis IC Not available as motion pro cessor developer s kit Used exclusively in ION products Magellan Motion Processor Programmer s Command Reference amp The Magellan Family This page intentionally left blank 10 Magellan Motion Processor Programmer s Command Reference 2 C Mlotion 2 1 Introduction C Motion is a C source code library that contains all the code required for communicating with the Magellan Motion Processor C Motion includes the following features Axis virtualization The ability to communicate to
104. e relayed to an attached Atlas amplifier Restrictions For pulse amp direction motor types only the Holding Delay is used It delays the assertion of the At Rest output by the indicated number of cycles after a move is complete C Motion API PMDresult PMDSetCurrent PMDAxisInterface axis intf PMDuinti16 parameter PMDuinti16 value PMDresult PMDGetCurrent PMDAxisInterface axis intf PMDuinti16 parameter PMDuinti16 value VB Motion API Dim value as Short MagellanAxis HoldingCurrent parameter valu value MagellanAxis HoldingCurrent parameter see GetDriveStatus p 42 Set GetSampleTime p 161 SetMotorCommand p 137 Magellan Motion Processor Programmer s Command Reference 103 SetCurrentControlMode buffered 43h GetCurrentControlMode 44h Lu o Syntax SetCurrentControlMode axis mode GetCurrentControlMode axis Motor Types Brushless DC Microstepping Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 mode Phase A B Current Loops 0 FOC 1 Packet SetCurrentControlMode Structure 0 axis 43h 15 12 11 8 7 0 First data word write mode 15 0 GetCurrentControlMode 0 axis 44h 15 12 11 8 7 0 First data word read mode 15 0 Description SetCurrentControlMode configures the axis to use either the Phase A B method or the FOC method for current control GetCurrentControlMode gets the buffered current loop mode for the indicated axis Atlas Th
105. e unsigned 16 bits Oto27 1 unity counts microsteps Packet SetPhaseAngle Structure 0 axis 84h 15 12 11 8 7 0 Data write angle 15 0 GetPhaseAngle 0 axis 2Ch 15 12 11 8 7 0 Data read angle 15 0 Description SetPhaseAngle sets the instantaneous commutation angle for the specified axis For brushless DC motors the phase angle is specified in units of encoder counts For microstepping motors it is specified in units of microsteps GetPhaseAngle returns the value of the phase angle To convert counts to an actual phase angle divide by the number of encoder counts per electrical cycle and multiply by 360 For example if a value of 500 is retrieved using GetPhaseAngle and the counts per electrical cycle value has been set to 2 000 SetPhaseCounts command this corresponds to an angle of 500 2 000 360 90 degrees current phase angle position SetPhaseAngle resets the phase offset previously set by SetPhaseOffset Restrictions The specified angle must not exceed the number set by the SetPhaseCounts command C Motion API PMDresult PMDSetPhaseAngle PMDAxisInterface axis intf PMDuinti16 angle PMDresult PMDGetPhaseAngle PMDAxisInterface axis intf PMDuinti16 angle VB Motion API Dim angle as Short MagellanAxis PhaseAngle angle angle MagellanAxis PhaseAngle see Set GetPhaseCounts p 148 146 Magellan Motion Processor Programmer s Command Reference SetPhaseCorrectionMode E8h GetPhaseCorrectionMode E9h Syntax Set
106. ect until the next Update or MultiUpdate command with the Trajectory Update bit set in the update mask 190 Magellan Motion Processor Programmer s Command Reference SetVelocity cont buffered 11h GetVelocity 4Bh C Motion API PMDresult PMDSetVelocity PMDAxisInterface axis intf PMDint32 velocity PMDresult PMDGetVelocity PMDAxisInterface axis intf PMDint32 velocity VB Motion API Dim velocity as Long MagellanAxis Velocity velocity velocity MagellanAxis Velocity see Set GetAcceleration p 77 Set GetDeceleration p 110 Set GetJerk p 134 Set GetPosition p 153 MultiUpdate p 63 Update p 192 Magellan Motion Processor Programmer s Command Reference 191 o Update 1Ah Syntax Update axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Packet Update Structure 0 axis 1Ah 15 12 11 8 7 0 Description Update causes all buffered data parameters to be copied into the corresponding run time registers on the specified axis When the Update command is executed the update mask is used to determine which groups of parameters are actually updated The following table shows the buffered commands and variables that are activated by the Update command Group Command Parameter Trajectory Acceleration Deceleration Gear Ratio Jerk Position Profile Mode Stop Mode Velocity Clear Po
107. ected SPI Checksum Error 14 Atlas Motor Type Mismatch 15 CPN aD Wa BR WI N O Ke Events 0 through 4 are hard faults If one of these occur the unit will shut down and power must be cycled Upon power up GetDriveFaultStatus should be used to check which if any hard fault may have caused the previous power cycle After querying the Drive Fault Status register it should be cleared using ClearDriveFaultStatus If this is not done the bits will be retained in non volatile memory which will diminish the ability to detect the cause of any subsequent hard faults Events 5 and 6 will not cause the system to shut down Instead they will cause the system to change to the disabled state and will cause the Bus Voltage Fault bit in GetEventStatus to be set Normally the Drive Fault Status register does not need to be monitored In the case of Bus Voltage Fault in GetEventStatus however the Drive Fault Status register can be used to distinguish the error between overvoltage and undervoltage The Overvoltage Fault and Undervoltage Fault bits are cleared upon power up 40 Magellan Motion Processor Programmer s Command Reference GetDriveFaultStatus cont 6Dh Atlas This command is relayed to any connected Atlas amplifier and the result combined with bits 14 and 15 from internal Magellan state to form the result The Atlas amplifier does not implement hard faults events 3 7 9 and 11 will unconditional
108. ectly represent the encoder count to step ratio GetEncoderToStepRatio returns the ratio of the number of encoder counts to the number of output steps per motor rotation C Motion API PMDresult PMDSetEncoderToStepRatio PMDAxisInterface axis intf PMDuinti16 counts PMDuint1l6 steps PMDresult PMDGetEncoderToStepRatio PMDAxisInterface axis intf PMDuinti16 counts PMDuintl6 steps VB Motion API MagellanAxis EncoderToStepRatioSet in counts in steps MagellanAxis EncoderToStepRatioGet out counts out steps see Set GetActualPositionUnits p 81 120 Magellan Motion Processor Programmer s Command Reference SetEventAction A8h GetEventAction 49h Syntax SetEventAction axis event action GetEventAction axis event Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 Axis2 Axis3 Axis4 event Immediate Positive Limit Negative Limit Motion Error Current Foldback action None Reserved Abrupt Stop Smooth Stop Reserved Disable Position Loop amp Higher Modules Disable Current Loop amp Higher Modules Disable Motor Output amp Higher Modules Abrupt Stop with Position Error Clear ONOOARWNAO FPWNHATDO WNHAO Packet SetEventAction Structure 0 axis 48h 15 12 11 8 7 0 First data word write event 15 0 Second data word write action 15 0 GetEventAction 0 axis 49h 15 12 11 8 7 0 First data word
109. eds this limit a motion error occurs Such a motion error can cause a choice of actions or no action configurable using the SetEventAction Motion Error command When the motor type is microstepping or pulse amp direction this value is set in microsteps or steps respectively GetPositionErrorLimit returns the value of the position error limit Restrictions C Motion API PMDresult PMDSetPositionErrorLimit PMDAxisInterface axis intf PMDuint32 limit PMDresult PMDGetPositionErrorLimit PMDAxisInterface axis intf PMDuint32 limit VB Motion API Dim limit as Long MagellanAxis PositionErrorLimit limit limit MagellanAxis PositionErrorLimit see GetPositionError p 51 GetActualPosition p 81 Set GetPosition p 153 Set GetEventAction p 121 154 Magellan Motion Processor Programmer s Command Reference SetPositionLoop buffered 67h GetPositionLoop 68h Syntax SetPositionLoop axis parameter value GetPositionLoop axis parameter Motor Types DC Brush BrushessDC m mm Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 parameter PID Proportional Gain Kp 0 PID Integrator Gain Ki 1 PID Integrator Limit limit 2 PID Derivative Gain Kd 3 PID Derivative Time 4 PID Output Gain Kout 5 Velocity Feedforward Gain Kvff 6 Acceleration Feedforward Gain Kaff 7 Biquad1 Enable Filter 8 Biquad1 CoefficientBO 9 Biquad1 CoefficientB1 10 Biquad1 CoefficientB2 11 Biquad1 Coeff
110. en power is applied if this pin is grounded Magellan will be in an Atlas compatible state if it is floating backwards compatible The motor type independent values are listed here Default Value Buffered Breakpoints and Interrupts Breakpoint 0 NO Breakpoint 2 0 NO Breakpoint Value 0 NO Breakpoint Value 2 0 NO Breakpoint Update Mask OBh NO Breakpoint Update Mask 2 OBh NO Interrupt Mask 0 NO Commutation Commutation Mode motor dependent NO Phase Angle 0 NO Phase Counts motor dependent NO Phase Offset I NO Phase Prescale 0 NO Phase Initialize Mode 0 NO Phase Initialize Time 0 NO Phase Correction Mode motor dependent NO Current Control Currrent Control Mode 0 YES Current Loop Current Loop Kp both A and B loops 0 YES Current Loop Current Loop Ki both A and B loops 0 YES Current Loop Current Loop Integrator Sum Limit 0 YES Current Loop both A and B loops FOC Kp both D and Q loops 0 YES Current Loop FOC Ki both D and Q loops 0 YES Current Loop FOC Integrator Sum Limit 0 YES Current Loop Holding Motor Limit 32767 NO Holding Delay motor dependent NO Magellan Motion Processor Programmer s Command Reference 69 o Reset cont 39h Default Value Buffered Digital Servo Filter Position Error Limit 65535 NO Position Loop Biquad Coeffs All O YES Posit
111. ending torque commands Restrictions The bits available in this register depend upon the products See the product user s guide C Motion API PMDresult PMDGetDriveStatus PMDAxisInterface axis intf PMDuint16 status VB Motion API Dim status as Short status MagellanAxis DriveStatus See 42 Magellan Motion Processor Programmer s Command Reference GetEventStatus 3th o Syntax GetEventStatus axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Returned data Type status unsigned 16 bits see below Packet GetEventStatus Structure 0 axis 31h 15 12 11 8 7 0 Data read 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Description GetEventStatus reads the Event Status register for the specified axis All of the bits in this status word are set by the motion processor and cleared by the host To clear these bits use the ResetEventStatus command The following table shows the encoding of the data returned by this command Name Bit s Description Motion Complete 0 Set to when motion has completed SetMotionCompleteMode determines if this bit is based on the trajectory generator position or the encoder position Wrap around Set to when the actual encoder position has wrapped from maximum allowed position to minimum or vice versa Breakpoint 2 Set to
112. ength sets the length in numbers of 32 bit elements of the buffer in the memory block identified by bufferlD Note The SetBufferLength command resets the buffers read and write indexes to 0 The GetBufferLength command returns the length of the specified buffer Restrictions Ihe buffer length plus the buffer start address cannot exceed the memory size of the product See the gtn p P product user s guide C Motion API PMDresult PMDSetBufferLength PMDAxisInterface axis intf PMDuinti16 bufferID PMDuint32 length PMDresult PMDGetBufferLength PMDAxisInterface axis intf PMDuinti16 bufferID PMDuint32 length Magellan Motion Processor Programmer s Command Reference 93 SetBufferLength cont C2h GetBufferLength C3h Oy a VB Motion API Dim length as Long MagellanObject BufferLength bufferID length length MagellanObject BufferLength bufferID see Set GetBufferReadlndex p 95 Set GetBufferStart p 96 Set GetBufferWritelndex p 98 94 Magellan Motion Processor Programmer s Command Reference SetBufferReadIndex C6h GetBufferReadIndex C7h Syntax SetBufferReadlndex bufferlD index GetBufferReadlIndex bufferlD Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Range Scaling Units bufferlD unsigned 16 bits 0 to 31 unity index unsigned 32 bits 0 to buffer unity double words length 1 Packet SetBufferReadindex Structure 0 C6h 15 8
113. ergy Limit 1 Type Range Scaling value unsigned 16 bit see below Packet SetCurrentFoldback Structure 0 41h 15 12 11 8 7 0 First data word write parameter 15 0 Second data word write value 15 0 GetCurrentFoldback 0 axis 42h 15 12 11 8 7 0 First data word write parameter 15 0 Second data word read value 15 0 Description SetCurrentFoldback is used to set various I t foldback related parameters Two parameters can be set the Continuous Current Limit and the Energy Limit The units of Continuous Current Limit are convertible to milliAmps and represent percentage of maximum peak current with scaling of 100 2P The range is from 0 to the factory default continuous current limit setting When using this command with the ION drive check the ION Digital Drive User s Manual for exact scaling values Different drives have different scaling values and default limit settings The units of Energy Limit are convertible to Amp Seconds and represent the percentage of maximum energy with scaling of 100 2 The range is from 0 to the factory default energy limit setting When using this command with the ION drive check the ION Digital Drive User s Manual for exact scaling values Different drives have different scaling values and default limit settings 106 Magellan Motion Processor Programmer s Command Reference SetCurrentFoldback cont Ath GetCurrentFoldback A2h Descr
114. ese commands will be relayed to an attached Atlas amplifier Atlas does not buffer the current control mode Restrictions This command is only available on products that include a digital current loop SetCurrentControlMode is a buffered command It will not take effect until an update is done on the current loop through Update command MultiUpdate command or update action on breakpoint The value read by GetCurrentControlMode is the buffered setting C Motion API PMDresult PMDSetCurrentControlMode PMDAxisInterface axis intf PMDuint16 mode PMDresult PMDGetCurrentControlMode PMDAxisInterface axis intf PMDuinti16 mode 104 Magellan Motion Processor Programmer s Command Reference SetCurrentControlMode cont buffered 43h GetCurrentControlMode 44h VB Motion API Dim mode as Short MagellanAxis CurrentControlMode mode mode MagellanAxis CurrentControlMode see Update p 192 Set GetUpdateMask p 188 MultiUpdate p 63 Set GetBreakpointUpdateMask p 89 GetFOCValue p 45 Get SetFOC p 127 GetCurrentLoopValue p 38 Get SetCurrentLoop p 108 Magellan Motion Processor Programmer s Command Reference 105 SetCurrentFoldback Ath GetCurrentFoldback A2h Lu oo Syntax SetCurrentFoldback axis parameter value GetCurrentFoldback axis parameter Motor Types DC Brush Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 parameter Continuous Current Limit O En
115. etAxisOutMask axis sourceAxis sourceRegister selectionMask senseMask GetAxisOutMask axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 sourceAxis Axis1 0 Axis2 1 Axis3 2 Axis4 3 sourceRegister Disabled 0 Event Status 1 Activity Status 2 Signal Status 3 Drive Status 4 selectionMask see below bitmask senseMask see below bitmask Packet SetAxisOutMask Structure 0 axis 45h 15 12 11 8 7 0 First Data Word write 0 sourceRegister sourceAxis 15 12 11 8 7 0 Second Data Word write selectionMask 15 0 Third Data Word write senseMask 15 0 GetAxisOutMask 0 axis 46h 15 12 11 8 7 0 First Data Word read 0 sourceRegister sourceAxis 15 12 11 8 7 0 Second Data Word read selectionMask 15 0 Third Data Word read senseMask 15 0 Description SetAxisOutMask configures what will drive the AxisOut pin of the axis The sourceRegister and sourceAxis arguments specify which register from which axis will be used to drive AxisOut of the specified axis 84 Magellan Motion Processor Programmer s Command Reference SetAxisOutMask cont 45h GetAxisOutMask 46h Description cont Restrictions C Motion API VB Motion API see Magellan Motion Processor Programmer s Command Reference For each bit in the selectionMask that is set to 1 the corresponding bit of the specified sourceRe
116. f VB Motion API MagellanAxis ClearInterrupt see GetInterruptAxis p 49 Set GetlnterruptMask p 132 ResetEventStatus p 74 24 Magellan Motion Processor Programmer s Command Reference ClearPositionError buffered 47h a Syntax ClearPositionError axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Packet ClearPositionError Structure 0 axis 47h 15 12 11 8 7 0 Description ClearPositionError sets the profile s commanded position equal to the actual position encoder input thereby clearing the position error for the specified axis This command can be used when the axis is at rest or when it is moving Restrictions ClearPositionError is a buffered command The new value set will not take effect until the next Update or MultiUpdate command with the Trajectory bit set in the update mask commands This command should not be sent while the chip is executing a move using the S curve profile mode C Motion API PMDresult PMDClearPositionError PMDAxisInterface axis intf VB Motion API MagellanAxis ClearPositionError see GetPositionError p 51 MultiUpdate p 63 Set GetPositionErrorLimit p 154 Update p 192 Magellan Motion Processor Programmer s Command Reference 25 DriveNVRAM Syntax Arguments Packet Structure Description Atlas Restrictions C Motion API 2
117. gister is selected to set AxisOut active The senseMask bit determines which state of each bit causes AxisOut to be active Aa zero 0 in the senseMask means that a 0 in the corresponding bit will cause AxisOut to be active and a 1 in the senseMask means that a 1 in the corresponding bit will cause AxisOut to be active If multiple bits are selected in the sourceRegister AxisOut will be active if any of the selected bits combined with their sense require it to be The following table shows the available bits in each register Activity Signal Event Status Status Status Drive Status Bit Register Register Register Register 0 Motion Complete Phasing Initialized Encoder A Wrap around At Maximum Encoder B In Foldback Velocity 2 Breakpoint Tracking Encoder Index Overtemperature 3 Position Capture Capture Input 4 Motion Error Positive Limit In Holding 5 Positive Limit Negative Limit Overvoltage 6 Negative Limit AxisIn Undervoltage 7 Instruction Error Axis Settled Hall Sensor A 8 Disable Motor Mode Hall Sensor B 9 Overtemperature Fault Position Capture Hall Sensor C 0Ah Bus Voltage Fault In Motion OBh Commutation Error In Positive Limit OCh Current Foldback In Negative Limit ODh Enable Input OEh Breakpoint 2 FaultOut OFh For example assume it is desired to have the AxisOut pin of Axis driven active whenever motion complete of Axis2 is 1 or commutation error of Axis2 is 0 In this
118. gned 16 bits GetTraceStatus 0 BAh 15 8 7 0 Data read 0 0 15 9 8 3 2 1 0 GetTraceStatus returns the trace status The definitions of the individual status bits are as follows Name Bit Number Description Wrap Mode 0 Set to 0 when trace is in one time mode when in rolling mode Activity l Set to when trace is active currently tracing 0 if trace not active Data Wrap 2 Set to when trace has wrapped 0 if it has not wrapped If 0 the buffer has not yet been filled and all recorded data is intact If I the trace has wrapped to the beginning of the buffer any previous data may have been overwritten if not explicitly retrieved by the host using the ReadBuffer command while the trace is active 3 7 Reserved Trigger Mode 8 Set to 0 when in Internal Trigger mode when in External Trigger mode 9 15 Reserved PMDresult PMDGetTraceStatus PMDAxisInterface axis intf PMDuintl16 status Dim status as Short status MagellanObject TraceStatus Set GetTraceStart p 177 Set GetTraceMode p 174 Magellan Motion Processor Programmer s Command Reference GetTraceValue 28h Syntax Motor Types Arguments Returned data Packet Structure Description C Motion API VB Motion API See GetTraceValue variablelD DC Brush Brushless DC Microstepping Pulse amp Direction Name Type
119. h 15 12 11 8 7 0 Data write 0 mode 15 32 0 GetOutputMode 0 axis 6Eh 15 12 11 8 7 0 Data read 0 mode 15 32 0 Description SetOutputMode sets the form of the motor output signal of the specified axis GetOutputMode returns the value for the motor output mode Restrictions Not all output modes are available on all products See the product user s guide C Motion API PMDresult PMDSetOutputMode PMDAxisInterface axis intf PMDuintl6 mode PMDresult PMDGetOutputMode PMDAxisInterface axis intf PMDuintl6 mode VB Motion API Dim mode as Short MagellanAxis OutputMode mode mode MagellanAxis OutputMode see 144 Magellan Motion Processor Programmer s Command Reference SetOvertemperatureLimit 1Bh GetOvertemperatureLimit 1Ch Syntax SetOvertemperatureLimit axis limit GetOvertemperatureLimit axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units limit signed 16 bits 2 5 to 275 1 29 C Packet SetOvertemperatureLimit Structure 0 axis 1Bh 15 12 11 8 7 0 First data word write limit 15 0 GetOvertemperatureLimit 0 axis 1Ch 15 12 11 8 7 0 First data word read limit 15 0 Description SetOvertemperatureLimit sets the temperature threshold upon which an overtemperature condition will occurr For example to set the overtemperature thres
120. he position trigger types 1 4 depending on the current position when the command is issued Restrictions Always load the breakpoint comparison value SetBreakpointValue command before setting a new breakpoint condition SetBreakpoint command Failure to do so will likely result in unexpected behavior Breakpoint trigger options may be limited depending on the resources of the sourceAxis See the product user s guide Magellan Motion Processor Programmer s Command Reference 87 SetBreakpoint cont D4h GetBreakpoint D5h C Motion API PMDresult PMDSetBreakpoint PMDAxisInterface axis intf PMDuinti16 breakpointID PMDAxis sourceAxis PMDuint8 action PMDuint8 trigger PMDresult PMDGetBreakpoint PMDAxisInterface axis intf PMDuinti16 breakpointID PMDAxis sourceAxis PMDuint8 action PMDuint8 trigger VB Motion API MagellanAxis BreakpointSet in breakpointID in sourceAxis in action in trigger MagellanAxis BreakpointGet in breakpointID out sourceAxis out action out trigger see Set GetBreakpointValue p 91 Set GetBreakpointUpdateMask p 89 88 Magellan Motion Processor Programmer s Command Reference SetBreakpointUpdateMask 32h GetBreakpointUpdateMask 33h Syntax SetBreakpointUpdateMask axis breakPointlD mask GetBreakpointUpdateMask axis breakPointlD Motor Types DC Brush Brushless DC Microstepping Pulse
121. heir current foldback event actions Restrictions The typical time before the device is ready for communication after a reset is 20ms for Magellan products and 100ms for ION products 72 Magellan Motion Processor Programmer s Command Reference Reset cont 39h The MC55110 and the MC58110 have a maximum Step Range of 100 ksteps sec which cannot be changed Not all of the listed variables are available on all products See the product user s guide C Motion API PMDresult PMDReset PMDAxisInterface axis intf VB Motion API MagellanObject Reset See SetDefault p 111 Magellan Motion Processor Programmer s Command Reference 73 o ResetEventStatus 34h Syntax ResetEventStatus axis mask Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mask Motion Complete FFFEh Wrap around FFFDh Breakpoint 1 FFFBh Capture Received FFF7h Motion Error FFEFh Positive Limit FFDFh Negative Limit FFBFh Instruction Error FF7Fh Disable FEFFh Overtemperature Fault FDFFh Drive Exception FBFFh Commutation Error F7FFh Current Foldback EFFFh Breakpoint 2 BFFFh Returned data None Packet ResetEventStatus Structure 0 34h 15 12 11 8 7 0 Data write mask 15 0 Description ResetEventStatus clears sets to 0 for the specified axis each bit in the Event Status register that has a value of 0 in the mask sent with this co
122. hold at 60 degrees C the value should be 60 256 15360 When the programmed threshold is exceeded the Overtemperature Fault bit is set in the Event Status register and the axis enters the overtemperature state GetOvertemperatureLimit gets the current overtemperature threshold setting Atlas These commands ate not used with Atlas Restrictions Get SetOvertemperatureLimit is only available in products equipped with temperature sensors If the axis has more than one temperature sensor the temperature used to compare to the overtemperature threshold will be the highest value of all sensor readings The overtemperature threshold cannot be set to a value greater than the reset default setting C Motion API PMDresult PMDSetOvertemperatureLimit PMDAxisInterface axis intf PMDint16 limit PMDresult PMDGetOvertemperatureLimit PMDAxisInterface axis intf PMDint16 limit VB Motion API Dim limit as Short MagellanAxis OvertemperatureLimit limit limit MagellanAxis OvertemperatureLimit see GetTemperature p 55 GetEventStatus p 43 ResetEventStatus p 74 Magellan Motion Processor Programmer s Command Reference 145 SetPhaseAngle 84h GetPhaseAngle 2Ch 4 T Syntax SetPhaseAngle axis angle GetPhaseAngle axis Motor Types Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units angl
123. ication of information regarding any third party s products or services does not constitute PMD s approval warranty or endorsement thereof Magellan Motion Processor Programmer s Command Reference A Related Documents Atlas Digital Amplifier User s Manual Description of the Atlas Digital Amplifier electrical and mechanical specifications along with a summary of its operational features Atlas Digital Amplifier Complete Technical Reference Complete electrical and mechanical description of the Atlas Digital Amplifier with detailed theory of opera tions Magellan Motion Processor User s Guide Complete description of the Magellan Motion Processor features and functions with detailed theory of its operation Magellan Motion Processor Electrical Specifications Booklets containing physical and electrical characteristics timing diagrams pinouts and pin descriptions of each seties MC58000 Series for DC brush brushless DC Microstepping and Pulse amp Direction motion processors MC55000 Series for Pulse amp Direction motion processors Magellan Motion Processor Developer s Kit Manual How to install and configure the DK58000 series and DK55000 series developer s kit PC board Pro Motion User s Guide User s guide to Pro Motion the easy to use motion system development tool and performance optimizer Pro Motion is a sophisticated easy to use program which allows all motion parameters to be set and or viewed and allows
124. icientA1 12 Biquad1 CoefficientA2 13 Biquad1 CoefficientK 14 Biquad2 Enable filter 15 Biquad2 CoefficientBO 16 Biquad2 CoefficientB1 17 Biquad2 CoefficientB2 18 Biquad2 CoefficientA1 19 Biquad2 CoefficientA2 20 Biquad2 CoefficientK 21 Type Range Scaling value signed 32 bits see below Packet SetPositionLoop Structure 0 axis 67h 15 12 M 8 7 0 First data word write parameter 15 0 Second data word write value high order part 31 16 Third data word write value low order part 15 0 Magellan Motion Processor Programmer s Command Reference 155 SetPositionLoop cont buffered 67h GetPositionLoop 68h OS ie Packet GetPositionLoop Structure 0 axis 68h cont 15 12 11 8 7 0 First data word write parameter 15 0 Second data word read value high order part 31 16 Third data word read value low order part 15 0 Description Set GetPositionLoop is used to configure the operating parameters of the PID position loop See the product user s guide for more information on how each parameter is used in the position loop processing Though these commands always use 32 bit data the range and format vary depending on the parameter as follows Parameter Range Scaling Units Velocity Feedforward Gain Kvff 0 to 2 1 unity gain cycles Acceleration Feedforward Gain Kaff 0 to 2 unity gain
125. ified axis The actual velocity is derived by subtracting the actual position during the previous chip cycle from the actual position for this chip cycle The result of this subtraction will always be integer because position is always integer As a result the value returned by GetActualVelocity will always be a multiple of 65 536 since this represents a value of one in the 16 16 number format The low word is always zero 0 This value is the result of the last encoder input so it will be accurate to within one cycle Scaling example If a value of 1 703 936 is retrieved by the GetActualVelocity command high word 01Ah low word 0h this corresponds to a velocity of 1 703 936 65 536 or 26 counts cycle Restrictions C Motion API PMDresult PMDGetActualVelocity PMDAxisInterface axis intf PMDint32 velocity VBI Motion API Dim velocity as Long velocity MagellanAxis ActualVelocity see GetCommandedVelocity p 37 GetActualPosition p 79 Magellan Motion Processor Programmer s Command Reference 31 Syntax Motor Types Arguments Returned Data Packet Structure Description Atlas Restrictions C Motion API VB Motion API see o GetBusVoltage 40h GetBusVoltage axis DC Brush Brushless DC Microstepping Pulse amp Direction Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling voltage unsigned 16 bits 0 to 216 1 1 3612 mv count GetBusVoltage 0 axis 40h 15
126. in the FOC current control algorithm Magellan Motion Processor Programmer s Command Reference 45 o GetFOCValue cont 5Ah Description Though the data returned is signed 32 bits regardless of the node the range and format vary cont depending on the node as follows Node Range Scaling Units Reference D Q 2 5 to 2 5 100 24 max current Feedback D Q 2 8 co 2 8 100 2 4 max current Error D Q 255 to 2 5 100 2 4 max current Integrator Sum D Q 23 to 23 100 24 max current current loop cycles Integrator Contribution D Q 23 to 23 100 2 4 max current Output D Q 2 to 25 100 24 PWM FOC Output Alpha Beta 2 to 2 5 100 24 PWM Actual Current A B 255 to 2 5 100 24 max current Pt Energy 2 to 2 100 22 max energy Most of the nodes have units of maximum current and most have a scaling of 100 2 4 That is a value of 2 4 corresponds to 100 maximum current The range is extended to allow for overshoot in excess of maximum peak current and thus values can be more than 100 of the maximum output current The Integrator Sum is a signed 32 bit number with scaling of 100 2 That is a current of 100 maximum present for 16 current loop cycles will result in an integrator sum of 16 100 2 100 2 8 Current loop cycles are not the same as position loop servo cycles The current loop runs at 20 kHz regardless of the servo cycle time Atla
127. indicator is set to 1 GetTrackingWindow returns the value of the tracking window Restrictions C Motion API PMDresult PMDSetTrackingWindow PMDAxisInterface axis intf PMDuintl6 window PMDresult PMDGetTrackingWindow PMDAxisInterface axis intf PMDuintl16 window VB Motion API Dim window as Short MagellanAxis TrackingWindow window window MagellanAxis TrackingWindow see GetActivityStatus p 29 GetActualPosition p 79 Magellan Motion Processor Programmer s Command Reference 187 SetUpdateMask F9h GetUpdateMask FAh e a Duda Syntax SetUpdateMask axis mask GetUpdateMask axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Scaling mask unsigned 16 bit bitmask Packet SetUpdateMask Structure 0 axis F9n 15 12 11 8 7 0 First data word write mask 15 o GetUpdateMask 0 axis FAh 15 12 11 8 7 0 First data word read mask 15 9 Description SetUpdateMask configures what loops in the axis are updated when an update is executed on the given axis If the bitmask for a given loop is set in the mask the operating parameters for that loop will be updated from the buffered values when an Update or MultiUpdate command is received The bitmask encoding is given below Name Bit s Description Trajectory 0 Set to to update trajec
128. int occurs when the indicated value reaches or crosses a threshold The status breakpoints are level triggered the breakpoint occurs when a specific bit or combination of bits in the indicated status register changes state Thresholds and bit specifications are both set by the SetBreakpointValue instruction The action determines what the motion processor does when the breakpoint occurs as follows Action Description None No action Update Transfer the double buffered registers specified by the Breakpoint Update Mask into the active registers Abrupt Stop Causes an instantaneous halt of the trajectory generator Trajectory velocity is zeroed Smooth Stop Causes a smooth stop to occur at the active deceleration rate Abrupt Stop with Position Abrupt stop of the trajectory and additionally zero the position error to Error Clear the servo Disable Position Loop amp Disables Trajectory generator and position loop modules Higher Modules Disable Current Loop amp Disables Trajectory generator position loop and current loop modules Higher Modules Disable Motor Output amp Disables all modules including the motor output Higher Modules GetBreakpoint returns the trigger action and sourceAxis for the specified breakpoint 1 or 2 of the indicated axis When a breakpoint occurs the trigger value will be reset to zero 0 The Commanded Position Crossed and the Actual Position Crossed triggers are converted to one of t
129. interrupt mask value 28h will generate an interrupt when either the Positive Limit bit or the Capture Received bit of the Event Status register goes active set to 1 132 Magellan Motion Processor Programmer s Command Reference SetinterruptMask cont 2Fh GetlnterruptMask 56h Restrictions C Motion API PMDresult PMDSetInterruptMask PMDAxisInterface axis intf PMDuint16 mask PMDresult PMDGetInterruptMask PMDAxisInterface axis intf PMDuint16 mask VB Motion API Dim mask as Short MagellanAxis InterruptMask mask mask MagellanAxis InterruptMask see Clearlnterrupt p 24 GetInterruptAxis p 49 Set GetFaultOutMask p 123 Magellan Motion Processor Programmer s Command Reference 133 SetJerk buffered 13h GetJerk 58h Se oH eee See Syntax SetJerk axis jerk GetJerk axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units jerk unsigned 32 bits 0 to 2 1 1 2 counts cycle microsteps cycle Packet SetJerk Structure 0 axis 13h 15 12 11 8 7 0 First data word write jerk high order part 31 16 Second data word write jerk low order part 15 0 GetJerk 0 axis 58h 15 12 11 8 7 0 First data word read jerk high order part 31 16 Second data word read jerk low order part 15 0 Description
130. iod Set Get the trace period 176 Set GetTraceStart Set Get the trace start condition 177 GetTraceStatus Get the trace status word 58 Set GetTraceStop Set Get the trace stop condition 180 Set GetTraceVariable Set Get a trace variable setting 183 Communications Set GetCANMode Set Get the CAN 2 0B configuration mode 99 GetlnstructionError Get the most recent I O error code 47 Set GetSerialPortMode Set Get the serial port configuration mode 163 Set GetSPIMode Set Get the SPI output mode 169 Miscellaneous GetChecksum Reads the internal chip checksum 34 Set GetSynchronizationMode Set Get the synchronization mode 173 GetVersion Get chipset software version information 60 NoOperation Perform no operation used to verify communications 65 ReadlO Read user defined I O value 68 Reset Reset chipset 69 WritelO Write user defined I O value 194 Magellan Motion Processor Programmer s Command Reference 197 e Instruction Summary Tables Miscellaneous ReadAnalog Read a raw analog input 66 Set GetDefault Set Get a reset default setting from non volatile memory 111 5 2 Command Support by Product The following table summarizes the support of each Magellan command by the different product families The MC58000 Atlas column is for commands affecting a Atlas digital amplifier attached to an MC58000 Motion pro cessor In that column pass through means that a command is sent
131. ion MinorVersion Returns the major and minor version number of C Motion PMDHardReset axis handle This function causes a hard reset of the motion proces sor Unlike all other card specific commands this command is processed directly through the bus interface PMDReadDPRAM axis handle This function reads directly from the onboard dual port data RAM via the bus interface if applicable offset in dwords words to read PMDWriteDPRAM axis handle This function writes directly to the onboard dual port RAM data via the bus interface if applicable offset in dwords words to write 2 5 Prodigy Motion Card Specific Functions Several auxiliary functions are included in addition to the standard Magellan API commands for use with the Magel based Prodigy Motion Cards only The functions ate for configuring functions on the motion control board The foll llan ing table describes the functions For more information see the user s guide for your motion control card C Mlotion function Arguments Function description PMDMBWriteDigitalOutput axis_handle This function writes to the eight general purpose digital write_value O signals digitalOut0 7 Write value holds the eight sig nals in its low order 8 bits PMDMBReadDigitallnput axis handle read value This function reads the value of the signals Digitalln0 7 and returns them in the low order 8 bits of read value PMDMBReadDigitalOutput axis_han
132. ion Processor Programmer s Command Reference GetinterruptAxis Eth Syntax GetlnterruptAxis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments None Returned data Name Instance Encoding mask None 0 Axis1 Mask 1 Axis2 Mask 2 Axis3 Mask 4 Axis4 Mask 8 Packet GetInterruptAxis Structure 0 E1h 15 8 7 0 Data read 0 mask 15 4 8 0 Description GetInterruptAxis returns a field that identifies all axes with pending interrupts Axis numbers are assigned to the low order four bits of the returned word with bits corresponding to interrupting axes set to 1 If there are no pending interrupts the returned word is zero 0 If any axis has a pending interrupt the HostInterrupt signal will be in an active state Restrictions This command is only useful for products with HostInterrupt pin When using CAN events for interrupt event notification the interrupting axis is sent as part of the CAN event C Motion API PMDresult PMDGetInterruptAxis PMDAxisInterface axis intf PMDuinti16 mask VB Motion API Dim mask as Short mask MagellanObject InterruptAxis see Clearlnterrupt p 24 Set GetInterruptMask p 132 Magellan Motion Processor Programmer s Command Reference 49 o GetPhaseCommand EAh Syntax GetPhaseCommand axis phase Motor Types Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3
133. ion SetSampleTime sets the time basis for the motion processor This time basis determines the trajectory update rate for all motor types as well as the servo loop calculation rate for DC brush and brushless DC motors It does not however determine the commutation rate of the brushless DC motor types nor the PWM or current loop rates for any motor type The time value is expressed in microseconds The motion processor hardware can adjust the cycle time only in increments of 51 2 microseconds the time value passed to this command will be rounded up to the nearest increment of this base value Minimum cycle time depends on the product and number of enabled axes as follows Minimum Cycle Time 4 Enabled Cycle w Trace Time Maximum Cycle Axes Time Capture per Axis Frequency I ION 102 4 us 102 4 us 102 4 us 9 76 kHz Magellan 51 2 us 102 4 us 51 2 us 19 53 kHz 9 76 w Single axis trace capture Magellan 102 4 us 102 4 us 102 4 us 9 76 kHz Multi axis 2 Magellan 153 6 us 153 6 us 76 8 us 6 5 kHz 3 Magellan 204 8 us 204 8 us 68 3 us 4 88 kHz 4 Magellan 256 us 256 us 64 us 3 91 kHz Magellan Motion Processor Programmer s Command Reference 161 SetSampleTime cont 3Bh GetSampleTime 3Ch mod E HUBMMUM MN Description Using the trace feature on single axis Magellan products with the sample time set to 51 2 us will cont result in unexpected behavior GetSampleTime returns the value of
134. ionLoop Position Loop Biquad Enables Both 0 YES Position Loop Position Loop Kvff 0 YES Position Loop Position Loop Kaff 0 YES Position Loop Position Loop Kp 0 YES Position Loop Position Loop Ki 0 YES Position Loop Position Loop Kd 0 YES Position Loop Position Loop Integrator Sum Limit 0 YES Position Loop Position Loop Derivative Time l YES Position Loop Position Loop Kout 65535 YES Position Loop Motor Limit 32767 NO Motor Bias 0 NO Motor Command 0 YES Position Loop Auxiliary Encoder Source 0 NO Encoder Actual Position 0 NO Actual Position Units motor dependent NO Capture Source 0 NO Encoder Modulus 0 NO Encoder Source motor dependent NO Encoder To Step Ratio 00010001h NO Motor Output Operating Mode 0033h Magellan backwards compatible NO 0001h ION Magellan Atlas compatible 0033h Magellan backwards compatible NO 0001h ION Magellan Atlas compatible Active Operating Mode 70 Output Mode motor dependent NO Motor Type product dependent NO PWM Frequency motor dependent NO Step Range l NO Position Servo Loop Control Motion Complete Mode 0 NO Sample Time see Notes NO Settle Time 0 NO Settle Window 0 NO Tracking Window 0 NO Profile Generation Acceleration 0 YES Trajectory Deceleration 0 YES Trajectory Gear Master 0 NO Gear Ratio 0 YES Trajectory Jerk 0 YES Trajectory Position 0 YES Trajectory Profile Mode 0 YES Trajectory Start Velocity 0 NO Stop
135. iption The Continuous Current Limit is used by the current foldback algorithm When the current output of the cont drive exceeds this setting accumulation of the I energy above this setting begins Once the accumulated excess I energy exceeds the value specified by the Energy Limit parameter a current foldback condition exists and the commanded current will be limited to the specified Continuous Current Limit When this occurs the Current Foldback bit in the Event Status and Drive Status registers will be set When the accumulated I energy above the Continuous Current Limit drops to zero 0 the limit is removed and the Current Foldback bit in the Drive Status register is cleared SetEventAction can be used to configure a change in operating mode when current foldback occurs Doing this does not interfere with the basic operation of Current Foldback described above If this is done the Current Foldback bit in the Event Status register must be cleared prior to restoring the operating mode regardless of whether the system is in current foldback or not When current control is not active a current foldback event always causes a change to the disabled state all loops and motor output are disabled regardless of the programmed Event Action Changing the operating mode from disabled requires clearing of the Current Foldback bit in Event Status GetCurrentFoldback gets the maximum continuous current setting Atlas These commands will be
136. ite value high order part 31 16 Third data word write value low order part 15 0 GetDefault 0 BAR 15 12 11 8 7 0 First data word write variable 15 0 Second data word read value high order part 31 16 Third data word read value low order part 15 0 Description SetDefault is used to override the reset default settings of system variables When SetDefault is invoked to change the reset default of a variable it stores the value sent by the user in non volatile memory It does not modify the value of the variable in active use On subsequent system power cycles or resets this value will become the default for the selected variable The value for each variable is the value that would be used normally by the Set Get command for that variable When configuring variables that are 16 bit values the value should be sent as the low order part of the 32 bit value The axis sent with Set GetDefault may or may not be relevent depending on whether the parameter is an axis specific parameter or not GetDefault gets the reset default value of the indicated variable from non volatile memory Magellan Motion Processor Programmer s Command Reference 111 SetDefault cont 89h GetDefault 8Ah 9 Restrictions This command is only available in products with non volatile memoty The SetDefault command can only be executed when motor output is
137. ity value Restrictions C Motion API PMDresult PMDGetCommandedVelocity PMDAxisInterface axis intf PMDint32 velocity VB Motion API Dim velocity as Long velocity MagellanAxis CommandedVelocity see GetCommandedAcceleration p 35 GetCommandedPosition p 36 Magellan Motion Processor Programmer s Command Reference 37 o GetCurrentLoopValue 71h Syntax GetCurrentLoopValue axis loopnum node Motor Types DC Brush Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 phase Phase A 0 Phase B 1 node Reference 0 Actual Current 1 Error 2 Integrator Sum 3 Reserved 4 Integrator Contribution 5 Output 6 I7t Energy 10 Returned data Type Range Scaling value signed 32 bits see below Packet GetCurrentLoopValue Structure 0 axis 71h 15 12 11 8 7 0 First data word write 0 phase node 15 12 11 8 7 0 Second data word read value high order part 31 16 Third data word read value low order part 15 0 Description GetCurrentLoopValue is used to read the value of a node in one of the digital current loops See the product user s guide for more information on the location of each node in the current loop processing Though the data returned is signed 32 bits regardless of the node the range and format vaty depending on the node as follows Node Range Scaling Units Reference 2 to 25 1 100 24 max current Actual Curre
138. k 56h AR SE cee Syntax SetinterruptMask axis mask GetInterruptMask axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 mask Motion Complete 0001h Wrap around 0002h Breakpoint 1 0004h Capture Received 0008h Motion Error 0010h Positive Limit 0020h Negative Limit 0040h Instruction Error 0080h Disable 0100h Overtemperature Fault 0200h Bus Voltage Fault 0400h Commutation Error 0800h Current Foldback 1000h Breakpoint 2 4000h Packet SetInterruptMask Structure 0 axis 2Fh 15 12 11 8 7 0 Data write mask 15 0 GetInterruptMask 0 axis 56h 15 12 11 8 7 0 Data read mask 15 0 Description SetlnterruptMask determines which bits in the Event Status register of the specified axis will cause a host interrupt For each interrupt mask bit that is set to 1 the corresponding Event Status register bit will cause an interrupt when that status register bit goes active is set to 1 Interrupt mask bits set to 0 will not generate interrupts GetinterruptMask returns the mask for the specified axis SetlnterruptMask also controls CAN event notification when using the motion processor s CAN 2 0B interface Whenever a host interrupt is activated a CAN message is generated using message ID 180h nodelD notifying interested CAN nodes of the change in the Event Status register Example The
139. lable on all products See the product uset s guide C Motion API PMDresult PMDWriteBuffer PMDAxisInterface axis intf PMDuint16 bufferID PMDint32 data VB Motion API Dim data as Long MagellanObject WriteBuffer bufferID data see ReadBuffer p 67 Set GetBufferWritelndex p 98 Magellan Motion Processor Programmer s Command Reference 193 o WritelO 82h Syntax WritelO address data Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Range address unsigned 16 bits 0 to 255 data unsigned 16 bits 0 fo 2161 Packet WritelO Structure 0 82h 15 8 7 0 First data word write 0 address 15 8 7 0 Second data word write data 15 0 Description WritelO writes one 16 bit word of data to address The address is an offset from location 1000h of the motion processor s peripheral device address space The format and interpretation of the 16 bit data word are dependent on the user defined device being addressed User defined I O can be used to implement a variety of features such as additional parallel I O flash memory for non volatile configuration information storage or display devices such as LED arrays Restrictions This command is only available in products with general purpose parallel port interfaces See the product user s guide C Motion API PMDresult PMDWriteIO PMDAxisInterface axis intf PMDuintl16 address PMDuint1l6 data VB Motion API
140. lasAxisHandle amp hAxis2 amp hAtlas2 2 4 1 C Motion Functions The table below describes the functions that are provided by C Motion in addition to the standard chip command set C Mlotion functions Arguments Function description PMDSetupAxisInterface_PCl axis_handle Used to setup an axis interface connection for communicat axis_number ing over a PCI bus board_number PMDSetupAxisInterface_ISA axis_handle Used to setup an axis interface connection for communicat axis_number ing over an ISA PC 104 bus board_number PMDSetupAxisInterface Serial axis handle Used to setup an axis interface connection for communicat axis number ing over a RS232 or RS485 serial bus port number Magellan Motion Processor Programmer s Command Reference 13 C Mlotion 14 C Motion functions Arguments Function description PMDSetupAxisInterface_CAN axis_handle axis_number board_number Used to setup an axis interface connection for communicat ing over a CAN bus PMDSetupAxisInterface_Parallel axis_handle axis_number board_address Low level function used to setup an axis interface for paral lel communications in an embedded system PMDCloseAxisInterface axis handle Should be called to terminate an interface connection PMDGetErrorMessage ErrorCode Returns a character string representation of the corre sponding PMD chip or C Motion error code GetCMotionVersion MajorVers
141. ly cause Atlas to disable output and raise a Drive Exception event The Drive Exception event is transmitted to the Magellan using the Atlas SPI status word which is received with every torque command sent and will cause the Magellan axis to disable output as well Event 8 may similarly disable output depending on the current foldback event action Events 10 and 14 are not handled by Magellan but indicate a problem with SPI communication which may seriously affect Atlas amplifier operation Event 15 indicates that the Magellan motor type and an attached Atlas amplifier motor type are not compatible This bit may be cleared only by using SetMotorType Restrictions This command is not available in products without drive amplifier support C Motion API PMDresult PMDGetDriveFaultStatus PMDAxisInterface axis intf PMDuinti16 status VB Motion API Dim status as Short status MagellanAxis DriveFaultStatus see ClearDriveFaultStatus p 23 SetMotorType p 140 SetEventAction p 121 Magellan Motion Processor Programmer s Command Reference 41 o GetDriveStatus OEh Syntax GetDriveStatus axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Returned data Type status unsigned 16 bits see below Packet GetDriveStatus Structure 0 axis OEh 15 12 11 8 Y 0 First Data Word read
142. mmand All other Event Status register bits bits that have a mask value of 1 are unaffected Events that cause changes in operating mode or trajectory require in general that the corresponding bit in Event Status be cleared prior to returning to operation That is prior to restoring the operating mode in cases where the event caused a change in it or prior to performing another trajectory move in cases where the event caused a trajectory stop The one exception to this is Motion Error which is not required to be cleared if the event action for it includes disabling of the position loop Atlas When clearing bits 10 Drive Exception or 12 Current Foldback this command will be sent to an attached Atlas amplifier before being applied to the local Magellan register Note that bit 9 Overtemperature Fault is not used for Atlas axes Restrictions Not all bits in ResetEventStatus are supported in some products See the product user s manual 74 Magellan Motion Processor Programmer s Command Reference ResetEventStatus cont 34h A C Motion API PMDresult PMDResetEventStatus PMDAxisInterface axis intf PMDuinti16 status VB Motion API MagellanAxis ResetEventStatus mask see GetEventStatus p 43 Magellan Motion Processor Programmer s Command Reference 75 o RestoreOperatingMode 2Eh Syntax RestoreOperatingMode axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction A
143. mmand Reference 43 o GetEventStatus cont 31h Restrictions Bits 8 9 10 and 12 are not implemented in products that do not include drive amplifier support In this case they are reserved may be 0 or 1 C Motion API PMDresult PMDGetEventStatus PMDAxisInterface axis intf PMDuint16 status VB Motion API Dim status as Short status MagellanAxis EventStatus see GetActivityStatus p 29 GetSignalStatus p 53 GetDriveStatus p 42 GetDriveFaultStatus p 40 44 Magellan Motion Processor Programmer s Command Reference GetFOCValue 5Ah o Syntax GetFOCValue axis loop node Motor Types Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 loop Direct D 0 Quaarature Q 1 node Reference D Q 0 Feedback D Q 1 Error D Q 2 Integrator Sum D Q 3 Reserved 4 Integrator Contribution D Q 5 Output D Q 6 FOC Output Alpha Beta 7 Actual Current A B 8 l t Energy 10 Returned data Type Range Scaling value signed 32 bits see below Packet GetFOCValue Structure 0 axis 5Ah 15 12 41 8 7 0 First data word write 0 loop node 15 12 11 8 7 0 Second data word read value high order part 31 16 Third data word read value low order part 15 0 Description GetFOCValue is used to read the value of a node of the FOC current control See the product user s guide for more information on the location of each node
144. n DC Brush Brushless DC Microstepping Pulse amp Direction None None NoOperation 0 00h 15 8 7 The NoOperation command has no effect on the motion processor PMDresult PMDNoOperation PMDAxisInterface axis intf MagellanObject NoOperation Magellan Motion Processor Programmer s Command Reference 65 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API see a ReadAnalog EFh ReadAnalog portID DC Brush Brushless DC Microstepping Pulse amp Direction Name Type Range Scaling Units portID unsigned 16 bits 0 to 7 unity Type Range Scaling Units value unsigned 16 bits O to 26 14 100 2 input ReadAnalog 0 EFh 15 8 7 0 First data word write 0 portiD 15 3 2 0 Second data word read value 15 0 ReadAnalog returns a 16 bit value representing the voltage presented to the specified analog input See the product user s guide for more information on analog input and scaling PMDresult PMDReadAnalog PMDAxisInterface axis intf PMDuintl6 portID PMDuinti16 value Dim value as Short value MagellanObject Analog portID Magellan Motion Processor Programmer s Command Reference ReadBuffer C9h Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API See
145. n Summary Tables 7 ON IVIC58000 Command MC55000 IMC58000 Atlas ION Encoder AdjustActualPosition Y Y Y Set GetActualPosition Y Y Y Set GetActualPositionUnits Y Y Y GetActualVelocity Y Y Y Set GetCaptureSource Y Y Y GetCaptureValue Y Y Y Set GetEncoderModulus Y Y Set GetEncoderSource Y Y Y Set GetEncoderToStepRatio Y Y Y Motor Output GetActiveMotorCommand Y Y Y Set GetMotorCommand Y Y Set GetMotorType readonly Y readonly Set GetOutputMode readonly Y readonly Set GetPWMFrequency pass through Y Set GetDrivePWM pass through Set GetStepRange Y Y Set GetCurrentFoldback Y pass through Y Set GetCurrent combined Set GetMotorLimit Y Y Set GetMotorBias Y Y Operating Mode Event and Update Control Set GetOperatingMode Y Y combined Y RestoreOperatingMode Y Y combined Y GetActiveOperatingMode Y Y Y MultiUpdate Y Y Update Y Y Y Set GetUpdateMask Y Y Y Set GetEventAction Y Y combined Y foldback Position Servo Loop Control Set GetMotionCompleteMode Y Y Y Set GetSampleTime Y Y Y Set GetSettleTime Y Y Y Set GetSettleWindow Y Y Y Set GetTrackingWindow Y Y Y GetTime Y Y separate Y Profile Generation Set GetAcceleration Y Y Y GetCommandedAcceleration Y Y Y GetCommandedPosition Y Y Y GetCommandedVelocity Y Y Y Set GetDeceleration Y Y Y Set GetGearMaster Y Y Y Set GetGearRatio Y Y Y Magellan Motion Process
146. n returns the reset cause in the variable reset_cause reset_cause reset_cause and also clears the reset condi tion PMDMBReadCardID axis handle This function returns the card ID encoded as defined in card ID the preceeding table Magellan Motion Processor Programmer s Command Reference 15 P 2N C Mlotion This page intentionally left blank 16 Magellan Motion Processor Programmer s Command Reference 3 VB Motion a 3 1 Introduction VB Motion provides a powerful Visual Basic object oriented interface to the Magellan API and allows the developer to focus on writing high level code to control the motion system It can be easily integrated with any VB6 or VB NET in cluding Microsoft VB NET Visual Studio NET and Visual Studio 6 applications The library supports communication to Magellan Developer s Kit Board and Magellan Motion Controller via serial RS232 RS485 and CAN IXXAT and where applicable PCI ISA and PC 104 parallel interfaces There are two COM DLLs PMDMPdll and PMDUser dll Each of these DLLs contains a set of COM objects that provide access to the system The following table describes the libraries COMI Library Description PMDMP dll implements the PMDMPLib object which contains the communication objects for PCI and ISA interfaces CommunicationPCl and CommunicationlSA and the motion processor com mand objects MagellanObject MagellanBoard and MagellanAxis PMDUser dll implements the PMDUserLib
147. n the unit regardless of whether RS 232 or RS 485 voltage levels are being used The response to this command will use the serial port settings in effect before the command is executed for example transmission rate and parity The new serial port settings must be used for the next command GetSerialPortMode returns the configuration for the asynchronous serial port regardless of whether RS 232 or RS 485 voltage levels ate being used The following table shows the encoding of the data used by this command Bit Number Name Instance Encoding 0 3 Transmission Rate 1200 baud 2400 baud 9600 baud 19200 baud 57600 baud 115200 baud 230400 baud 460800 baud 4 5 Parity none odd even 6 Stop Bits l 2 7 8 Protocol Point to point Multi drop using idle line detection Reserved Reserved 11 15 Multi Drop Address Address 0 Address O WN O OIN OINDUABRWN OO Address 31 3l Magellan Motion Processor Programmer s Command Reference 163 SetSerialPortMode cont 8Bh GetSerialPortMode 8Ch A INDGNAMEM Aii NS Restrictions C Motion API PMDresult PMDSetSerialPortMode PMDAxisInterface axis intf PMDuint8 baud PMDuint8 parity PMDuint8 stopBits PMDuint8 protocol PMDuint8 multiDropID PMDresult PMDGetSerialPortMode PMDAxisInterface axis intf PMDuint8 baud PMDuint8 parity PMDuint8 stopBits PMDuint8 protocol PMDuint8 multiDropID VB Motion API Communic
148. nce SetTracePeriod B8h GetTracePeriod B9h 4h s o UU Syntax SetTracePeriod period GetTracePeriod Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Range Scaling Units period unsigned 16 bits 1102 6 1 unity cycles Packet SetTracePeriod Structure 0 B8h 15 8 7 0 Data write period 15 0 GetTracePeriod 0 B9h 15 8 7 0 Data read period 15 0 Description SetTracePeriod sets the interval between contiguous trace captures For example if the trace period is set to one trace data will be captured at the end of every chip cycle If the trace period is set to two trace data will be captured at the end of every second chip cycle and so on GetTracePeriod returns the value for the trace period Atlas No additional Atlas communication is performed for these commands but Atlas trace parameters may have to be set by addressing an Atlas amplifier directly Atlas trace may be synchronized to Magellan trace by using the external trigger trace mode which is done using the trace bit in each Atlas torque command See Atlas Digital Amplifier Complete Technical Reference for more detail Restrictions C Motion API PMDresult PMDSetTracePeriod PMDAxisInterface axis intf PMDuintl6 period PMDresult PMDGetTracePeriod PMDAxisInterface axis intf PMDuinti16 period VB Motion API Dim period as Short MagellanObject TracePeriod period
149. ncoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mode No Stop 0 Abrupt Stop 1 Smooth Stop 2 Packet SetStopMode Structure 0 axis DOh 15 12 11 8 7 0 Data write 0 mode 15 2 1 0 GetStopMode 0 axis D1h 15 12 11 8 7 0 Data read 0 mode 15 2 1 0 Description SetStopMode stops the specified axis The available stop modes are Abrupt Stop which instantly without any deceleration phase stops the axis Smooth Stop which uses the programmed deceleration value and profile shape for the current profile mode to stop the axis or No Stop which is generally used to turn off a previously issued set stop command Note After an Update a buffered stop command SetStopMode command will reset to the No Stop condition In other words if the SetStopMode command is followed by an Update command and then by a GetStopMode command the retrieved stop mode will be No Stop GetStopMode returns the value of the stop mode Restrictions Smooth Stop mode is not available in the Electronic Gear profile mode SetStopMode is a buffered command The value set using this command will not take effect until the next Update or MultiUpdate command with the Trajectory Update bit set in the update mask C Motion API PMDresult PMDSetStopMode PMDAxisInterface axis intf PMDuintl6 mode PMDresult PMDGetStopMode PMDAxisInterface axis intf PMDuintl6 mode VB Motion API Dim mode as Short MagellanAxis StopMode mode mode MagellanAxis StopMode see MultiUpdate p 63
150. nd will be sent to an attached Atlas amplifier before being applied to the local Magellan register The foldback event action is set automatically on Atlas by Magellan when first establishing SPI communication Restrictions If a Smooth Stop action occurs while the trajectory mode is S curve the trajectory cannot be restarted until the smooth stop is complete If a Smooth Stop action occurs while the trajectory mode is electronic gearing an abrupt stop will occur C Motion API PMDresult PMDSetEventAction PMDAxisInterface axis intf PMDuinti16 event PMDuint16 action PMDresult PMDGetEventAction PMDAxisInterface axis intf PMDuinti16 event PMDuinti16 action VB Motion API Dim action as Short MagellanAxis EventAction event action action MagellanAxis EventAction event see GetActiveOperatingMode p 28 RestoreOperatingMode p 76 Set GetOperatingMode p 142 122 Magellan Motion Processor Programmer s Command Reference SetFaultQutMask FBh GetFaultOutMask FCh Syntax SetFaultOutMask axis mask GetFaultOutMask axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mask see below bitmask Packet SetFaultOutMask Structure 0 axis FBh 15 12 11 8 7 0 First data word write mask 15 0 GetFaultOutMask 0 axis FCh 15 12 11 8 7 0 First data word read mask 15 0 Description SetFa
151. nical Reference for more detail Atlas These commands are relayed to an attached Atlas amplifier C Motion API PMDresult PMDSetDriveCommandMode PMDAxisInterface axis intf PMDuinti16 mode PMDresult PMDGetDriveCommandMode PMDAxisInterface axis intf PMDuinti16 mode VB Motion API MagellanAxis DriveCommandMode mode mode MagellanAxis DriveCommandMode Magellan Motion Processor Programmer s Command Reference 113 SetDriveFaultParameter 62h GetDriveFaultParameter 60h n o CA Syntax SetDriveFaultParameter axis parameter value GetDriveFaultParameter axis parameter Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 parameter Overvoltage Limit 0 Undervoltage Limit 1 Event Recovery Mode 2 Watchdog Limit 3 Temperature Limit 4 Temperature Hysteresis 5 Type Range Scaling value unsigned 16 bits see below see below Packet SetDriveFaultParameter Structure 0 axis 62h 15 12 1 8 7 0 First data word write parameter 15 0 Second data word write value 15 0 GetDriveFaultParameter 0 axis 60n 15 12 11 8 7 0 First data word write parameter 15 0 Second data word read value 15 0 Description SetDriveFaultParameter sets the thresholds for determination of overvoltage and undervoltage conditions If the bus voltage exceeds the Overvoltage Limit value an overvoltage condition occu
152. nisms for opening a connection to a Motion Processor discussed for Version 3 x in section 2 4 Using C Motion on page 12 C Motion 3 x requires the commu nication interface PCI ISA serial or CAN to be specified at compile time This allows a smaller program and in the case of a port to a microprocessor host means that code for interfaces that are not used need not be ported C Motion 3 x uses only the Magellan protocols and does not support PRP C Motion 4 x allows the communications interface PCI TCP serial or CAN to be specified at run time and supports multiple connections using different interfaces at the same time A larger and more complex library is therefore required C Motion 4 x supports both the Magellan pro tocols which are used to communicate with Magellan attached Motion Processors and also PRP which is used to com municate with Prodigy CME cards and ION CME and ION D digital drives A port of C Motion 4 x to a microprocessor host could certainly omit some interfaces but source code changes in various parts of the library would be required For more information on using C Motion version 4 x see the PMD Resource Access Protocol Programmer s Refer ence Magellan Motion Processor Programmer s Command Reference 11 C Motion 12 2 3 Files The following table lists the files that make up the C Motion distribution C Motion h C Motion c Definition declaration of the PMD Magellan command set
153. not inverted cont When the Step Output SPI Enable bit is set to 1 a step will be generated by the motion processor with a low to high transition on the Pulse signal Otherwise a step will be generated by the motion processor with a high to low transition on the Pulse signal The same bit is used to control the sense of the SPI Enable signal either in SPI DAC or in Atlas SPI output mode When the bit is set the Enable signal will be held low when addressing the SPI output device otherwise it will be held high When driving an Atlas amplifier this bit must be set Setting the Motor Direction bit has the effect of swapping the sense of positive and negative motor movement GetSignalSense returns the value of the Signal Sense mask Atlas No additional Atlas communication is performed for these commands Atlas communication will fail if bit 11 is not properly set Restrictions In ION products FaultOut and Enable exist in the Signal Status register but their sense is not controllable In ION products when the Capture Source is set to Encoder Index only the Encoder Index bit of signal sense should be used to configure its polarity The Capture Input bit of Signal Sense should always be cleared to zero 0 in this case Not all bits are implemented for all products See the product user s guide For Atlas these signals are not included in the Magellan signal status register C Motion API PMDresult PMDSetSignalSense PMDAxisInterface a
154. nsigned 16 bits 0 to 216 1 ReadlO 0 83h 15 8 7 0 First data word write 0 address 15 8 7 0 Second data word read data 15 0 ReadlO reads one 16 bit word of data from the device at address The address is an offset from location 1000h of the motion processor s peripheral device address space The format and interpretation of the 16 bit data word are dependent on the user defined device being addressed User defined I O can be used to implement a number of features including additional parallel I O flash memory for non volatile configuration information storage or display devices such as LED arrays This command is not available in products without a parallel I O port PMDresult PMDReadIO PMDAxisInterface axis intf PMDuintl6 address PMDuint16 data Dim data as Short data MagellanObject IO address WritelO p 194 Magellan Motion Processor Programmer s Command Reference Reset 39h Syntax Reset Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments None Returned data None Packet Reset Structure 0 39h 15 8 7 0 Description Reset restores the motion processor to its initial condition setting all motion processor variables to their default values Most variables are motor type independent however several default values depend upon the configured motor type of the axis Some of the default values also depend on the state of Magellan pin OutputMode0 wh
155. nt 2 to 25 100 2 4 max current Error 25 to 2 5 100 24 max current Integrator Sum 23 to 23 _ 100 2 4 max current current loop cycles Integrator Contribution 23 to 23 100 2 4 max current Output 325 56 315 100 24 max current Pt Energy 23 to 23 100 2 max energy 38 Magellan Motion Processor Programmer s Command Reference GetCurrentLoopValue cont 71h Description All of the nodes have units of maximum current and most have scaling of 100 2 That is a value of cont 2 corresponds to 100 maximum current The range is extended to allow for overshoot in excess of maximum peak current and thus values can be more than 100 of the maximum output current The Integrator Sum is a signed 32 bit number with scaling of 100 2 That is a current error of 100 maximum present for 16 current loop cycles will result in an integrator sum of 16 100 2 100 25 Current loop cyles are not the same as position loop servo cycles The current loop runs at 20 kHz regatdless of the servo cycle time Atlas This command is relayed to any connected Atlas amplifier Restrictions This command is only supported in products that include digital current control and when the current control mode is Phase A B C Motion API PMDresult PMDGetCurrentLoopValue PMDAxisInterface axis intf PMDuint8 phase PMDuint8 node PMDint32 value VB Motion API MagellanAxis CurrentLoopValue in phase
156. o low order part 15 0 GetGearRatio 0 slaveAxis 59h 15 12 11 8 7 0 First data word read ratio high order part 31 16 Second data word read ratio low order part 15 0 Description SetGearRatio sets the ratio between the master and slave axes for the Electronic Gear profile for the given slaveAxis Positive ratios cause the slave to move in the same direction as the master negative ratios in the opposite direction The specified ratio has a unity scaling of 65 536 GetGearRatio returns the gear ratio set for the specified slaveAxis Scaling examples ratio value resultant ratio 32 768 5 negative slave counts for each positive master count 1 000 000 15 259 positive slave counts for each positive master count 123 0018 positive slave counts for each positive master count Restrictions This is a buffered command The new value set will not take effect until the next Update or MultiUpdate command is entered with the Trajectory Update bit set in the update mask C Motion API PMDresult PMDSetGearRatio PMDAxisInterface axis intf PMDint32 ratio PMDresult PMDGetGearRatio PMDAxisInterface axis intf PMDint32 ratio VB Motion API Dim ratio as Long MagellanAxis GearRatio ratio ratio MagellanAxis GearRatio see Set GetGearMaster p 129 MultiUpdate p 63 Update p 192 Magellan Motion Processor Programmer s Command Reference 131 SetinterruptMask 2Fh GetlnterruptMas
157. ocessor Programmer s Command Reference Instruction Summary Tables 2 MC58000 Command MC55000 IMC58000 Atlas ION Miscellaneous GetChecksum Y Y separate Y Set GetSynchronizationMode Y GetVersion Y Y separate Y NoOperation Y Y separate Y ReadlO Y Y Reset Y Y separate Y WritelO Y Y Y ReadAnalog Y Y separate Y Set GetDefault Y Y 5 3 Alphabetical Listing Get Set instructions pairs ate shown together on the same line of the table e Instruction Code Instruction Code Page AdjustActualPosition F5h 22 ClearDriveFaultStatus 6Ch 23 Clearlnterrupt ACh 24 ClearPositionError 47h 25 DriveNVRAM 30h 26 GetAcceleration 4Ch SetAcceleration 90h TT GetActiveMotorCommand 3Ah 27 GetActiveOperatingMode 57h 28 GetActivityStatus A6h 29 GetActualPosition 37h SetActualPosition 4Dh 79 GetActualPositionUnits BFh SetActualPositionUnits BEh 81 GetActualVelocity ADh 31 GetAuxiliaryEncoderSource 09h SetAuxiliaryEncoderSource 08h 82 GetAxisOutMask 46h SetAxisOutMask 45h 84 GetBreakpoint D5h SetBreakpoint D4h 86 GetBreakpointUpdateMask 33h SetBreakpointUpdateMask 32h 89 GetBreakpointValue D7h SetBreakpointValue D6h gi GetBufferLength C3h SetBufferLength C2h 93 GetBufferReadIndex C7h SetBufferReadlndex C6h 95 GetBufferStart CIh SetBufferStart COh 96 GetBufferWritelndex C5h SetBufferWritelndex C4h 98 GetBusVoltage 40h 32 GetCANMode I5h SetC
158. ode and the active operating mode to the desired state GetOperatingMode gets the operating mode of the axis Atlas The SetOperatingMode command will be relayed to an attached Atlas amplifier before being applied to the local Magellan register GetOperatingMode does not require any additional Atlas communication Restrictions The possible operating modes of an axis is product specific and in some cases axis specific See the product user s guide for a description of what operating modes are supported on each axis C Motion API PMDresult PMDSetOperatingMode PMDAxisInterface axis intf PMDuinti16 mode PMDresult PMDGetOperatingMode PMDAxisInterface axis intf PMDuinti16 mode VB Motion API Dim mode as Short MagellanAxis OperatingMode mode mode MagellanAxis OperatingMode see GetActiveOperatingMode p 28 RestoreOperatingMode p 76 Magellan Motion Processor Programmer s Command Reference 143 SetOutputMode EOh GetOutputMode GEh mus A Snc Syntax SetOutputMode axis mode GetOutputMode axis Motor Types DC Brush Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mode Parallel DAC Offset Binary 0 PWM Sign Magnitude 1 PWM 50 50 Magnitude 2 SPI DAC Offset Binary 3 Parallel DAC Sign Magnitude 4 SPI DAC 2 s Complement 5 Atlas SPI 6 PWM High Low 7 Packet SetOutputMode Structure 0 axis EO
159. oding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Indicator Encoding Bit Number sense EncoderA 0001h 0 EncoderB 0002h 1 Encoder Index 0004h 2 Capture Input 0008h 3 Positive Limit 0010h 4 Negative Limit 0020h 5 Axisln 0040h 6 HallA 0080h 7 HallB 0100h 8 HallC 0200h 9 AxisOut 0400h 10 Step Output SPI Enable 0800h 11 Motor Direction 1000h 12 Reserved 13 15 Packet SetSignalSense Structure 0 axis A2h 15 12 11 8 7 0 Data write 0 sense 15 13 12 0 GetSignalSense 0 axis A3h 15 12 11 8 7 0 Data read 0 sense 15 13 12 0 Description SetSignalSense establishes the sense of the corresponding bits of the Signal Status register with the addition of Step Output and Motor Direction for the specified axis For Encoder Index if the sense bit is 1 an index will be recognized for use in index based phase correction if the index is high For the Capture Input if the sense bit is 1 a capture will occur on a low to high signal transition Otherwise a capture will occur on a high to low transition For Positive Limit and Negative Limit if the sense bit is 1 an overtravel condition will occur if the signal is high Otherwise an overtravel condition will occur when the signal is low Magellan Motion Processor Programmer s Command Reference 167 SetSignalSense cont A2h GetSignalSense A3h Op a Description The AxisOut signal is inverted if the sense bit is set to one otherwise it is
160. onal contribution of the current loop output to be 30 of maximum output Magellan Motion Processor Programmer s Command Reference 127 SetFOC cont buffered F6h GetFOC F7h k LL Description Similarly setting KiDQ to 256 gives it a gain of 1 the value of the integrator sum would become the cont integrator contribution to the output ILimitDQ is used to limit the contribution of the integrator sum at the output Its effect depends on the value of KiDQ Setting llimitDQ to 1000 when KiDQ is 10 means that the maximum contribution to the output is 1000 x 10 10 000 out of 2 1 or approximately 30 5 The units of time for the integrator sum are cycles The loop argument allows individual configuration of the parameters for the D and Q current loops Alternately a loop of 2 can be used with SetFOC to set the D and Q loops with a single API command A loop of 2 is not valid for GetFOC Atlas These commands are relayed to an attached Atlas amplifier Restrictions Set GetFOC are buffered commands All parameters set are buffered and will not take effect until an update is done on the current loop through Update command MultiUpdate command or update action on breakpoint The values read by GetFOC are the buffered settings These commands are only supported in products that include digital current control and when the current control mode is set to FOC C Motion API PMDresult PMDSetFOC PMDA
161. op Control Set GetMotionCompleteMode Set Get the motion complete mode 135 Set GetSampleTime Set Get servo loop sample time 161 Set GetSettleTime Set Get the axis settled time 165 Set GetSettleWindow Set Get the settle window boundary value 166 GetTime Get current chipset time number of servo loops 56 Set GetTrackingWindow Set Get the tracking window boundary value 187 Profile Generation Set GetAcceleration Set Get acceleration limit 77 GetCommandedAcceleration Get commanded instantaneous desired acceleration 35 GetCommandedPosition Get commanded instantaneous desired position 36 GetCommandedVelocity Get commanded instantaneous desired velocity 37 Set GetDeceleration Set Get deceleration limit 110 Set GetGearMaster Set Get the electronic gear mode master axis and source 129 Set GetGearRatio Set Get commanded electronic gear ratio 131 Set GetJerk Set Get jerk limit 134 Set GetPosition Set Get destination position 153 Set GetProfileMode Set Get current profile mode 158 Set GetStartVelocity Set Get start velocity 170 Set GetStopMode Set Get stop command abrupt smooth or none 172 196 Magellan Motion Processor Programmer s Command Reference Instruction Summary Tables 2 Profile Generation Set GetVelocity Set Get velocity limit 190 RAM Buffer Set GetBufferLength Set Get the length of a memory buffer 93 Se
162. or Programmer s Command Reference 199 e Instruction Summary Tables IMC58000 Command MC55000 IMC58000 Atlas ION Profile Generation Set GetJerk Y Y Y Set GetPosition Y Y Y Set GetProfileMode Y Y Y Set GetStartVelocity Y Y Y Set GetStopMode Y Y Y Set GetVelocity Y Y Y RAM Buffer Set GetBufferLength Y Y separate Y Set GetBufferReadIndex Y Y separate Y Set GetBufferStart Y Y separate Y Set GetBufferWritelndex Y Y separate Y ReadBuffer Y Y Y WriteBuffer Y Y Y ReadBuffer 6 Atlas only Drive Set GetDriveFaultParameter pass through GetBusVoltage pass through Y Set GetOvertemperatureLimit Y GetTemperature pass through Y Set GetFaultOutMask pass through Y GetDriveFaultStatus pass through Y ClearDriveFaultStatus pass through Y Status Registers and AxisOut Indicator GetActivityStatus Y Y Y GetDriveStatus Y Y Y Set GetAxisOutMask Y Y Y GetEventStatus Y Y Y GetSignalStatus Y Y separate Y Set GetSignalSense Y Y Y ResetEventStatus Y Y combined Y Traces GetTraceCount Y Y separate Y Set GetTraceMode Y Y separate Y Set GetTracePeriod Y Y separate Y Set GetTraceStart Y Y separate Y GetTraceStatus Y Y separate Y Set GetTraceStop Y Y separate Y Set GetTraceVariable Y Y separate Y Communications Set GetCANMode Y Y Y GetInstructionError Y Y separate Y Set GetSerialPortMode Y Y Y Set GetSPIMode Y 200 Magellan Motion Pr
163. otion Processor Programmer s Command Reference SetTraceVariable B6h GetTraceVariable B7h Syntax SetTraceVariable variableNumber traceAxis variablelD GetTraceVariable variableNumber Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding variableNumber Variable 1 0 Variable2 1 Variable3 2 Variable4 3 traceAxis Axis1 0 Axis2 1 Axis3 2 Axis4 3 variablelD Trajectory Generator Commanded Position 02h Commanded Velocity 03h Commanded Acceleration 04h Encoder Actual Position 05h Actual Velocity 06h Capture Value 09h Phase Angle OFh Phase Offset 10h 32 bit Actual Velocity 53h Raw Encoder Reading 54h Position Loop Position Error 01h Position Loop Integrator Sum OAh Position Loop Integrator Contribution 39h Position Loop Derivative OBh PID Output Biquad1 Input 40h Biquad1 Output Biquad2 Input 41h Status Registers Event Status Register OCh Activity Status Register ODh Signal Status Register OEh Drive Status Register 38h Atlas SPI Status 50h Commutation Phasing Active Motor Command 07h Phase A Command 11h Phase B Command 12h Phase C Command 13h Phase Angle Scaled 1Dh Magellan Motion Processor Programmer s Command Reference 183 SetTraceVariable cont B6h GetTraceVariable B7h Arguments Current Loops Phase A Reference 42h cont Phase A Error 1Eh Phase A Actual Current 1Fh Phase A Integrator Sum 20h Phase A Integrator Contribution 21h Current Loo
164. ow GetActivityStatus 0 axis A6h 15 12 11 8 7 0 Data read 15 13 12 n 10 9 8 7 6 5 3 2 1 0 GetActivityStatus reads the 16 bit Activity Status register for the specified axis Each of the bits in this register continuously indicate the state of the motion processor without any action on the part of the host There is no direct way to set or clear the state of these bits since they are controlled by the motion processor The following table shows the encoding of the data returned by this command Name Bit s Description Phasing Initialized 0 Set to if phasing is initialized brushless DC axes only At Maximum Velocity Set to when the trajectory is at maximum velocity This bit is determined by the trajectory generator not the actual encoder velocity Tracking Set to when the axis is within the tracking window Current Profile Mode 3 5 Contains trajectory mode encoded as follows bit 5 bit 4 bit 3 Profile Mode 0 0 0 Trapezoidal 0 0 l Velocity Contouring 0 l 0 S curve 0 l l Electronic Gear 6 Reserved not used may be 0 or Axis Settled 7 Set to when the axis is settled Position Loop Enabled 8 Set to when position loop or trajectory is enabled Position Capture 9 Set to when a value has been captured by the high speed position capture hardware but has not yet been read 29 o GetActivityStatus cont A6h 30 Description cont Restrictions C Motion A
165. p A Output 22h Phase B Reference 43h Phase B Error 23h Phase B Actual Current 24h Phase B Integrator Sum 25h Phase B Integrator Contribution 26h Current Loop B Output 27h D Feedback 2Ah Q Feedback 30h Field Oriented Control D Reference 28h D Error 29h D Feedback 2Ah D Integrator Sum 2Bh D Integrator Contribution 2Ch D Output 2Dh Q Reference 2Eh Q Error 2Fh Q Feedback 30h Q Integrator Sum 31h Q Integrator Contribution 32h Q Output 33h Phase A Actual Current 1Fh Phase B Actual Current 24h FOC Alpha Output 34h FOC Beta Output 35h Motor Output Bus Voltage 36h Temperature 37h l t Energy 44h Analog Inputs Analog InputO 14h Analog Input1 15h Analog Input2 16h Analog Input3 17h Analog Input4 18h Analog Input5 19h Analog Input6 1Ah Analog Input 1Bh Miscellaneous None disable variable 00h Motion Processor Time 08h 184 Magellan Motion Processor Programmer s Command Reference SetTraceVariable cont B6h GetTraceVariable B7h Packet Structure Description Atlas Restrictions C Motion API SetTraceVariable 0 B6h 15 8 7 0 First data word write 0 variableNumber 15 2 1 0 Second data word write variablelD 0 traceAxis 15 8 7 4 3 0 GetTraceVariable 0 B7h 15 8 7 0 First data word write 0 variableNumber 15 2 1 0 Second data word read variablelD 0 traceAxis 15 8 7 4 3 0 SetTraceVariable assigns the given variable to the specified
166. p synchronization cannot be used Multichip synchronization is not supported in all products See the product user s guide C Motion API PMDresult PMDSetSynchronizationMode PMDAxisInterface axis intf PMDuint16 mode PMDresult PMDGetSynchronizationMode PMDAxisInterface axis intf PMDuint16 mode VB Motion API Dim mode as Short MagellanObject SynchronizationMode mode mode MagellanObject SynchronizationMode see GetTime p 56 SetBreakPoint p 86 Magellan Motion Processor Programmer s Command Reference 173 SetTraceMode BOh GetTraceMode B1h cR _ i Syntax SetTraceMode mode GetTraceMode Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding mode 16 bit unsigned see below Packet SetTraceMode Structure 0 Boh 15 8 7 0 Data write mode 15 0 GetTraceMode 0 B1h 15 8 7 0 Data read mode 15 1 0 Description SetTraceMode sets the behavior for the next trace Mode is a bitmask as shown below Name Bit Wrap Mode 0 Reserved 1 7 Trigger Mode 8 Reserved 9 15 Wrap mode may be either One Time zero or Rolling Buffer one In One Time mode the trace continues until the trace buffer is filled then stops In Rolling Buffer mode the trace continues from the beginning of the trace buffer after the end is reached When in rolling mode values stored at the beginning of the trace buffer are los
167. pdate command with the Trajectory Update bit set in the update mask C Motion API PMDresult PMDSetProfileMode PMDAxisInterface axis intf PMDuint16 mode PMDresult PMDGetProfileMode PMDAxisInterface axis intf PMDuinti16 mode VB Motion API Dim mode as Short MagellanAxis ProfileMode mode mode MagellanAxis ProfileMode see MultiUpdate p 63 Update p 192 158 Magellan Motion Processor Programmer s Command Reference SetPWMFrequency OCh GetPWMFrequency ODh Syntax SetPWMFrequency axis frequency GetPWMFrequency axis Motor Types DC Brush Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units frequency unsigned 16 bits 0 to 216 1 1 25 kHz Packet SetPWMFrequency Structure 0 axis OCh 15 12 11 8 7 0 Data write frequency 15 0 GetPWMFrequency 0 axis O0Dh 15 12 11 8 7 0 Data read frequency 15 0 Description SetPWMFrequency sets the PWM output frequency in kHz for the specified axis To select one of the supported frequencies pass the value listed in the SetPWMFrequency Value column as the frequency argument to this command Approximate PWM bit Actual X SetPWMrFrequency _ Frequency Resolution Frequency Value 20 kHz 10 19 531 kHz 5 000 40 kHz 9 39 062 kHz 10 000 80 kHz 8 78 124 kHz 20 000 Atlas These commands are relayed to an attached Atlas amplifier A
168. period MagellanObject TracePeriod see Set GetSampleTime p 161 Set GetTraceStart p 177 Set GetTraceStop p 180 176 Magellan Motion Processor Programmer s Command Reference SetTraceStart B2h GetTraceStart B3h Syntax SetTraceStart triggerAxis condition triggerBit triggerState GetTraceStart Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding triggerAxis Axis1 0 Axis2 1 Axis3 2 Axis4 3 condition Immediate 0 Next Update 1 Event Status 2 Activity Status 3 Signal Status 4 Drive Status 5 triggerBit Status Register Bit 0 to 15 triggerState tS Triggering State of the Bit O value 0 1 value 1 Packet SetTraceStart Structure 0 B2h 15 8 7 0 Data write 0 tS triggerBit condition triggerAxis 15 13 12 11 8 7 4 3 0 GetTraceStart 0 B3h 15 8 7 0 Data read 0 tS triggerBit condition triggerAxis 15 13 12 1 8 7 4 3 0 Description SetTraceStart sets the condition for starting the trace The Immediate condition requires no axis to be specified and the trace will begin upon execution of this instruction The other four conditions require an axis to be specified and when the condition for that axis is attained the trace will begin When a status register bit is the trigger the bit number and state must be included in the argument The trace is started when the indicated bit reaches the specified
169. pointUpdateMask p 89 GetCurrentLoopValue p 38 Set GetCurrentControlMode p 104 Magellan Motion Processor Programmer s Command Reference 109 SetDeceleration buffered 91h GetDeceleration 92h uh a Syntax SetDeceleration axis deceleration GetDeceleration axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units deceleration unsigned 32 bits 0to29 1 1 2 counts cycle microsteps cycle Packet SetDeceleration Structure 0 axis 91h 15 12 11 8 7 0 First data word write deceleration high order part 31 16 Second data word write deceleration low order part 15 0 GetDeceleration 0 axis 92h 15 12 11 8 7 0 First data word read deceleration high order part 31 16 Second data word read deceleration low order part 15 0 Description SetDeceleration loads the maximum deceleration buffer register for the specified axis GetDeceleration returns the value of the maximum deceleration buffer Scaling example To load a value of 1 750 counts cycle multiply by 65 536 giving 114 688 and load the resultant number as a 32 bit number giving 0001 in the high word and C000h in the low word Retrieved numbers GetDeceleration must correspondingly be divided by 65 536 to convert to units of counts cycle or steps cycle
170. ption Encoding product family Navigator 2 Pilot 3 Magellan 5 ION 9 motor type Servo Brushless 3 Microstepping 4 Pulse amp Direction 5 All Motor Types 8 ION Any Motor Type 9 number of axes Maximum number of supported axes to I5 special Reserved 0 to 3 chips 0 to 3 customization code None 0 Other to 255 product version 0 to 3 major s w version 0 to 3 minor s w version 0 to I5 Note that in the C Motion function PMDGetVersion the special attributes value and the chip count values are combined and returned in a single parameter special and chip count Chip count is encoded in bits 0 1 of this value special is encoded in bits 2 3 Likewise for the major parameter The major version is encoded in bits 0 1 and the product version is encoded in bits 2 3 Magellan Motion Processor Programmer s Command Reference GetVersion cont SFh o C Motion API PMDresult PMDGetVersion PMDAxisInterface axis intf PMDuintl6 family PMDuintli6 motorType PMDuintl16 numberAxes PMDuintl6 special and chip count PMDuintl6 custom PMDuint1l6 major PMDuinti16 minor VB Motion API Dim version as Long version MagellanObject Version See Magellan Motion Processor Programmer s Command Reference 61 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions C Motion API VB Motion API see o InitializePhase 7Ah InitializePhase axis Brushless DC
171. r A5h 47 GetlnterruptAxis Elh 49 GetlnterruptMask 56h SetlnterruptMask 2Fh 132 GetJerk 58h SetJerk 13h 134 GetMotionCompleteMode ECh SetMotionCompleteMode X EBh 135 GetMotorBias 2Dh SetMotorBias OFh 136 GetMotorCommand 69h SetMotorCommand 77h 137 GetMotorLimit 07h SetMotorLimit 06h 139 GetMotorType 03h SetMotorType 02h 140 GetOperatingMode 66h SetOperatingMode 65h 142 GetOutputMode 6Eh SetOutputMode EOh 144 GetOvertemperatureLimit ICh SetOvertemperatureLimit Bh 145 GetPhaseAngle 2Ch SetPhaseAngle 84h 146 GetPhaseCommand EAh 50 GetPhaseCorrectionMode E9h SetPhaseCorrectionMode E8h 147 GetPhaseCounts 7Dh SetPhaseCounts 75h 148 GetPhaselnitializeMode E5h SetPhaselnitializeMode E4h 149 GetPhaselnitializeTime 7Ch SetPhaselnitializeTime 72h 150 GetPhaseOffset 7Bh SetPhaseOffset 76h 151 GetPhasePrescale E7h SetPhasePrescale E6h 152 GetPosition 4Ah SetPosition 10h 153 GetPositionError 99h 51 GetPositionErrorLimit 98h SetPositionErrorLimit 97h 154 GetPositionLoop 68h SetPositionLoop 67h 155 GetPositionLoopValue 55h 52 GetProfileMode Alh SetProfileMode AOh 158 GetPWMFrequency O0Dh SetPWMFrequency OCh 159 GetSampleTime 3Ch SetSampleTime 3Bh 161 Magellan Motion Processor Programmer s Command Reference Instruction Summary Tables 2 Instruction Code Instruction Code Page GetSerialPortMode 8Ch SetSerialPortMode 8Bh 163 GetSettleTime ABh SetSe
172. r occurs unless ModeSuppressExceptions is TRUE Dim valLong As Long Il To get a motion processor parameter use the following syntax valLong axis Position I To set a motion processor parameter use the following syntax axis Position valLong Magellan Motion Processor Programmer s Command Reference VB Motion Some commands require additional parameters Some standard values are defined by VB Motion and can be used with the appropriate commands Refer to PMDMPLib in the Object Viewer for a complete list of defined types The fol lowing is an example of calling one of the VB Motion methods with the pre defined types Dim valBreakPoint As PMD BREAKPOINT ID Dim valAxis As PMD AXIS Dim valBreakPointAction As PMD BREAKPOINT ACTION Dim valBreakPointTrigger As PMD BREAKPOINT TRIGGER valBreakPoint PMD BREAKPOINT ID 1 valAxis PMD AXIS I valBreakPointAction PMD BREAKPOINT ACTION ABRUPT STOP valBreakPointTrigger PMD BREAKPOINT TRIGGER ACTUAL POSITION CROSSED axis BreakpointValue valBreakPoint 1000 axis BreakpointSet valBreakPoint valAxis valBreakPointAction valBreakPointT rigger The above example sets breakpoint 1 on axis 1 to trigger an abrupt stop if the actual position crosses 1000 3 4 Prodigy Motion Card Specific Commands Several auxiliary methods and properties are included in addition to the standard Magellan API commands for use with the Magellan based Prodigy Motion Cards only The commands are for config
173. raceStop returns the value of the trace stop trigger Once a trace has stopped the trace stop trigger is reset to zero 0 180 Magellan Motion Processor Programmer s Command Reference SetTraceStop cont B4h GetTraceStop B5h Description The following table shows the corresponding value for combinations of triggerBit and register cont Activity Signal Event Status Status Status Drive Status TriggerBit Register Register Register Register 0 Motion Complete Phasing Initialized Encoder A Wrap around At Maximum Encoder B In Foldback Velocity 2 Breakpoint Tracking Encoder Index Overtemperature 3 Position Capture Capture Input 4 Motion Error Positive Limit In Holding 5 Positive Limit Negative Limit Overvoltage 6 Negative Limit Axisln Undervoltage 7 Instruction Error Axis Settled Hall Sensor A 8 Disable Motor mode Hall Sensor B 9 Overtemperature Position Capture Hall Sensor C Fault 0Ah Bus Voltage Fault In Motion OBh Commutation Error In Positive Limit OCh Current Foldback In Negative Limit ODh Enable Input OEh Breakpoint 2 FaultOut OFh Examples If it is desired that the trace ends on the next Update for axis 3 then a 2 is set for the axis number a 1 is set for the condition and bit number and state can be loaded with zeroes since they are not used The actual data word sent to the motor processor in this case is 0012h If it is desired that the trace ends when bit 7 of the Activity St
174. rent but extra SPI communication can significantly slow down Magellan command processing because a result must be received from Atlas before it is passed on to the Magellan host Any comments in this section do not apply to any Magellan axis not connected to an Atlas amplifier This section will not be present in the case of commands without any Atlas implications For more information on the behavior of Atlas commands see the Atlas Digital Amplifier Complete Technical Reference Restrictions Describes the circumstances in which the instruction is not valid that is when it should not be issued For example velocity acceleration deceleration and jerk parameters may not be issued while an S curve profile is being executed C Motion API The syntax of the C function call in the PMD C Motion library that implements this motion processor command VB Motion API The Visual Basic syntax for the function in the PMD VB Motion library that implements this motion processor command Properties and methods are shown with their associated root object name separated by a period see Refers to related instructions Magellan Motion Processor Programmer s Command Reference 21 a AdjustActualPosition F5h Syntax AdjustActualPosition axis position Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Rang
175. rguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 Packet RestoreOperatingMode Structure 0 axis 2En 15 12 11 8 7 0 Description RestoreOperatingMode is used to command the axis to return to its static operating mode It should be used when the active operating mode has changed due to actions taken from safety events ot other programmed events Calling RestoreOperatingMode will re enable all loops that were disabled as a result of events Atlas This command will be sent to an attached Atlas amplifier before being applied to the local Magellan register Restrictions Before using RestoreOperatingMode to return to the static operating mode the event status bits should all be cleared If a bit in event status that caused a change in operating mode is not cleared this command will return an error An exception to this is Motion Error which does not have to be cleared prior to restoring the operating mode Though RestoreOperatingMode will re enable the trajectory generator if it was disabled as a result of an event action it will not resume a move This must be done through an Update or MultiUpdate C Motion API PMDresult PMDRestoreOperatingMode PMDAxisInterface axis intf VB Motion API MagellanAxis RestoreOperatingMode see GetActiveOperatingMode p 28 Set GetOperatingMode p 142 Set GetEventAction p 121 Set GetBreakpoint p 86 76 Magellan Motion Processor Programmer s Command Reference SetAcceler
176. right to make changes to its products or to discontinue any product or service without notice and advises customers to obtain the latest version of relevant information to verify before placing orders that information being relied on is current and complete All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgement including those pertaining to warranty patent infringement and limitation of liability Safety Notice Certain applications using semiconductor products may involve potential risks of death personal injury or severe property or environmental damage These products are not designed authorized or warranted to be suitable for use in life support devices or systems or other critical applications Inclusion of PMD products in such applications is un derstood to be fully at the customet s risk In order to minimize risks associated with the customer s applications adequate design and operating safeguards must be provided by the customer to minimize inherent procedural hazards Disclaimer PMD assumes no liability for applications assistance or customer product design PMD does not warrant or represent that any license either express or implied is granted under any patent right copyright mask work right or other in tellectual property right of PMD covering or relating to any combination machine or process in which such products or services might be or are used PMD s publ
177. rocessor Programmer s Command Reference SetMotorCommand buffered 11h GetMotorCommand 69h Syntax SetMotorCommand axis command GetMotorCommand axis Motor Types DC Brush Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units command signed 16 bits 215 to 215 4 100 215 output Packet SetMotorcommand Structure 0 axis 77h 15 12 11 8 7 0 Data write command 15 0 GetMotorCommand 0 axis 69h 15 12 11 8 7 0 Data read command 15 0 Description SetMotorCommand loads the Motor Command buffer register of the specified axis For axes configured for microstepping motors this command is used to control the magnitude of the output waveform For DC brush and brushless DC motors this command directly sets the Motor Output register when the Position Loop and Trajectory Generator modules are disabled in the operating mode GetMotorCommand reads the contents of the motor command buffer register Scaling example If it is desired that a Motor Command value of 13 7 of full scale be output to the motot then this register should be loaded with a value of 13 7 32 768 100 4 489 decimal This corresponds to a hexadecimal value of 1189h Atlas Note that SetMotorCommand is not used to set step motor drive current when using an Atlas amplifier SetCurrent should be used instead Restrictions SetMotorComman
178. rrent control active 3 Reserved Position Loop Enabled 4 0 axis position loop bypassed axis position loop active Trajectory Enabled 5 0 trajectory generator disabled trajectory generator enabled 6 15 Reserved When the axis is disabled no processing will be done on the axis and the axis outputs will be at their reset states When the axis motor output is disabled the axis will function normally but its motor outputs will be in their disabled state When a loop is disabled position or current loop it operates by passing its input directly to its output and clearing all internal state variables such as integrator sums etc When the trajectory generator is disabled it operates by commanding 0 velocity 142 Magellan Motion Processor Programmer s Command Reference SetOperatingMode cont 65h GetOperatingMode 66h Description For example to configure an axis for Torque mode trajectory and position loop disabled the operating cont mode would be set to hexadecimal 0007h This command should be used to configure the static operating mode of the axis The actual current operating mode may be changed by the axis in response to safety events or user programmable events In this case the present operating mode is available using GetActiveOperatingMode GetOperatingMode will always return the static operating mode set using SetOperatingMode Executing the SetOperatingMode command sets both the static operating m
179. rs If the bus voltage is less than the Undervoltage Limit value an undervoltage condition occurs Both the Overvoltage Limit and Undervoltage Limit have ranges of 0 to 2 1 with scaling of 1 3612 millivolts count For example to set the overvoltage threshold to 30V Overvoltage Limit should be set to 30V 1 3612mv 22039 GetDriveFaultParameter reads the indicated limit The remaining parameters are relevant only to an axis driving an Atlas amplifier see 747 25 Digital Amplifier Complete Technical Reference for their use These commands were previously documented as Set GetBusVoltageLimits The names have been changed for clarity as more fault parameter options were added 114 Magellan Motion Processor Programmer s Command Reference SetDriveFaultParameter cont 62h GetDriveFaultParameter 60h i Atlas These commands will be relayed to an attached Atlas amplifier Restrictions Get SetDriveFaultParameter is only available in products equipped with Bus voltage sensors The Overvoltage Limit cannot be set to a value greater than the reset default setting and the Undervoltage Limit cannot be set to a value less than the reset default setting Motion API PMDresult PMDSetDriveFaultParameter PMDAxisInterface axis intf PMDuinti16 parameter PMDuinti16 value PMDresult PMDGetDriveFaultParameter PMDAxisInterface axis intf PMDuinti16 parameter PMDuinti16 value VB Motion API Dim value as Short MagellanAxis BusVoltageLimits
180. s This command is relayed to an attached Atlas amplifier Restrictions This command is only supported in products that include digital current control and when the current control mode is set to FOC C Motion API PMDresult PMDGetFOCValue PMDAxisInterface axis intf PMDuint8 loop PMDuint8 node PMDint32 value VB Motion API MagellanAxis FOCValue in loop in node out value see Set GetFOC p 127 Set GetCurrentControlMode p 104 Set Get Current Foldback p 106 46 Magellan Motion Processor Programmer s Command Reference GetinstructionError Abh o Syntax GetinstructionError Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments None Returned data Type Range error unsigned 16 bits 0 to 11h Packet GetInstructionError Structure 0 A5h 15 12 11 8 7 0 Data read error 15 0 Description GetlnstructionError returns the code for the last instruction error and then resets the error to zero 0 Generally this command is issued only after the instruction error bit in the Event Status register indicates there was an instruction error It also resets the Instruction error bit in the I O status read wotd to zero 0 The error codes are encoded as defined below Error Code Encoding No error 0 Processor reset l Invalid instruction 2 Invalid axis 3 Invalid parameter 4 Trace r
181. s calculated using the ratio as set by the SetEncoderToStepRatio command GetActualPositionUnits returns the position units for the specified axis Restrictions The trace vatiable capture value is not affected by this command The value is always in counts C Motion API PMDresult PMDSetActualPositionUnits PMDAxisInterface axis intf PMDuint16 mode PMDresult PMDGetActualPositionUnits PMDAxisInterface axis intf PMDuint16 mode VB Motion API Dim mode as Short MagellanAxis ActualPositionUnits mode mode MagellanAxis ActualPositionUnits see Set GetActualPosition p 79 Set GetEncoderToStepRatio p 120 AdjustActualPosition p 22 GetCaptureValue p 33 Set GetTraceVariable p 183 Magellan Motion Processor Programmer s Command Reference 81 SetAuxiliaryEncoderSource 08h GetAuxiliaryEncoderSource 09h yA GIC ggssp Ke Syntax SetAuxiliaryEncoderSource axis mode auxiliaryAxis GetAuxiliaryEncoderSource axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mode Disable 0 Enable 1 auxiliaryAxis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Packet SetAuxiliaryEncoderSource Structure 0 axis 08h 15 12 11 8 7 0 Data write 0 mode 0 auxiliaryAxis 15 9 8 7 21 0 GetAuxiliaryEncoderSource 0 axis 09h 15 12 11 8 7 0 Data read 0 mode 0 auxiliaryAxis 15 9 8 7 21 0 De
182. scription SetAuxiliaryEncoderSource controls the motion processor s dual encoder loop feature The mode enables or disables the secondary encoder loop for axis The auxilaryAxis selects which axis encoder input is to be interpreted as the damping term Kd of the servo equation for axis To determine the actual position of the auxiliary encoder use GetActualPosition auxiliaryAxis The auxiliary axis encoder input is used for commutation of brushless DC motors The SetPhaseOffset SetPhaseAngle and SetPhaseCounts commands should still be applied to the main axis even when dual encoder loop is enabled Restrictions To avoid a potentially unstable operating condition in dual loop mode the auxiliary encoder should have resolution greater than or equal to that of the main encoder C Motion API PMDresult PMDSetAuxiliaryEncoderSource PMDAxisInterface axis intf PMDuint8 mode PMDAxis auxiliaryAxis PMDresult PMDGetAuxiliaryEncoderSource PMDAxisInterface axis intf PMDuint8 mode PMDAxis auxiliaryAxis 82 Magellan Motion Processor Programmer s Command Reference SetAuxiliaryEncoderSource cont 08h GetAuxiliaryEncoderSource 09h VB Motion API MagellanAxis AuxiliaryEncoderSourceSet in mode in auxiliaryAxis MagellanAxis AuxiliaryEncoderSourceGet out mode out auxiliaryAxis Magellan Motion Processor Programmer s Command Reference 83 SetAxisOutMask 45h GetAxisOutMask 46h E ro Syntax S
183. shless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 mode commanded 0 actual 1 Packet SetMotionCompleteMode Structure 0 axis EBh 15 12 11 8 7 0 Data write 0 mode 15 1 0 GetMotionCompleteMode 0 axis ECh 15 12 11 8 7 0 Data read 0 mode 15 1 0 Description SetMotionCompleteMode establishes the source for the comparison which determines the motion complete status for the specified axis When set to commanded the motion is considered complete when the profile velocity reaches zero 0 and no further motion will occur without an additional host command This mode is unaffected by the actual encoder location When set to actual mode the motion complete bit will be set when the above condition is true and when the actual encoder position has been within the settle window SetSettleWindow command for the number of cycles specified by the SetSettleTime command The settle timer is started at zero 0 at the end of the trajectory profile motion so a minimum delay of settle time cycles will occur after the trajectory profile motion is complete GetMotionCompleteMode returns the value for the motion complete mode Restrictions C Motion API PMDresult PMDSetMotionCompleteMode PMDAxisInterface axis intf PMDuint16 mode PMDresult PMDGetMotionCompleteMode PMDAxisInterface axis intf PMDuint16 mode VB Motion API Dim mode as Short MagellanAxis MotionCompleteMode mode mode M
184. sition Error Position Servo Derivative Time Integrator Sum Limit Kaff Kd Ki Kp Kvff Kout Motor Command Current Loops Integrator Sum Limit Ki Kp Atlas No additional Atlas communication need be performed for this command because the update bit in the Atlas torque command is used to cause an Atlas amplifier update See Azas Digital Amplifier Complete Technical Reference for more detail Restrictions C Motion API PMDresult PMDUpdate PMDAxisInterface axis intf VB Motion API MagellanAxis Update see MultiUpdate p 63 Set GetUpdateMask p 188 192 Magellan Motion Processor Programmer s Command Reference WriteBuffer C8h Syntax WriteBuffer bufferlD value Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Range bufferlD unsigned 16 bits 0 to 31 value signed 32 bits 2 to 2311 Packet WriteBuffer Structure 0 C8h 15 8 7 0 First data word write 0 bufferlD 15 5 4 0 Second data word write value high order part 31 16 Third data word write value low order part 15 0 Description WriteBuffer writes the 32 bit value into the location pointed to by the write buffer index in the specified buffer After the contents have been written the write index is incremented by 1 If the result is equal to the buffer length set by SetBufferLength the index is reset to zero 0 Restrictions The command is not avai
185. state 0 or 1 GetTraceStart returns the value of the trace start trigger Once a trace has started the trace start trigger is reset to zero 0 Magellan Motion Processor Programmer s Command Reference 177 y a In SetTraceStart cont GetTraceStart B2h B3h Description The following table shows the corresponding value for combinations of triggerBit and register0 cont Activity Event Status Status Signal Status Drive Status TriggerBit Register Register Register Register 0 Motion Complete Phasing Initialized Encoder A l Wrap around At Maximum Encoder B In Foldback Velocity 2 Breakpoint Tracking Encoder Index Overtemperature 3 Position Capture Capture Input 4 Motion Error Positive Limit In Holding 5 Positive Limit Negative Limit Overvoltage 6 Negative Limit Axisln Undervoltage 7 Instruction Error Axis Settled Hall Sensor A 8 Disable Motor mode Hall Sensor B 9 Overtemperature Position Capture Hall Sensor C Fault 0Ah Bus Voltage Fault In Motion OBh Commutation Error In Positive Limit OCh Current Foldback In Negative Limit ODh Enable Input OEh Breakpoint 2 FaultOut OFh Examples If it is desired that the trace begin on the next Update for axis 3 then a 2 is set for the axis number a 1 is set for the condition and bit number and state can be loaded with zeroes since they are not used The actual data word sent to the motor processor in this case is 0012h
186. t 139 47h ClearPositionError 25 07h GetMotorLimit 139 48h SetEventAction 121 08h SetAuxiliaryEncoderSource 82 49h GetEventAction 121 09h GetAuxiliaryEncoderSource 82 4Ah GetPosition 153 0Ah SetSPIMode 169 4Bh GetVelocity 190 OBh GetSPIMode 169 4Ch GetAcceleration 77 OCh SetPWMFrequency 159 4Dh SetActualPosition 79 O0Dh GetPWMFrequency 159 53h GetTemperature 55 OEh GetDriveStatus 42 55h GetPositionLoopValue 52 OFh SetMotorBias 136 56h GetlnterruptMask 132 10h SetPosition 153 57h GetActiveOperatingMode 28 Ith SetVelocity 190 58h GetJerk 134 12h SetCANMode 99 59h GetGearRatio 131 13h SetJerk 134 5Ah GetFOCValue 45 14h SetGearRatio 131 5Bh MultiUpdate 63 15h GetCANMode 99 5Eh SetCurrent 102 Ah Update 192 5Fh GetCurrent 102 IBh SetOvertemperatureLimit 145 60h GetDriveFaultParameter 114 ICh GetOvertemperatureLimit 145 62h SetDriveFaultParameter 114 IDh GetCommandedPosition 36 65h SetOperatingMode 142 Eh GetCommandedVelocity 37 66h GetOperatingMode 142 21h SetFeedbackParameter 125 67h SetPositionLoop 155 22h GetFeedbackParameter 125 68h GetPositionLoop 155 23h SetDriveP WM 116 69h GetMotorCommand 137 24h GetDrivePWM 116 6Ah SetStartVelocity 170 28h GetTraceValue 59 6Bh GetStartVelocity 170 2Ch GetPhaseAngle 146 6Ch ClearDriveFaultStatus 23 2Dh GetMotorBias 136 6Dh GetDriveFaultStatus 40 2Eh RestoreOperatingMode 76 6Eh GetOutputMode 144 2Fh SetInterruptMask 132 7 h GetCurrentLoopValue 38 30h DriveNVRAM 26 72h SetPhaselnitializeTime 150 3lh GetEventSt
187. t GetBufferReadIndex Set Get the buffer read pointer for a particular buffer 95 Set GetBufferStart Set Get the start location of a memory buffer 96 Set GetBufferWritelndex Set Get the buffer write pointer for a particular buffer 98 ReadBuffer Read a long word value from a buffer memory location 67 WriteBuffer Write a long word value to a buffer memory location 193 Drive Set GetDriveFaultParameter Set Get threshold for Overvoltage or Undervoltage fault 32 GetBusVoltage Get the current bus voltage reading 32 Set GetOvertemperatureLimit Set Get threshold for Overtemperature fault 145 GetTemperature Gets current temperature reading 55 Set GetFaultOutMask Set Get mask for FaultOut from Event Status register 123 GetDriveFaultStatus Gets the Drive Fault Status register 40 ClearDriveFaultStatus Clears the Drive Fault Status register 23 Status Registers and AxisOut Indicator GetActivityStatus Get Activity Status register 29 GetDriveStatus Gets the Drive Status register 42 Set GetAxisOutMask Set Get AxisOut source 84 GetEventStatus Get Event Status word 43 GetSignalStatus Get the current axis Signal Status register 53 Set GetSignalSense Set Get the interpretation of the Signal Status bits 167 ResetEventStatus Reset bits in Event Status word 74 Traces GetTraceCount Get the number of traced data points 57 Set GetTraceMode Set Get the trace mode rolling or one time 174 Set GetTracePer
188. t if they are not read before being overwritten by the wrapped data Trigger mode may be either Internal zero or External one This mode is used to control tracing on attached Atlas amplifiers In Internal trigger mode the trace bit in all Atlas torque commands will be set whenever Magellan trace is active In this mode Atlas should be configured to use its own internal trace period to time trace samples In External mode the trace bit in all Atlas torque commands will be set exactly once each time Magellan stores a trace sample and clear at other times In this mode Atlas should be configured to use its external trigger mode to synchronize sampling with Magellan GetTraceMode returns the value for the trace mode Atlas No additional Atlas communication is performed for these commands but the Atlas trace mode and other trace parameters may have to be set by addressing an Atlas amplifier directly See Ad as Digital Amplifier Complete Technical Reference for more detail Restrictions 174 Magellan Motion Processor Programmer s Command Reference SetTraceMode cont BOh GetTraceMode Bth C Motion API PMDresult PMDSetTraceMode PMDAxisInterface axis intf PMDuintl6 mode PMDresult PMDGetTraceMode PMDAxisInterface axis intf PMDuintl16 mode VB Motion API Dim mode as Short MagellanObject TraceMode mode mode MagellanObject TraceMode see GetTraceStatus p 58 175 Magellan Motion Processor Programmer s Command Refere
189. ta word write value 15 0 GetCurrentLoop 0 axis 74h 15 12 11 8 7 0 First data word write 0 phase parameter 15 12 11 8 7 0 Second data word read value 15 0 Description Set GetCurrentLoop is used to configure the operating parameters of the Phase A B PI digital current loops See the product user s guide for more information on how each parameter is used in the current loop processing The value written read is always an unsigned 16 bit value with the parameter specific scaling shown below Parameter Range Scaling Units Proportional Gain KpCurrent 0 to 2 1 1 64 gain Integer Gain KiCurrent 0 to 25 1 1 256 gain cycles Integrator Sum Limit ILimitCurrent 0 to 2 1 1 100 current cycles A setting of 64 for KpCurrent corresponds to a gain of 1 That is an error signal of 30 maximum current will cause the proportional contribution of the current loop output to be 30 of maximum output Similarly setting KiCurrent to 256 gives it a gain of 1 and the value of the integrator sum would become the integrator contribution to the output The units of time for the integrator sum are cycles 108 Magellan Motion Processor Programmer s Command Reference SetCurrentLoop cont buffered 73h GetCurrentLoop 74h Description ILimitCurrent is used to limit the contribution of the integrator sum at the output Its effect depends on cont the value of KiCurrent Setting ILimitCurrent to 1
190. tax SetSettleWindow axis window GetSettleWindow axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units window unsigned 16 bits 0 to2 1 unity counts Packet SetSettleWindow Structure 0 axis BCh 15 12 11 8 7 0 Data write window 15 0 GetSettleWindow 0 axis BDh 15 12 11 8 7 0 Data read window 15 0 Description SetSettleWindow sets the position range within which the specified axis must remain for the duration specified by SetSettleTime before the Axis Settled indicator in the Activity Status register is set GetSettleWindow returns the value of the settle window Restrictions C Motion API PMDresult PMDSetSettleWindow PMDAxisInterface axis intf PMDuintl16 window PMDresult PMDGetSettleWindow PMDAxisInterface axis intf PMDuintl6 window VB Motion API Dim window as Short MagellanAxis SettleWindow window window MagellanAxis SettleWindow see Set GetMotionCompleteMode p 135 Set GetSettleTime p 165 GetActivityStatus p 29 166 Magellan Motion Processor Programmer s Command Reference SetSignalSense A2h GetSignalSense A3h Syntax SetSignalSense axis sense GetSignalSense axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Enc
191. te bit set in the update mask C Motion API PMDresult PMDSetPosition PMDAxisInterface axis intf PMDint32 position PMDresult PMDGetPosition PMDAxisInterface axis intf PMDint32 position VB Motion API Dim position as Long MagellanAxis Position position position MagellanAxis Position see Set GetAcceleration p 77 Set GetDeceleration p 110 Set GetJerk p 134 Set GetVelocity p 190 MultiUpdate p 63 Update p 192 Magellan Motion Processor Programmer s Command Reference 153 SetPositionErrorLimit 97h GetPositionErrorLimit 98h X o Syntax SetPositionErrorLimit axis limit GetPositionErrorLimit axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units limit unsigned 32 bits 0to27 1 unity counts microsteps Packet SetPositionErrorLimit Structure 0 axis 97h 15 12 11 8 7 0 First data word write limit high order part 31 16 Second data word write limit low order part 15 0 GetPositionErrorLimit 0 axis 98h 15 12 11 8 7 0 First data word read limit high order part 31 16 Second data word read limit low order part 15 0 Description SetPositionErrorLimit sets the absolute value of the maximum position error allowable by the motion processor for the specified axis If the position error exce
192. terface axis intf PMDuint16 mode PMDresult PMDGetCommutationMode PMDAxisInterface axis intf PMDuint16 mode VB Motion API Dim mode as Short MagellanAxis CommutationMode mode mode MagellanAxis CommutationMode see Set GetPhasePrescale p 152 Set GetPhaseCounts p 148 Magellan Motion Processor Programmer s Command Reference 101 SetCurrent bEh GetCurrent bFh D a MM NUUS CNET Syntax SetCurrent axis parameter value GetCurrent axis parameter Motor Types Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 parameter Holding Motor Limit 0 Holding Delay 1 Drive Current 2 Type Range Scaling value unsigned 16 bit see below Packet SetCurrent Structure 0 axis 5Eh 15 12 11 8 7 0 First Data Word write parameter 15 0 Second Data Word write value 15 0 GetCurrent 0 axis 5Fh 15 12 11 8 7 0 First Data Word write parameter 15 0 Second Data Word read value 15 0 Description SetCurrent configures the operation of the holding current The two parameters to set are Holding Motor Limit the maximum commanded current when in holding and Holding Delay the number of cycles to wait after end of move before going into holding current The Holding Motor Limit is in units of maximum current with scaling of 100 2 Its range is 0 to 21 It defines the value to which the current will be limite
193. tes When the axis motor output is disabled the axis will function normally but its motor outputs will be in their disabled state When a loop is disabled position or current loop it operates by passing its input directly to its output and clearing all internal state variables such as integrator sums etc When the trajectory generator is disabled it operates by commanding zero 0 velocity Atlas Note that the current control bit is meaningful whenever an axis is connected to an Atlas amplifier Restrictions The possible modes of an axis are product specific and in some cases axis specific See the product user s guide for a description of what modes are supported on each axis C Motion API PMDresult PMDGetActiveOperatingMode PMDAxisInterface axis intf PMDuint16 mode VB Motion API Dim mode as Short mode MagellanAxis ActiveOperatingMode see GetOperatingMode p 142 RestoreOperatingMode p 76 Set GetEventAction p 121 Set GetBreakpoint p 86 28 Magellan Motion Processor Programmer s Command Reference GetActivityStatus A6h o GetActivityStatus axis Syntax Motor Types Arguments Returned Data Packet Structure Description Magellan Motion Processor Programmer s Command Reference DC Brush Brushless DC Microstepping Pulse amp Direction Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type status unsigned 16 bits see bel
194. tion 206 Magellan Motion Processor Programmer s Command Reference For additional information or for technical assistance please contact PMD at 978 266 1210 You may also e mail your request to support pmdcorp com Visit our website at http www pmdcorp com PM D Performance Motion Devices 80 Central Street Boxborough MA 01719 Magellan Motion Processor Programmer s Command Reference 207
195. tlas supports 20 kHz 40 kHz and 80 kHz PWM frequencies Restrictions Only 20 kHz and 80 kHz are currently supported by the Magellan motion processor Only 20 kHz and 40 kHz are supported in the ION products The PWM frequency can be changed only when motor output is disabled e g immediately after powert up of reset C Motion API PMDresult PMDSetPWMFrequency PMDAxisInterface axis intf PMDuinti16 frequency PMDresult PMDGetPWMFrequency PMDAxisInterface axis intf PMDuinti16 frequency Magellan Motion Processor Programmer s Command Reference 159 SetPWMFrequency cont OCh GetPWMFrequency ODh y a VB Motion API Dim frequency as Short MagellanAxis PWMFrequency frequency frequency MagellanAxis PWMFrequency see SetOutputMode p 144 160 Magellan Motion Processor Programmer s Command Reference SetSampleTime 3Bh GetSampleTime 3Ch Syntax SetSampleTime time GetSampleTime Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Type Range Units time unsigned 32 bits 51 to 27 microseconds Packet SetSampleTime Structure 0 3Bh 15 8 7 0 First data word write time high order part 31 16 Second data word write time low order part 15 0 GetSampleTime 0 3Ch 15 8 7 0 First data word read time high order part 31 16 Second data word read time low order part 15 0 Descript
196. tor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Returned data Type Range Scaling Units error signed 32 bits 2 to 2 1 unity counts microsteps Packet GetPositionError Structure 0 axis 99h 15 12 11 8 7 0 First data word read error high order part 31 16 Second data word read error low order part 15 0 Description GetPositionError returns the position error of the specified axis The error is the difference between the actual position encoder position and the commanded position instantaneous output of the trajectory generator When used with the motor type set to microstepping or pulse amp direction the error is defined as the difference between the encoder position represented in microsteps or steps and the commanded position instantaneous output of the trajectory generator Restrictions C Motion API PMDresult PMDGetPositionError PMDAxisInterface axis intf PMDint32 error VB Motion API Dim error as Long error MagellanAxis PositionError See Set GetPosition p 153 Set GetPositionErrorLimit p 154 Magellan Motion Processor Programmer s Command Reference 51 o GetPositionLoopValue 55h Syntax GetPositionLoopValue axis node Motor Types DC Brush Brushless DC Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 node Integrator Sum 0 Integrator Contribution
197. tory from buffered parameters Position Loop l Set to to update position loop from buffered parameters 2 Reserved Current Loop 3 Set to to update current loop from buffered parameters 4 15 Reserved For example if the update mask for a given axis is set to hexadecimal 0003h the trajectory and position loop parameters will be updated from their buffered values when an Update or MultiUpdate command is received for that axis The Current Loop bit applies regardless of the active current control mode When it is set an Update or MultiUpdate command will update either the active FOC parameters or the active digital current loop parameters depending on which Current Control mode is active GetUpdateMask gets the update mask for the indicated axis 188 Magellan Motion Processor Programmer s Command Reference SetUpdateMask cont F9h GetUpdateMask FAh Restrictions The current loop bit is only valid for products that include a current loop C Motion API PMDresult PMDSetUpdateMask PMDAxisInterface axis intf PMDuint16 mask PMDresult PMDGetUpdateMask PMDAxisInterface axis intf PMDuint16 mask VB Motion API Dim mask as Short MagellanAxis UpdateMask mask mask MagellanAxis UpdateMask see Set GetBreakpointUpdateMask p 188 Update p 192 MultiUpdate p 63 Magellan Motion Processor Programmer s Command Reference 189 ee SetVelocity GetVelocity buffered 11h ABh
198. ttleTime AAh 165 GetSettleWindow BDh SetSettleWindow BCh 166 GetSignalSense A3h SetSignalSense A2h 167 GetSignalStatus A4h 53 GetSPIMode OBh SetSPIMode OAh 169 GetStart Velocity 6Bh SetStartVelocity 6Ah 170 GetStepRange CEh SetStepRange CFh 171 GetStopMode Dih SetStopMode DOh 172 GetSynchronizationMode F3h SetSynchronizationMode F2h 173 GetTemperature 53h 55 GetTime 3Eh 56 GetTraceCount BBh 57 GetTraceMode Blh SetTraceMode BOh 174 GetTracePeriod B9h SetTracePeriod B8h 176 GetTraceStart B3h SetTraceStart B2h 177 GetTraceStatus BAh 58 GetTraceStop B5h SetTraceStop B4h 180 GetTraceValue 28h 59 GetTraceVariable B7h SetTraceVariable B6h 183 GetTrackingWindow A9h SetTrackingWindow A8h 187 GetUpdateMask FAh SetUpdateMask F9h 188 GetVelocity 4Bh SetVelocity Ith 190 GetVersion 8Fh 60 InitializePhase 7Ah 62 MultiUpdate 5Bh 63 NoOperation 00h 65 ReadAnalog EFh 66 ReadBuffer C9h 67 ReadlO 83h 68 Reset 39h 69 ResetEventStatus 34h 74 RestoreOperatingMode 2Eh 76 Update Ah 192 WriteBuffer C8h 193 WritelO 82h 194 Magellan Motion Processor Programmer s Command Reference 203 e Instruction Summary Tables 5 4 Numerical Listing Code Instruction Page Code Instruction Page 00h NoOperation 65 44h GetCurrentControlMode 104 02h SetMotorType 140 45h SetAxisOutMask 84 03h GetMotorType 140 46h GetAxisOutMask 84 06h SetMotorLimi
199. ty p 31 Set GetActualPositionUnits p 81 Set GetActualPosition p 79 22 Magellan Motion Processor Programmer s Command Reference ClearDriveFaultStatus 6Ch Syntax Motor Types Arguments Packet Structure Description Atlas Restrictions C Motion API VB Motion API See ClearDriveFaultStatus axis DC Brush Brushless DC Microstepping Pulse amp Direction Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 ClearDriveFaultStatus 0 axis 6Ch 15 12 11 8 7 0 ClearDriveFaultStatus clears all bits in the Drive Fault Status register It should be executed after power up after using GetDriveFaultStatus to examine if any hard faults caused the power cycle This command is relayed to any attached Atlas amplifier before being applied to internal Magellan state Note that the Atlas Motor Type Mismatch bit which is maintained by Magellan may not be cleared by this command That bit may be cleared by SetMotorType This command is not available in products that do not include drive amplifier support This command can only be executed when motor output is disabled e g immediately after power up or reset PMDresult PMDClearDriveFaultStatus PMDAxisInterface axis intf MagellanAxis ClearDriveFaultStatus GetDriveFaultStatus p 40 SetMotorType p 140 Magellan Motion Processor Programmer s Command Reference 23 A Clearinterrupt ACh
200. ual Each Magellan is a complete chip based motion processor providing trajectory generation and related motion control functions Depending on the type of motor to be controlled it provides servo loop closure on board commutation for brushless motors and high speed pulse amp direction outputs Together these products provide a software compatible family of dedicated motion processors that can handle a large variety of system configurations Each of the multi chip versions of these products utilizes a similar architecture consisting of a high speed computation unit along with an ASIC Application Specific Integrated Circuit The computation unit contains special on board hard ware which makes it well suited for the task of motion control Single axis single chip configurations of Magellan are also available in which case the logic provided in the ASIC is integrated directly with the high speed computation unit Along with similar hardware architecture these chips also share most software commands Therefore software written for one motion processor may be re used with the other independent of motor type or hardware configuration 1 1 Family Summary The various members of the Magellan family are designed for differing motor types and applications MC58000 Series MC58420 MC58320 M C58220 MC58120 MC58110 This series supports DC brush brushless DC and step motors using both pulse amp direction and microstepping output formats
201. ultOutMask configures the mask on Event Status register bits that will be ORed together on the FaultOut pin The FaultOut pin is active high as are the bits in Event Status Thus FaultOut will go high when any of the enabled bits in Event Status are set 1 The mask parameter is used to determine what bits in the Event Status register can cause FaultOut high as follows Name Bit Motion Complete Wrap around Breakpoint Position Capture Motion Error Positive Limit Negative Limit Instruction Error Disable Overtemperature Fault oI NIAJ BR WwW N O o o Bus Voltage Fault Commutation Error Current Foldback Reserved Breakpoint 2 Reserved M Bw uo Magellan Motion Processor Programmer s Command Reference 123 SetFaultOutMask cont FBh GetFaultOutMask FCh m i sgy Description For example a mask setting of hexadecimal 0610h will configure the FaultOut pin to go high upon cont a motion error Overtemperature Fault or Bus Voltage Fault The FaultOut pin stays high until all Fault enabled bits in Event Status are cleared The default value for the FaultOut mask is 0600h Overtemperature Fault and Bus Voltage Fault enabled GetFaultOutMask gets the current mask for the indicated axis Atlas The Magellan version of this command does vot apply to an Atlas amplifier In order to control Atlas behavior it is necessary to
202. uncontrolled move can be tolerated by the motor mechanism and load C Motion API PMDresult PMDSetPhaseInitializeMode PMDAxisInterface axis intf PMDuinti16 mode PMDresult PMDGetPhaseInitializeMode PMDAxisInterface axis intf PMDuinti16 mode VB Motion API Dim mode as Short MagellanAxis PhaseInitializeMode mode mode MagellanAxis PhaseInitializeMode see InitializePhase p 62 Set GetPhaselnitializeTime p 150 Magellan Motion Processor Programmer s Command Reference 149 SetPhaselnitializeTime 72h GetPhaselnitializeTime 7Ch 4 o c LM Syntax SetPhaselnitializeTime axis time GetPhaselnitializeTime axis Motor Types Brushless DC Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units time unsigned 16 bits 0 to 2 1 unity cycles Packet SetPhaselnitializeTime Structure 0 axis 72h 15 12 11 8 7 0 Data write time 15 0 GetPhaselnitializeTime 0 axis 7Ch 15 12 11 8 7 0 Data read time 15 0 Description SetPhaselnitializeTime sets the time value in cycles to be used during the algorithmic phase initialization procedure This value determines the duration of each of the four segments in the phase initialization algorithm GetPhaselnitializeTime returns the value of the phase initialization time Restrictions C Motion API PMDresult PMDSetPhaseInitializeTime PMDAxisInterface axis intf PMDuint16 time PMDresult
203. unning 5 Reserved 6 Block out of bounds 7 Trace buffer zero 0 8 Bad serial checksum 9 Reserved Ah Invalid negative value Bh Invalid parameter change Ch Invalid move after event triggered stop Dh Invalid move into limit Eh Invalid Operating Mode restore after event triggered change 10h Invalid Operating Mode for command Ith Invalid register state for command 12h Reserved 13h Command invalid without Atlas amplifier 14h Incorrect Atlas command checksum I5h Invalid Atlas command protocol 16h Invalid Atlas command timing 17h Invalid Atlas torque command detected 18h Reserved 19h Atlas command invalid in flash mode IAh Magellan Motion Processor Programmer s Command Reference 47 A GetinstructionError cont Abh 48 Atlas Restrictions C Motion API VB Motion API See This command does not require any additional Atlas communication In case a command error is signaled by an Atlas amplifier during the processing of a Magellan command the Magellan instruction error register will be set to the error code returned by Atlas The error code is maintained separately by the Atlas amplifier and may be cleared by reading directly from Atlas it is not reset by reading the Magellan instruction error code PMDresult PMDGetInstructionError PMDAxisInterface axis intf PMDuinti16 error Dim error as Short error MagellanObject InstructionError GetEventStatus p 43 ResetEventStatus p 74 Magellan Mot
204. unts PMDAxisInterface axis intf PMDuint1l6 counts PMDresult PMDGetPhaseCounts PMDAxisInterface axis intf PMDuintl6 counts VB Motion API Dim counts as Short MagellanAxis PhaseCounts counts counts MagellanAxis PhaseCounts see Set GetPhaseAngle p 146 148 Magellan Motion Processor Programmer s Command Reference SetPhaselnitializeMode E4h GetPhaselnitializeMode E5h Syntax SetPhaselnitializeMode axis mode GetPhaselnitializeMode axis Motor Types Brushless DC Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 mode Algorithmic 0 Hall based 1 Packet SetPhaselnitializeMode Structure 0 axis E4h 15 12 11 8 7 0 Data write 0 mode 15 1 0 GetPhaselnitializeMode 0 axis E5h 15 12 11 8 7 0 Data read 0 mode 15 1 0 Description SetPhaselnitializeMode establishes the mode in which the specified axis is to be initialized for commutation The options are Algorithmic and Hall based In algorithmic mode the motion processor briefly stimulates the motor windings and sets the initial phasing based on the observed motor response In Hall based initialization mode the three Hall sensor signals are used to determine the motor phasing GetPhaselnitializeMode returns the value of the initialization mode Restrictions Algorithmic mode should only be selected if it is known that the axis is free to move in both directions and that a brief
205. uring functions on the motion control board The following table describes the commands For more information see the user s guide for your motion control card These methods and properties are part of the Magellan Board object Name Style Description ResetHardware Method This method causes a hard reset of the card Unlike all other board specific commands this command is processed directly through the bus interface ReadDPRAM Method This method reads directly from the onboard dual port RAM via the bus interface if applicable WriteDPRAM Method This method writes directly to the onboard dual port RAM via the bus interface if applicable DigitalOutput Prop r w Controls the eight general purpose digital output signals DigitalOut0 7 Digitallnput Prop Read Contains the status of the eight general purpose digital input signals DigitallnO 7 CardID Prop Read Contains the card revision information DACOutputEnable Prop r w Enables the DAC output hardware ResetCause Prop Read Cause of the most recent reset AmplifierEnable Prop r w Bit mapped value of the four amplifier enable output signals AmpEnablel 4 WatchdogSet Method This method writes the correct value to the watchdog register so that for the next 104 milliseconds the board will not be reset by the watchdog circuitry Magellan Motion Processor Programmer s Command Reference 19 4 VB Motion This page intentionally left blank
206. us PMDAxisInterface axis intf PMDuinti16 modulus VB Motion API Dim modulus as Short MagellanAxis EncoderModulus modulus modulus MagellanAxis EncoderModulus see Set GetEncoderSource p 118 Magellan Motion Processor Programmer s Command Reference 117 SetEncoderSource DAh GetEncoderSource DBh B o ee Syntax SetEncoderSource axis source GetEncoderSource axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 source Incremental 0 Parallel 1 None 2 Loopback 3 Pulse and Direction 4 Reserved 5 32 bit parallel 6 Packet SetEncoderSource Structure 0 axis DAh 15 12 11 8 7 0 Data write 0 source 15 3 2 0 GetEncoderSource 0 axis DBh 15 12 11 8 7 0 Data read 0 source 15 32 0 Description SetEncoderSource sets the type of encoder feedback Incremental quadrature encoder or Parallel word for the specified axis When incremental quadrature is selected the motion processor expects A and B quadrature signals to be input at the QuadA and QuadB axis inputs When parallel word is selected the motion processor expects user defined external circuitry connected to the motion processor s external bus to load a 16 bit word containing the current position value for the selected axis External feedback devices with less than 16 bits may be used but the unused bits must
207. variableNumber location in the trace buffer Up to four vatiables may be traced at one time All variable assignments must be contiguous starting with variableNumber 0 GetTraceVariable returns the variable and axis of the specified variableNumber Example To set up a three vatiable trace capturing the commanded acceleration for axis 1 the actual position for axis 1 and the event status wotd for axis 3 the following sequence of commands would be used First a SetTraceVariable command with variableNumber of 0 axis of 0 and variablelD of 4 would be sent Then a SetTraceVariable command with variableNumber of 1 axis of 0 and variablelD of 5 would be sent Finally a SetTraceVariable command with a variableNumber of 3 axis of 2 and variablelD of 0h would be sent No additional Atlas communication is performed for these commands but Atlas trace parameters may have to be set by addressing an Atlas amplifier directly See Aas Digital Amplifier Complete Technical Reference for more detail When selecting ActualVelocity as a trace variable the reported value is the change in position between trace captures In FOC Field Oriented Control mode A B current values are not meaningful Select D Q current values instead Not all trace variables are available in all products See the product user s guide PMDresult PMDSetTraceVariable PMDAxisInterface axis intf PMDuintl16 variableNumber PMDAxis traceAxis PMDuint8 variableID PMDresult
208. x SetPhaseCounts axis counts GetPhaseCounts axis Motor Types Brushless DC Microstepping Arguments Name Instance Encoding axis Axis1 0 Axis2 1 Axis3 2 Axis4 3 Type Range Scaling Units counts unsigned 16 bits 1 to 25 1 unity counts microsteps Packet SetPhaseCounts Structure 0 axis 75h 15 12 11 8 7 0 Data write counts 15 0 GetPhaseCounts 0 axis 7Dh 15 12 11 8 7 0 Data read counts 15 0 Description For axes configured for brushless DC motor types SetPhaseCounts sets the number of encoder counts per electrical cycle of the motor The number of electrical cycles is equal to 1 2 the number of motor poles If this value is not an integer then the closest integer value should be used and phase correction mode should be enabled See SetPhaseCorrectionMode p 147 For axes configured for microstepping motor types the number of microsteps per full step is set using the SetPhaseCounts command The parameter used for this command represents the number of microsteps per electrical cycle 4 times the desired number of microsteps For example to set 64 microsteps per full step the SetPhaseCounts 256 command should be used The maximum number of microsteps that can be generated per full step is 256 giving a maximum parameter value of 1024 GetPhaseCounts returns the number of counts or microsteps per electrical cycle Restrictions C Motion API PMDresult PMDSetPhaseCo
209. xis intf PMDuint1l6 sense PMDresult PMDGetSignalSense PMDAxisInterface axis intf PMDuinti16 sense VB Motion API Dim sense as Short MagellanAxis SignalSense sense sense MagellanAxis SignalSense see GetSignalStatus p 53 168 Magellan Motion Processor Programmer s Command Reference SetSPIMode OAh GetSPIMode OBh Syntax SetSPIMode mode GetSPIMode Motor Types DC Brush Arguments Name Instance Encoding mode RisingEdge 0 RisingEdgeDelay 1 FallingEdge 2 FallingEdgeDelay 3 Packet SetSPIMode Structure 0 0Ah 15 8 7 0 Data write 0 mode 15 2 1 0 GetSPIMode 0 OBh 15 8 7 0 Data read 0 mode 15 2 1 0 Description SetSPIMode configures the communication settings for the motion processor s SPI Serial Peripheral Interface DAC output port Data is output as a series of 16 bit data words transmitted at 10 Mbps The mode parameter controls the data clocking scheme as shown in the following table Mode Encoding Description RisingEdge 0 Rising edge without phase delay The SPlClock signal is inactive low The SPIXmt pin transmits data on the rising edge of the SPIClock signal RisingEdgeDelay Rising edge with phase delay The SPIClock signal is inactive low The SPIXmt pin transmits data one half cycle ahead of the rising edge of the SPIClock signal FallingEdge 2 Falling edge without phase delay The SPIClock signal is inactive high The
210. xisInterface axis intf PMDuint8 loop PMDuint8 parameter PMDuintl6 value PMDresult PMDGetFOC PMDAxisInterface axis intf PMDuint8 loop PMDuint8 parameter PMDuinti16 value VB Motion API MagellanAxis FOCSet in loop in parameter in value MagellanAxis FOCGet in loop in parameter out value see Update p 192 Set GetUpdateMask p 188 MultiUpdate p 63 Set GetBreakpointUpdateMask p 90 GetFOCValue p 45 Set GetCurrentControlMode p 104 128 Magellan Motion Processor Programmer s Command Reference SetGearMaster AEh GetGearMaster AFh Syntax SetGearMaster axis masterAxis source GetGearMaster axis Motor Types DC Brush Brushless DC Microstepping Pulse amp Direction Arguments Name Instance Encoding axis Axis 0 Axis2 1 Axis3 2 Axis4 3 masterAxis Axis 0 Axis2 1 Axis3 2 Axis4 3 source Actual 0 Commanded 1 Packet SetGearMaster Structure 0 axis AEh 15 12 11 8 7 0 Data write 0 source masterAxis 15 9 8 7 0 GetGearMaster 0 axis AFh 15 12 11 8 7 0 Data read 0 source masterAxis 15 9 8 7 0 Description SetGearMaster establishes the slave axis and master masterAxis axes for the electronic gearing profile and sets the source Actual or Commanded of the master axis position data to be used The masterAxis determines the axis that will drive the slave axis Both the slave and the master axes must be

Download Pdf Manuals

image

Related Search

Related Contents

Newstar FPMA-D700D3 flat panel desk mount  くらしのQ&A - つくばみらい市  SMART Board 600 and D600 Series Interactive Whiteboard  INSTR-028 Rel 111111 Rev 007 Matrix PureSine User Manual  LDG AT-200Pro Automatic Antenna Tuner  広報ぬまた1月号 (PDF 24.2MB)  JVC KW-XR616 Car Radio OWNER`S MANUAL Operating    

Copyright © All rights reserved.
Failed to retrieve file