step/dir spindle control

More
10 Aug 2024 06:43 #307402 by dreynolds
Hi there,

I've spent several days trying to understand how to make the spindle control work without success. I know PathPilot will need several changes but I couldn't get it to work with LinuxCNC using Pncconf either.

I have a C6 spindle control board that should output a 0-10v signal to my VFD. This particular version requires step/dir. The manual says requires a 25 KHz input signal to deliver 10v. I have a 7i92T connected to a C10 BOB. I think I need to change the step_type to 0 for step/dir but I have zero idea what to change after that for my specific setup. Seems everything I change results in an output of 10v regardless of the commanded speed in PathPilot.

I have a single speed belt drive. An output of 10v should command 120Hz at the VFD. 120Hz will be approximately 5400 rpm at the spindle and 3490 rpm at the motor.

Where do I start to get a 25 KHz output when I command max rpm? What do I need to change to get the correct ratio and/or scaling for the rest of the rpm range? Is the PathPilot hal file missing components that need to be added?

Thanks in advance.
 

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

More
10 Aug 2024 14:16 #307417 by PCW
Replied by PCW on topic step/dir spindle control
1. What firmware are you using on the 7I92?
(suggest C11, not C11G) as it has a step only output
on pin 14.

2. Typically you would use stepgen mode 2 for this type of application
(since it generates a square wave). In addition you need to set the
steplength and step space to small enough values that they do not
interfere with the maximum frequency (say 1000 each)

If the full scale RPM is 3490 RPM, the step scale would be set to 25000/3490
= ~7.163

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

More
10 Aug 2024 15:22 #307419 by dreynolds
Replied by dreynolds on topic step/dir spindle control
1. I'm using Tormach's firmware for the 770 configuration which has the following for the spindle:

#    Mill Function   Pin#    I/O     Pri. func    Sec. func    Chan      Pin func        Pin Dir
#
#    Spindle Speed    1        0     IOPort       StepGen       4        Step/Table1     (Out)

2. By default the PathPilot uses stepgen mode 2. I think I'm confused as I read they use PWM and I need a step/dir which made me think I needed to use stepgen mode 0. I'll switch back to mode 2. These are the other default values:

position-scale 1.0
maxaccel 0
stepspace 0
steplen 10000

I'll change the steplength and step space to 1000 and position-scale to 7.163. Does maxaccel matter? The PathPilot hal also appears to be missing dirsetup, dirhold and maxvel which were included in the hal generated by Pncconf.
 

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

More
10 Aug 2024 19:34 #307432 by PCW
Replied by PCW on topic step/dir spindle control
You would need the stepspace defined as well
(I think the default times are quite long which may
prevent getting all the way to 25 KHz)

The direction timings don't matter

You can use maxaccel if you wish to change the spindle
accel and deccel times. Setting the stepgen Maxvel to 25000
will prevent it from ever generating more than a 25 KHz
frequency even if given a bogus spindle speed command.
 

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

More
11 Aug 2024 21:28 #307504 by dreynolds
Replied by dreynolds on topic step/dir spindle control
I got it working - I'm not sure why and I think I'm even more confused - but it works! I found an older post on CNCZone. You recommended setting for a C11 REV8 board. I can confirm they also work for a C6 REV6.2 spindle control board. www.cnczone.com/forums/novakon/343810-pa...814.html#post2091814

I had to bypass the spindle comp in PathPilot and add the missing items from the above post that were missing in my original hal file.

Is the below appropriate for my charge pump that requires 12.5khz signal? It works but I can drop the frequency all the way down to 3500 and it still works. Below that it does not.

setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 1
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency 12500
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale 100
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value 5

What frequency is it actually putting out? Is there a frequency, scale and value more appropriate for a 12.5khz signal?

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

More
11 Aug 2024 21:55 #307505 by PCW
Replied by PCW on topic step/dir spindle control
You would normally use a stepgen in mode 2 for a frequency source
not a PWMgen. If you only have 1 PWMgen, and its not needed for other
duties that should work. It will generate the requested frequency.

The reason I say this is that the PWM frequency is a global for all
PWMgens so all PWMgens  in a system would need to be ok with
a 12.5 KHz frequency if one was used for a 12.5 KHz chargepump.

If the chargepump circuit works down to 3.5 KHz, that's because
of its design.

If you set the scale to 100, you should set the value to 50 for a 50%
duty cycle (Square wave). A value of 5 with a scale of 100 is 5% duty
cycle (4 usec on 76 usec off at 12.5 KHz)

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

Moderators: cncbasher
Time to create page: 0.162 seconds
Powered by Kunena Forum