Getting started
3. Connecting axis motor drivers
24 min
the axis motors drive the machine into position each axis can have up to two motors by combining the signals from one output to both drives, resulting in a total of 8 motors across all axes motors can perform linear and rotary motion, as well as general purpose functions, such as those in an {{atc}} as long as the step/direction interface is available, it does not matter whether stepper or servo drives are used wiring the controller with the breakout board has several connectors to connect the motor drivers it can be wired up using screw terminals or idc connectors all these options provide a step, direction, and enable signals always consult the motor driver manual to determine whether any additional wiring steps are required this manual is meant to be generic and cannot contain every combination screw terminals connecting a motor driver to the {{controller name}} screw terminals is generally possible for all drivers while other connection methods may be easier, connecting them via screw terminals will work with all drivers the {{controller name}} supports both sinking (npn) and sourcing (pnp) single ended control signals consult the driver's manual to determine which of these two methods is usable for the motor driver idc connector / box header these connectors can be used for setups that use flatcables to connect to a motor drive sourcing/pnp/common anode wiring in this wiring option, all driver positive terminals are connected to the +5v terminal each negative terminal on the driver is wired to its respective terminal on the {{controller name}} sourcing/pnp/common cathode wiring in this wiring option, all driver negative terminals are connected to the ground terminal each positive terminal on the driver is wired to its respective terminal on the {{controller name}} combining alarms many drivers have open collector alarm outputs; these outputs can simply be combined resulting in simpler wiring software setup start the software with the machine connected navigate to ' setup ' > ' machine general ' > ' motors ' details on any setting can be found on the docid 3acpjkoz0s zevsegiyow settings page this guide covers only the most commonly used applications visible in operate view any axis that needs to be visible on the dro in the operate view should be marked as visible in the " visible in operate view " setting controller port in general, port 1 on the controller should map to the x axis, port 2 to the y axis, port 3 to the z axis, and so on this can be changed if this mapping cannot be followed for some reason if a port is currently in use, it will not appear in the list; remove the port from its current use, then select the new port slave mode the slave mode setting sets the purpose of the additional axis it can be set as a slave to another axis (tandem axis), as a rotational axis, as a tangential knife, or used in a special kinematic type all options except the rotational axis require additional setup more information on using slave mode is available in the ' connecting home sensors ' step steps per unit the " steps per unit " setting is the number of steps (including microsteps) required to move the machine 1 unit (mm or inches) two parameters are required to calculate this value the number of steps per revolution of the motor for stepper motors, this equals the number of full steps per revolution (typically 200 or 400) multiplied by the microstepping setting (typically 1, 2, 4, 8, 16, etc ) for servo motors, this is usually a parameter in the drive the distance traveled by rotating the motor one full revolution in simple situations where the motor is directly coupled to a lead/ball screw, this value is simply the thread pitch when using pulleys, this value varies with the gear ratio when using a rack and pinion, these values are usually listed using these two values, the steps per unit (referred to as revolutions) can be calculated as follows resolution=\frac{stepsperrevolution}{distanceperrevolution} direction inverted ' direction inverted ' changes the direction of the axis this setting is usually best set by trial and error if the machine moves in the wrong direction, just change this setting keep in mind that slave axes cannot be inverted independently of the master negative/positive limit the positive and negative limits are the maximum and minimum travel distances from the home position if these are known from the design, they can be set directly; if they must be determined by moving the machine to its extremes, they should be set last rotary axis configuration when a rotary axis is configured, it's vital to understand that the steps are no longer measured in mm or inches but in 1 degree increments so also the limits are now interpreted in degrees if a rotary axis does not need a limit, the limits should be set to 0 testing ensure first that the e stop switch has been wired correctly according to the instructions in ' connecting an e stop switch ' failure to do so may result in damage to the machine or injury to the operator check local regulations for specific instructions make sure the software is started and a connection to the machine has been established if the software was previously started, restart to ensure the machine is in a freshly initialized state without further action, check the following check that the drivers are not enabled if the drive enable signal was wired if the drives are enabled but are wired to the enable signal, it's possible you need to invert the signal this can be done through the input/output screen in the ' setup ' tab make sure the e stop is not pressed and that no error related to it is displayed now press the reset button (f1) and check the following check that the drivers are enabled check that no drive alarm or drive errors are displayed if there are errors, first check if the drivers are actually in an error state; these signals might also need to be inverted this can usually be seen by an indicator on the driver jog the machine by opening the jog pad (f10), pressing the step size (0 001/0 01/0 1/1), and pressing the button for the respective axis ensure the step size is small when unsure about the step/unit setting check for the following the axis moves in the correct direction ; compare this to either the coordinates or the tool in the 3d view check that the correct axis moves check that the distance moved is correct this can be an approximate checked, further calibration can be done by the setups outlined in docid\ do2uqsrmihz0vmbdx1ge axis limits in most cases, the theoretical axis limits are not exact and may require additional setup before testing the axis limits or working on any calibration the home sensors should be connected and tested with the machine homed , jog each axis to both its positive and negative limits use smaller steps or lower velocities when approaching the limits so the machine can stop faster; this reduces damage if the limit settings are incorrect if the machine reaches its mechanical limit before the software limit, ensure the machine moves slightly back and use the dro reading from that position make sure to use the machine position and not the work position it is always recommended to be slightly conservative with the software limits, so set the range slightly smaller than the mechanical limit calibration/compensation pitch compensation is a feature that corrects for minute mechanical inaccuracies in the ball screw, rack and pinion, or linear scales along an axis's travel it improves positioning accuracy by adjusting movement pulses based on measured pitch errors, correcting for uneven screw pitch or assembly tolerances the software provides several calibration options to compensate for inaccuracies equal compensation across the entire range linear pitch compensation mapping inaccuracies across the axis cross compensation compensation inaccuracies between different axes backlash compensation compensation of lost motion (mechanical slack) when reversing direction each of these compensation methods addresses a specific inaccuracy equal compensation equal compensation is the easiest form of compensation and compensates completly along each axis step 1 move the machine to a starting position (typically near the axis's starting range) and mark the position on the machine, either with a v bit or a bit with a known diameter or a pen note the exact position used here, as shown in the dro step 2 move to a position near the other extreme of the axis, and make the same mark as at the starting point also, note this position from the dro the distance expected in the formula is the end position minus the start position use a calculator to calculate this distance if needed the distance expected is the distance between the center of the mark at the end position and the center of the mark at the start position if a bit with a larger, known diameter was used, measure from the shortest distance between the points and add the tool diameter to this distance the formulas below also apply to rotary axes; in that case, replace distance with angle in degrees any of these calibration steps may influence the machine's limit settings if these were previously set by moving the machine to its extremes and using those values, that step must be repeated resolution {new}=resolution {old} \frac{distance {expected}}{distance {actual}} resolution {new}=320 \frac{100}{99}=323 232 the newly calculated resolution can be entered in the axis setup after saving, repeat the test to verify that the theoretical and actual distances match linear pitch compensation the accuracy of the screw pitch varies over the length of the screw the linear pitch compensation is a way to improve the machine's accuracy when the linear displacements are not precisely correct for example, cheap rolled ball bearing spindles may have an inaccuracy of several 0 1 mm at a meter length also, the pitch may vary a bit depending on the position this compensation feature allows us to correct this these steps should be followed only when the machine can be homed the measurements are relative to the machine position; therefore, the origin should be at the same location every time to automatical generate an example file take the following steps open the ' setup ' tab navigate to ' machine general' , scroll to the ' motors' table enable pitch compensation for the desired axis save the settings turn pitch compensation off save the settings again this will ensure that the example file is generated the ' pitch compensation file ' setting specifies the file in which the compensation values are stored if this file did not exist, it would have been created by following the previous step the newly created file will contain an example of this table the entire axis range can be mapped or only a small section here is an example of the created file the left value is the position of the machine the right value is the calibrated position obtained by measuring perform the measurement steps of the previous method, but on multiple positions make a list of the programmed positions of each point and the corresponding measured points open the pitch compensation file for the measured axis and replace the values with the measurements the measurements should be ordered from smallest to largest position (note that 100 is smaller than 0 and should come first) save the file and close the editor after this, enable the pitch compensation for the axis and press save to ensure the new values have been loaded when pitch compensation is active, it will be visible in the dro it is recommended to repeat this tests to ensure the compensation has been applied correctly you can make the compensation value visible by checking show in dro on the coordinates window you will see this in the dro a small number above the position showing the pitch compensation value related videos the video below is in german it shows how to use pitch and cross compensation