- Configuring LinuxCNC
- Configuration Tools
- StepConf Wizard
- Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
×
Forum Header
Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
- sk_linuxcnc
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
18 Nov 2024 15:37 - 19 Nov 2024 10:26 #314763
by sk_linuxcnc
Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig was created by sk_linuxcnc
Hello I am new to linuxcnc.
Earlier, I have a servomotor from JMC : model ihsv86. its Pul and Dir signals are wired to the parallel port pin 4 and 5 respectively. the motor runs as A axis in the current setup. However, now i want to use the servomotor as a spindle. and my X axis to be a tool table linear slide.
I dont know what settings are to be done in the pin configuration in stepconfig, and what should be done for stepgen in HAL and INI files.
im keeping the post short, but i am willing to ellaborate and attach ini and hal files if needed.
help is much appreciated! Thank you
Earlier, I have a servomotor from JMC : model ihsv86. its Pul and Dir signals are wired to the parallel port pin 4 and 5 respectively. the motor runs as A axis in the current setup. However, now i want to use the servomotor as a spindle. and my X axis to be a tool table linear slide.
I dont know what settings are to be done in the pin configuration in stepconfig, and what should be done for stepgen in HAL and INI files.
im keeping the post short, but i am willing to ellaborate and attach ini and hal files if needed.
help is much appreciated! Thank you
Last edit: 19 Nov 2024 10:26 by sk_linuxcnc.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17899
- Thank you received: 4774
18 Nov 2024 16:15 #314765
by PCW
Replied by PCW on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
This is fairly easy to setup if the motor is always used as a spindle
(basically using the stepgen in velocity mode)
If you need both A Axis and spindle in the same configuration,
it's a bit more difficult to setup as the hal file needs to change
a number of connections, scaling depending on mode.
(basically using the stepgen in velocity mode)
If you need both A Axis and spindle in the same configuration,
it's a bit more difficult to setup as the hal file needs to change
a number of connections, scaling depending on mode.
The following user(s) said Thank You: sk_linuxcnc
Please Log in or Create an account to join the conversation.
- sk_linuxcnc
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
18 Nov 2024 17:15 #314774
by sk_linuxcnc
Replied by sk_linuxcnc on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
No i dont want to use it as both A axis and spindle. I just want to use it as a Spindle. But i dont know how. The pul and dir pins of the motor need to be configured as what? Spindle CW and Spindle PWM? Where to get stepgen from? I basically need entire help on configuration so that i can make this jmc ihsv86 Servo motor as a spindle.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17899
- Thank you received: 4774
18 Nov 2024 17:24 #314775
by PCW
Replied by PCW on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
if the spindle motor is step/dir, you setup the spindle stepgen as a normal joint stepgen
except you set the stepgen to velocity mode and connect the stepgen velocity command
to the commanded spindle speed (that step scale must me chosen to get the correct RPM)
except you set the stepgen to velocity mode and connect the stepgen velocity command
to the commanded spindle speed (that step scale must me chosen to get the correct RPM)
The following user(s) said Thank You: sk_linuxcnc
Please Log in or Create an account to join the conversation.
- sk_linuxcnc
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
18 Nov 2024 21:27 #314801
by sk_linuxcnc
Replied by sk_linuxcnc on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
Okay. So. As you can see, i have the servomotor's Step signal connected to pin 4 and Pulse signal connected to pin 5 of my parallel port.
What should i configure these two pins as in the step config?
Where should i write stepgen and how?
How can i enable this motor? The enable of the two motors are on a common pin 6 as you can see in the image
What should i configure these two pins as in the step config?
Where should i write stepgen and how?
How can i enable this motor? The enable of the two motors are on a common pin 6 as you can see in the image
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17899
- Thank you received: 4774
18 Nov 2024 23:05 #314808
by PCW
Replied by PCW on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
stepconf doesn't know how to setup a step/dir spindle so I would
setup an unused axis for the spindle, and then edit the hal/ini files.
If you do that and post the hal/ini files, I can give you some direction
in what needs to be done.
setup an unused axis for the spindle, and then edit the hal/ini files.
If you do that and post the hal/ini files, I can give you some direction
in what needs to be done.
The following user(s) said Thank You: sk_linuxcnc
Please Log in or Create an account to join the conversation.
- sk_linuxcnc
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
19 Nov 2024 09:12 - 19 Nov 2024 09:42 #314831
by sk_linuxcnc
Replied by sk_linuxcnc on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
sincere apologies. since i do not initially know or understand how stepgen actually works (even after reading the stepgen and hal manual) I have just copied the code from another solution. however, the spindle still doesnt work. infact the AXIS gui doesnt start. i get the following error. "./test_grofi.hal:72: Pin 'stepgen.2.step' does not exist
3015"
please help me and guide me through the basics. :´)
EDIT: added this to the start of the HAL file loadrt stepgen step_type=0,0,0 ctrl_type=p,p,v
and removed a typo on line 79: setp stepgen.2.dirsetup [SPINDLE_0]DIRSETUP
and now the servomotor moves as a spindle. next i will have to set the speed and rpm as i need. Many thanks for pushing me into looking at the right direction!! Cheers
3015"
please help me and guide me through the basics. :´)
EDIT: added this to the start of the HAL file loadrt stepgen step_type=0,0,0 ctrl_type=p,p,v
and removed a typo on line 79: setp stepgen.2.dirsetup [SPINDLE_0]DIRSETUP
and now the servomotor moves as a spindle. next i will have to set the speed and rpm as i need. Many thanks for pushing me into looking at the right direction!! Cheers
Last edit: 19 Nov 2024 09:42 by sk_linuxcnc.
Please Log in or Create an account to join the conversation.
- sk_linuxcnc
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
20 Nov 2024 15:39 #314919
by sk_linuxcnc
Replied by sk_linuxcnc on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
how should i attain the maximum possible rotational speed on my spindle?
my current settings are:
[SPINDLE_0]
SCALE = 6400
MAX_VELOCITY = 20000.0
MAX_ACCELERATION = 40000
STEPGEN_MAXVEL = 25000.00
STEPGEN_MAXACCEL = 40000
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 6400
the spindle motor is set to 800 Pulses/rev
when i configure the motor as the axis, the fastest possible speed is apparently a bit higher than i can achieve when configured as a spindle
#*** AXIS_A *******************************
[AXIS_A]
MAX_VELOCITY = 971.590909090909
MAX_ACCELERATION = 36000.0
MIN_LIMIT = -99999999999999.0
MAX_LIMIT = 99999999999999.0
[JOINT_3]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -99999999999999.0
MAX_LIMIT = 99999999999999.0
MAX_VELOCITY = 971.590909090909
MAX_ACCELERATION = 36000.0
STEPGEN_MAXACCEL = 45000.0
SCALE = 17.77777777777778
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 0.0
#******************************************
Thankyou in advance. looking forward
my current settings are:
[SPINDLE_0]
SCALE = 6400
MAX_VELOCITY = 20000.0
MAX_ACCELERATION = 40000
STEPGEN_MAXVEL = 25000.00
STEPGEN_MAXACCEL = 40000
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 6400
the spindle motor is set to 800 Pulses/rev
when i configure the motor as the axis, the fastest possible speed is apparently a bit higher than i can achieve when configured as a spindle
#*** AXIS_A *******************************
[AXIS_A]
MAX_VELOCITY = 971.590909090909
MAX_ACCELERATION = 36000.0
MIN_LIMIT = -99999999999999.0
MAX_LIMIT = 99999999999999.0
[JOINT_3]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -99999999999999.0
MAX_LIMIT = 99999999999999.0
MAX_VELOCITY = 971.590909090909
MAX_ACCELERATION = 36000.0
STEPGEN_MAXACCEL = 45000.0
SCALE = 17.77777777777778
FERROR = 1
MIN_FERROR = .25
HOME_OFFSET = 0.0
#******************************************
Thankyou in advance. looking forward
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17899
- Thank you received: 4774
20 Nov 2024 18:00 #314931
by PCW
Replied by PCW on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
The limit will likely be the rate at which steps can be generated by the parallel port
If you set the stepgen velocity with RPM and you have 800 steps/turn the step scale should
be 800/60 = 13.3333. With a 55 usec base period and 800 steps per turn, this limits you to 1350 RPM
If you set the stepgen velocity with RPM and you have 800 steps/turn the step scale should
be 800/60 = 13.3333. With a 55 usec base period and 800 steps per turn, this limits you to 1350 RPM
The following user(s) said Thank You: sk_linuxcnc
Please Log in or Create an account to join the conversation.
- sk_linuxcnc
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
21 Nov 2024 09:34 #314974
by sk_linuxcnc
Replied by sk_linuxcnc on topic Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
and how about the other terms,
SCALE = 6400
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
because i noticed that if i keep scale as 800, then the spindle rotates very slowly.
what values should the rest of the terms, dirsetup, dirhold, steplen and stepspace should have to maximise the rpm.
i certainly can see that when the motor is set as A axis(with max values), it turns faster than with my current settings as spindle.
SCALE = 6400
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
because i noticed that if i keep scale as 800, then the spindle rotates very slowly.
what values should the rest of the terms, dirsetup, dirhold, steplen and stepspace should have to maximise the rpm.
i certainly can see that when the motor is set as A axis(with max values), it turns faster than with my current settings as spindle.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Configuration Tools
- StepConf Wizard
- Help: configure a Servo motor with (PUL/DIR) as a Spindle by Par-port stepconfig
Time to create page: 0.074 seconds