STEPPER.SETUP ends in Syntax error

Here we can discuss about the problem found
goof
Posts: 3
Joined: Fri Dec 10, 2021 10:01 am

STEPPER.SETUP ends in Syntax error

Post 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
User avatar
Electroguard
Posts: 857
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 273 times
Been thanked: 321 times

Re: STEPPER.SETUP ends in Syntax error

Post 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
User avatar
cicciocb
Site Admin
Posts: 2041
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 436 times
Been thanked: 1342 times
Contact:

Re: STEPPER.SETUP ends in Syntax error

Post 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)
User avatar
cicciocb
Site Admin
Posts: 2041
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 436 times
Been thanked: 1342 times
Contact:

Re: STEPPER.SETUP ends in Syntax error

Post by cicciocb »

I've just uploaded the version 1.52.6 CAN_STP_LFS

Let me know if it works for you
User avatar
Electroguard
Posts: 857
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 273 times
Been thanked: 321 times

Re: STEPPER.SETUP ends in Syntax error

Post 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.
User avatar
Electroguard
Posts: 857
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 273 times
Been thanked: 321 times

Re: STEPPER.SETUP ends in Syntax error

Post 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.
User avatar
cicciocb
Site Admin
Posts: 2041
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 436 times
Been thanked: 1342 times
Contact:

Re: STEPPER.SETUP ends in Syntax error

Post 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.
goof
Posts: 3
Joined: Fri Dec 10, 2021 10:01 am

Re: STEPPER.SETUP ends in Syntax error

Post 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.
User avatar
cicciocb
Site Admin
Posts: 2041
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 436 times
Been thanked: 1342 times
Contact:

Re: STEPPER.SETUP ends in Syntax error

Post 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
goof
Posts: 3
Joined: Fri Dec 10, 2021 10:01 am

Re: STEPPER.SETUP ends in Syntax error

Post 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.
Post Reply