Motion Control ICs  
      Motion Control Cards  
      Motion Control Digital Drives  
      Motor Control ICs  
      Developer's Kits  
      Development Software  
      Product Selection Guide  
      Product Family Features  
     
 






Motion Control University

PMD on Twitter  Follow Us on Twitter

 
MOTION CONTROL > TECHNICAL SUPPORT > FAQ'S

Frequently Asked Questions

If you need immediate assistance or your question does not appear below,
please call Technical Support at 978.266.1210 or email tech-support@pmdcorp.com.

How does GetActualVelocity work?
(MC73110 users see below) Actual velocity is calculated by subtracting the actual position of the previous cycle from the current actual position. The default cycle time can be as small as 51usec depending on which product is being used. GetActualVelocity returns a fixed-point 16.16 value, so to convert it to counts/cycle divide the returned value by 65536. Depending on what your maximum velocity is you may not get anything other than 0 or 65536, because at velocities (counts/cycle) that are approximately equal to 1 count/cycle the calculation will result in a change in position of 0 or 1 encoder counts during the previous chip cycle.
 
For those using the MC73110:
The MC73110 contains a feature referred to as the “Velocity Estimator” which adds significant resolution to the ActualVelocity calculation. This is a 2nd order filter on the position feedback data that can generate ActualVelocity values with a fractional number of counts per cycles.      

What is PMD’s address?

PMD’s Headquarters is located at 55 Old Bedford Road, Lincoln, MA 01773. For driving directions visit, http://www.pmdcorp.com/contact/.


Where can I find release notes?

Go to the "tech support" tab on our website (http://www.pmdcorp.com) and under there you will find a "release notes" menu item in the drop down or go directly to http://www.pmdcorp.com/support/release_notes.cfm. Contact PMD for the password. Release notes for all motion processor products, including ION Drives and Prodigy/CME firmware, are available.


Where can I find information about the latest version of my PMD product?

The Release Notes section contains the latest versions of all products.  http://www.pmdcorp.com/support/release_notes.cfm. Contact PMD for the password. Release notes for all motion processor products are available.


Where can I find the latest manuals for the product I am using?

Manuals and Datasheets can be found at http://www.pmdcorp.com/advanced-motion-control/support/release_notes.cfm or by going to the “Tech Support" tab on our website (http://www.pmdcorp.com).

 

Is there a way I can support parallel and incremental encoder input at the same time?

The chip cannot use both types of position input simultaneously. Only one of the two inputs can be selected as the primary input source for a given axis using the command SetEncoderSource.

If an incremental encoder is the source, you can read the value of a parallel output position device by mapping it to the User I/O space. The value can then be retrieved using the command ReadIO.   Refer to the User’s Guide and Technical Specification manuals for more information regarding the User I/O space.


Do you have any information on resolvers?
Interfacing a resolver to a PMD product will involve the use of a Resolver to Digital converter (RtoD). If the RtoD generates an incremental quadrature encoder signal, that signal can directly interface to a PMD product however the absolute position information will not be available. Typically the RtoD will also output absolute position information in a digital format. In this case additional circuitry is required to convert that information into a “parallel word” format. This can be used with products that support a “Parallel Word” encoder such as Magellan chipset and Prodigy boards.   There is a reference design on the Application Notes webpage (Parallel Word AD2S80)  Some RtoD’s are available on 3rd part Development Boards like the Analog Devices AD2S1200DK.
The standard MC73110 does not support the Parallel Word interface, but custom solutions are available.   Contact PMD for more information.

How can I find out the current state of the limit, encoder, home and AxisIn signals?

Use the command GetSignalStatus.  This command is described in the Programmer’s Command Reference and the User’s Guide.


What is VB-Motion?

VB-Motion is a software library containing pre-made COM DLLs.  The library also contains examples of using the COM DLLs to interface PMD products. Included are VB.NET examples. (The existance of VB 6.0 examples are there for legacy purposes and VB 6.0 is not recommended for new designs.)


How can I execute a smooth stop when a limit switch is tripped instead of executing an abrupt stop?
By default an abrupt stop will occur in response to a Limit Switch Event. The SetEventAction command can be used to alter the behavior associated with a Limit Switch Event. Executing the command below will alter the behavior such that a SmoothStop will occur.
on all future Positive Limit Switch Events.
 
SetEventAction (PMDEventActionEventPositiveLimit, PMDEventActionSmoothStop)
 
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
Note: The SetEventAction command does not exist on older products and an alternate method described below must be used.
The method involves using a breakpoint or an interrupt service routine (ISR). The benefit of the ISR approach is that additional action may be taken in response to the limit event as opposed to simply performing a smooth stop. In either case, the default action must first be disabled. This is done as follows:
SetLimitSwitchMode( &hAxis, PMDLimitDisabled );
Executing a smooth stop after a limit event using a chip breakpoint. The following code sets a breakpoint that generates a smooth stop when the limit switches are low. To use “active high” logic set the sense mask equal to the selection mask. If the breakpoint triggers it must be re-set.
selection_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask; sense_mask = 0;
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask );
SetBreakpoint( &hAxis, PMDBreakpoint1, PMDBreakpointActionSmoothStop,
PMDBreakpointSignalStatus );
Executing a smooth stop after a limit event using an ISR routine. The following code sets a breakpoint that simply sets the breakpoint bit in the event register when the limit switches are low. To use “active high” logic, set the sense mask equal to the selection mask. If the breakpoint triggers it must be re-set.
selection_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask;
sense_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask;
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask ); SetBreakpoint( &hAxis, PMDBreakpoint1, PMDBreakpointNoAction,
PMDBreakpointSignalStatus );
SetInterruptMask( &hAxis, PMDEventBreakpoint1Mask );
The interrupt service routine for the PMD chip should include the following:
GetEventStatus( &hAxis, &status );
if (status & PMDEventBreakpoint1Mask)
{
            // stop the axis
           SetStopMode( &hAxis, PMDSmoothStopMode );
           Update( &hAxis, PMDSmoothStopMode );
           ResetEventStatus( &hAxis, ~PMDEventBreakpoint1Mask );
}

How can I add a programmable time limit to the motion error detection?
At the end of a move, set a breakpoint to be triggered when the axis settled bit is not active. The breakpoint will only trigger once the axis is out of the settle window (a programmable value) for the specified settle time (a programmable value). Set the breakpoint action to “motor off”. Before the next move is commanded, turn off the breakpoint.

Example pseudo code is shown below.

// Using the settled window to stop motor output
// if the settle window is exceeded

selection_mask = PMDActivityAxisSettledMask;
sense_mask = 0;
SetSettleWindow( &hAxis, 1000 );
SetSettleTime( &hAxis, 100 );
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask );
SetBreakPoint( &hAxis, PMDBreakpoint1, PMDBreakpointActionDisablePositionLoopAndHigherModules, PMDBreakpointActivityStatus );

The same method can be used with the tracking window. That is, if the axis goes outside of the tracking window, output to the motor will be switched off. Depending on the individual application it may preferable to have some other action taken such as an abrupt stop.

// using the tracking window to stop motor output
// if the tracking window is exceeded
selection_mask = PMDActivityTrackingMask;
sense_mask = 0;
SetTrackingWindow( &hAxis, 1000 );
SetBreakpointValue( &hAxis, PMDBreakpoint2, (selection_mask<<16)|sense_mask );
SetBreakPoint( &hAxis, PMDBreakpoint2,
PMDBreakpointActionDisablePositionLoopAndHigherModules, PMDBreakpointActivityStatus );
 
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
ThePMDBreakpointActionDisablePositionLoopAndHigherModules action does not exist on earlier products. PMDBreakpointActionMotorOff should be used instead.

Does the motion error bit in the event status register still get set if MotionError EventAction has been set to NONE?
Yes.
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
The concept of an EventAction does not exist in earlier products. Instead the MotionError behavior is control by the SetAutoStopMode command. The answer is the same however, when AutoStopMode is disabled a MotionError will still cause the bit in the EventStatus to get set. 

How do I convert from encoder counts per second to native PMD units?

Velocity, acceleration and jerk have the chip cycle as their time base. In the following example, the chip being used is the MC2140. This is a 4-axis chipset with a cycle time of 102.4 microseconds per axis. This is shown in the calculations as (4*102.4). In these calculations you should substitute the number of axes and cycle time from the motion processor you are using.

Cycle times are listed in the Technical Specification manual.

VELOCITY
To convert from counts/second to counts/cycle use this formula:-

counts per cycle = (counts per second)* ((4*102.4)/1000000)

Finally, to convert to the chip fixed-point format (16.16), multiply by 65536 and use only the integer portion of the result as the value for the SetVelocity command.

