Page 1 of 2

STEPPER.SETUP ends in Syntax error

Posted: Tue Apr 16, 2024 12:23 pm
by goof
Hello everybody.

after using Annex for several years now i finaly ran into a problem i can´t solve on my own with lots of reading in the forum.

i´m using Annex32 CAN 1.52.6 LFS

i try to setup a stepper motor with

Code: [Local Link Removed for Guests]

STEPPER.SETUP 1,17,4
when i run the program i get systax error at this line

any thoughts on this

Re: STEPPER.SETUP ends in Syntax error

Posted: Tue Apr 16, 2024 12:48 pm
by Electroguard
No goof, it's a problem with the multi-channel version syntax being broken, which I reported at start of the year while Francesco was on holiday.
I tried all the old and new variants, and the best I could get to work was Annex32 CAN 1.51.3 LFS using the original single channel syntax...
stepper.setup STEPS_pin, DIRECTION_pin

Re: STEPPER.SETUP ends in Syntax error

Posted: Tue Apr 16, 2024 4:11 pm
by cicciocb
Sorry for that but, in fact, this feature is not included into the "basic" release.
I need to compile a specific version for that. (I'll do later tonight)

Re: STEPPER.SETUP ends in Syntax error

Posted: Tue Apr 16, 2024 5:03 pm
by cicciocb
I've just uploaded the version 1.52.6 CAN_STP_LFS

Let me know if it works for you

Re: STEPPER.SETUP ends in Syntax error

Posted: Tue Apr 16, 2024 7:03 pm
by Electroguard
I've only got a partially developed single channel 'proof of concept' to try it on, but after a lot of syntax updating it is looking promising so far.
The Nema23 is moving forward and backward, and speeding up/slowing down according to acceleration value.
It is using proximity sensors for position control, but I should be able to test the calculated position functionality tomorrow, and valid channel numbers.

Re: STEPPER.SETUP ends in Syntax error

Posted: Wed Apr 17, 2024 11:05 pm
by Electroguard
Yep, the calculated positioning is working fine, and I was able to initialise a couple of channels apparently without any cross-channel interaction (I still only have one driver and stepper to actually test with).
Was able to initialise a single working channel using channel numbers from 0 to 9 (probably could have used any higher numbers), so it seems like the channel numbers are just relative different labels rather than specific absolute hardware channel addressing.
Firmware was used on a 4Mb ESP32 UNO clone which was plugged onto a DIN Rail mount holder, with 3.3v outputs directly connected to the Nemo23 stepper driver.

Won''t be yet for a while, but eventually I should hopefully be able to report back after testing the firmware with multiple steppers.
Thanks for the addition Francesco.

Re: STEPPER.SETUP ends in Syntax error

Posted: Thu Apr 18, 2024 8:21 am
by cicciocb
Thanks Robin,
nice to know that is working for you, I just forgot to include the function in the release :oops: .

I built a test bench with 3 steppers some time ago for the integration (should be somewhere in the garage :-) )so, in case of problem, I should be able to reproduce the issue.

Re: STEPPER.SETUP ends in Syntax error

Posted: Sat Apr 20, 2024 3:40 pm
by goof
i found the time to build test setup with two motors. the variables with two motors work well but the output mapping to the specified pins seems not to work. i get step pulses from motor 2 on dir pin of motor 1 even when i change the setup.

Re: STEPPER.SETUP ends in Syntax error

Posted: Sat Apr 20, 2024 3:57 pm
by cicciocb
[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat Apr 20, 2024 3:40 pm i found the time to build test setup with two motors. the variables with two motors work well but the output mapping to the specified pins seems not to work. i get step pulses from motor 2 on dir pin of motor 1 even when i change the setup.
I think you must restart the module when you change the pins

Re: STEPPER.SETUP ends in Syntax error

Posted: Sat Apr 20, 2024 6:37 pm
by goof
yes this did the trick. now everything works fine.

Thank you very much.you are awesome.


now itś time for programming the gui for tft and web interface.
by the way and off topic. is there a way to connect the backcolor of a html button to a variable to show if the motors are running or not.