Adding a C6 Speed control board

More
24 Aug 2014 21:35 #50221 by comjon
I abandoned the idea to map pins from the Sherline controller box A axis, given Sherline does not provide a schematic, I have no oscilloscope, and simply do not want to either play a guessing game or smell molten chips. I added a 2nd parallel card, and configured stepconf to send PWM, STEP, and DIR through the second parallel port on pins 1, 14, and 16 respectively.

I have been working with Arturo Duncan at CNC4Pc and he recommended pin 14 for PWM and 1 for DIR, and if that eases setup I know how to make the changes. AT THIS TIME I have stepconf configured as describe in my first paragraph.

The 2nd aprallel port seems to be working. My reading from pin 1, the PWM, is 2.3v, and Arturo confirmed this is what I ought to see. I am making some progress. I am not however, reading voltage above .008v on the output terminals set by the C6 onboard potentiometer, nor am I seeing the two LEDs located behind the relays light up. 12v power is being applied to the board during this testing.

I believe the issue at this time is my HAL file setup, and therefore a software problem. I have tried a few customized HAL files; the result is a crash of LinuxCNC on startup. I don't know if resolving these customized HAL file problems will solve the voltage output issue; I decided I would start loading customized HAL files to test how LinuxCNC would respond on startup. Arturo assured me I would NOT get voltage readings in the 0-10v range without the correct Stepconf setup.

I am working in Linux 2.6.2

With patience, please, discard the earlier issues I poorly or erroneously described, as I think I have a good understanding of the C6's role in the chain of hardware I am wiring together. The earlier issues I wrote about were the result of not having parallel port pins physically wired into the C6.

Please if you have questions or input, all is welcome. I have pictures and configuration files I will gladly share.

Commander Jones

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

More
24 Aug 2014 22:21 #50224 by cncbasher
please post your configs folder as an archive
or email me direct

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

More
25 Aug 2014 01:10 #50229 by comjon
I abandoned the idea to map pins from the Sherline controller box A axis, given Sherline does not provide a schematic, I have no oscilloscope, and simply do not want to either play a guessing game or smell molten chips. I added a 2nd parallel card, and configured stepconf to send PWM, STEP, and DIR through the second parallel port on pins 1, 14, and 16 respectively.

I have been working with Arturo Duncan at CNC4Pc and he recommended pin 14 for PWM and 1 for DIR, and if that eases setup I know how to make the changes. AT THIS TIME I have stepconf configured as describe in my first paragraph.

The 2nd aprallel port seems to be working. My reading from pin 1, the PWM, is 2.3v, and Arturo confirmed this is what I ought to see. I am making some progress. I am not however, reading voltage above .008v on the output terminals set by the C6 onboard potentiometer, nor am I seeing the two LEDs located behind the relays light up. 12v power is being applied to the board during this testing.

I believe the issue at this time is my HAL file setup, and therefore a software problem. I have tried a few customized HAL files; the result is a crash of LinuxCNC on startup. I don't know if resolving these customized HAL file problems will solve the voltage output issue; I decided I would start loading customized HAL files to test how LinuxCNC would respond on startup. Arturo assured me I would NOT get voltage readings in the 0-10v range without the correct Stepconf setup.

I am working in Linux 2.6.2

With patience, please, discard the earlier issues I poorly or erroneously described, as I think I have a good understanding of the C6's role in the chain of hardware I am wiring together. The earlier issues I wrote about were the result of not having parallel port pins physically wired into the C6.

Please if you have questions or input, all is welcome. I have pictures and configuration files I will gladly share.

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

More
25 Aug 2014 02:32 #50232 by cncbasher
yes pin 14 would be good , as you are limited on output pins you can use for pwm , hence why your been asked to use alternative pins
if this is a laptop by the way that would bring other complications .

rather than try and scale the output , try and get an output first then scale back or up to get your measured scaled output correct
once you have some voltages to work with

what you have is a step ( frequency output ) hence why you have limited pins that can be used for the purpose
and direction in this case it is a logic high or logic low ( 5v or 0 ) depending on either switching the relay on or off
spindle enable works the same way , either high or low ..

try steplen at 1

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

More
25 Aug 2014 02:42 #50234 by BigJohnT
Now that your customizing hal files I suggest you get familiar with the short Basic HAL Tutorial in the Manual. If you need a link I can look it up.

JT

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

More
12 Jul 2016 15:27 #77344 by DaveDischord
I am looking into the details of everyone's configurations, but as far as my situation, I'm using a C69 board and the KDIC-120 and was wondering if I had a similar setup as far a LinuxCNC goes. Every aspect in consideration, but as far as pin setup, its it the same? Pin 1 for Spindle-on, Pin 14 for PWM, and Pin 16 for Spindle-CW? I'm using a Sherline 6517 if that helps. I have yet to get it to work, aside from going from full stop to full speed and I'll probably need to adjust the analog output.

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

More
13 Jul 2016 13:52 #77396 by andypugh

I have yet to get it to work, aside from going from full stop to full speed and I'll probably need to adjust the analog output.


This is probably a scaling problem. At a guess your PWM scale is 1, so your spindle is at full speed with a request of 1 rpm.

Try M3 S0.5 and see if you get half-speed.

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

More
27 Jul 2016 16:13 #78078 by comjon
DaveDischord,

I abandoned CNC4PC's products and went with the Mesa Spinx1 from Mesa.

I was able to get the Spinx1 working.

C. Jones

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

More
20 Jan 2018 06:32 #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
05 Feb 2018 00:51 #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.080 seconds
Powered by Kunena Forum