ACCELERATION
To convert from counts/second2 (acc) to counts/cycle2 use this formula:

counts per cycle = (counts per second)* ((4*102.4)/1000000)2

Finally, to convert to the chip fixed-point format (16.16), multiply by 65536 and use only the integer portion of the result as the value for the SetAcceleration command.

JERK
To convert from counts/second3 (jerk) to counts/cycle3 use this formula:

counts per cycle = (counts per s)* ((4*102.4)/1000000) 3.

Finally, to convert to the chip fixed-point format (0.32), multiply by 232 and use only the integer portion of the result as the value for the SetJerk command.


How do I program a coordinated 2-axis move?
denominator = sqrt(x_length2 + y_length2);
// for the x axis
x_vel  = x_length/denominator * linear_vel;
x_acc  = x_length/denominator * linear_acc;
x_jerk = x_length/denominator * linear_jerk;
// for the y axis
y_vel  = y_length/denominator * linear_vel;
y_acc  = y_length/denominator * linear_acc;
y_jerk = y_length/denominator * linear_jerk;
Linear_xxx is the desired vector velocity/accel/jerk.

How does GetActualVelocity work?
(MC73110 users see below) Actual velocity is calculated by subtracting the actual position of the previous cycle from the current actual position. The default cycle time can be as small as 51usec depending on which product is being used. GetActualVelocity returns a fixed-point 16.16 value, so to convert it to counts/cycle divide the returned value by 65536. Depending on what your maximum velocity is you may not get anything other than 0 or 65536, because at velocities (counts/cycle) that are approximately equal to 1 count/cycle the calculation will result in a change in position of 0 or 1 encoder counts during the previous chip cycle.
 
For those using the MC73110:
The MC73110 contains a feature referred to as the “Velocity Estimator” which adds significant resolution to the ActualVelocity calculation. This is a 2nd order filter on the position feedback data that can generate ActualVelocity values with a fractional number of counts per cycles.      

How do I perform a typical homing sequence?
The Application Notes webpage contains a document detailing recommended Homing procedures along with example C-Motion code.
 
Here is an overview of a typical home sequence :-
1) Finding the home
2) Setting or zeroing the actual position.
When the home switch is located, its position must be captured. By default the capture hardware looks for a high to low transition of the signal. If the input signal has a low to high transition, the sense logic can be inverted using the SetSignalSense command.
SetSignalSense( &hAxis1, PMDSignalEncoderHomeMask );
The first step is to test if the axis is currently located in the home switch. If the switch is active, move the axis away from it until it becomes inactive.
GetSignalStatus(&hAxis1,  &status);
if ( status & PMDSignalEncoderHomeMask )
{
     SetProfileMode( &hAxis1,  PMDVelocityContouringProfile );
     SetVelocity( &hAxis1, 65536 );
     SetAcceleration( &hAxis1, 256 );
     Update( &hAxis1 );
     do
{
     GetSignalStatus( &hAxis1,  &status );
}    while ( status & PMDSignalEncoderHomeMask );
     SetStopMode( &hAxis1, PMDSmoothStopMode );
     Update( &hAxis1 );
}
The next step is to move into the home switch and capture the position.
SetProfileMode( &hAxis1,  PMDVelocityContouringProfile );
SetVelocity( &hAxis1, -65536 );
SetAcceleration( &hAxis1, 256 );
// now prepare for the capture
SetCaptureSource( &hAxis1, PMDCaptureSourceHome );
// this clears the latched capture bit
ResetEventStatus( &hAxis1, ~PMDEventCaptureReceivedMask );
// this clears the capture hardware
GetCaptureValue( &hAxis1, &value );
// start the move into the home switch
Update( &hAxis1 );
// wait for the capture
do
{
     GetEventStatus( &hAxis1,  &status );
} while ( !(status & PMDEventCaptureReceivedMask) );
// now that we have the capture, stop the axis
SetStopMode( &hAxis1, PMDSmoothStopMode );
Update( &hAxis1 );
GetCaptureValue( &hAxis1, &home_pos );
The captured position can now be used to program an offset to the actual position using AdjustActualPosition. The home position will now be position zero.
AdjustActualPosition( &hAxis1, -home_pos );

How do I setup Stall Detection on products that support step motors?
The following commands are needed to configure the product for Stall Detection.(i.e. MotionError). The ratio between the number of encoder counts per revolution versus the number of steps per revolution must be defined.

// actual position is expressed as encoder counts
SetActualPositionUnits( &hAxis1, 0 )
SetEncoderSource( &hAxis1, PMDEncoderSourceIncremental );
SetEncoderToStepRatio( &hAxis1,  4096, 200); // In this case the system has an encoder with 4096 counts per revolution and a 200 (1.8
°) step motor.
// set the error limit to 10 steps
SetPositionErrorLimit( &hAxis1,  10 );
 
When the MotorType is set to 2-phase microstepping, the ratio between encoder counts to microsteps should be used in the arguments to SetEncoderToStepRatio.

How can I use the AxisOut signal for the general purpose output?
The AxisOut pin is normally used to reflect the state of an internal register bit on a digital output. This is done using the SetAxisOutMask and SetSignalSense commands. It is also possible to set the state of this signal directly using the same commands.
To operate the AxisOut signal manually, first set the “source” to “none”.
SetAxisOutMask (&hAxis, PMDAxis1, 0, 0, PMDAxisOutSourceNone) ;
This will set the signal to its active state as defined by bit 10 of the signal sense register. By default the signal will be active low. You can then set the active level (and hence the state) of the signal using the SetSignalSense command.
In pseudo code, to set the output signal low:
signal_sense = GetSignalSense( &hAxis );
SetSignalSense( &hAxis, signal_sense & ~0x400 );
In pseudo code, to set the output signal to high:
signal_sense = GetSignalSense( &hAxis );
SetSignalSense( &hAxis, signal_sense | 0x400 );
 
For those using Magellan V1.x, Navigator, Pilot, or Navigator Motion Boards
The command SetAxisOutSource should be used instead of SetAxisOutMask.  Referenece the appropriated Programmers Command Reference for proper formatting.

What is a typical startup sequence?
When using a chip level product, after power-on, a hardware reset must be performed. In addition the Reset instruction can be executed by a host application at any time. This instruction will place the motion processor in its “power on” state, setting all internal parameters to their default values. Refer to the Programmers Reference for a complete description of this command and the default settings for each internal register.
After a hardware reset, or following a Reset instruction being executed, the product will be in the reset state. The GetInstructionError command can be used to detect and clear any pending Errors.

// reset the chip
Reset( &hAxis1 );
// confirm that the chip reset correctly

GetInstructionError( &hAxis1, &status );
if ( status!= PMD_ERR_ChipsetReset )
{
     printf(“Chip reset error occurred\n”);
}
When using a board level product there are is a non-volatile register that can be queried at startup. The command MBGetResetCause will report the reason for the previous reset. MBClearResetCause should then be used to clear this register.
The ION digital drive does not support the GetResetCause command but instead supports the GetDriveFaultStatus command. After the ION has entered a hard fault condition, power must be cycled. Afterwards, the GetDriveFaultStatus will report the reason for the previous hard fault. Using this command will also clear the register.
For those using Magellan V1.x, Navigator, Pilot, MC73110, or Navigator Motion Boards
The command GetHostIOError should be used instead of GetInstructionError.

What is the maximum motor voltage that can be driven by the DK73110?
(MC73110) The max voltage that can be applied from the MOSFET is:-1. The PWM waveform from the MOSFET drive has a peak value of (Vbus-R*I), where I is the current from the MOSFET and R is the cumulative resistance of the power train. For example, on the DK, the MOSFET has on-resistance of 44mohm typ, and two 10mohm bus resistor.
Therefore, Vmax_pwm = Vbus-0.64*I 2. Often the commutation voltage (voltage seen by the motor at the commutation frequency) is also of concern. In that case, the max voltage from the MOSFET to the motor is:-(Vbus-R*I)*(pwm limit) For example, if the max pwm duty ratio can go 97%, then the voltage will be (Vbus-0.064*I)*.97. The above discussion is based on the phase-to-ground voltage. The phase-to-phase voltage can be derived by referencing the sinusoidal waveform used to compute each phase.  The offset for each phase is 120 degrees. 
The above discussion is based on phase to ground voltages. The phase-to-phase voltage can be derived by referencing the sinusoidal waveform used to compute each phase.  The offset for each phase in 120 degress.

When driving IGBTs, how can I prevent shoot-through if power is intentionally or suddenly switched off to the motion processor?

As the chip powers down, the PWM signals output by the chip may not all go to GND at the same time.  In some cases this can result in sudden shoot-through currents. To prevent this condition from occurring the PWM signals should be connected to weak pull-down resistors.


What is the theoretical maximum rotation speed for the brushless motor products?

PMD products will drive the majority of motors to their maximum rated speed.  For example the ION has been used to drive a Brushless DC motor at over 1000 Electrical cycles per second, which equates to over 60,000RPM for a 2-pole brushless motor, or 30,000 RPM for a 4-pole brushless DC motor. It is possible however that special brushless DC motors which need to be driven above 1,000 electrical cycles per second may not be controlled effectively. Note that for maximum speed using the ION, field oriented control control mode should be used.


When using the brushless product in open loop mode; if I issue an Update, the motor rotates, Why?
This can occur if algorithmic phase initialization was used. In this mode a SetMotorCommand with a value is required during the initialization procedure.
The problem is that in open loop mode this value will cause the motor to rotate. The solution is to program a value of zero after you have finished the initialization, as shown below:-
1) Perform the steps required for an algorithmic initialization
2)
SetMotorCommand( &hAxis1, 0 );
3) Execute the rest of the host code....

What is the motor phase angle at the end of algorithmic initialization?

180 degrees, which equals PhaseCounts/2


When I send an invalid command through the serial port, the chip responds “bad checksum” and fails to respond to further commands. Why?
An invalid command can be defined as a command that does not exist on the motion processor. For example, the SetNumberPhases command is not available on the brushed motor control products.  If the invalid command that is sent by the host has parameters, this error can occur.
When the motion processor receives the command, instead of replying with an “invalid instruction” error, it responds “bad checksum” error. This is because it assumes that any invalid command has zero parameters, hence the checksum verification will fail before it attempts to process the (invalid) command. Because the chip sees the serial data as a constant stream, it assumes that the next byte received is the start of the next packet. In reality, the next byte or bytes are the data from the invalid command. The serial communication is now out of sync. To recover you need to re-sync communication with the chip. To do this send a zero byte until the chip responds with a zero byte.

What is the maximum IO rate for parallel and serial communication?
All commands in parallel mode are from 1 to 4 words long and they all have from 0-3 words of data sent back giving a total number of words transferred for each command ranging from 1-7.
We do not have any commands that actually take a full three words of data and three words returned, so 7 words is longer than any real command. For this comparison we assume that the average amount of data is two words including both sent and received. That gives a total time for a parallel command as:
12.5usec * 3 words (1 command, 2 data) = 37.5usec
resulting in a theoretical maximum rate of 26,667 cmds/sec.
Now, serial commands all have an overhead of 4 bytes plus data, and a return packet of 2 bytes plus data. Assuming that we average 2 words (4 bytes) of data for each command, that gives us 10 bytes/command.  Also, assume 10 bits for each byte (8 data, 1 stop, 1 start) which is a minimum and we get a total time of 10/baud * 10 bytes = total time.
Here are the times for the typical baud rates:
Baud
Command time (usec)
Rate (cmd/sec)
 9600
10,416.7
96
 19200
5,108.3
192
 57600
1,909.7
524
 115200
954.9
1,047
 230400
434
2,304
 460800
217
4,608

What is the format of CAN messages?

Communication takes place using message IDs 0x580+NodeID and 0x600+NodeID.  The contents of the packet use the PMD motion control API.  It is very simple to construct the messages and we have "C" code to demonstrate this.


Using the serial or CAN interface, I get no response from the chipset after sending a command. Why does this happen even though the CP has proper Vcc, Ground and Clock?

The serial (and CAN) configuration is defined by the data bus after reset.  In case the configuration was corrupted, initial attempts at communication should be at the lowest baud rate if a point-to-point serial interface is being used.  In that case the user should see some activity on the SrlXmt after sending a command. Of course the response may not make sense since the baud rate is incorrect but the existence of activity on SrlXmt should be verified first and then worry about the configuration later.Also, if using a Magellan processor, ensure that the READY signal (pin 120 on CP) is high.  This can cause failures using all interface types. 


Are the I/O pins open collector or totem pole?

All I/O pins are input, bidirectional (tri-state), or totem pole.


How can I connect a USB port to your device?

A USB to RS-232 Serial adapter is available from PMD. Order ADAPT-USB232-01.R. This is a common solution for PCs or laptops that do not have a serial port.


How can I talk to your products via the serial interface if I do not have a serial port on my PC or laptop?

A USB to RS-232 Serial adapter is available from PMD. Order ADAPT-USB232-01.R. 


Can I use a limit switch as a home signal?

Yes, but you must wire it to the limit signal as well as the home signal.


What is the state of the AxisOut signal after a reset?

It is logic level high.


Do you have any design information for the A/D input?
The Application Notes section of the Magellan Electrical Specifications contains ADC reference designs.
VCCA:   Analog supply voltage should be isolated from the digital supply to preserve accuracy and noise immunity of A/D conversion.
VSSA:   Analog ground, should be isolated from the digital ground to preserve accuracy and noise immunity of A/D conversion.
VREFHI: ADC hi reference, VCCA => VREFHI > VREFLO>= VSSA
VREFLO: ADC lo reference, VCCA => VREFHI > VREFLO>= VSSA
VREFHI and VREFLO are usually adapted to the range of analog input voltages to take maximum advantage of the range of the ADC. For example if input analog voltages are 0-1V and VREFHI is 3.3V and VREFLO is 0V, then the full range of the ADC conversion will not be utilized and the resolution will not be optimal.  Instead use a VREFHI of 1V to optimize the resolution.  
The ADC is a 10-bit conversion.  The upper 10-bits of the 16-bit value returned by ReadAnalog will contain the converted value.  (Use GetAnalog on the MC73110)

Do you have the Digikey part numbers for the J2 and J5 mating connectors on the Magellan or Navigator DK board?
J2: MSD16K-ND, J5: MSD20K-ND
A ribbon cable with mating connectors for J5 is also available from PMD. Order CABLE-4371-01.R. 

What can I use to create a USB interface on the board I am designing?

Future Technology Devices International make USB to serial interface chips that will work with PMD chips. Their home page is http://www.ftdichip.com/


Can you give me part numbers for Magellan sockets and clamshells?
Sockets can be obtained from YAMIACHI    http://www.yeu.com/
CP socket: IC149-144-045-B5
IO socket: IC149-100-025-B5
Clamshells can be obtained from IronWood Electronics http://www.ironwoodelectronics.com/
CP clamshell: PA-QFE144SC-C-Z-01
IO clamshell: PA-QFE100SC-P-Z-01

Can you give me part numbers for MC73110 socket and clamshell?
Sockets and clamshells can be obtained from YAMIACHI    http://www.yeu.com/
socket: IC234-0644-27P
clamshell: IC51-0644-807

Can you give me part numbers for Navigator/Pilot through-hole sockets?
This is a through-hole socket for the CP chip.  The base and cover are sold separately. Go to http://www.digikey.com/   
SKT132PQFP
part#s A24824-ND,A24825-ND.
This is a through-hole socket with clamshell cover for the IO chip.
SKT100PQRTZIF
YAMIACHI    http://www.yeu.com/
IC51-1004-814-2

Can two PMD chipsets be driven from the same oscillator?

We recommend splitting the clock output and placing 33-ohm resistors on each branch as close as possible to the oscillator. Then connect the signal to the IO chip clock input.


What is the part number of the 100-pin cable connector used on the Magellan DK?

The part# is P50E-100S-TG. It is a Robinson Nugent part but 3M bought out this company.
http://solutions.3m.com/wps/portal/3M/en_WW/electronics/home/productsandservices/products/interconnectsolutions/?WT.mc_id=www.3m.com/interconnects.


Why does the first command over the parallel host interface on the Magellan chipset not work?

If the IO chip HostRdy signal (pin 8) is used for chip busy detection, the first instruction sent to the chipset after a device reset may be ignored or may produce a checksum error.  It is recommended that in this configuration a NoOperation command be sent to the chipset as the first instruction after a power on or reset.  If the ReadStatus operation is used to check the HostRdy state this problem does not occur.


How is the SPI interface on the MC73110 used?

The SPI interface on the MC73110 is used to send a 16-bit reference value to the MC73110.  The interpretation of the value depends on which loops are currently enabled.  If the velocity loop is enabled this value represents a desired velocity.  If only the current loop is enabled the SPI value represents the desired peak of the current waveform.  Note: the command set is not supported on the SPI interface.  Only the UART interface (RS232/485) supports the full command set. 


How is the SPI interface on the Magellan (MC58xxxx) used?

The SPI interface on the Magellan processor is used to output a 16-bit motor command. This is only available when the MotorType is set DC Brushed and will represent the numerical output of the position loop. Commonly the PSI signal is sent to a SPI DAC to generate an analog voltage for an DC Brushed Motor driver/amplifier.


When using the parallel interface, why does a DataRead operation return the same value that was written in the subsequent InstructionWrite operation?

(Magellan & Navigator): This is usually a result of the HostMode0 and HostMode1 pins being in the wrong state.  For the 16/16 interface they should be tied low.  For 8/16 mode, HostMode0 should be low and HostMode1 should be high.


How can I test the host processor to PMD chip parallel communication?
First, the host processor to PMD IO chip connection should be tested.
1) Hold the CP in reset (pin 133).
2) Execute a 16 bit data write to the IO chip, using random data and ignoring the state of the ready line.
3) Execute a 16 bit data read from the IO chip, ignoring the state of the ready line.
This data should match exactly what you wrote. If the data doesn't match, the most common problems are:
1) Open connect on one of the data/control signals.
2) Reversed or incorrect connection on one of the data/control signals.
3) Incorrect timing.

How is the ~Reset signal on the Magellan CP, Navigator CP, Pilot, and MC73110 used?

The ~Reset signal is active (low) and must remain active (low) after Vcc and Clock are present for a minimum amount of time as described in the appropriate product manual (Magellan/Navigator/Pilot Electrical Specifications or the MC73110 Product Manual). When the ~Reset signal is brought high, communication with the processor can begin after a fixed amount of time (reference manual). Afterward the ~Reset signal can be pulsed low to force another reset event if/when desired. Caution: Output signals such at AxisOut and PWM are in an undefined state when ~Reset is active.


Do I need to synchronize the release of the ~Reset signal?

Only when the Magellan chipset is being used with an IOABN version label on the IO chip is synchronization required.   In this case  the release of the ~Reset signal must be synchronized to the IOClock.  The new Magellan IO chip (IOAD8) does not require synchronization of the ~Reset signal release. 


Can you give me a list of RAM devices compatible with Navigator/Pilot?
 
Manufacturer
Part Number
Alliance Semi
AS7C513-15
G-Link Tech
GLT751216-15
Integrated Device
IDT71008S-15
Integrated Silicon Solution
IS61C3216-15
Paradigm Tech
PDM41516LA-15
Paradigm Tech
PDM41516SA-15
Samsung Semi
KM616513-15

How do I program a motion error to stop motion on all axes?
(Magellan and Navigator) On a multi-Axis product it may be desirable to have a motion error event on one axis cause the motion on all axis to shut down.  The default response to a motion error is the disabling of the position loop on the axis the motion error occurred on.  By default, any other axes on that product will not be affected.  To create a system where all axes will react to a motion error on any axis, the BreakPoint feature is utilized.  A breakpoint needs to be setup on each axis that is triggered by a breakpoint or motion error on another axis.  In this example the breakpoint on Axis1 will be triggered by the occurrence of a Motion Error or BreakPoint1 on Axis2.  The breakpoint on Axis 2 will look at events on Axis 3.  Axis 3 looks at Axis 4 and Axis 4 looks at Axis 1.  In this way the motion error event is cascaded across all axes.
C-Motion example:
SetBreakPointValue (Axis1, 0, 0x00140014)    // Looks at BreakPoint1 and MotionError
SetBreakPoint (Axis1, 0, Axis2, <action>,8)     // Look at Axis 2 EventStatus
SetBreakPointValue (Axis2, 0, 0x00140014)    
SetBreakPoint (Axis2, 0, Axis3, <action>,8)     // Look at Axis 3 EventStatus
SetBreakPointValue (Axis3, 0, 0x00140014)    
SetBreakPoint (Axis3, 0, Axis4, <action>,8)     // Look at Axis 4 EventStatus
SetBreakPointValue (Axis4, 0, 0x00140014)   
SetBreakPoint (Axis4, 0, Axis1, <action>,8)     // Look at Axis 1 EventStatus
There a several choices for the <action> argument.  A command choice for this argument would be "5", which is "Disable Position Loop and Higher Modules".

Is there a way I can support parallel and incremental encoder input at the same time?

The chip cannot use both types of position input simultaneously. Only one of the two inputs can be selected as the primary input source for a given axis using the command SetEncoderSource.

If an incremental encoder is the source, you can read the value of a parallel output position device by mapping it to the User I/O space. The value can then be retrieved using the command ReadIO.   Refer to the User’s Guide and Technical Specification manuals for more information regarding the User I/O space.


Do you have any information on resolvers?
Interfacing a resolver to a PMD product will involve the use of a Resolver to Digital converter (RtoD). If the RtoD generates an incremental quadrature encoder signal, that signal can directly interface to a PMD product however the absolute position information will not be available. Typically the RtoD will also output absolute position information in a digital format. In this case additional circuitry is required to convert that information into a “parallel word” format. This can be used with products that support a “Parallel Word” encoder such as Magellan chipset and Prodigy boards.   There is a reference design on the Application Notes webpage (Parallel Word AD2S80)  Some RtoD’s are available on 3rd part Development Boards like the Analog Devices AD2S1200DK.
The standard MC73110 does not support the Parallel Word interface, but custom solutions are available.   Contact PMD for more information.

How can I find out the current state of the limit, encoder, home and AxisIn signals?

Use the command GetSignalStatus.  This command is described in the Programmer’s Command Reference and the User’s Guide.


What is VB-Motion?

VB-Motion is a software library containing pre-made COM DLLs.  The library also contains examples of using the COM DLLs to interface PMD products. Included are VB.NET examples. (The existance of VB 6.0 examples are there for legacy purposes and VB 6.0 is not recommended for new designs.)


How can I execute a smooth stop when a limit switch is tripped instead of executing an abrupt stop?
By default an abrupt stop will occur in response to a Limit Switch Event. The SetEventAction command can be used to alter the behavior associated with a Limit Switch Event. Executing the command below will alter the behavior such that a SmoothStop will occur.
on all future Positive Limit Switch Events.
 
SetEventAction (PMDEventActionEventPositiveLimit, PMDEventActionSmoothStop)
 
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
Note: The SetEventAction command does not exist on older products and an alternate method described below must be used.
The method involves using a breakpoint or an interrupt service routine (ISR). The benefit of the ISR approach is that additional action may be taken in response to the limit event as opposed to simply performing a smooth stop. In either case, the default action must first be disabled. This is done as follows:
SetLimitSwitchMode( &hAxis, PMDLimitDisabled );
Executing a smooth stop after a limit event using a chip breakpoint. The following code sets a breakpoint that generates a smooth stop when the limit switches are low. To use “active high” logic set the sense mask equal to the selection mask. If the breakpoint triggers it must be re-set.
selection_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask; sense_mask = 0;
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask );
SetBreakpoint( &hAxis, PMDBreakpoint1, PMDBreakpointActionSmoothStop,
PMDBreakpointSignalStatus );
Executing a smooth stop after a limit event using an ISR routine. The following code sets a breakpoint that simply sets the breakpoint bit in the event register when the limit switches are low. To use “active high” logic, set the sense mask equal to the selection mask. If the breakpoint triggers it must be re-set.
selection_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask;
sense_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask;
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask ); SetBreakpoint( &hAxis, PMDBreakpoint1, PMDBreakpointNoAction,
PMDBreakpointSignalStatus );
SetInterruptMask( &hAxis, PMDEventBreakpoint1Mask );
The interrupt service routine for the PMD chip should include the following:
GetEventStatus( &hAxis, &status );
if (status & PMDEventBreakpoint1Mask)
{
            // stop the axis
           SetStopMode( &hAxis, PMDSmoothStopMode );
           Update( &hAxis, PMDSmoothStopMode );
           ResetEventStatus( &hAxis, ~PMDEventBreakpoint1Mask );
}

How can I add a programmable time limit to the motion error detection?
At the end of a move, set a breakpoint to be triggered when the axis settled bit is not active. The breakpoint will only trigger once the axis is out of the settle window (a programmable value) for the specified settle time (a programmable value). Set the breakpoint action to “motor off”. Before the next move is commanded, turn off the breakpoint.

Example pseudo code is shown below.

// Using the settled window to stop motor output
// if the settle window is exceeded

selection_mask = PMDActivityAxisSettledMask;
sense_mask = 0;
SetSettleWindow( &hAxis, 1000 );
SetSettleTime( &hAxis, 100 );
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask );
SetBreakPoint( &hAxis, PMDBreakpoint1, PMDBreakpointActionDisablePositionLoopAndHigherModules, PMDBreakpointActivityStatus );

The same method can be used with the tracking window. That is, if the axis goes outside of the tracking window, output to the motor will be switched off. Depending on the individual application it may preferable to have some other action taken such as an abrupt stop.

