Generating set amount of steps?
17 Jun 2016 01:39 #76193
by chevydan6
Generating set amount of steps? was created by chevydan6
Is there software in LinuxCNC that allows me to generate a set amount of steps? Like enter 350 steps and the motors moves just that amount?
Please Log in or Create an account to join the conversation.
17 Jun 2016 09:53 #76201
by BigJohnT
Replied by BigJohnT on topic Generating set amount of steps?
Please Log in or Create an account to join the conversation.
17 Jun 2016 10:58 - 17 Jun 2016 10:58 #76203
by andypugh
Replied by andypugh on topic Generating set amount of steps?
One way is this. You can do it from a simple HAL session at the terminal
You can probably paste this into a terminal window then carry on, or save it as a file9(somename.hal) and then use
You can now use commands liketo move the motor. And because the scale is set as 1 then the units are actual steps.
halrun
loadrt stepgen
loadrt threads name1=base-thread period1=100000 name2=servo-thread period2=1000000
addf stepgen.make-pulses base-thread
addf stepgen.capture-position servo-thread
addf stepgen.update-freq servo-thread
setp stepgen.0.scale 1
setp stepgen.0.maxvel 100
setp stepgen.0.maxaccel 1000
start
You can probably paste this into a terminal window then carry on, or save it as a file9(somename.hal) and then use
halrun
source somename.hal
You can now use commands like
setp stepgen.0.position-cmd 200
setp stepgen.0.position-cmd 0
Last edit: 17 Jun 2016 10:58 by andypugh.
The following user(s) said Thank You: Clive S
Please Log in or Create an account to join the conversation.
17 Jun 2016 18:01 #76232
by chevydan6
Replied by chevydan6 on topic Generating set amount of steps?
so to reverse direction, do I just use -200?
Please Log in or Create an account to join the conversation.
17 Jun 2016 19:18 #76233
by andypugh
Yes. Or setp scale to -1 if you want.
Replied by andypugh on topic Generating set amount of steps?
so to reverse direction, do I just use -200?
Yes. Or setp scale to -1 if you want.
Please Log in or Create an account to join the conversation.
Time to create page: 0.082 seconds