Giter Site home page Giter Site logo

Comments (5)

terjeio avatar terjeio commented on July 17, 2024 1

I think grblHAL should definitely support 8 or 9 axes running at the same time.

8 axes should be relatively easy to add since a byte is used to hold information such as step and direction output. 9 (or more) requires two bytes and will trigger more significant changes?

What should I do?

Debug? Support for U and V is work (in slow) progress for me and there may be issues such as settings/parameter storage allocation that has to be resolved. It is a pity that the Teensy is not easily debuggable, myself I would use a Nucleo STM32F756 board to debug as it has plenty of pins.

For the iMXRT1062: if you have a UART <> USB breakout board you may either add debug output to a UART channel or switch the primary output stream to that. Debug output can be enabled in grbl/config.h (DEBUGOUT) and writing is via debug_write().

from imxrt1062.

pzh11001 avatar pzh11001 commented on July 17, 2024

i use ArduinoIDE1.8.19。 Just in config.h set N_AXIS . If axis is larger than 6, MCU will crash. As long as 6 axes or less are set. Everything is back to normal. Why doesn't the code I added work。I need to use 7 independent axes instead of ganged axes
《motor_pins.h》
#ifdef C_AXIS
#ifndef M5_AVAILABLE
#error "C_AXIS pins are not available"
#endif
#define C_STEP_PORT M5_STEP_PORT
#define C_STEP_PIN M5_STEP_PIN
#define C_STEP_BIT (1<<M5_STEP_PIN)
#define C_DIRECTION_PORT M5_DIRECTION_PORT
#define C_DIRECTION_PIN M5_DIRECTION_PIN
#define C_DIRECTION_BIT (1<<M5_DIRECTION_PIN)
#ifdef M5_LIMIT_PIN
#define C_LIMIT_PORT M5_LIMIT_PORT
#define C_LIMIT_PIN M5_LIMIT_PIN
#define C_LIMIT_BIT (1<<M5_LIMIT_PIN)
#endif
#ifdef M5_LIMIT_PIN_MAX
#define C_LIMIT_PORT_MAX M5_LIMIT_PORT_MAX
#define C_LIMIT_PIN_MAX M5_LIMIT_PIN_MAX
#define C_LIMIT_BIT_MAX (1<<M5_LIMIT_PIN_MAX)
#endif
#ifdef M5_ENABLE_PIN
#define C_ENABLE_PORT M5_ENABLE_PORT
#define C_ENABLE_PIN M5_ENABLE_PIN
#define C_ENABLE_BIT (1<<M5_ENABLE_PIN)
#endif
#endif

#ifdef U_AXIS
#ifndef M6_AVAILABLE
#error "U_AXIS pins are not available"
#endif
#define U_STEP_PORT M6_STEP_PORT
#define U_STEP_PIN M6_STEP_PIN
#define U_STEP_BIT (1<<M6_STEP_PIN)
#define U_DIRECTION_PORT M6_DIRECTION_PORT
#define U_DIRECTION_PIN M6_DIRECTION_PIN
#define U_DIRECTION_BIT (1<<M6_DIRECTION_PIN)
#ifdef M6_LIMIT_PIN
#define U_LIMIT_PORT M6_LIMIT_PORT
#define U_LIMIT_PIN M6_LIMIT_PIN
#define U_LIMIT_BIT (1<<M6_LIMIT_PIN)
#endif
#ifdef M6_LIMIT_PIN_MAX
#define U_LIMIT_PORT_MAX M6_LIMIT_PORT_MAX
#define U_LIMIT_PIN_MAX M6_LIMIT_PIN_MAX
#define U_LIMIT_BIT_MAX (1<<M6_LIMIT_PIN_MAX)
#endif
#ifdef M6_ENABLE_PIN
#define U_ENABLE_PORT M6_ENABLE_PORT
#define U_ENABLE_PIN M6_ENABLE_PIN
#define U_ENABLE_BIT (1<<M6_ENABLE_PIN)
#endif
#endif