// using the tracking window to stop motor output
// if the tracking window is exceeded
selection_mask = PMDActivityTrackingMask;
sense_mask = 0;
SetTrackingWindow( &hAxis, 1000 );
SetBreakpointValue( &hAxis, PMDBreakpoint2, (selection_mask<<16)|sense_mask );
SetBreakPoint( &hAxis, PMDBreakpoint2,
PMDBreakpointActionDisablePositionLoopAndHigherModules, PMDBreakpointActivityStatus );
 
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
ThePMDBreakpointActionDisablePositionLoopAndHigherModules action does not exist on earlier products. PMDBreakpointActionMotorOff should be used instead.

Does the motion error bit in the event status register still get set if MotionError EventAction has been set to NONE?
Yes.
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
The concept of an EventAction does not exist in earlier products. Instead the MotionError behavior is control by the SetAutoStopMode command. The answer is the same however, when AutoStopMode is disabled a MotionError will still cause the bit in the EventStatus to get set. 

How do I convert from encoder counts per second to native PMD units?

Velocity, acceleration and jerk have the chip cycle as their time base. In the following example, the chip being used is the MC2140. This is a 4-axis chipset with a cycle time of 102.4 microseconds per axis. This is shown in the calculations as (4*102.4). In these calculations you should substitute the number of axes and cycle time from the motion processor you are using.

Cycle times are listed in the Technical Specification manual.

VELOCITY
To convert from counts/second to counts/cycle use this formula:-

counts per cycle = (counts per second)* ((4*102.4)/1000000)

Finally, to convert to the chip fixed-point format (16.16), multiply by 65536 and use only the integer portion of the result as the value for the SetVelocity command.

ACCELERATION
To convert from counts/second2 (acc) to counts/cycle2 use this formula:

counts per cycle = (counts per second)* ((4*102.4)/1000000)2

Finally, to convert to the chip fixed-point format (16.16), multiply by 65536 and use only the integer portion of the result as the value for the SetAcceleration command.

JERK
To convert from counts/second3 (jerk) to counts/cycle3 use this formula:

counts per cycle = (counts per s)* ((4*102.4)/1000000) 3.

Finally, to convert to the chip fixed-point format (0.32), multiply by 232 and use only the integer portion of the result as the value for the SetJerk command.


How do I program a coordinated 2-axis move?
denominator = sqrt(x_length2 + y_length2);
// for the x axis
x_vel  = x_length/denominator * linear_vel;
x_acc  = x_length/denominator * linear_acc;
x_jerk = x_length/denominator * linear_jerk;
// for the y axis
y_vel  = y_length/denominator * linear_vel;
y_acc  = y_length/denominator * linear_acc;
y_jerk = y_length/denominator * linear_jerk;
Linear_xxx is the desired vector velocity/accel/jerk.

How does GetActualVelocity work?
(MC73110 users see below) Actual velocity is calculated by subtracting the actual position of the previous cycle from the current actual position. The default cycle time can be as small as 51usec depending on which product is being used. GetActualVelocity returns a fixed-point 16.16 value, so to convert it to counts/cycle divide the returned value by 65536. Depending on what your maximum velocity is you may not get anything other than 0 or 65536, because at velocities (counts/cycle) that are approximately equal to 1 count/cycle the calculation will result in a change in position of 0 or 1 encoder counts during the previous chip cycle.
 
For those using the MC73110:
The MC73110 contains a feature referred to as the “Velocity Estimator” which adds significant resolution to the ActualVelocity calculation. This is a 2nd order filter on the position feedback data that can generate ActualVelocity values with a fractional number of counts per cycles.      

How do I perform a typical homing sequence?
The Application Notes webpage contains a document detailing recommended Homing procedures along with example C-Motion code.
 
Here is an overview of a typical home sequence :-
1) Finding the home
2) Setting or zeroing the actual position.
When the home switch is located, its position must be captured. By default the capture hardware looks for a high to low transition of the signal. If the input signal has a low to high transition, the sense logic can be inverted using the SetSignalSense command.
SetSignalSense( &hAxis1, PMDSignalEncoderHomeMask );
The first step is to test if the axis is currently located in the home switch. If the switch is active, move the axis away from it until it becomes inactive.
GetSignalStatus(&hAxis1,  &status);
if ( status & PMDSignalEncoderHomeMask )
{
     SetProfileMode( &hAxis1,  PMDVelocityContouringProfile );
     SetVelocity( &hAxis1, 65536 );
     SetAcceleration( &hAxis1, 256 );
     Update( &hAxis1 );
     do
{
     GetSignalStatus( &hAxis1,  &status );
}    while ( status & PMDSignalEncoderHomeMask );
     SetStopMode( &hAxis1, PMDSmoothStopMode );
     Update( &hAxis1 );
}
The next step is to move into the home switch and capture the position.
SetProfileMode( &hAxis1,  PMDVelocityContouringProfile );
SetVelocity( &hAxis1, -65536 );
SetAcceleration( &hAxis1, 256 );
// now prepare for the capture
SetCaptureSource( &hAxis1, PMDCaptureSourceHome );
// this clears the latched capture bit
ResetEventStatus( &hAxis1, ~PMDEventCaptureReceivedMask );
// this clears the capture hardware
GetCaptureValue( &hAxis1, &value );
// start the move into the home switch
Update( &hAxis1 );
// wait for the capture
do
{
     GetEventStatus( &hAxis1,  &status );
} while ( !(status & PMDEventCaptureReceivedMask) );
// now that we have the capture, stop the axis
SetStopMode( &hAxis1, PMDSmoothStopMode );
Update( &hAxis1 );
GetCaptureValue( &hAxis1, &home_pos );
The captured position can now be used to program an offset to the actual position using AdjustActualPosition. The home position will now be position zero.
AdjustActualPosition( &hAxis1, -home_pos );

How do I setup Stall Detection on products that support step motors?
The following commands are needed to configure the product for Stall Detection.(i.e. MotionError). The ratio between the number of encoder counts per revolution versus the number of steps per revolution must be defined.

// actual position is expressed as encoder counts
SetActualPositionUnits( &hAxis1, 0 )
SetEncoderSource( &hAxis1, PMDEncoderSourceIncremental );
SetEncoderToStepRatio( &hAxis1,  4096, 200); // In this case the system has an encoder with 4096 counts per revolution and a 200 (1.8
°) step motor.
// set the error limit to 10 steps
SetPositionErrorLimit( &hAxis1,  10 );
 
When the MotorType is set to 2-phase microstepping, the ratio between encoder counts to microsteps should be used in the arguments to SetEncoderToStepRatio.

When I send an invalid command through the serial port, the chip responds “bad checksum” and fails to respond to further commands. Why?
An invalid command can be defined as a command that does not exist on the motion processor. For example, the SetNumberPhases command is not available on the brushed motor control products.  If the invalid command that is sent by the host has parameters, this error can occur.
When the motion processor receives the command, instead of replying with an “invalid instruction” error, it responds “bad checksum” error. This is because it assumes that any invalid command has zero parameters, hence the checksum verification will fail before it attempts to process the (invalid) command. Because the chip sees the serial data as a constant stream, it assumes that the next byte received is the start of the next packet. In reality, the next byte or bytes are the data from the invalid command. The serial communication is now out of sync. To recover you need to re-sync communication with the chip. To do this send a zero byte until the chip responds with a zero byte.

What is the maximum IO rate for parallel and serial communication?
All commands in parallel mode are from 1 to 4 words long and they all have from 0-3 words of data sent back giving a total number of words transferred for each command ranging from 1-7.
We do not have any commands that actually take a full three words of data and three words returned, so 7 words is longer than any real command. For this comparison we assume that the average amount of data is two words including both sent and received. That gives a total time for a parallel command as:
12.5usec * 3 words (1 command, 2 data) = 37.5usec
resulting in a theoretical maximum rate of 26,667 cmds/sec.
Now, serial commands all have an overhead of 4 bytes plus data, and a return packet of 2 bytes plus data. Assuming that we average 2 words (4 bytes) of data for each command, that gives us 10 bytes/command.  Also, assume 10 bits for each byte (8 data, 1 stop, 1 start) which is a minimum and we get a total time of 10/baud * 10 bytes = total time.
Here are the times for the typical baud rates:
Baud
Command time (usec)
Rate (cmd/sec)
 9600
10,416.7
96
 19200
5,108.3
192
 57600
1,909.7
524
 115200
954.9
1,047
 230400
434
2,304
 460800
217
4,608

What is the format of CAN messages?

Communication takes place using message IDs 0x580+NodeID and 0x600+NodeID.  The contents of the packet use the PMD motion control API.  It is very simple to construct the messages and we have "C" code to demonstrate this.


Using the serial or CAN interface, I get no response from the chipset after sending a command. Why does this happen even though the CP has proper Vcc, Ground and Clock?

The serial (and CAN) configuration is defined by the data bus after reset.  In case the configuration was corrupted, initial attempts at communication should be at the lowest baud rate if a point-to-point serial interface is being used.  In that case the user should see some activity on the SrlXmt after sending a command. Of course the response may not make sense since the baud rate is incorrect but the existence of activity on SrlXmt should be verified first and then worry about the configuration later.Also, if using a Magellan processor, ensure that the READY signal (pin 120 on CP) is high.  This can cause failures using all interface types. 


How can I use the AxisOut signal for the general purpose output?
The AxisOut pin is normally used to reflect the state of an internal register bit on a digital output. This is done using the SetAxisOutMask and SetSignalSense commands. It is also possible to set the state of this signal directly using the same commands.
To operate the AxisOut signal manually, first set the “source” to “none”.
SetAxisOutMask (&hAxis, PMDAxis1, 0, 0, PMDAxisOutSourceNone) ;
This will set the signal to its active state as defined by bit 10 of the signal sense register. By default the signal will be active low. You can then set the active level (and hence the state) of the signal using the SetSignalSense command.
In pseudo code, to set the output signal low:
signal_sense = GetSignalSense( &hAxis );
SetSignalSense( &hAxis, signal_sense & ~0x400 );
In pseudo code, to set the output signal to high:
signal_sense = GetSignalSense( &hAxis );
SetSignalSense( &hAxis, signal_sense | 0x400 );
 
For those using Magellan V1.x, Navigator, Pilot, or Navigator Motion Boards
The command SetAxisOutSource should be used instead of SetAxisOutMask.  Referenece the appropriated Programmers Command Reference for proper formatting.

What is a typical startup sequence?
When using a chip level product, after power-on, a hardware reset must be performed. In addition the Reset instruction can be executed by a host application at any time. This instruction will place the motion processor in its “power on” state, setting all internal parameters to their default values. Refer to the Programmers Reference for a complete description of this command and the default settings for each internal register.
After a hardware reset, or following a Reset instruction being executed, the product will be in the reset state. The GetInstructionError command can be used to detect and clear any pending Errors.

// reset the chip
Reset( &hAxis1 );
// confirm that the chip reset correctly

GetInstructionError( &hAxis1, &status );
if ( status!= PMD_ERR_ChipsetReset )
{
     printf(“Chip reset error occurred\n”);
}
When using a board level product there are is a non-volatile register that can be queried at startup. The command MBGetResetCause will report the reason for the previous reset. MBClearResetCause should then be used to clear this register.
The ION digital drive does not support the GetResetCause command but instead supports the GetDriveFaultStatus command. After the ION has entered a hard fault condition, power must be cycled. Afterwards, the GetDriveFaultStatus will report the reason for the previous hard fault. Using this command will also clear the register.
For those using Magellan V1.x, Navigator, Pilot, MC73110, or Navigator Motion Boards
The command GetHostIOError should be used instead of GetInstructionError.

Can I use a limit switch as a home signal?

Yes, but you must wire it to the limit signal as well as the home signal.


What is the state of the AxisOut signal after a reset?

It is logic level high.


Are the I/O pins open collector or totem pole?

All I/O pins are input, bidirectional (tri-state), or totem pole.


How can I connect a USB port to your device?

A USB to RS-232 Serial adapter is available from PMD. Order ADAPT-USB232-01.R. This is a common solution for PCs or laptops that do not have a serial port.


How can I talk to your products via the serial interface if I do not have a serial port on my PC or laptop?

A USB to RS-232 Serial adapter is available from PMD. Order ADAPT-USB232-01.R. 


What is the maximum motor voltage that can be driven by the DK73110?
(MC73110) The max voltage that can be applied from the MOSFET is:-1. The PWM waveform from the MOSFET drive has a peak value of (Vbus-R*I), where I is the current from the MOSFET and R is the cumulative resistance of the power train. For example, on the DK, the MOSFET has on-resistance of 44mohm typ, and two 10mohm bus resistor.
Therefore, Vmax_pwm = Vbus-0.64*I 2. Often the commutation voltage (voltage seen by the motor at the commutation frequency) is also of concern. In that case, the max voltage from the MOSFET to the motor is:-(Vbus-R*I)*(pwm limit) For example, if the max pwm duty ratio can go 97%, then the voltage will be (Vbus-0.064*I)*.97. The above discussion is based on the phase-to-ground voltage. The phase-to-phase voltage can be derived by referencing the sinusoidal waveform used to compute each phase.  The offset for each phase is 120 degrees. 
The above discussion is based on phase to ground voltages. The phase-to-phase voltage can be derived by referencing the sinusoidal waveform used to compute each phase.  The offset for each phase in 120 degress.

When driving IGBTs, how can I prevent shoot-through if power is intentionally or suddenly switched off to the motion processor?

As the chip powers down, the PWM signals output by the chip may not all go to GND at the same time.  In some cases this can result in sudden shoot-through currents. To prevent this condition from occurring the PWM signals should be connected to weak pull-down resistors.


What is the theoretical maximum rotation speed for the brushless motor products?

PMD products will drive the majority of motors to their maximum rated speed.  For example the ION has been used to drive a Brushless DC motor at over 1000 Electrical cycles per second, which equates to over 60,000RPM for a 2-pole brushless motor, or 30,000 RPM for a 4-pole brushless DC motor. It is possible however that special brushless DC motors which need to be driven above 1,000 electrical cycles per second may not be controlled effectively. Note that for maximum speed using the ION, field oriented control control mode should be used.


When using the brushless product in open loop mode; if I issue an Update, the motor rotates, Why?
This can occur if algorithmic phase initialization was used. In this mode a SetMotorCommand with a value is required during the initialization procedure.
The problem is that in open loop mode this value will cause the motor to rotate. The solution is to program a value of zero after you have finished the initialization, as shown below:-
1) Perform the steps required for an algorithmic initialization
2)
SetMotorCommand( &hAxis1, 0 );
3) Execute the rest of the host code....

What is the motor phase angle at the end of algorithmic initialization?

180 degrees, which equals PhaseCounts/2


When I send an invalid command through the serial port, the chip responds “bad checksum” and fails to respond to further commands. Why?
An invalid command can be defined as a command that does not exist on the motion processor. For example, the SetNumberPhases command is not available on the brushed motor control products.  If the invalid command that is sent by the host has parameters, this error can occur.
When the motion processor receives the command, instead of replying with an “invalid instruction” error, it responds “bad checksum” error. This is because it assumes that any invalid command has zero parameters, hence the checksum verification will fail before it attempts to process the (invalid) command. Because the chip sees the serial data as a constant stream, it assumes that the next byte received is the start of the next packet. In reality, the next byte or bytes are the data from the invalid command. The serial communication is now out of sync. To recover you need to re-sync communication with the chip. To do this send a zero byte until the chip responds with a zero byte.

What is the maximum IO rate for parallel and serial communication?
All commands in parallel mode are from 1 to 4 words long and they all have from 0-3 words of data sent back giving a total number of words transferred for each command ranging from 1-7.
We do not have any commands that actually take a full three words of data and three words returned, so 7 words is longer than any real command. For this comparison we assume that the average amount of data is two words including both sent and received. That gives a total time for a parallel command as:
12.5usec * 3 words (1 command, 2 data) = 37.5usec
resulting in a theoretical maximum rate of 26,667 cmds/sec.
Now, serial commands all have an overhead of 4 bytes plus data, and a return packet of 2 bytes plus data. Assuming that we average 2 words (4 bytes) of data for each command, that gives us 10 bytes/command.  Also, assume 10 bits for each byte (8 data, 1 stop, 1 start) which is a minimum and we get a total time of 10/baud * 10 bytes = total time.
Here are the times for the typical baud rates:
Baud
Command time (usec)
Rate (cmd/sec)
 9600
10,416.7
96
 19200
5,108.3
192
 57600
1,909.7
524
 115200
954.9
1,047
 230400
434
2,304
 460800
217
4,608

What is the format of CAN messages?

Communication takes place using message IDs 0x580+NodeID and 0x600+NodeID.  The contents of the packet use the PMD motion control API.  It is very simple to construct the messages and we have "C" code to demonstrate this.


Using the serial or CAN interface, I get no response from the chipset after sending a command. Why does this happen even though the CP has proper Vcc, Ground and Clock?

