Welcome! Log In Create A New Profile

Advanced

click encoder clarification wanted

Posted by P4LIL 
click encoder clarification wanted
April 13, 2012 09:46AM
Ive fitted a click encoder directly to pins 16 and 17, which works, but seems to jump 2 steps per click, I see in the code to swap REV for non REV and swap pins, but no matter what I do it seems to jump over the next menu item, I can get to the other items by turning the encoder half way between clicks. Am I doing something wrong.
Also using the positioning menu, and moving the head around sometimes completely locks the machine and It has to be reset.

Sorry, It always seem like im finding problems.

Regards Paul

Edited 1 time(s). Last edit at 04/13/2012 11:08AM by P4LIL.
Re: click encoder clarification wanted
April 14, 2012 04:57AM
P4LIL Wrote:
-------------------------------------------------------
> Ive fitted a click encoder directly to pins 16 and
> 17, which works, but seems to jump 2 steps per
> click, I see in the code to swap REV for non REV
> and swap pins, but no matter what I do it seems to
> jump over the next menu item, I can get to the
> other items by turning the encoder half way
> between clicks. Am I doing something wrong.

The encoder I used 2 phase changes per click. From your description I woud guess your encoder has 4 changes, so you get the double number of moves. Look into ui.cpp and find the following line (line 21):
int8_t encoder_table[16] PROGMEM = {0,0,-1,0,0,0,0,1,1,0,0,0,0,-1,0,0};

and replace it with
int8_t encoder_table[16] PROGMEM = {0,0,0,0,0,0,0,0,1,0,0,0,0,-1,0,0};

or
int8_t encoder_table[16] PROGMEM = {0,0,-1,0,0,0,0,1,0,0,0,0,0,0,0,0};

Use the one that is more stable with your encoder. This should reduce the increments to 50%. Report if it works, then I will make an option for it.

> Also using the positioning menu, and moving the
> head around sometimes completely locks the machine
> and It has to be reset.

My encoder is on i2c connection, so I can only move slowly. Can you say if it happens only when moving fast? Could be a buffer overflow in this case. I will recheck the code if I see the problem.

>
> Sorry, It always seem like im finding problems.
>

Better users reporting problems and helping to improve software then users thinking shit software and doing nothing. There are so many combination possible, that it is impossible to test all. Take your encoder - mine worked but other people use different encoders with different problems I would never see with my equipment.

> Regards Paul


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: click encoder clarification wanted
April 14, 2012 06:51AM
thanks, option 1 seems to work well for the encoder.

It still freezes or resets on fast moves, slow moves seem to be OK , but slow moves on an axis seem to be trying to move the other axis as well, particularly noticeable is the extruder motor.

Also I lost all connection to the firmware, while playing in configuration/general the baudrate is not displayed, I clicked and twiddled, a * appeared and I must have changed the rate, and was unable to leave the setting, upon resetting I could no longer connect and had to reload the firmware and eeprom values.
Re: click encoder clarification wanted
April 14, 2012 07:22AM
another thing winking smiley

homing and moving via the lcd system doesn't set the host's values, I assume this is because the firmware is unable to talk back to the host and is mainly designed as a standlone system.

regards

Paul
Re: click encoder clarification wanted
April 14, 2012 07:43AM
Ok, the baudrate problem could be verified. In uilang.h you need

#define UI_TEXT_BAUDRATE          "Baudrate:%oc"

the old code missed the %oc so the rate wasn't written. I need to verify it, just a first result.

Currently there is no feedback to the host, but it would make sense. I will add a coordinate report and make my host aware of these messages. Sounds like a good idea.

>It still freezes or resets on fast moves, slow moves seem to be OK , but slow moves on an axis seem to be trying to move the other axis as well, particularly noticeable is the extruder motor.

seems to be trying? So it doesn't do it, or what do you mean. The way it works is sending a move command for 1mm/1step and wait for it to finish. Not the smoothest way to move longer distances, but the only way with direct feedback. I guess the crash comes from sending the next move before finishing the last one confusing the firmware. I will add a block to prevent new moves during position moves, so they are managed in correct order. Fix will come soon.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: click encoder clarification wanted
April 14, 2012 08:01AM
With
#define UI_TEXT_BAUDRATE          "Baudrate:%oc"

the baudrate is now displayed, but clicking on it puts a little star and locks you in that entry, a reset is needed to escape.

The steppers shake on moves, are they enabled and then disabled on every step? because that is what it feels like, im running a modified gen7 board and all the stepper enable pins are tied together.

thanks


Paul

Mendel prusa, homemade Gen7 on stripboard

'A little knowledge is a dangerous thing' - Alexander Pope
Re: click encoder clarification wanted
April 14, 2012 08:15AM
P4LIL Wrote:
-------------------------------------------------------
> With
>
> #define UI_TEXT_BAUDRATE "Baudrate:%oc"
>
>
> the baudrate is now displayed, but clicking on it
> puts a little star and locks you in that entry, a
> reset is needed to escape.
You need to press the encode for exit. The star says modify mode. Click stores the value. This is true for every menupoint where you can change values directly.
>
> The steppers shake on moves, are they enabled and
> then disabled on every step? because that is what
> it feels like, im running a modified gen7 board
> and all the stepper enable pins are tied
> together.

Possible, if you set DISABLE_E true this will indeed happen.
If you have any of the DISABLE_XYZ enabled, this can also happen.
With gen7 you should have all set to false.

>
> thanks


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: click encoder clarification wanted
April 14, 2012 09:38AM
that was it, had disable_z set

paul
Re: click encoder clarification wanted
April 14, 2012 12:27PM
I uploaded verison 0.61 to github.

All your problems are solved with the new version (I think).

I also added some improvements in the user interface. You can now switch the info panels with encoder and disable autochange of panels. In addition after doing nothing for a given period, the menu goes back into info mode. You can now move your printhead much faster with the encoder. It will sum missed clicks and add them to one larger smooth move instead of multiple small moves.

The drawback are some new configuration options in uiconfig.h.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: click encoder clarification wanted
April 14, 2012 04:35PM
all seems good, thankyou

Paul
Sorry, only registered users may post in this forum.

Click here to login