Stepper Motor to work like a DC

More
2 years 6 months ago #297574 by PCW
Replied by PCW on topic Stepper Motor to work like a DC
Try this:

setp hm2_7i96.0.stepgen.03.steplen 20000 # Step length (nanoseconds) 20 usec
setp hm2_7i96.0.stepgen.03.stepspace 20000 # Step space (nanoseconds) 20 usec
setp hm2_7i96.0.stepgen.03.maxaccel 50000 # Maximum acceleration (steps/second^2) so 1/10 second to full speed
setp hm2_7i96.0.stepgen.03.maxvel 5000 # Maximum velocity (steps/second)
setp hm2_7i96.0.stepgen.03.step_type 0 # Regular step type
setp hm2_7i96.0.stepgen.03.dirsetup 50000 # Direction setup time (nanoseconds) 50 usec
setp hm2_7i96.0.stepgen.03.dirhold 50000 # Direction hold time (nanoseconds) 00 usec
setp hm2_7i96.0.stepgen.03.control-type 1 # Control type (1 for velocity control)
setp hm2_7i96.0.stepgen.03.enable True # Enable the step generator initially

setp hm2_7i96.0.stepgen.03.velocity 1000 # run forward

 
The following user(s) said Thank You: BonoCNC

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #297585 by BonoCNC
It is not necessary to link anything in .hal?


I will try with another board this way and simulate it.
For now I made it run with a arduino and it works fine and smooth.

Thanks

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #297586 by PCW
Replied by PCW on topic Stepper Motor to work like a DC
No links needed in hal, but ultimately to control the motors
you would have the velocity command linked to the control logic:

net motor_velocity  hm2_7i96.0.stepgen.03.velocity  <= control_velocity
The following user(s) said Thank You: BonoCNC

Please Log in or Create an account to join the conversation.

More
2 years 6 months ago #297593 by BonoCNC
I will test it as soon as possible and share the results with you!

Thanks

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.053 seconds
Powered by Kunena Forum