The serial (and CAN) configuration is defined by the data bus after reset.  In case the configuration was corrupted, initial attempts at communication should be at the lowest baud rate if a point-to-point serial interface is being used.  In that case the user should see some activity on the SrlXmt after sending a command. Of course the response may not make sense since the baud rate is incorrect but the existence of activity on SrlXmt should be verified first and then worry about the configuration later.Also, if using a Magellan processor, ensure that the READY signal (pin 120 on CP) is high.  This can cause failures using all interface types. 


How can I use the AxisOut signal for the general purpose output?
The AxisOut pin is normally used to reflect the state of an internal register bit on a digital output. This is done using the SetAxisOutMask and SetSignalSense commands. It is also possible to set the state of this signal directly using the same commands.
To operate the AxisOut signal manually, first set the “source” to “none”.
SetAxisOutMask (&hAxis, PMDAxis1, 0, 0, PMDAxisOutSourceNone) ;
This will set the signal to its active state as defined by bit 10 of the signal sense register. By default the signal will be active low. You can then set the active level (and hence the state) of the signal using the SetSignalSense command.
In pseudo code, to set the output signal low:
signal_sense = GetSignalSense( &hAxis );
SetSignalSense( &hAxis, signal_sense & ~0x400 );
In pseudo code, to set the output signal to high:
signal_sense = GetSignalSense( &hAxis );
SetSignalSense( &hAxis, signal_sense | 0x400 );
 
For those using Magellan V1.x, Navigator, Pilot, or Navigator Motion Boards
The command SetAxisOutSource should be used instead of SetAxisOutMask.  Referenece the appropriated Programmers Command Reference for proper formatting.

What is a typical startup sequence?
When using a chip level product, after power-on, a hardware reset must be performed. In addition the Reset instruction can be executed by a host application at any time. This instruction will place the motion processor in its “power on” state, setting all internal parameters to their default values. Refer to the Programmers Reference for a complete description of this command and the default settings for each internal register.
After a hardware reset, or following a Reset instruction being executed, the product will be in the reset state. The GetInstructionError command can be used to detect and clear any pending Errors.

// reset the chip
Reset( &hAxis1 );
// confirm that the chip reset correctly

GetInstructionError( &hAxis1, &status );
if ( status!= PMD_ERR_ChipsetReset )
{
     printf(“Chip reset error occurred\n”);
}
When using a board level product there are is a non-volatile register that can be queried at startup. The command MBGetResetCause will report the reason for the previous reset. MBClearResetCause should then be used to clear this register.
The ION digital drive does not support the GetResetCause command but instead supports the GetDriveFaultStatus command. After the ION has entered a hard fault condition, power must be cycled. Afterwards, the GetDriveFaultStatus will report the reason for the previous hard fault. Using this command will also clear the register.
For those using Magellan V1.x, Navigator, Pilot, MC73110, or Navigator Motion Boards
The command GetHostIOError should be used instead of GetInstructionError.

Can I use a limit switch as a home signal?

Yes, but you must wire it to the limit signal as well as the home signal.


What is the state of the AxisOut signal after a reset?

It is logic level high.


Are the I/O pins open collector or totem pole?

All I/O pins are input, bidirectional (tri-state), or totem pole.


How can I connect a USB port to your device?

A USB to RS-232 Serial adapter is available from PMD. Order ADAPT-USB232-01.R. This is a common solution for PCs or laptops that do not have a serial port.


How can I talk to your products via the serial interface if I do not have a serial port on my PC or laptop?

A USB to RS-232 Serial adapter is available from PMD. Order ADAPT-USB232-01.R. 


What is the maximum motor voltage that can be driven by the DK73110?
(MC73110) The max voltage that can be applied from the MOSFET is:-1. The PWM waveform from the MOSFET drive has a peak value of (Vbus-R*I), where I is the current from the MOSFET and R is the cumulative resistance of the power train. For example, on the DK, the MOSFET has on-resistance of 44mohm typ, and two 10mohm bus resistor.
Therefore, Vmax_pwm = Vbus-0.64*I 2. Often the commutation voltage (voltage seen by the motor at the commutation frequency) is also of concern. In that case, the max voltage from the MOSFET to the motor is:-(Vbus-R*I)*(pwm limit) For example, if the max pwm duty ratio can go 97%, then the voltage will be (Vbus-0.064*I)*.97. The above discussion is based on the phase-to-ground voltage. The phase-to-phase voltage can be derived by referencing the sinusoidal waveform used to compute each phase.  The offset for each phase is 120 degrees. 
The above discussion is based on phase to ground voltages. The phase-to-phase voltage can be derived by referencing the sinusoidal waveform used to compute each phase.  The offset for each phase in 120 degress.

When driving IGBTs, how can I prevent shoot-through if power is intentionally or suddenly switched off to the motion processor?

As the chip powers down, the PWM signals output by the chip may not all go to GND at the same time.  In some cases this can result in sudden shoot-through currents. To prevent this condition from occurring the PWM signals should be connected to weak pull-down resistors.


What is the theoretical maximum rotation speed for the brushless motor products?

PMD products will drive the majority of motors to their maximum rated speed.  For example the ION has been used to drive a Brushless DC motor at over 1000 Electrical cycles per second, which equates to over 60,000RPM for a 2-pole brushless motor, or 30,000 RPM for a 4-pole brushless DC motor. It is possible however that special brushless DC motors which need to be driven above 1,000 electrical cycles per second may not be controlled effectively. Note that for maximum speed using the ION, field oriented control control mode should be used.


When using the brushless product in open loop mode; if I issue an Update, the motor rotates, Why?
This can occur if algorithmic phase initialization was used. In this mode a SetMotorCommand with a value is required during the initialization procedure.
The problem is that in open loop mode this value will cause the motor to rotate. The solution is to program a value of zero after you have finished the initialization, as shown below:-
1) Perform the steps required for an algorithmic initialization
2)
SetMotorCommand( &hAxis1, 0 );
3) Execute the rest of the host code....

What is the motor phase angle at the end of algorithmic initialization?

180 degrees, which equals PhaseCounts/2


Do you have any information on resolvers?
Interfacing a resolver to a PMD product will involve the use of a Resolver to Digital converter (RtoD). If the RtoD generates an incremental quadrature encoder signal, that signal can directly interface to a PMD product however the absolute position information will not be available. Typically the RtoD will also output absolute position information in a digital format. In this case additional circuitry is required to convert that information into a “parallel word” format. This can be used with products that support a “Parallel Word” encoder such as Magellan chipset and Prodigy boards.   There is a reference design on the Application Notes webpage (Parallel Word AD2S80)  Some RtoD’s are available on 3rd part Development Boards like the Analog Devices AD2S1200DK.
The standard MC73110 does not support the Parallel Word interface, but custom solutions are available.   Contact PMD for more information.

How can I find out the current state of the limit, encoder, home and AxisIn signals?

Use the command GetSignalStatus.  This command is described in the Programmer’s Command Reference and the User’s Guide.


What is VB-Motion?

VB-Motion is a software library containing pre-made COM DLLs.  The library also contains examples of using the COM DLLs to interface PMD products. Included are VB.NET examples. (The existance of VB 6.0 examples are there for legacy purposes and VB 6.0 is not recommended for new designs.)


How can I execute a smooth stop when a limit switch is tripped instead of executing an abrupt stop?
By default an abrupt stop will occur in response to a Limit Switch Event. The SetEventAction command can be used to alter the behavior associated with a Limit Switch Event. Executing the command below will alter the behavior such that a SmoothStop will occur.
on all future Positive Limit Switch Events.
 
SetEventAction (PMDEventActionEventPositiveLimit, PMDEventActionSmoothStop)
 
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
Note: The SetEventAction command does not exist on older products and an alternate method described below must be used.
The method involves using a breakpoint or an interrupt service routine (ISR). The benefit of the ISR approach is that additional action may be taken in response to the limit event as opposed to simply performing a smooth stop. In either case, the default action must first be disabled. This is done as follows:
SetLimitSwitchMode( &hAxis, PMDLimitDisabled );
Executing a smooth stop after a limit event using a chip breakpoint. The following code sets a breakpoint that generates a smooth stop when the limit switches are low. To use “active high” logic set the sense mask equal to the selection mask. If the breakpoint triggers it must be re-set.
selection_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask; sense_mask = 0;
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask );
SetBreakpoint( &hAxis, PMDBreakpoint1, PMDBreakpointActionSmoothStop,
PMDBreakpointSignalStatus );
Executing a smooth stop after a limit event using an ISR routine. The following code sets a breakpoint that simply sets the breakpoint bit in the event register when the limit switches are low. To use “active high” logic, set the sense mask equal to the selection mask. If the breakpoint triggers it must be re-set.
selection_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask;
sense_mask = PMDSignalPositiveLimitMask | PMDSignalNegativeLimitMask;
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask ); SetBreakpoint( &hAxis, PMDBreakpoint1, PMDBreakpointNoAction,
PMDBreakpointSignalStatus );
SetInterruptMask( &hAxis, PMDEventBreakpoint1Mask );
The interrupt service routine for the PMD chip should include the following:
GetEventStatus( &hAxis, &status );
if (status & PMDEventBreakpoint1Mask)
{
            // stop the axis
           SetStopMode( &hAxis, PMDSmoothStopMode );
           Update( &hAxis, PMDSmoothStopMode );
           ResetEventStatus( &hAxis, ~PMDEventBreakpoint1Mask );
}