#ifdef V_AXIS
#ifndef M7_AVAILABLE
#error "V_AXIS pins are not available"
#endif
#define V_STEP_PORT M7_STEP_PORT
#define V_STEP_PIN M7_STEP_PIN
#define V_STEP_BIT (1<<M7_STEP_PIN)
#define V_DIRECTION_PORT M7_DIRECTION_PORT
#define V_DIRECTION_PIN M7_DIRECTION_PIN
#define V_DIRECTION_BIT (1<<M7_DIRECTION_PIN)
#ifdef M7_LIMIT_PIN
#define V_LIMIT_PORT M7_LIMIT_PORT
#define V_LIMIT_PIN M7_LIMIT_PIN
#define V_LIMIT_BIT (1<<M7_LIMIT_PIN)
#endif
#ifdef M7_LIMIT_PIN_MAX
#define V_LIMIT_PORT_MAX M7_LIMIT_PORT_MAX
#define V_LIMIT_PIN_MAX M7_LIMIT_PIN_MAX
#define V_LIMIT_BIT_MAX (1<<M7_LIMIT_PIN_MAX)
#endif
#ifdef M7_ENABLE_PIN
#define V_ENABLE_PORT M7_ENABLE_PORT
#define V_ENABLE_PIN M7_ENABLE_PIN
#define V_ENABLE_BIT (1<<M7_ENABLE_PIN)
#endif
#endif

《my_machine_map.h》 :
#define BOARD_NAME "myboard"
#define HAS_IOPORTS

#define X_STEP_PIN (0u)
#define X_DIRECTION_PIN (1u)
#define X_ENABLE_PIN (24u)
#define X_LIMIT_PIN (23u)

#define Y_STEP_PIN (2u)
#define Y_DIRECTION_PIN (3u)
#define Y_ENABLE_PIN (25u)
#define Y_LIMIT_PIN (22u)

#define Z_STEP_PIN (4u)
#define Z_DIRECTION_PIN (5u)
#define Z_ENABLE_PIN (26u)
#define Z_LIMIT_PIN (21u)

#define M3_AVAILABLE
#define M3_STEP_PIN (6u)
#define M3_DIRECTION_PIN (7u)
#define M3_ENABLE_PIN (27u)
#define M3_LIMIT_PIN (20u)

#define M4_AVAILABLE
#define M4_STEP_PIN (8u)
#define M4_DIRECTION_PIN (9u)
#define M4_ENABLE_PIN (28u)
#define M4_LIMIT_PIN (19u)

#define M5_AVAILABLE
#define M5_STEP_PIN (10u)
#define M5_DIRECTION_PIN (11u)
#define M5_ENABLE_PIN (29u)
#define M5_LIMIT_PIN (18u)

#define M6_AVAILABLE
#define M6_STEP_PIN (41u)
#define M6_DIRECTION_PIN (40u)
#define M6_ENABLE_PIN (39u)
#define M6_LIMIT_PIN (38u)

#define M7_AVAILABLE
#define M7_STEP_PIN (37u)
#define M7_DIRECTION_PIN (36u)
#define M7_ENABLE_PIN (35u)
#define M7_LIMIT_PIN (34u)

from imxrt1062.

pzh11001 avatar pzh11001 commented on July 17, 2024

I think grblHAL should definitely support 8 or 9 axes running at the same time.

8 axes should be relatively easy to add since a byte is used to hold information such as step and direction output. 9 (or more) requires two bytes and will trigger more significant changes?

What should I do?

Debug? Support for U and V is work (in slow) progress for me and there may be issues such as settings/parameter storage allocation that has to be resolved. It is a pity that the Teensy is not easily debuggable, myself I would use a Nucleo STM32F756 board to debug as it has plenty of pins.

For the iMXRT1062: if you have a UART <> USB breakout board you may either add debug output to a UART channel or switch the primary output stream to that. Debug output can be enabled in grbl/config.h (DEBUGOUT) and writing is via debug_write().

I see. Thank you very much. I think I need to prepare a UART to USB device. Connect to uart1 of teensy4.1.

from imxrt1062.

pzh11001 avatar pzh11001 commented on July 17, 2024

Finally found the problem, The starting macro definition in 《nvc.h》 file is too small. After the expansion, grbHALl will not crash and can operate normally. Next, the 7-axis and 8-axis motors still don't rotate, but the command "?" of grblhal has been able to correctly show the coordinates, and I already know where to find the problem. It should be solved soon!

Thank you again for your help!

from imxrt1062.

terjeio avatar terjeio commented on July 17, 2024

The starting macro definition in 《nvc.h》 file is too small

I've fixed this, and related stuff, in the latest commit.

from imxrt1062.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.