Sorry for the confusion, I meant to ask if this configuration is good for running with the SPINx1
loadrt pwmgen output_type=0 addf pwmgen.update servo-thread addf pwmgen.make-pulses base-thread net spindle-speed-cmd motion.spindle-speed-out => pwmgen.0.value net spindle-on motion.spindle-on => pwmgen.0.enable net spindle-pwm pwmgen.0.pwm => parport.0.pin-09-out # Set the spindle's top speed in RPM setp pwmgen.0.scale 1800 with say the scale set to 6000 rpm, it is going to work as is ? Thanks On Tue, 2017-02-21 at 16:54 -0500, Gene Heskett wrote: > On Tuesday 21 February 2017 12:15:22 Valerio Bellizzomi wrote: > > > From the LinuxCNC manual I see an example : > > > > > > loadrt pwmgen output_type=0 > > addf pwmgen.update servo-thread > > addf pwmgen.make-pulses base-thread > > net spindle-speed-cmd motion.spindle-speed-out => pwmgen.0.value > > net spindle-on motion.spindle-on => pwmgen.0.enable > > net spindle-pwm pwmgen.0.pwm => parport.0.pin-09-out > > # Set the spindle's top speed in RPM > > setp pwmgen.0.scale 1800 > > > > > > is this sufficient to get the spindle going ? > > > This would be for purely software driving, which generally cannot drive a > machine to anything resembling high speeds when it is supposed to be > making a G0 move. > > Thats is why the majority of us use a smart card, which in some cases can > be its own breakoutboard too. Such is the case with all but one of my > machines, and that one can only move around 8ipm cutting and 10 or so at > full throttle. My stuff with more std interfaces can move 40 to 75 ipm > without missing a beat. > Also associated in the speed limits are the limited drive currants > available from the parport. Getting 10 mills out to drive the stepper > drivers doesn't turn on the opto's all that fast, so that contributes to > the speed limit. Most of the accessory boards can sink 24 mills, easily > turning the led on in the isolation circuitry of the driver. > > But the most telling in using a parport with direct drive is the pulse > jitter, as indicated by running latency-test for half an hour or so. > Every time you see a spike/raise in the displayed time of the > base-thread, thats a long step, and the motor may well stop while > waiting for the next step, but when the cpu, even running an rtai > kernel, will then try to catch up when it does get free of whatever it > was doing, but the motor isn't able to re-accelerate that fast so it > stalls. And everytime it stalls, you have a damaged or wrecked part. > > That makes spending the sheckels for a smart card interface very much > desirable. If that interface can also be the BoB, thats a desirable > economy. There are several mesa cards that meet that criteria, and I'm > fond of the 7i90HD, which gives you a big pile of very steady heartbeat > signals, as high as 8 stepper drivers, 4 pwm generators, and 4 encoder > inputs. What you do not use, can be removed from the load > configuration, and those pins then used as General Purpose I/O, for a > grand total of 72 of them. The 7i90 can be driven by a std EPP capable > printer port, (yours may or may not be EPP capable, and mainboard > manuals do not always state the truth) or by an SPI port. > > So please reconsider how you are going to interface to the machinery. > Getting some isolation between the computer and its jitter pulse > generation is something you'll never regret. > > Where on this ball of rock and water are you? > > > On Tue, 2017-02-21 at 11:26 -0500, Gene Heskett wrote: > > > On Tuesday 21 February 2017 07:33:28 Valerio Bellizzomi wrote: > > > > Hello, > > > > the SpinX1 manual says it acts like a potentiometer, the figure on > > > > page C-13 of the VFD's manual shows the VIA contact to be > > > > connected to an external potentiometer > > > > > > > > is that the right way to connect the spinx1 ? > > > > > > Yes, it has silk screened names. Its a totally isolated thing on the > > > VFD side. The vfd should have a common, a nominally 12 volt plus > > > source when measured to the common. > > > > > > The fwd and rev signals are separated by the spinx1, and generally > > > on the VFD side respond to a closure to this common to enable it to > > > respond to the voltage from the "arm" of the potentiometer. On the > > > computer side, you will need to dedicate on pin of the BoB as an > > > enable signal and wire it up in the hal file. > > > > > > You will need, if using the mesa cards, something that faintly > > > resembles this to get the LCNC speed signal hooked to the spinx1: > > > ############################################################## > > > # Hook pwmgen.00 to the spindle speed and set for PDM output # > > > ############################################################## > > > setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale > > > [SPINDLE_9]PWMGEN_S_SCALE setp > > > hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency > > > [SPINDLE_9]PWMGEN_S_FREQ #setp > > > hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_freq > > > [SPINDLE_9]PWMGEN_S_FREQ setp > > > hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type > > > [SPINDLE_9]PWMGEN_OUTPUT_TYPE setp > > > hm2_[HOSTMOT2](BOARD).0.pwmgen.pdm_frequency > > > [SPINDLE_9]PDMGEN_PDM_FREQUENCY > > > > > > The data being referred in the right hand argument to needs assigned > > > in the [SPINDLE_9] section of your .ini file. > > > > > > Now, I don't see below, what breakout you are using so I'll just > > > copy and paste from my setup. Keep in mind that these will NOT match > > > yours, but will show you approximately what you need. > > > First, setup the enable signal which in my case uses a gpio > > > pin in my 7i90 card. > > > > > > First, you need to set the output pins for all axis's used as > > > inverting and true low, > > > > > > # Turn pulses to true low, opendrain so they are closures to ground. > > > # stepgen 00 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.000.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.000.is_opendrain 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.001.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.001.is_opendrain 1 > > > # stepgen 01 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.002.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.002.is_opendrain 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.003.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.003.is_opendrain 1 > > > # stepgen 03 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.018.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.018.is_opendrain 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.019.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.019.is_opendrain 1 > > > > > > # the above gpio numbers correspond to the outputs of the canned > > > code in the FPGA's installed firmware for the stepgens I use, and > > > the PDM signal from the pwmgen module in the cards firmware. > > > > > > And the reason I keep calling it PDM is that is a ditherless > > > method of getting quite smooth speed signals from a basically > > > digital circuit. That is done as the modules are enabled in > > > the .ini file by a line grouping like this: > > > > > > [SPINDLE_9] > > > # 16.6 is close to 100 revs per click in low belt position > > > PWMGEN_S_SCALE = 16.6 > > > # make it run in PDM mode, is self smoothing then > > > PWMGEN_S_FREQ = 1 > > > PWMGEN_OUTPUT_TYPE = 3 > > > PDMGEN_PDM_FREQUENCY = 10000 > > > > > > # the SCALE above sets it to run the spindle at 100 rpm per > > > click on the + button, when the backgear is not engaged and > > > the belt is in the lowest speed grooves of the pulleys. All of > > > these settings are of course your personal choices. PDM_FREQUENCY > > > is a balance between update rate and quantization of the speed > > > change. A lower frequency is higher resolution but it should be fast > > > enough so the motor speed doesn't ripple. 10000 is a good choice for > > > me with my fake vfd.. > > > > > > sets emcmot.00.enable FALSE > > > net emcmot.00.enable <= joint.0.amp-enable-out > > > net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.03.enable > > > Thats not all of that stuff, but you'll get the idea. > > > > > > A gpio pin is an input unless told otherwise, and all signals > > > are closures to ground, with 5 volts fed to the + terminals on > > > the axis motor drivers, with your step/dirs connected to the - > > > terminal on the drivers control plug. > > > > > > #################################################################### > > >############# # Setup vfd drive enable yadda yadda, building down > > > from top down forward first # # The SpinX1 only needs pwm and dir I > > > thought, but needs an ena(ble) too. > > > #################################################################### > > >############# # start with SpinX1's dir which has to be converted to > > > an output of the correct polarity setp > > > hm2_[HOSTMOT2](BOARD).0.gpio.071.is_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.071.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.071.is_opendrain 1 > > > # this is the green jumper wire from the SpinX1's FWD, to 7i90-p3-47 > > > net reverse_vfd <= motion.spindle-reverse => > > > hm2_[HOSTMOT2](BOARD).0.gpio.071.out > > > > > > # and the spinX1 does need an enable, so setup gpio.070 for that > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.070.is_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.070.invert_output 1 > > > setp hm2_[HOSTMOT2](BOARD).0.gpio.070.is_opendrain 1 > > > # net line moved to be combined with enable_vfd below > > > net enable_vfd <= motion.spindle-on > > > net enable_vfd => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable > > > net enable_vfd => hm2_[HOSTMOT2](BOARD).0.gpio.070.out > > > > > > The above demonstrates then when a "net" signal is defined, the next > > > argument on that line becomes the source for that signal. The next > > > two lines show where that signal is to be sent. > > > IF they are in the sequence shown, the => and <= gismo's are > > > optional. > > > > > > Currently, do NOT put a comment as a trailing #comment, put it on > > > its own line. > > > > > > ########################################################### > > > # make the vfd's pdm drive unidirectional, fwd/rev handles that # > > > # but the SpinX1 needs a DIR, which is on P1-43 > > > ########################################################### > > > net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps > > > net spindle-vel-cmd-rps => spindle-abs.in > > > # this come out on P1-41 as the pulse Duration Modulated signal to > > > the SpinX1, red jumper net spindle-unispeed <= spindle-abs.out => > > > hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value > > > > > > This is, without a doubt, incomplete, but with the halmeters help, > > > you should see whats missing. Yell if the water is still rising. :) > > > > > > > On Thu, 2017-02-16 at 08:56 -0800, Kirk Wallace wrote: > > > > > On 02/16/2017 03:37 AM, Valerio Bellizzomi wrote: > > > > > ... snip > > > > > > > > > > > the VFD is a Toshiba VFS15-4037PL-W, it has a Forward input, a > > > > > > Reverse input, and a current speed input (and alternatively a > > > > > > 0-10V input). There isn't an enable input. I do not need the > > > > > > reverse so it should be two parallel pins, one for forward and > > > > > > one for speed. > > > > > > > > > > ... snip > > > > > > > > > > I found a manual here: > > > > > https://inverterdrive.com/file/Toshiba-VFS15-User-Manual > > > > > > > > > > I usually first check the overview graphic which seems to be on > > > > > page B-4. I see the F terminal which could just be shorted to > > > > > common to activate it. The speed potentiometer is shown too. PWM > > > > > could simulate that. I also see theRS485 connector. I did a > > > > > search in the document for "485" and found page C-4, which shows > > > > > some control options; terminal (relay), keypad, RS485 (Modbus?), > > > > > CAN (cool), communication(what the heck?). Just below are some > > > > > speed setting options. This should be a nice VFD. > > > > > > > > > > A little farther down from B-4 are the I/O circuit options. > > > > > Looking at the F entry, it basically says shorting the F > > > > > terminal to CC will start forward rotation. You can use a > > > > > parallel port pin to control a small solid state relay or > > > > > opto-isolator. It just needs to tolerate 24 Volts on the output. > > > > > > > > > > It looks like the VIA (voltage, input, analog?) is a speed > > > > > input. The same parallel port pin to solid state relay or > > > > > opto-isolator as F above may be used, except it only needs 10 > > > > > Volt tolerence. Terminal PP is the 10 Volt source (CC common > > > > > isn't needed, most likely). The signal from the parallel port > > > > > pin should use PWM or PDM. > > > > > > > > > > If you have a BOB (Break Out Board), post a make/model and/or > > > > > picture or other information. It may be useful for the above > > > > > connections. > > > > > > > > > > It looks like page D-3 is a good place to start VFD programing. > > > > > > > > > > The above may be wrong or missing some information, so study the > > > > > manual and decide for yourself what to do. I would get a mains > > > > > input noise filter right of the bat, so you don't have to chase > > > > > down weird issues while trying to learn how to use your VFD. > > > > > Hmm... It looks like your VFD already has a built-in noise > > > > > filter. > > > > > > > > ------------------------------------------------------------------ > > > >---- -------- Check out the vibrant tech community on one of the > > > > world's most engaging tech sites, SlashDot.org! > > > > http://sdm.link/slashdot > > > > _______________________________________________ > > > > Emc-users mailing list > > > > Emc-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > Cheers, Gene Heskett > > > > ---------------------------------------------------------------------- > >-------- Check out the vibrant tech community on one of the world's > > most engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > _______________________________________________ > > Emc-users mailing list > > Emc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > Cheers, Gene Heskett ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users