Welcome! Log In Create A New Profile

Advanced

RAMP board steppers one direction only?

Posted by KM6VV 
RAMP board steppers one direction only?
September 30, 2017 04:55PM
I have Marlin loaded on my RAMPS board and Arduino. Move axis can only step in the + direction (XYZ) There is a direction signal that changes with direction when I move the shaft encoder
+ or -. The enable line goes low when I start a move, and goes off after inactivity. Steppers are OK. I've tried different stepper driver modules.
I've tried both with and without the limit sw's plugged in, and both activated and not.

Thoughts?

EDIT: Seems not to be making step pulses in one direction.

Edited 2 time(s). Last edit at 09/30/2017 06:09PM by KM6VV.
VDX
Re: RAMP board steppers one direction only?
September 30, 2017 07:16PM
... this is mostly caused by wrong defined or "activated" limit switches.

You can show the actual states with the command "M119" ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: RAMP board steppers one direction only?
September 30, 2017 08:56PM
Thanks,

Ran the M119,

got:
17:47:51.639 : x_min: TRIGGERED
17:47:51.639 : y_min: TRIGGERED
17:47:51.639 : z_min: TRIGGERED

I found and commented out the endstops, but although I can now go negative in xyz (per move screen display), the stepper still only turns positive.

// If enabled, axes won't move below MIN_POS in response to movement commands.
//alm for testing #define MIN_SOFTWARE_ENDSTOPS
// If enabled, axes won't move above MAX_POS in response to movement commands.
//alm for testing #define MAX_SOFTWARE_ENDSTOPS

Must be other #defines involved?


I have:

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200

Where bed size is 200.

max stopped axis moves at plus 200 before I commented out the endstops.

Other things to look for?

Edited 2 time(s). Last edit at 09/30/2017 09:07PM by KM6VV.
Re: RAMP board steppers one direction only?
October 01, 2017 09:52AM
If your endstops are showing triggered while not being pressed then you need to invert their logic function

In configuration.h

[quote
]#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
[/quote]
Re: RAMP board steppers one direction only?
October 01, 2017 05:56PM
Thanks! That did it.
Re: RAMP board steppers one direction only?
October 02, 2017 07:33PM
Hi Obewan, all.

The forum thinks I'm a robot! I'll edit a few lines and try again.

Only limited success. Still can't issue Gcode move (G1) commands.

I can move steppers from prepare/move axis on LCD, however I can't move from issuing G1 X1 command (but got 'ok') from connected Arduino terminal.

G28 'home' moves all three axis. Issued M17 first (enable stepper motors).

RAMPS14_test runs. (no temps). Steppers move. lights flash. All good (no temp sensors were connected at first).

I had read that a temp sensor had to be connected. Attached one.
T0 changed value (RAMPS test). Still can't issue G1 command and move.

Also read that temp sensor could be disabled '#define TEMP_SENSOR_0 0 // 0 instead of 1' Just got compile message that 1 sensor needs to be connected.

Repetier host homes steppers.no move from manual jog. no G1 X1 move.

Any thoughts?

Thanks,

Alan
(not a robot)

P.S. This is on the bench, no heat bed or extruder.

Edited 1 time(s). Last edit at 10/02/2017 09:11PM by KM6VV.
Re: RAMP board steppers one direction only?
October 02, 2017 10:37PM
try G1 X100 F6000

also if its in absolute mode then g1 x1 says go to absolute position 1, so repeating the command will have zero effect

see g90 g91

[reprap.org]

Edited 1 time(s). Last edit at 10/02/2017 10:38PM by Dust.
Re: RAMP board steppers one direction only?
October 03, 2017 01:43PM
Hi,
Thanks for the tip. It's related to inch/mm mode. I set support for inch mode,

// G20/G21 Inch mode support
#define INCH_MODE_SUPPORT //alm

Maybe doesn't initialize in INCH correctly. G20/G21

Not certain yet, but it looks like I need a mm move first, then change to inch. Still testing.

Absolute mode doesn't seem to be a problem, never got the first move.

I usually do a block of 'G20 G90 G17 F4' at the beginning of my code. My controller defaults to inch.

That's a lot of code to get familiar with!

I'd like to see modal G/M's. And ignore 'just' line numbers, in ANY order.

Alan (I BUILD robots, I am not a robot!)
Re: RAMP board steppers one direction only?
October 04, 2017 10:13AM
Are you homing the axis before trying to issue a G1 move ?
Re: RAMP board steppers one direction only?
October 04, 2017 12:35PM
Yes, I've added G28 to home axis before the G1 move. Not sure if it's needed. Might depend if a power-up was done first. I am getting movement now from MDI, but not from manual jog under Repieter.

I haven't been able to find out what Repieter sends the RAMPS board. I suspect it sends G&M codes of it's own for 3D printing, or maybe Marlin automatically does setup for 3D; like turning on the heat pad and extruder heater. So what if I just want to run a laser? What are the M codes for D8, D9 D10? I've searched the quick starts and lists of G/M codes, Maybe M106/107, M140, M3/4/5. M6/7? not clear.

I suppose it might just 'all work' after I connect it up to my PCB router, maybe not. But I need better control (direct control) if I am to run CNC with Marlin/RAMPS, or laser.

Alan (not a robot).
Sorry, only registered users may post in this forum.

Click here to login