How can I add a programmable time limit to the motion error detection?
At the end of a move, set a breakpoint to be triggered when the axis settled bit is not active. The breakpoint will only trigger once the axis is out of the settle window (a programmable value) for the specified settle time (a programmable value). Set the breakpoint action to “motor off”. Before the next move is commanded, turn off the breakpoint.

Example pseudo code is shown below.

// Using the settled window to stop motor output
// if the settle window is exceeded

selection_mask = PMDActivityAxisSettledMask;
sense_mask = 0;
SetSettleWindow( &hAxis, 1000 );
SetSettleTime( &hAxis, 100 );
SetBreakpointValue( &hAxis, PMDBreakpoint1, (selection_mask<<16)|sense_mask );
SetBreakPoint( &hAxis, PMDBreakpoint1, PMDBreakpointActionDisablePositionLoopAndHigherModules, PMDBreakpointActivityStatus );

The same method can be used with the tracking window. That is, if the axis goes outside of the tracking window, output to the motor will be switched off. Depending on the individual application it may preferable to have some other action taken such as an abrupt stop.

// using the tracking window to stop motor output
// if the tracking window is exceeded
selection_mask = PMDActivityTrackingMask;
sense_mask = 0;
SetTrackingWindow( &hAxis, 1000 );
SetBreakpointValue( &hAxis, PMDBreakpoint2, (selection_mask<<16)|sense_mask );
SetBreakPoint( &hAxis, PMDBreakpoint2,
PMDBreakpointActionDisablePositionLoopAndHigherModules, PMDBreakpointActivityStatus );
 
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
ThePMDBreakpointActionDisablePositionLoopAndHigherModules action does not exist on earlier products. PMDBreakpointActionMotorOff should be used instead.

Does the motion error bit in the event status register still get set if MotionError EventAction has been set to NONE?
Yes.
For those using Magellan V1.x, Navigator, Pilot,, or Navigator Motion Boards
The concept of an EventAction does not exist in earlier products. Instead the MotionError behavior is control by the SetAutoStopMode command. The answer is the same however, when AutoStopMode is disabled a MotionError will still cause the bit in the EventStatus to get set. 

How do I convert from encoder counts per second to native PMD units?

Velocity, acceleration and jerk have the chip cycle as their time base. In the following example, the chip being used is the MC2140. This is a 4-axis chipset with a cycle time of 102.4 microseconds per axis. This is shown in the calculations as (4*102.4). In these calculations you should substitute the number of axes and cycle time from the motion processor you are using.

Cycle times are listed in the Technical Specification manual.

VELOCITY
To convert from counts/second to counts/cycle use this formula:-

counts per cycle = (counts per second)* ((4*102.4)/1000000)

Finally, to convert to the chip fixed-point format (16.16), multiply by 65536 and use only the integer portion of the result as the value for the SetVelocity command.

ACCELERATION
To convert from counts/second2 (acc) to counts/cycle2 use this formula:

counts per cycle = (counts per second)* ((4*102.4)/1000000)2

Finally, to convert to the chip fixed-point format (16.16), multiply by 65536 and use only the integer portion of the result as the value for the SetAcceleration command.

JERK
To convert from counts/second3 (jerk) to counts/cycle3 use this formula:

counts per cycle = (counts per s)* ((4*102.4)/1000000) 3.

Finally, to convert to the chip fixed-point format (0.32), multiply by 232 and use only the integer portion of the result as the value for the SetJerk command.


How do I program a coordinated 2-axis move?
denominator = sqrt(x_length2 + y_length2);
// for the x axis
x_vel  = x_length/denominator * linear_vel;
x_acc  = x_length/denominator * linear_acc;
x_jerk = x_length/denominator * linear_jerk;
// for the y axis
y_vel  = y_length/denominator * linear_vel;
y_acc  = y_length/denominator * linear_acc;
y_jerk = y_length/denominator * linear_jerk;
Linear_xxx is the desired vector velocity/accel/jerk.

How does GetActualVelocity work?
(MC73110 users see below) Actual velocity is calculated by subtracting the actual position of the previous cycle from the current actual position. The default cycle time can be as small as 51usec depending on which product is being used. GetActualVelocity returns a fixed-point 16.16 value, so to convert it to counts/cycle divide the returned value by 65536. Depending on what your maximum velocity is you may not get anything other than 0 or 65536, because at velocities (counts/cycle) that are approximately equal to 1 count/cycle the calculation will result in a change in position of 0 or 1 encoder counts during the previous chip cycle.
 
For those using the MC73110:
The MC73110 contains a feature referred to as the “Velocity Estimator” which adds significant resolution to the ActualVelocity calculation. This is a 2nd order filter on the position feedback data that can generate ActualVelocity values with a fractional number of counts per cycles.      

How do I perform a typical homing sequence?
The Application Notes webpage contains a document detailing recommended Homing procedures along with example C-Motion code.
 
Here is an overview of a typical home sequence :-
1) Finding the home
2) Setting or zeroing the actual position.
When the home switch is located, its position must be captured. By default the capture hardware looks for a high to low transition of the signal. If the input signal has a low to high transition, the sense logic can be inverted using the SetSignalSense command.
SetSignalSense( &hAxis1, PMDSignalEncoderHomeMask );
The first step is to test if the axis is currently located in the home switch. If the switch is active, move the axis away from it until it becomes inactive.
GetSignalStatus(&hAxis1,  &status);
if ( status & PMDSignalEncoderHomeMask )
{
     SetProfileMode( &hAxis1,  PMDVelocityContouringProfile );
     SetVelocity( &hAxis1, 65536 );
     SetAcceleration( &hAxis1, 256 );
     Update( &hAxis1 );
     do
{
     GetSignalStatus( &hAxis1,  &status );
}    while ( status & PMDSignalEncoderHomeMask );
     SetStopMode( &hAxis1, PMDSmoothStopMode );
     Update( &hAxis1 );
}
The next step is to move into the home switch and capture the position.
SetProfileMode( &hAxis1,  PMDVelocityContouringProfile );
SetVelocity( &hAxis1, -65536 );
SetAcceleration( &hAxis1, 256 );
// now prepare for the capture
SetCaptureSource( &hAxis1, PMDCaptureSourceHome );
// this clears the latched capture bit
ResetEventStatus( &hAxis1, ~PMDEventCaptureReceivedMask );
// this clears the capture hardware
GetCaptureValue( &hAxis1, &value );
// start the move into the home switch
Update( &hAxis1 );
// wait for the capture
do
{
     GetEventStatus( &hAxis1,  &status );
} while ( !(status & PMDEventCaptureReceivedMask) );
// now that we have the capture, stop the axis
SetStopMode( &hAxis1, PMDSmoothStopMode );
Update( &hAxis1 );
GetCaptureValue( &hAxis1, &home_pos );
The captured position can now be used to program an offset to the actual position using AdjustActualPosition. The home position will now be position zero.
AdjustActualPosition( &hAxis1, -home_pos );

How do I setup Stall Detection on products that support step motors?
The following commands are needed to configure the product for Stall Detection.(i.e. MotionError). The ratio between the number of encoder counts per revolution versus the number of steps per revolution must be defined.

// actual position is expressed as encoder counts
SetActualPositionUnits( &hAxis1, 0 )
SetEncoderSource( &hAxis1, PMDEncoderSourceIncremental );
SetEncoderToStepRatio( &hAxis1,  4096, 200); // In this case the system has an encoder with 4096 counts per revolution and a 200 (1.8
°) step motor.
// set the error limit to 10 steps
SetPositionErrorLimit( &hAxis1,  10 );
 
When the MotorType is set to 2-phase microstepping, the ratio between encoder counts to microsteps should be used in the arguments to SetEncoderToStepRatio.

 
  Site Map
Performance Motion Devices, Inc.
80 Central St. | Boxborough, MA 01719 | P: 978.266.1210 F: 978.266.1211 | motion-control@pmdcorp.com