Sending negative G91 values always sets axis to minimum position
-
Why do you have the M208 minima commented out? You'll need to define the extents of the axis.
-
Perhaps best to post your full config.g and a description of what you're trying to accomplish in general would help.
-
Hi,
Before we get to your question just a quick note regards M208 and G91/G92
You can use a single M208 to set both min and max values
M208 A-63:63 B-63:63 U-63:63 V-63:63
You might find that a bit easier to use.
You can put G91 and G92 on their own line since they set a mode which remains until changed. So the second G91 is redundant.
Now to your question.
Do you have an end stop defined at the min end of axis B?
The G1 H1 B-1 F6000 is a command to move along the B axis in the min direction until the end stop is activated or the movement covers the length specified.
However if the end stop is already active at the start of the move nothing will happen other than setting the position of B to the axis min of -63.
That sounds like what is happening.
Frederick
-
@Phaedrux said in Sending negative G91 values always sets axis to minimum position:
Why do you have the M208 minima commented out? You'll need to define the extents of the axis.
Oops, I added the commented out descriptive lines to post, but commented out the command itself (thats not in my config.g)
@fcwilt said in Sending negative G91 values always sets axis to minimum position:
Do you have an end stop defined at the min end of axis B?
I think that is my problem. Here is how I set up my axis and endstops. I have 4 motors which I want to map to A, B, U and V and they all have their endstop at their minimum value.
Now, for M574 I have read that I cannot directly assign endstops to additional axis, so I tried mapping them through E as I think I understood correctly. But its clearly not the right way as I think only 1 of my endstops (A if Im not mistaken) works..;mapping M584 A0 B1 U2 V3 M574 X1 Y1 Z1 E1:1:1:1 S0 ; Set active low endstops
-
@jcsb1994 said in Sending negative G91 values always sets axis to minimum position:
Now, for M574 I have read that I cannot directly assign endstops to additional axis, so I tried mapping them through E as I think I understood correctly. But its clearly not the right way as I think only 1 of my endstops (A if Im not mistaken) works..
To assign endstops to the additional axis just use the axis letter in M574.
M574 X1 Y1 Z1 A1 B1 U1 V1
It would also help to know what firmware version you're using as there may be limitations on the order of newly created axis.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M584_Set_drive_mapping
https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_Set_endstop_configuration
-
@Phaedrux said in Sending negative G91 values always sets axis to minimum position:
M574 X1 Y1 Z1 A1 B1 U1 V1
My firmware version:
I have sent the endstop command with the new axis and it is acknowledged.
Here, I clearly activated the endswitches for my new axis, but the motors keep trying to spin when they hit the switches..
Im sure I am just missing one command somewhere..
-
Hi,
Move one of the axis, say X, into the middle of its range.
Then execute a G91 command and then a G1 H1 X-99 F100 command. This is quite slow and will give you plenty of time to manually trigger the end stop switch to see if LED changes state and the motion stops - as it should.
If the motion does not stop then there is something wrong with the end stop configuration and/or wiring.
And as I mentioned you don't need to keep repeating the G91 command as it sets the relative motion mode which remains in effect until a G90 command changes it to absolute mode. And vice versa.
Frederick
-
I think you may be affected by some of the limitations of M584 in reprapfirmware 2, so please read the linked documentation to see what applies to you. Upgrading to RRF3 will remove some of those limitations. Even if you don't update to 3.1.1 which would require an updated config, you should at least update to 2.05.1 as 2.02 is quite old at this point.
-
@fcwilt said in Sending negative G91 values always sets axis to minimum position:
Move one of the axis, say X, into the middle of its range.
Then execute a G91 command and then a G1 H1 X-99 F100 commandThe problem when I do this is that the motor wont even spin, as it automatically sets itself to the lower limit of the axis... I am completely lost.
@Phaedrux said in Sending negative G91 values always sets axis to minimum position:
Even if you don't update to 3.1.1 which would require an updated config, you should at least update to 2.05.1 as 2.02 is quite old at this point.
I should try to do 2.05, I am worried of all the config changes I need to do if I decide to go with V3!
-
@jcsb1994 said in Sending negative G91 values always sets axis to minimum position:
The problem when I do this is that the motor wont even spin, as it automatically sets itself to the lower limit of the axis... I am completely lost.
Then first depress the end stop switch and try to do the move.
As I said if the end stop is already active at the start of the move then all that will happen is setting the position to the min value for that axis, assuming you have specified that the end stop is at the min end.
If the move does not happen with the end stop switch depressed then check the configuration of the end stop to insure that it is correct.
Frederick
-
Post your full config.g and what you're trying to accomplish.
-
@Phaedrux said in Sending negative G91 values always sets axis to minimum position:
Post your full config.g and what you're trying to accomplish.
I decided to update to firmware 3.1.1
So I am slowly figuring out what needs changing in my config. My application requires 4 motors (A B U V) that are each operating a rack and pinion, disposed in a square. Imagine each motor's rack is actually pushing on a different side of an imaginary square to expand and retract each of its side. Its for simulation purposes.
I didn't manage to make the endstops work yet. I am puzzled because it seems like RR2 supported the way I used M574
my config.g so far:
; Drives M584 A0 B1 U2 V3 ; map drives for first band M564 H0 ; can move motors without homing M569 P0 S1 ; Drive 0 goes forwards M569 P1 S1 ; Drive 1 goes forwards M569 P2 S1 ; Drive 2 goes backwards M569 P3 S1 ; Drive 3 goes forwards M350 X8 Y8 Z8 E8 I1 ; Configure microstepping with interpolation M92 X50.929 Y50.929 Z50.929 E50.929 ; Set steps per mm M566 X100.00 Y100.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min) M203 X10000.00 Y10000.00 Z10000.00 E10000.00 ; Set maximum speeds (mm/min) Z wobbles at 800 M201 X1100.00 Y1100.00 Z1100.00 E1100.00 ; Set accelerations (mm/s^2); testing was done at 4500 4500 10 250 M906 X700.00 Y500.00 Z500.00 E500.00:500.00 ; Set motor currents (mA) M84 S0 ; Disable motor idle current reduction ; Axis Limits M208 A0:63 B0:63 U0:63 V0:63 W0:63 X0:63 Y0:63 Z0:63 E0:63 ; Set axis min-maxima G92 A0 B0 U0 V0 ; set all position to 0 along axis ; Endstops ;M574 A1 B1 U1 V1 W1 X1 Y1 Z1 E1:1:1:1 S0 ; Set active low for all 8 motors M574 A1 S0 P"xstop" ; active low endstop switch M574 B1 S0 P"ystop" ; active low endstop switch M574 U1 S0 P"zstop" ; active low endstop switch M574 V1 S0 P"e0stop" ; active low endstop switch
-
Hi,
One thing you need to do is verify that your end stop switches are working.
Since you have upgraded to 3.1.1 you can check in Duet Web Control (DWC).
On the left side select "Machine-Specific" and then over on the right you can see the status of the end stops.
The problem you are having is related to the end stops and you need to get them working correctly.
Frederick
-
@fcwilt said in Sending negative G91 values always sets axis to minimum position:
On the left side select "Machine-Specific" and then over on the right you can see the status of the end stops.
Wow, thanks for this info.
Here is the code I have for my endstops
M574 A1 S1 P"!xstop" ; A min active LOW endstop switch M574 B1 S1 P"!ystop" ; B min active LOW endstop switch M574 U1 S1 P"!zstop" ; U min active LOW endstop switch M574 V1 S1 P"!e0stop" ; V max active LOW endstop switch
And here you can see that it activates 4 endstops (in no state, but turn to yes when I press them)
Small question: ow do I determine which endstop is which index? for example, my E0 endstop is index 4, Z is 5, x is 3 and y is 6 (seems randomly assigned).Now, it would seem like the endstops are active since I can press them and they turn to yes. But there is a weird error when I try to move my motors with H1:
I cannot find this error code online?
-
@fcwilt said in Sending negative G91 values always sets axis to minimum position:
One thing you need to do is verify that your end stop switches are working.
Hmm...
I was looking at the config.g you posted.
It is a strange mix of X,Y,Z and A,B,U,V.
I see M584 with A,B,U,V
I see M350 with X,Y,Z,E
I see M92 with X,Y,Z,E
I see M574 with A using X endstop, B using Y endstop, U using Z endstop, V using E0 endstop.How many stepper motors does this device have?
Frederick
-
Yes you definitely need to clean up your config.g a bit.
Condense your commands and ensure they contain all of the axis you plan to use. Make sure the commands are in the correct order. Namely that M584 that creates the axis must come before the commands that set a parameter for those axis.
I understand your post about the 4 axis to move a plate like a rack and pinion, but are there other axis involved in motion?
-
@Phaedrux said in Sending negative G91 values always sets axis to minimum position:
I understand your post about the 4 axis to move a plate like a rack and pinion, but are there other axis involved in motion?
At a certain point, we will copy the structure, so we will have 8 axis (basically 2 squares like I have shown you). But for now, I want to have the first half functioning properly with the endstops (they are located on the inside, when the 4 racks are fully retracted). Since I do not have the extension board yet, nor the motors, I am not adding the additional axis yet in my config.
-
Then you need to create the config file using just X,Y,Z,E or A,B,U,V but not a mixture of both.
Frederick
-
I finally managed to make it work. I switched my 4 axes to X, Y, Z and U. I do not know why but trying A B U V didn't work no matter what I did. It might be because I still had my XYZ axis setup, so I really had 7 axes, and maybe the endstops were just checking the first axis they were setup for (i.e. X instead of A, Y instead of B, and Z instead of U)