Hello,
I have added a stepgen to a puma hal and I was able to output of a joint value to a parallel port using stepgen, the code is more or less like this (they can have typos and errors because I'm typing this from my memory):
Code:
loadrt hal_parport cfg="0x378 out"
addf parport.0.write servo-thread
loadrt stepgen step_type=0
net direccion stepgen.0.dir
net paso stepgen.0.step
setp stepgen.0.position-scale 10000
setp stepgen.0.enable.1
addf stepgen.update-freq servo-thread
addf stepgen.make-pulses servo-thread
net eje-0 axis.0.joint-pos-cmd => stepgen.0.position-cmd
I have a few questions regarding output things through a stepgen:
- I have a small and not very precise step motor for my tests, with a driver that divide the whole circle in 200 steps. What are the calculations required to use the joint value to output that? (I see the joint figures move very slowly)
- How can I extend the pulse time? (because right now I have TONS of very small pulses, and I need to degrade the resolution, so I get less pulses (this is related to the previous question)
- Is the axis value the right value to output for a step motor? (I think it's not, but I am not sure what to send to the stepgen.0.position-cmd)
As usual, thank you so much for your help
Cheers