comanding axis movement from within a component

14 Mar 2017 13:38 - 14 Mar 2017 13:39 #89585 by andypugh
What do you want to jog with? MPG or button?

You could just add a second signal to the current one prior to passing it to the stepgen.
Or add a jogging function to the HAL component.
Last Edit: 14 Mar 2017 13:39 by andypugh.
14 Mar 2017 16:41 #89601 by JR1050
Im trying to use buttons and im attempting to write a jog function to my component. sine it is a jog by button, it isnt being given a distance to go to, idea being push plus button, actuator move left, push minus, it goes right.
something similar to this

case 32;
ram_enable=1; // connected to stepgen enable
stepgen_go=0; //stepgen.0.dir
step_step=400; //stepgen.0.step-based on 400 steps a rev
stepgen_go=1; //stepgen.0.dir
step_step=400; //stepgen.0.step-based on 400 steps a rev

I think this would work with the standard stepgen component, but , im using the hm2 version and it doesnt have the step or direction pins, not that i could find in then manual, am is missing something?
14 Mar 2017 17:01 #89605 by andypugh
Presumably your component sends position commands?
So, jogging is just a case of sending different position commands.

if (button) {
position = position + 0.0001;
The following user(s) said Thank You: JR1050
14 Mar 2017 17:10 #89610 by JR1050
thank you, a simple loop...would not have thought of that
Time to create page: 0.118 seconds
Powered by Kunena Forum