Welcome! Log In Create A New Profile

Advanced

Repetier 0.92 Case Light Pin Menu bugy

Posted by amicado 
Repetier 0.92 Case Light Pin Menu bugy
January 10, 2015 02:03PM
I try to implement a case light but failed because of following behaviour:

In Configurator, when i say case light pin = digital 0

i dont get a menu entry on my reprapdiscount full grafic controller, maybe because of the following line in the uiconfig.h:

#if CASE_LIGHTS_PIN > 0
UI_MENU_ACTIONCOMMAND(ui_menu_toggle_light,UI_TEXT_LIGHTS_ONOFF,UI_ACTION_LIGHTS_ONOFF)
#define UI_TOOGLE_LIGHT_ENTRY ,&ui_menu_toggle_light
#define UI_TOGGLE_LIGHT_COUNT 1
#else
#define UI_TOOGLE_LIGHT_ENTRY
#define UI_TOGGLE_LIGHT_COUNT 0
#endif

if i do it with case light pin = digital 1 i do get an entry in the menu!

second:

if i have the entry in the quick menu, i cant toggle light on or off. (its not connected allready tough)
The Menu entry stays at -> "Light On" and the digital output stays the same at 5V no matter how often i press the button on the encoder wheel.

Is this a bug maybe? grinning smiley How can i get this to work have spent so many time to wire the led´s in the 3 delta towers sad smiley

Edited 1 time(s). Last edit at 01/10/2015 02:04PM by amicado.
Re: Repetier 0.92 Case Light Pin Menu bugy
January 10, 2015 09:14PM
Ok, i got a little bit further! smileys with beer

When i assign another pin then the digital 0 pin it works!
I get a menue entry for switching light on and off and i can switch it on and off. (0V / 5 V)

It only doesnt work when digital 0 is assigned. It doesnt matter if its firmware 0.91 or 0.92. Its not working in both.

Does anyone out there has an explanation for that? Maybe repetier himself can dial in here?!


confused smiley

Kind regards
Alex
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 06:19AM
Seems to be a simple case. The one in uimenu.h was already found but there is one more in ui.h

#if CASE_LIGHTS_PIN >= 0
        case UI_ACTION_LIGHTS_ONOFF:
            TOGGLE(CASE_LIGHTS_PIN);
            UI_STATUS(UI_TEXT_LIGHTS_ONOFF);
            break;
#endif

Here I added already the greater sign if the forum does not swollow it.


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: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 09:47AM
Quote
Seems to be a simple case.
unfortunately not sad smiley
If I change it for both files (uimenu.h & ui.cpp (i guess you meant ui.cpp not ui.h)) with the >=0 sign instead of just >0 i do get the menu entry even if i assign digital 0 output (is it the one on AUX1? 0,1,GND, VCC)

but the button press doesnt toggle the light off or on.. it always stays at "ON"...

even if PIN 1 is assigned, (where i always have a menu entry for light even if i leave it at
#if CASE_LIGHTS_PIN > 0
)
the toggeling doesnt funktion.

If i say output to "x min endstop" in the configurator it works both,.. the menu entry is there and it is toggeling...

Maybe something wrong with the pin assignment, or the two pins are blocked somewhere else? (tough i selected ramps 1.4 and Mega Board)

Thanks very much for your help i try so hard to find the problem... smiling bouncing smiley

Edited 1 time(s). Last edit at 01/11/2015 09:47AM by amicado.
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 10:32AM
Yes I meant that u.cpp.

That code fragment is actually the code that does the switching. Along with the initialization in Printer.cpp
#if CASE_LIGHTS_PIN >= 0
    SET_OUTPUT(CASE_LIGHTS_PIN);
    WRITE(CASE_LIGHTS_PIN, CASE_LIGHT_DEFAULT_ON);
#endif // CASE_LIGHTS_PIN

it is all that matters. I checked 0.92 so maybe that part looks different for you?
Apart from this I see no reason why pins 0 and 1 should not work. No Special meaning no default pins using them. And the fact that other pins work show that the code is also correct.


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: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 10:53AM
Iam sorry to bother you, i dig depper now^^

If i select Ramps 1.3/Ramps 1.4 and Arduino Mega in the configurator (0.92) i get a pins.h with the following code:

Look at the 2 highlighted lines. Shouldnt get the first uncommented by default to assign a ramps 1.3/1.4 board?

Second there is no CASE_LIGHTS_PIN assigned to a port number by default by the configurator tool (I searched the whole pins.h).

If i enter it manual (third highlighted line) i still cant toggle that pin with button press on FGSC. it allways says "LIGHTS: ON" ("LAMPEN: AN" in German)

//////////////////FIX THIS//////////////
#ifndef __AVR_ATmega1280__
#ifndef __AVR_ATmega2560__
#error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#endif

// uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
// #define RAMPS_V_1_3
// #define RAMPS_V_1_0

#ifdef RAMPS_V_1_3

#define ORIG_X_STEP_PIN         54
#define ORIG_X_DIR_PIN          55
#define ORIG_X_ENABLE_PIN       38
#define ORIG_X_MIN_PIN          3
#define ORIG_X_MAX_PIN          2

#define ORIG_Y_STEP_PIN         60
#define ORIG_Y_DIR_PIN          61
#define ORIG_Y_ENABLE_PIN       56
#define ORIG_Y_MIN_PIN          14
#define ORIG_Y_MAX_PIN          15

#define ORIG_Z_STEP_PIN         46
#define ORIG_Z_DIR_PIN          48
#define ORIG_Z_ENABLE_PIN       62
#define ORIG_Z_MIN_PIN          18
#define ORIG_Z_MAX_PIN          19

#define ORIG_E0_STEP_PIN         26
#define ORIG_E0_DIR_PIN          28
#define ORIG_E0_ENABLE_PIN       24

#define ORIG_E1_STEP_PIN         36
#define ORIG_E1_DIR_PIN          34
#define ORIG_E1_ENABLE_PIN       30

#define SDPOWER            -1
#define SDSS               53
#define SDCARDDETECT 	    49

#define LED_PIN            13
#define ORIG_FAN_PIN            9
#define ORIG_PS_ON_PIN          12

#define CASE_LIGHTS_PIN	1

#define HEATER_0_PIN       10
#define HEATER_1_PIN       8
#define HEATER_2_PIN       9
#define TEMP_0_PIN         13   // ANALOG NUMBERING
#define TEMP_1_PIN         14   // ANALOG NUMBERING
#define TEMP_2_PIN         15
#define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
#define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,


#else // RAMPS_V_1_1 or RAMPS_V_1_2 as default

#define ORIG_X_STEP_PIN         26
#define ORIG_X_DIR_PIN          28
#define ORIG_X_ENABLE_PIN       24
#define ORIG_X_MIN_PIN           3
#define ORIG_X_MAX_PIN          -1    //2

#define ORIG_Y_STEP_PIN         38
#define ORIG_Y_DIR_PIN          40
#define ORIG_Y_ENABLE_PIN       36
#define ORIG_Y_MIN_PIN          16
#define ORIG_Y_MAX_PIN          -1    //17

#define ORIG_Z_STEP_PIN         44
#define ORIG_Z_DIR_PIN          46
#define ORIG_Z_ENABLE_PIN       42
#define ORIG_Z_MIN_PIN          18
#define ORIG_Z_MAX_PIN          -1    //19

#define ORIG_E0_STEP_PIN         32
#define ORIG_E0_DIR_PIN          34
#define ORIG_E0_ENABLE_PIN       30

#define SDPOWER            48
#define SDSS               53
#define LED_PIN            13
#define ORIG_PS_ON_PIN          -1
//#define SCL                21
//#define SDA                20

#define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
#define E1_PINS


#ifdef RAMPS_V_1_0 // RAMPS_V_1_0
#define HEATER_0_PIN     12    // RAMPS 1.0
#define HEATER_1_PIN     -1    // RAMPS 1.0
#define ORIG_FAN_PIN          11    // RAMPS 1.0

#else // RAMPS_V_1_1 or RAMPS_V_1_2
#define HEATER_0_PIN     10    // RAMPS 1.1
#define HEATER_1_PIN      8    // RAMPS 1.1
#define ORIG_FAN_PIN           9    // RAMPS 1.1
#endif

#define TEMP_0_PIN          2    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define TEMP_1_PIN          1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#endif

Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 11:00AM
#if CASE_LIGHTS_PIN >= 0
    SET_OUTPUT(CASE_LIGHTS_PIN);
    WRITE(CASE_LIGHTS_PIN, CASE_LIGHT_DEFAULT_ON);
