ENDLESS_COUNTERCLOCKWISE not working

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Post Reply
Message
Author
massild
Posts: 4
Joined: Mon Nov 28, 2022 9:56 pm

ENDLESS_COUNTERCLOCKWISE not working

#1 Post by massild »

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)

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ENDLESS_COUNTERCLOCKWISE not working

#2 Post by Ralph »

I'll give it a try tomorrow.

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ENDLESS_COUNTERCLOCKWISE not working

#3 Post by Ralph »

I completely forgot about this. Probably Friday, I have to leave early tomorrow.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: ENDLESS_COUNTERCLOCKWISE not working

#4 Post by Keith Baxter »

Ralph wrote: Wed Dec 07, 2022 12:37 pm I completely forgot about this. Probably Friday, I have to leave early tomorrow.
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 

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: ENDLESS_COUNTERCLOCKWISE not working

#5 Post by Ralph »

Snap! You caught us! :oops:

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: ENDLESS_COUNTERCLOCKWISE not working

#6 Post by Keith Baxter »

Ralph wrote: Wed Dec 07, 2022 2:29 pm Snap! You caught us! :oops:
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 

Post Reply