- Posts: 25
- Thank you received: 4
Stepgen and 4-phase steppers
- Skec
- Offline
- Junior Member
-
Less
More
6 years 2 months ago #178422
by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Thank you!
Please Log in or Create an account to join the conversation.
- Skec
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 4
6 years 2 months ago #178724
by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Hi,
I have tried to configure (by hand, mostly copying configurations from uploaded examples) for one phase stepper motor control using Linuxcnc. Attached are *.hal and *.ini files. May I ask, if configuration files are right, assuming I connected L298N driver leads into parport 2, 3, 4, and 5 pins (motor A A* B B* leads I connected to L298N driver as suggested in spec.sheet)?
The stepper I am using is a motor from DVD ROM.
Driver - L298N.
My other question would be, if the parameters (e.g. cycle time, linear velocity, etc.) are set correct (I guess I left the default values)... Its hard to find those values for DVD ROM motor and L298N driver..
Thank you!
I have tried to configure (by hand, mostly copying configurations from uploaded examples) for one phase stepper motor control using Linuxcnc. Attached are *.hal and *.ini files. May I ask, if configuration files are right, assuming I connected L298N driver leads into parport 2, 3, 4, and 5 pins (motor A A* B B* leads I connected to L298N driver as suggested in spec.sheet)?
The stepper I am using is a motor from DVD ROM.
Driver - L298N.
My other question would be, if the parameters (e.g. cycle time, linear velocity, etc.) are set correct (I guess I left the default values)... Its hard to find those values for DVD ROM motor and L298N driver..
Thank you!
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
-
Less
More
- Posts: 22011
- Thank you received: 7491
6 years 2 months ago #178737
by tommylight
Replied by tommylight on topic Stepgen and 4-phase steppers
In your pinout.hal file there is
net XPA => parport.0.pin-03-out
net XPB => parport.0.pin-04-out
net XPC => parport.0.pin-05-out
net XPD => parport.0.pin-06-out
Not 2,3,4,5 as you say in the post, so correct that.
When testing set LinuxCNC to very low speed, like 100mm/minute and check if the motor turns.
Also set the step_type to 6 until the motor is turning correctly as it will make it easier to check, later you can try mode 7 or 8 or 9 and see what gets you more torque or more speed.
net XPA => parport.0.pin-03-out
net XPB => parport.0.pin-04-out
net XPC => parport.0.pin-05-out
net XPD => parport.0.pin-06-out
Not 2,3,4,5 as you say in the post, so correct that.
When testing set LinuxCNC to very low speed, like 100mm/minute and check if the motor turns.
Also set the step_type to 6 until the motor is turning correctly as it will make it easier to check, later you can try mode 7 or 8 or 9 and see what gets you more torque or more speed.
Please Log in or Create an account to join the conversation.
- Skec
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 4
6 years 2 months ago #178742
by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Yes, sorry, I made mistake in post here. The pins are 3, 4, 5, and 6. Thanks for correction.
I tried to load this configuration file, however, I got error: function 'parport.0.read' not found in core_stepper.hal. For this reason LinuxCNC terminated.
I tried to load this configuration file, however, I got error: function 'parport.0.read' not found in core_stepper.hal. For this reason LinuxCNC terminated.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
-
Less
More
- Posts: 22011
- Thank you received: 7491
6 years 2 months ago #178743
by tommylight
Replied by tommylight on topic Stepgen and 4-phase steppers
Gather everything from two hal files to one, then edit the ini to use only that hal file.
I see no reason why it is complaining about that, but might be due to the loading of real time stuff.
I see no reason why it is complaining about that, but might be due to the loading of real time stuff.
Please Log in or Create an account to join the conversation.
- Skec
- Offline
- Junior Member
-
Less
More
- Posts: 25
- Thank you received: 4
6 years 2 months ago #178764
by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Finally it works! Thank you everyone for suggestions!
Just a reminder:
I wanted to drive stepper motor (taken from old DVD/CD/Floppy) with L298N using LinuxCNC.
Because Step/dir configuration could not be used, configuration must have been prepared manually (without config. wizard).
Below are the figure of hardware configuration, as well as added *.hal and *.ini files. *.var, and *.tbl files also should be included in the same directory (not added here).
Only 1 axis is configured. However, it is super easy to add other axis too (just copy-paste-rename X axis; change some number accordingly, e.g. axis number, naming, etc.)
Also, be aware that when manually tested motor movement in LinuxCNC (under continuous option) - the stepper motor will spin with no brake (as long as you press "+" or "-"). This might damage the sledge or motor, if being not careful.
Best,
Simonas.
Just a reminder:
I wanted to drive stepper motor (taken from old DVD/CD/Floppy) with L298N using LinuxCNC.
Because Step/dir configuration could not be used, configuration must have been prepared manually (without config. wizard).
Below are the figure of hardware configuration, as well as added *.hal and *.ini files. *.var, and *.tbl files also should be included in the same directory (not added here).
Only 1 axis is configured. However, it is super easy to add other axis too (just copy-paste-rename X axis; change some number accordingly, e.g. axis number, naming, etc.)
Also, be aware that when manually tested motor movement in LinuxCNC (under continuous option) - the stepper motor will spin with no brake (as long as you press "+" or "-"). This might damage the sledge or motor, if being not careful.
Best,
Simonas.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.888 seconds