Steps to get started
4. Connecting home sensors
10min
this information is meant for the {{controller name}} and may not be accurate when using another controller please check the documentation pages for your specific controller home sensors are responsible for providing the machine with a reference for its position after shutdowns, step loss, and manual movements the machine will be able to find its original position home sensors and limit sensors are not the same the difference may seem semantic, but in reality, this means that the machine will need to be able to move slightly past the trigger point of the switch this is to ensure that the machine can decelerate after the switch is triggered this distance is determined by the homing speed and the machine's acceleration (deceleration) settings additionally, the home switch position may not be near the axis's limit at all the home sensor types supported by the {{controller name}} are npn both in normally open (no) and normally closed (nc) configurations the method of detection is irrelevant to the {{controller name}} and can be chosen based on the machine's specifics, these include physical switches, inductive switches, capacitive switches, etc the {{controller name}} is designed to sink around 10ma into the sensor when it is active/closed the threshold voltage for a low or closed signal is typically < 1 4v for revision 13 and up and < 0 7v for revision 12 and lower all home sensors must have the same polarity, so all no or all nc wiring npn in general npn sensors will have the following color codes blue is the ground wire black is the signal wire brown is the +24v wire always check the manual of the sensors to validate the color code switch switches have no polarity and can be wired between the ground and the signal terminal sensor configuration homing an axis works the same for most axis types except for master slave setups master slave is sometime also called gantry squaring or tandem axis using master slave axes with auto gantry squaring requires additional setup steps outlined in 4 connecting home sensors docid\ tjyqq9lpp5zo84wywqhgm that cannot be skipped with all sensors wired, start the software with the machine connected open the setup tab, navigate to machine general, and scroll to the homing section if the type of switches is known , the setting must be set to "falling edge" for no sensors and "rising edge" for nc sensors if the type of switches is not known , the polarity of the switches can be determined automatically jog the machine to a position where none of the switches are triggered press "auto detect polarity" and "ok" to use the current values of the home inputs as inactive if the state of all home inputs is not equal , an error will be displayed this can happen because either the sensor types are not identical/mixed types or some inputs are triggered while others are not perhaps some switches are accidentally activated when all home inputs have been wired together to the first home input, the " use home input for x axis as home input for all axes " option must be checked this option is not supported with tandem axes because, with both motors running simultaneously, it is impossible to know which sensor was triggered next, scroll to the motors section all homing options here can be configured on a per axis basis these configuration steps assume that the maximum velocity and maximum acceleration have already correctly been set both these settings may influence the homing procedure and changing them later may induce changes to the homing sequence by default, the homing velocit y is set to 0, in this case, manual appears in the setup for that axis executing a home command for this axis results in the current position being set as 0 entering a non zero positive value ensures a proper home movement will be executed a high homing velocity results in a faster homing sequence, but also increases the distance the axis moves past the trigger point of the sensor when the sensor triggers during the homing procedure, the axis will decelerate according to the value entered in maximum acceleration the distance covered results from the acceleration, homing velocity, and trajectory docid\ tun7rde84cwjm3nptdibt typical values are around 10mm/s the precise/safe homing velocity is the velocity at which the machine is moved out of the sensor's triggered area typical values here are roughly 10% of the homing velocity, the point at which the sensor untriggers is the point that is used for the home position any inaccuracies caused by the first faster movement are therefore not translated into an inaccurate home position the homing sequence needs to know if it should home in a postive or negative direction if the home position is at the negative limit of the machine, the direction should be inverted if it is at the positive limit, it should not be inverted this is set by checking inverted homing direction lastly, the 'home position' does not have to be at the point where the sensor triggers an offset can be applied to decouple the sensor position from the home position the value entered here is the position of the trigger point relative to the home position tandem axes / master slave / gantry squaring in many cases, it is helpful to use two separate motors on a gantry, perhaps due to weight and size, or to avoid the gantry being no longer square during the operation of the machine there are three modes to do this connecting two motor drivers to one output advantages cheap and simple disadvantage once the gantry is misaligned for any reason, this needs to be fixed manually using two axes output in master slave or tandem setup (slave follows master) advantages complete control of master and slave axis position disadvantage needs an extra axis output master slave setup, but with so called 'gantry squaring' advantages the gantry can automatically square itself after homing, improving the machine's results disadvantage it needs an additional homing sensor, and setup is a little more complicated the rest of the document will only discuss the second and third options as the first option required no additional setup compared to a regular axis step 1 axes setup the first step in setting up this is to set up the axes depending on the controller, any of the up to 3 extra axes can be configured as a slave axis, as shown in the image below please note that typically, only one of these dropdown boxes will be displayed the options relevant to setting this up are selecting one of three options slave to x axis slave to y axis slave to z axis for this example, we will use the a axis as a slave to the y axes in the setup, this will look like this step 2 macro modifications changes to the macro must be made to home axes used in a tandem configuration a tandem configuration contains two axes, one master and one slave axis the master axis is the axis that can be actively controlled, and the slave follows the position programmed to the master in this example, the y axis forms a tandem pair with the a axis the y is the master, and the a axis follows as the slave in the macro, both of the homing macros need to be changed on the operate tab of the software, click " macro ", and subsequently " edit file " there are two options tandem axes with one homing sensor use gantry squaring with two homing sensors option 1 only tandem axes with one homing sensor since there is only one homing sensor, there must be no separate homing of the slave axis we can modify this in the macro called home a in this case, we can either remove the line home a or comment this out original sub home a home a endsub modified sub home a ; home a endsub option 2 use gantry squaring with two homing sensors when actual gantry squaring is to be performed, two macros need to be modified, ' home y ' and ' home a ' first, modify ' home y ' original sub home y home y endsub modified sub home y hometandem y endsub next, as before, modify ' home a ' original sub home a home a endsub modified sub home a ; home a endsub this starts tandem homing when the y axis is homed and does not re home the a axis separately please note, the macro home all is used to indicate the homing sequence sub home all gosub home z gosub home y gosub home x gosub home a gosub home b gosub home c msg "home complete" endsub when pressing 'home all', each axis is homed sequentially, the default sequence is z, y, x, a, b, c if the machine needs a different order, this can be changed in the macro as well by changing the order of the lines in home all save the file and close the editor press "reload file" to load the changes into the software gantry squaring when using two homing sensors for homing, it's likely that there is a small difference in the position in reference to the gantry as part of gantry squaring this can be addressed in the setup of each axes in the setup tab navigate to ' machine general ' and scroll to the motors section when using gantry squaring, the home position settings for both the master and slave are used for both homing sensor compensation and squaring maximum distance slave and master axis setting the maximum distance between the master and slave after homing to a low enough value is crucial both axes move simultaneously during every step of the homing procedure except the last movement this last movement moves the slave axis to the position of the master this is the actual squaring movement if the difference between these axes is too high, the machine may be too rigid to perform this movement most machines may only be able to independently move between 1 mm and 20 mm before binding or damage occurs the more rigid the machine, the smaller this distance should be if a large difference is found after homing, this likely indicates that the homing procedure failed testing things to observe during testing the first thing to watch out for is the direction the machine homes if this is incorrect, stop the machine using either the e stop or by pressing reset if the homing direction is incorrect, see if the messages show " home sensor active, starting with second move " this means that the homing inputs trigger edge setting was set wrong if this message does not occur, the homing direction should be inverted in the setup, as described in the 4 connecting home sensors docid\ tjyqq9lpp5zo84wywqhgm chapter once the machine moves in the correct direction when homing, let the machine go home completely keep near the e stop switch if the machine moves past the homing sensor without stopping, abort using the e stop switch or the reset button if the machine homes correctly, the axis will have moved to the direction of the home sensor, upon triggering it will decelerate and move back out of the sensor after the sensor un triggers, the machine will again delecerate and come to a standstill step 1 testing homing sensors ensure that none of the sensors are currently triggered open the io tab and find the home inputs their state is indicated by the circle's color next to the input check that the color of the switches in the non triggered state is the same and matches the setting for home inputs trigger edge if the setting was set to falling edge, all indicators must be on, if rising edge was set, the indicators must be off please note, this indicators show the logical state of the input, so either high or low it does not show the functional state detection is purely based on change of level compared to the level when the sensor is not active manually activate the home sensor for each axis and check if the state of the input changes if the switch does not trigger, check the 4 connecting home sensors docid\ tjyqq9lpp5zo84wywqhgm steps if the wiring is correct, check that the sensor actually triggered, some sensors have a built in led indicator to show the activation step 2 manually testing gantry squaring when gantry squaring is used it's possible to manually test each of the 4 sequences of gantry squaring please note, this is only for testing each step not for normal homing these steps are normally automatically executed when tandemhome function is called in home macro use them in mdi for testing and understanding preparetandemhome y , both slave and master are moved towards the home sensor the axes stop when both axes are on the sensor when one axis reaches the home sensor first, this one is stopped, and the other moves further this movement is done when both axes have reached the sensor home y , home the y, the slave will just follow the y home sensor is used because the y is already on the sensor, the move will be toward the machining area away from the sensor the position is latched at the moment the sensor de activates then the movement stops and then the correct position is calculated end set for the y home a , exactly the same, but now the a home sensor is used and the a position is set when done, a is no longer a slave because the position is different from y this is indicated by the message "slave decoupled " the following command will make the master slave coupling again at this point, both master and slave have a correct known position but are probably different it can be equalized by moving the slave axis to the position of the a axis this is done using the command moveslavetomaster a the slave will move to the same position as the master the gantry is squared and the homing procedure is done (if the gantry is not square, adjust the home positions in the setup) step 3 home each axis keep near an e stop switch and start the homing procedure for each axis separately by going to the home menu and pressing the home button for the accompanying axis remember that the order of homing operations is usually important to avoid collisions the image below shows the homing menu at the bottom of the operate tab the homing menu has separate buttons for manually homing each axis repeat this manual homing each axis after all axes are tested separately, press home all to verify the order of the homing operations optionally correcting the homing position after homing after the machine has been homed, the actual machine coordinate position will be slightly away from the home position point, this difference is the result of the machine needing to decelerate after the home sensor triggers this does not mean that the home position is inaccurate a side effect of this behavior is that the sensor is always un triggered after the home operation for that axis is completed this is especially important in setups that use all homing switches to be connected to one input if, for any reason, it is preferred that the machine is positioned at position 0 of that axis, it is possible to add a command to the homing functions there are two ways of doing this move to position 0 of the axis after homing it for example, for the x axis, the standard macro function can be modified so that after homing the axes move back to their actual 0 position original sub home x home x endsub modified sub home x home x g0 g53 x0 endsub keep in mind that for other axes the 'x0' needs to be changed to its respective axis depending on the machine, you can optionally also add the feed rate by replacing the g0 with g1 and adding an f word g1 g53 x0 f50 move to position 0 for all axes after homing the second option is to execute the move when all separate axes have been homed this is also preferred when all homing inputs are connected to one input in that case, an extra line is added for all axes below is an example of the home all function original sub home all gosub home z gosub home y gosub home x gosub home a gosub home b gosub home c msg "home complete" endsub modified sub home all gosub home z gosub home y gosub home x gosub home a gosub home b gosub home c g0 g53 x0 y0 z0 msg "home complete" endsub