-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add new pins and use them. #66
Comments
For digital I/O add them as aux ports in your map and use them via M62-M66. |
Sry, I should have described better what I want to do. There are still some comments missing, I will add some when I am done and make a pull request for it. |
You will have to define them as aux in and/or aux out. By default such pins are made available for the M62-M66 commands but can be claimed by plugins for exclusive use meaning the can no longer be set or read by those M commands. Use the
It is and is the limit (home switch) pin for the second Y2 motor (for auto-squared Y axis). |
Hello terjeio, After many hours of trying to understand the code and get what i want to do...I need help or a thought to move forward. Y_LIMIT_PIN= AUXOUTPUT6_PIN<-- HIGH when Y_LIMIT_PIN is triggered and a step signal is generated. I have added "#elif Y_DOUBLED == 6" to motor.pins.h to make Y2_LIMIT_PIN not dependent on the other axes. I hope you can help me, even though I know it's a big ask. Thank you |
I am not sure I understand what you want to achieve but I am pretty sure you are complicating it by modifying motor_pins.h. |
The AUX ports must be switched during the home cycle (HIGH), otherwise it is not necessary. |
Check this piece of code, it intercepts the HAL get limit switch status and modifies it when homing. Step signals are generated as long as the homing sequence is active, in If you rename the init function to |
How do I get access to the Y2_LIMIT_PIN? |
The status is available in the limit_signals_t struct, |
some things are working now, i'm starting to see the big picture behind the code.
|
I still do not understand clearly what you want to achieve...
hal.stepper.disable_motors could be another call you need to intercept? |
I would like to expand the Autosquaring so that I don't have to waste an extra axle like A. Too long is over 500 milliseconds, when a sensor triggers, the output must go HIGH as quickly as possible.
This function is running in My_Plugin. |
If outside of homing the delay will be up to the real-time request interval (from the sender). Please post the complete plugin code, the snippet above does not provide any context. |
You want to do auto squaring with two motors connected to a single stepper driver? |
I think you are making what I am trying to achieve more complicated than it is :D.
|
driver.c supports up to 6 axes, 2 of which can be auto-squared (1 in an 5 axes configuration), you will need a new board map to take avantage of that though. E.g. if you add M5 definitions to the board map you can have either 6 axes or 5 axes with one auto-squared. Duplicating Y-axis definitions to the highest numbered motor in use (except the limit pin) and configure the Y-axis as auto-squared might work as suggested above. E.g. for a 5 axis configuration Y2 will be M5, in a 4 axis it will be M4. ABC-axis motors are assigned from M3 upwards and second motors for auto squared axes downwards from the highest numbered needed.
This is with the Y-axis not configured as auto squared then? |
I know, that is in the motor_pins.h. The problem is that the IMXRT1062 does not have unlimited free GPIO's available, so i cannot use the common way. Currently, auto squared is not configured because it then immediately uses the A axis as M3. "which is why I initially wanted to add another option to motor_pins.h". I will test a few ways. Thanks :) |
Hello,
I would like to use pins 48-50 (Teensy 4.1 from PSRAM) in the programme, how do I set this up?
The text was updated successfully, but these errors were encountered: