× Forum Header

Question about stepgen type 1

More
26 Nov 2014 18:22 - 26 Nov 2014 18:23 #53432 by color
Hello everybody,
I am not shure is this a right place for my question, so if not please excuse me. I have a stepper driver wich can accept both signals - steps\dir and cw\ccw. I used stepconfig to tune my motors and to create the initial configuration. Now I want to run my drivers with CW\CCW signals instead step\dir. I know it must be set stepgen to type1 in HAL file and change pins from step\dir to up\down. Can i use all other settings created from stepconfig wizard and is this any other to change in my settings?
Last edit: 26 Nov 2014 18:23 by color. Reason: edit

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

More
27 Nov 2014 00:54 #53459 by BigJohnT
You would have to see what pins change and adapt your hal file to fit the changes.

To see what the pins are in a terminal:
halrun
loadrt stepgen step_type=0,1
show pin
quit


JT

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

More
27 Nov 2014 01:05 - 27 Nov 2014 01:07 #53460 by ArcEye
Hi

Now I want to run my drivers with CW\CCW signals instead step\dir.


Because you can, or is there some other reason?

Can i use all other settings created from stepconfig wizard and is this any other to change in my settings?


I have never done it myself but from the man page these should get you going
www.linuxcnc.org/docs/devel/html/man/man9/stepgen.9.html

You need to edit by hand

loadrt stepgen step_type=1,1,1 (assuming 3 axes)

For each axis

net xup => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdown => parport.0.pin-03-out

(setp parport.0.pin-03-out-reset 1 ....also possibly? )

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0

setp stepgen.0.dirhold 15100
setp stepgen.0.dirsetup 35000
setp stepgen.0.dirdelay 35000

setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb

net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xup <= stepgen.0.up
net xdown <= stepgen.0.down


net xenable axis.0.amp-enable-out => stepgen.0.enable

regards
Last edit: 27 Nov 2014 01:07 by ArcEye.

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

More
27 Nov 2014 01:55 - 27 Nov 2014 01:58 #53461 by color
Replied by color on topic Question about stepgen type 1
Thank you for the answers. I have a desktop CNC mill witn 4 Vexta stepper drivers and motors, 5 phase. These are oldy but goldy, and actualy they have only CW/CCW inputs. I run this system using Mach3 and I have done a simple logic circuit to convert CW/CCW to Step/Dir. In fact this system is working allready 3 years without any problems, but I want to try LinuxCNC. In addition, this is a possibility to eliminate this aditional logical circuit (I do not know if this will have some positive effect) I am not a linux user, but there are a huge amount of helpful information and smart people in this community wich gave me impulse to go ahead. Thanks again, I wil do tests and will ask again B)
Last edit: 27 Nov 2014 01:58 by color. Reason: spelling

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

Time to create page: 0.087 seconds
Powered by Kunena Forum