Motor mirroring - 'DIOEX10_ENABLE2_PIN_WPORT' (compile error)

Hi,
I tried to mirror extruder0 and extruder1 to my X-Axis and get the following error while compiling:
"exit status 1
'DIOEX10_ENABLE2_PIN_WPORT' was not declared in this scope"

What is wrong here?

The X-Axis is only used in this test setup. 
Main goal here is to use an additional stepper for an active mixing chamber that is mirrored to both extruder0 and extruder1.
So that the mixing Extruder is only turning while extruding and always at the same speed.


Comments

  • Looks like a bug in source, should be

    WRITE(EXT1_ENABLE2_PIN, EXT1_ENABLE_ON);

    in line 1372 in extruder.cpp at least in my version. 
  • I'm using the current dev version.

    line 1372 in extruder.cpp is " if(Extruder::dittoMode)" for me.


    I tried to replace both instances of "WRITE(EXT1_STEP_PIN,!START_STEP_WITH_HIGH);"
    with "WRITE(EXT1_ENABLE2_PIN, EXT1_ENABLE_ON);", 
    but still get the same compile error.

    Did I replace the correct line?
  • You need to replace the line where the error occurs. If you have a different version lines may differ.
  • Also it might be another error but that was the only one I found with same wrong pin name.
  • I didn't realize the error message was much longer.
    Is this more complicating than just replacing pin names?


    Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

    In file included from sketch\HAL.h:83:0,

                     from sketch\Repetier.h:539,

                     from sketch\Extruder.cpp:22:

    sketch\Extruder.cpp: In static member function 'static void Extruder::enable()':

    fastio.h:29: error: 'DIOEX10_ENABLE2_PIN_WPORT' was not declared in this scope

     #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                           ^

    sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

     #define  WRITE(IO, v)   _WRITE(IO, v)

                             ^

    sketch\Extruder.cpp:1206:2: note: in expansion of macro 'WRITE'

      WRITE(EX10_ENABLE2_PIN, EXT1_ENABLE_ON);

      ^

    fastio.h:29: error: 'DIOEX10_ENABLE2_PIN_PIN' was not declared in this scope

     #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                        ^

    sketch\fastio.h:17:30: note: in definition of macro 'MASK'

      #define  MASK(PIN)    (1 << PIN)

                                  ^

    sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

     #define  WRITE(IO, v)   _WRITE(IO, v)

                             ^

    sketch\Extruder.cpp:1206:2: note: in expansion of macro 'WRITE'

      WRITE(EX10_ENABLE2_PIN, EXT1_ENABLE_ON);

      ^

    fastio.h:29: error: 'DIOEX10_ENABLE2_PIN_WPORT' was not declared in this scope

     #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                                                    ^

    sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

     #define  WRITE(IO, v)   _WRITE(IO, v)

                             ^

    sketch\Extruder.cpp:1206:2: note: in expansion of macro 'WRITE'

      WRITE(EX10_ENABLE2_PIN, EXT1_ENABLE_ON);

      ^

    fastio.h:29: error: 'DIOEX10_ENABLE2_PIN_PIN' was not declared in this scope

     #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                                                                                  ^

    sketch\fastio.h:17:30: note: in definition of macro 'MASK'

      #define  MASK(PIN)    (1 << PIN)

                                  ^

    sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

     #define  WRITE(IO, v)   _WRITE(IO, v)

                             ^

    sketch\Extruder.cpp:1206:2: note: in expansion of macro 'WRITE'

      WRITE(EX10_ENABLE2_PIN, EXT1_ENABLE_ON);

      ^

    exit status 1
    'DIOEX10_ENABLE2_PIN_WPORT' was not declared in this scope


  • You seem to be using an older firmware version. Here is the core problem:

    sketch\Extruder.cpp:1206:2: note: in expansion of macro 'WRITE'

      WRITE(EX10_ENABLE2_PIN, EXT1_ENABLE_ON);

    so in your version it is line 1206 where the line needs to be exchanged,
  • Thanks!  :)>-
    That did the job.

    I downloaded the dev version via the online config tool.
    Is Github more up to date?
  • I try to have github dev and config tool dev the same. config tool is only delayed if I'm not sure about an update.
Sign In or Register to comment.