I am experiencing a weird issue where I have several X27 stepper motors running in step direction mode. I need them to run counterclockwise to the stops to set the 0 direction, however, this does not work for me. There is absolutely no motion on the steppers. If I change the code to ENDLESS_CLOCKWISE it works just fine. I am at a loss for a solution here. I am running Am 4.1.5 on PC
The code looks like this:
--Initilize stepper motors
stepper_alt = hw_stepper_motor_add("Altimeter", "4WIRE_4STEP", 4096, 120)
stepper_rpm = hw_stepper_motor_add("Engine RPM", "VID66-06", 6480, 360)
stepper_map = hw_stepper_motor_add("Manifold Pressure", "VID66-06", 6480, 360)
stepper_asi = hw_stepper_motor_add("Airspeed", "VID66-06", 6480, 360)
stepper_vsi = hw_stepper_motor_add("Vertical Speed", "VID66-06", 6480, 360)
-- Initialization starting, rotate clockwise for 3 seconds
hw_stepper_motor_position(stepper_rpm, nil, "ENDLESS_COUNTERCLOCKWISE")
hw_stepper_motor_position(stepper_map, nil, "ENDLESS_COUNTERCLOCKWISE")
hw_stepper_motor_position(stepper_asi, nil, "ENDLESS_COUNTERCLOCKWISE")
hw_stepper_motor_position(stepper_vsi, nil, "ENDLESS_COUNTERCLOCKWISE")
--Run for 4 seconds for X27 dials to zero
timer_start(4000, function(count)
hw_stepper_motor_calibrate(stepper_rpm, 0.0)
hw_stepper_motor_calibrate(stepper_map, 0.0)
hw_stepper_motor_calibrate(stepper_asi, 0.0)
hw_stepper_motor_calibrate(stepper_vsi, 0.0)
hw_stepper_motor_position(stepper_rpm, 0.0)
hw_stepper_motor_position(stepper_map, 0.0)
hw_stepper_motor_position(stepper_asi, 0.0)
hw_stepper_motor_position(stepper_vsi, 0.0)
end)
ENDLESS_COUNTERCLOCKWISE not working
Re: ENDLESS_COUNTERCLOCKWISE not working
I'll give it a try tomorrow.
Re: ENDLESS_COUNTERCLOCKWISE not working
I completely forgot about this. Probably Friday, I have to leave early tomorrow.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: ENDLESS_COUNTERCLOCKWISE not working
Hi,
You guys still working? I thought you’s were on holiday.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: ENDLESS_COUNTERCLOCKWISE not working
Snap! You caught us!
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: ENDLESS_COUNTERCLOCKWISE not working
Yes , you guys work hard for us and deserve some family time.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card