[grblHAL/STM32F4xx Issue#145] GRBL for STM32F407 .For driving motor to move smoothly

未分类 bolang 6个月前 (10-15) 85次浏览

Issue #145 | 状态: 进行中 | 作者: mr-huang-mou | 创建时间: 2023-11-20



评论 (30)

#1 – mr-huang-mou 于 2023-11-20

I cannot see about Serial Init in main.c


#2 – mr-huang-mou 于 2023-11-20

And how to startup IDLE Status in Candle2


#3 – terjeio 于 2023-11-20

> I cannot see about Serial Init in main.c

Serial port(s) are registered in Src/driver.c, if the board is not a Nucleo board then USB is the default comms channel. You can disable USB in by commenting out controller is not starting in Alarm state?


#4 – mr-huang-mou 于 2023-11-20

> > I cannot see about Serial Init in main.c
>
> Serial port(s) are registered in Src/driver.c, if the board is not a Nucleo board then USB is the default comms channel. You can disable USB in by commenting out controller is not starting in Alarm state?

(!pic)
Although disable this line ,I also didn’t make STM32F407 chip to communicate with my host computer(Candle2)

The status is Port opened in Candle2, not Alarm state
!pic2


#5 – terjeio 于 2023-11-20

What kind of board do you have?
Your own design?
It is important that the build you select matches the properties of the board, most importantly the MCU xtal frequency.


#6 – mr-huang-mou 于 2023-11-20

> What kind of board do you have?
Your own design?
It is important that the build you select matches the properties of the board, most importantly the MCU xtal frequency.

Currently,I want to know how to resolve error:79, and did the MCU must be connected the motor drive ? I didn’t connect except serial port and power .I followed your First Run Grbl Settings but now the state still is alarm and send $X it show me error:79. I am a beginner and thank you for your help.


#7 – terjeio 于 2023-11-20

> the state still is alarm and send $X it show me error:79

This is likely due to the reset or estop input beeing in the asserted state. Have you tried with setting $14=70 and resetting the controller? If this does not help what is the response when you send ?


#8 – mr-huang-mou 于 2023-11-21

> > the state still is alarm and send $X it show me error:79
>
> This is likely due to the reset or estop input beeing in the asserted state. Have you tried with setting $14=70 and resetting the controller? If this does not help what is the response when you send ?

send ? and receive is .


#9 – terjeio 于 2023-11-21

> send ? and receive is .

Looks good, if you clear the alarm by sending + followed by $X then what is the state?


#10 – mr-huang-mou 于 2023-11-21

> > send ? and receive is .
>
> Looks good, if you clear the alarm by sending + followed by $X then what is the state?

I don’t know whether sending success,send Ctrl +X and back package was error:9,and $X was error:79


#11 – terjeio 于 2023-11-21

Set $10=1535 and reboot, then post a ? response so I can see the reason for the alarm.


#12 – mr-huang-mou 于 2023-11-21

> Set $10=1535 and reboot, then post a ? response so I can see the reason for the alarm.

Actually, my problem was that I send G1 X10 Y10 Z10 F100 to machine and home machine showok ,but the state didn’t to change to jog or run.Sending a ? and show sending $$ and show
$0=10.0
$1=25
$2=0
$3=0
$4=7
$5=0
$6=0
$7=0
$10=511
$11=0.010
$12=0.002
$13=0
$14=7
$15=0
$16=0
$17=0
$18=0
$19=0
$20=0
$21=0
$22=0
$23=0
$24=25.0
$25=500.0
$26=250
$27=1.000
$28=0.100
$29=0.0
$30=1000.000
$31=0.000
$32=0
$33=5000.0
$34=0.0
$35=0.0
$36=100.0
$37=0
$39=1
$40=0
$43=1
$44=4
$45=3
$46=0
$62=0
$63=2
$64=0
$65=0
$100=250.000
$101=250.000
$102=250.000
$110=500.000
$111=500.000
$112=500.000
$120=10.000
$121=10.000
$122=10.000
$130=200.000
$131=200.000
$132=200.000
$341=0
$342=30.0
$343=25.0
$344=200.0
$345=100.0
$384=0
ok
but how to set $50~$55 ? I couldn’t set ,and didn’t find in code .


#13 – terjeio 于 2023-11-21

> but how to set $50~$55 ? I couldn’t set ,and didn’t find in code .

By adding the keypad plugin to the build.


#14 – mr-huang-mou 于 2023-11-22

>
> By adding the keypad plugin to the build.

Now,I have a new problem. I sent G1 X10 F100 and receive ok
but it didn’t move and I also sent ? receive
but it doesn’t change
I am not sure whether something I didn’t set.Oh,I also sent $J=G53 Y1.0 F10 and ? ,it show me ,it moved,but it didn’t act as expected.


#15 – terjeio 于 2023-11-22

Have you calibrated your motors? The step/mm settings are important for correct movement.
Stepper driver and motor wiring is ok?


#16 – mr-huang-mou 于 2023-11-22

> Have you calibrated your motors? The step/mm settings are important for correct movement. Stepper driver and motor wiring is ok?

I haven’t wire motor and Stepper driver.Temporarily only MCU is used for testing.If needs,I can wire.Stepper driver is TB6600 and motor is 42BYGH48-401A.Other than that, do I need to modify in the code?


#17 – terjeio 于 2023-11-22

> Other than that, do I need to modify in the code?

No, code modifications are seldom required.


#18 – mr-huang-mou 于 2023-11-22

> > Other than that, do I need to modify in the code?
>
> No, code modifications are seldom required.

do I need wire motor,Stepper driver and MCU ?


#19 – mr-huang-mou 于 2023-11-22

I sent G1 X10 F100 and ?,but received
ok

it didn’t run.
I have no idea to fix it.


#20 – mr-huang-mou 于 2023-11-22

this is my settings
$0=10.0
$1=255
$2=0
$3=0
$4=7
$5=0
$6=0
$7=0
$10=511
$11=0.010
$12=0.002
$13=0
$14=7
$15=0
$16=0
$17=0
$18=0
$19=0
$20=0
$21=0
$22=0
$23=0
$24=25.0
$25=500.0
$26=250
$27=1.000
$28=0.100
$29=0.0
$30=1000.000
$31=0.000
$32=0
$33=5000.0
$34=0.0
$35=0.0
$36=100.0
$37=0
$39=1
$40=0
$43=1
$44=4
$45=3
$46=0
$50=100.0
$51=600.0
$52=3000.0
$53=0.250
$54=500.0
$55=3000.0
$62=0
$63=2
$64=0
$65=0
$100=250.000
$101=250.000
$102=250.000
$110=500.000
$111=500.000
$112=500.000
$120=10.000
$121=10.000
$122=10.000
$130=200.000
$131=200.000
$132=200.000
$341=0
$342=30.0
$343=25.0
$344=200.0
$345=100.0
$384=0


#21 – terjeio 于 2023-11-22

> I have no idea to fix it.

And I have no idea about what is going on.
Are you using Windows? If so can you download ioSender and use that to communicate with the board?


#22 – mr-huang-mou 于 2023-11-22

Why do I need to cycle the $J=G53 X100 F500 command lots of times to finish jog ?
And how do I make G1 X10 F100 command work?


#23 – terjeio 于 2023-11-22

There is something seriously wrong with your build, but I do not know what.
How do you build the firmware? Using the Web Builder or STM32CubeIDE or something else?
If the STM32CubeIDE have you selected a build for the correct MCU? There are many combinations available from the Hammer tool i the toolbar.
How do you flash the controller?
And post the output from the $I command.


#24 – mr-huang-mou 于 2023-11-22

> There is something seriously wrong with your build, but I do not know what. How do you build the firmware? Using the Web Builder or STM32CubeIDE or something else? If the STM32CubeIDE have you selected a build for the correct MCU? There are many combinations available from the Hammer tool i the toolbar. How do you flash the controller? And post the output from the $I command.

Using STM32CubeIDE and selecting Debug F407 8Mhz
$I command show that
[VER:1.1f.20220625:]
[OPT:VNMSL,35,1024,3,0]
[NEWOPT:ENUMS,RT+,TC,SED]
[FIRMWARE:grblHAL]
[NVS STORAGE:*FLASH]
[DRIVER:STM32F407]
[DRIVER VERSION:130522]
[PLUGIN:KEYPAD v1.34]
ok
I thought that maybe DRIVER VERSION was old.
And MCU is STM32F407ZGT6


#25 – mr-huang-mou 于 2023-11-22

I have new problem in using the lastest edition, I use to the new version to test ,but it show me alarm: 10 I am not sure what trigger Estop.


#26 – terjeio 于 2023-11-23

> I am not sure what trigger Estop.

Short the estop (reset) pin to ground (PB5 in the generic map) or invert the input with $14.


#27 – mr-huang-mou 于 2023-11-23

> > I am not sure what trigger Estop.
>
> Short the estop (reset) pin to ground (PB5 in the generic map) or invert the input with $14.

Thank you for help, I tried to short the estop pin and it can start ,but invert the input was still alarm.


#28 – terjeio 于 2023-11-23

Did you invert using the correct bitmap? Send $$=14 to get which values to use, or use ioSender to change the setting.


#29 – mr-huang-mou 于 2023-11-24

> Did you invert using the correct bitmap? Send $$=14 to get which values to use, or use ioSender to change the setting.

I set $14=71 and view the settings ,it’s true of $14=71 .I also tried to use ConfigApp to change the settings.


#30 – mr-huang-mou 于 2023-11-24

I have new problem .how can I do to release the hold state When I send M0 command .


原始Issue: https://github.com/grblHAL/STM32F4xx/issues/145

喜欢 (0)