Adding a C6 Speed control board

More
8 years 9 months ago #104738 by automagic67
Hi everyone, I've been having trouble getting the C6 board to work. So far, I have powered the board with it's own cannibalized wall charger and fed it what I think is a stepper pulse signal and ground from my DB25 BOB. With my multi-meter, I see around 2V on the pulse signal, I have a guy hopefully coming over tomorrow with a fancier multi-meter that can measure frequencies. I didn't get any output with just the pulse and ground so I connected the spindle enable to relay 2. It is labeled as Dir CW. Do I need to run it to the other relay instead? Do I need a Direction or Enable signal, or both? My HAL file is below. I'm sorry if it's messy, I am not a programmer and am going off the examples posted in this thread as well as someone on YouTube with the same setup as me. Thanks for the help.

# Generated by stepconf 1.1 at Thu Aug 13 23:20:40 2009
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hal_parport cfg="0x378 out"
setp parport.0.reset-time 3500
loadrt stepgen step_type=0,0,0,0 ctrl_type=p,p,p,v

loadrt scale count=1

#setup for scaling
setp scale.0.in 0
setp scale.0.gain 1.5 #must be tuned
setp scale.0.offset 0 #no current offset

#connect scale to servo clock thread
addf scale.0 servo-thread

#sends the speed request from EMC to scale module
net spindle-cmd motion.spindle-speed-out => scale.0.in

#sends scaled spindle speed to EMC and spindle stepgen for requested speed
net spindle-freq <= scale.0.out => stepgen.3.velocity-cmd

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread

net xdir => parport.0.pin-02-out
setp parport.0.pin-03-out-invert 1
net xstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net ydir => parport.0.pin-04-out
setp parport.0.pin-05-out-invert 1
net ystep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
setp parport.0.pin-07-out-invert 1
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1

#sends frequency out to par port 14 and to EMC
setp parport.0.pin-14-out-invert 1
net spindle-out <= stepgen.3.step => parport.0.pin-14-out

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 20000
setp stepgen.0.dirsetup 20000
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 xenable axis.0.amp-enable-out => stepgen.0.enable

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 20000
setp stepgen.1.dirsetup 20000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 20000
setp stepgen.2.dirsetup 20000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

#setup for stepgen to drive spindle
setp stepgen.3.position-scale 1
setp stepgen.3.maxvel 4500 #max RPM of Spindle

setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 20000
setp stepgen.3.dirsetup 20000
setp stepgen.3.maxaccel 600 #max accel for spindle

#enable stepgen for spindle
#setp parport.0.pin-16-out-invert 1
net spindle-enable <= motion.spindle-on => stepgen.3.enable parport.0.pin-16-out

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

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

More
8 years 8 months ago #105427 by automagic67
Hey everyone, I managed to figure out my issue. It turns out the input signal to the C6 board didn't have enough current. A transistor fixed the problem. I made a YouTube video showing it as well as one showing my setup. I also drew up a wiring diagram and copied my .HAL file. You are free to use, post, share, etc. this information, I just ask that you state somewhere that you got it from RivalMachining.com. All the links are here:






HAL and Wiring Diagram
www.rivalmachining.com/machine-shop/
The following user(s) said Thank You: andypugh

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

Time to create page: 0.049 seconds
Powered by Kunena Forum