#endif // CASE_LIGHTS_PIN

btw i cant find this code fragment in 0.92. in which file should that be?

in ui.cpp i have:

#if CASE_LIGHTS_PIN > 0
        case UI_ACTION_LIGHTS_ONOFF:
            TOGGLE(CASE_LIGHTS_PIN);
            UI_STATUS(UI_TEXT_LIGHTS_ONOFF);
            break;
#endif

where is that function TOGGLE(CASE_LIGHTS_PIN)?

Edited 1 time(s). Last edit at 01/11/2015 11:03AM by amicado.
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 11:14AM
The part you can't find is in Printer.cpp

TOGGLE is a macro defined in fastio.h


Why did you put
#define CASE_LIGHTS_PIN 1
inside pins.h. It should be in Configuration.h.

The 2 commented lines
// #define RAMPS_V_1_3
// #define RAMPS_V_1_0

are ok. Should delete them completely.


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: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 11:16AM
Oh sry my mistake! The CASE_LIGHTS_PIN gets defined in configuration.h^^

The problem persists...

if i select pin 0 or pin 1 in config.h for CASE_LIGHTS_PIN no toggeling.

ill upload a video now, because i feel like iam dumb, but ill like to show you that it doesnt work...

Edited 1 time(s). Last edit at 01/11/2015 11:20AM by amicado.
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 11:38AM
[www.youtube.com]

here u go, watch with sound spinning smiley sticking its tongue out

Edited 1 time(s). Last edit at 01/11/2015 11:39AM by amicado.
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 11:49AM
If you define CASE_LIGHTS_PIN under RAMPS_V_1_3
you should also also uncomment #define RAMPS_V_1_3 unless I missed something

// #define RAMPS_V_1_3
// #define RAMPS_V_1_0

#ifdef RAMPS_V_1_3
.....
.......
#define CASE_LIGHTS_PIN 1

:-(
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 11:55AM
@ justcurious:

i did the pin assignment now in config.h as it should be, and left the two lines
Quote
// #define RAMPS_V_1_3
// #define RAMPS_V_1_0


commented. Thats not the point. regards sad smiley
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 12:58PM
Shame on me but there is some misbehaviour of the display itself! Maybe this is causing the trouble

Look @ [www.youtube.com]

How can i fix this? eye popping smileysmileys with beer
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 01:29PM
Ok, I found the reason. See this image

There you see that pins 0 and 1 have a special function namely RX and TX which are the 2 pins used for communication! So it is good that it does not work otherwise your communication would break. Didn't register until know that we have access to these pins externally:-)


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: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 02:04PM
Quote
Ok, I found the reason.

DUDE YOU ARE THE BEST! smileys with beer
I thought exactly the same when i looked over the schematic to double check the pinout.

The question is still why would that be of use to access this pins on the ramps board? hot smiley

I guess its not possible to change the two pins separately to digital pins if they are used for the communication. (USB communication? They look like USART pins thou)

So i have to follow another route to connect the lights^^ (Dont need the min endstops anyway)

Quote
Didn't register until know that we have access to these pins externally:-)
so you should better remove them from the configurator to avoid further frustration of other reprapers tongue sticking out smiley

I hope i can get rid of the other issue of my display (2nd video) with the (soft)debouncing.


One last Question: What is REPEAT TIME, REDUCE REPEAT TIME BY, MINIMUM REPEAT TIME good for?

1 time Repetier ever Repetier!!! thumbs upgrinning smiley
Re: Repetier 0.92 Case Light Pin Menu bugy
January 11, 2015 02:15PM
I guess you can use pins 0 and 1 for a bluetooth receiver.

REPEAT TIME, REDUCE REPEAT TIME BY, MINIMUM REPEAT TIME is for extra pins with function that can repeat like if you have X+ move. Holding it will then repeat the command faster and faster until you reach minimum repeat time.

I would ignore your second video, now we now it is communication it might simply the signal going out which is on and off from communication as bits go through the line.


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: Repetier 0.92 Case Light Pin Menu bugy
January 12, 2016 07:10PM
awsome, thx repetier, I just had the sameproblem winking smiley
Sorry, only registered users may post in this forum.

Click here to login