SPINDLE SERVO SPECS

Moderators: TomKerekes, dynomotion

Moray
Posts: 101
Joined: Thu Apr 26, 2018 10:16 pm

Re: SPINDLE SERVO SPECS

Post by Moray » Wed Apr 10, 2019 11:55 am

turbothis wrote:
Tue Apr 09, 2019 8:04 pm
outstanding
it is working good

for some reason the CCW program spins CW too

Code: Select all

#define SPINDLEAXIS 2			// Axis Channel to Jog to rotate Spindle
#define FACTOR (11872.46/60.0)  	// to convert RPM to counts/sec (counts/rev / 60.0sec)
#define SPINDLECW_BIT 154   	// bit to activate to cause CW rotation
#define SPINDLECCW_BIT 155		// bit to activate to cause CCW rotation
#define SPEEDVAR 99				// global persistant variable to store latest speed
#define STATEVAR 98				// global persistant variable to store latest state (-1=CCW,0=off,1=CW)
#define KMVAR PC_COMM_CSS_S 	// variable KMotionCNC will pass speed parameter (113)
#define USE_POS_NEG_VOLTAGE 0 	// 0 = output Magnitude, 1 = output positive and negative speed 
Have you changed the USE_POS_NEG_VOLATGE define to 1?
I've not checked all the code, but setting that to one should cause a Jog to be commanded either positive or negative depending on direction, whereas with it set to zero, the Jog is always in the same negative or positive direction, with the CW/CCW outputs controlling the direction (i.e. how a typical VFD would run, with the direction set by a dedicated signal, then just 0-10V to control speed)

turbothis
Posts: 55
Joined: Fri Mar 15, 2019 4:07 pm

Re: SPINDLE SERVO SPECS

Post by turbothis » Wed Apr 10, 2019 1:54 pm

no i did not change that. works great now
i always know what i need is right in front of my eyes but i just cant see it
thanks for the pointer
thanks

Post Reply