Some advices for a noob
01 Jul 2013 15:11 #36187
by kenran
Some advices for a noob was created by kenran
Hello,
I have a motor (I think multiphase because it has plenty of torque even at low speed)
and its driver
I have the input :
- start
- brake
- CW / CCW
Which are controlled by relays connected to COM
Output:
24V pulses (12 per revolution)
My questions:
- How to use the motor via the driver (I have cards with relay)? Wich module ?
- Is Linuxcnc able to automatically calculate the displacement using the driver output pulses?
- The output pulses are 24V, how to connect them to a LPT input (optocoupler, transistor)
Thank you in advance
I have a motor (I think multiphase because it has plenty of torque even at low speed)
and its driver
I have the input :
- start
- brake
- CW / CCW
Which are controlled by relays connected to COM
Output:
24V pulses (12 per revolution)
My questions:
- How to use the motor via the driver (I have cards with relay)? Wich module ?
- Is Linuxcnc able to automatically calculate the displacement using the driver output pulses?
- The output pulses are 24V, how to connect them to a LPT input (optocoupler, transistor)
Thank you in advance
Please Log in or Create an account to join the conversation.
01 Jul 2013 15:31 #36188
by cncbasher
Replied by cncbasher on topic Some advices for a noob
have you details of the driver , link to manual etc
Please Log in or Create an account to join the conversation.
01 Jul 2013 18:57 #36190
by kenran
Replied by kenran on topic Some advices for a noob
Here the driver manual.
Thank you for your time
Thank you for your time
Please Log in or Create an account to join the conversation.
01 Jul 2013 19:20 #36193
by andypugh
For speed control you probably need a PWM output from LinuxCNC
www.linuxcnc.org/docs/html/examples/spindle_fr.html
This circuit can be used to convert the PWM to an analogue voltage for your drive:
tom-itx.dyndns.org:81/~webpage/cnc/ACPL-P480_opto_sch.png
However that optocoupler:
radiospares-fr.rs-online.com/web/p/optoc...searchTerm=ACPL-P480
Is only rated to 20V. I didn't read the manual carefully enough to work out what the analogue control voltage was.
Replied by andypugh on topic Some advices for a noob
Here the driver manual.
Thank you for your time
For speed control you probably need a PWM output from LinuxCNC
www.linuxcnc.org/docs/html/examples/spindle_fr.html
This circuit can be used to convert the PWM to an analogue voltage for your drive:
tom-itx.dyndns.org:81/~webpage/cnc/ACPL-P480_opto_sch.png
However that optocoupler:
radiospares-fr.rs-online.com/web/p/optoc...searchTerm=ACPL-P480
Is only rated to 20V. I didn't read the manual carefully enough to work out what the analogue control voltage was.
Please Log in or Create an account to join the conversation.
01 Jul 2013 19:48 #36194
by kenran
Replied by kenran on topic Some advices for a noob
According to the manual the motor speed can be control by the driver (always the same speed) or by voltage but linearity between voltage and speed (to low voltage = not enough torque = stopped )
Is it really the best way to convert output impulse in voltage ? Is there enough accuracy ? Why not counting the pulse (like a mouse) ?
Is it really the best way to convert output impulse in voltage ? Is there enough accuracy ? Why not counting the pulse (like a mouse) ?
Please Log in or Create an account to join the conversation.
01 Jul 2013 22:43 #36198
by PCW
Replied by PCW on topic Some advices for a noob
Speed control (Linuxcnc --> motor) looks to be analog (0 to 5V)
Good PWM --> ANALOG circuits can easily have better than 0.1% linearity
(much better than the drive probably) so this should not be an issue
The SPD output pulse is open collector, so can interface directly with a parallel port, by using a pullup resistor to 5V but you may want isolation between your PC and the drive so a breakout board may be advisable.
Good PWM --> ANALOG circuits can easily have better than 0.1% linearity
(much better than the drive probably) so this should not be an issue
The SPD output pulse is open collector, so can interface directly with a parallel port, by using a pullup resistor to 5V but you may want isolation between your PC and the drive so a breakout board may be advisable.
The following user(s) said Thank You: kenran
Please Log in or Create an account to join the conversation.
02 Jul 2013 00:38 #36205
by kenran
Replied by kenran on topic Some advices for a noob
Ok for the input i can use an pwm -> analog converter like below ?
wiki.linuxcnc.org/cgi-bin/wiki.pl?action...tal/Analog_Interface
For the SP output which module / configuration may i use ? The motor speed is below 50 tr/min
wiki.linuxcnc.org/cgi-bin/wiki.pl?action...tal/Analog_Interface
For the SP output which module / configuration may i use ? The motor speed is below 50 tr/min
Please Log in or Create an account to join the conversation.
02 Jul 2013 04:11 #36214
by andypugh
The one I posted a link to works better.
Replied by andypugh on topic Some advices for a noob
Ok for the input i can use an pwm -> analog converter like below ?
wiki.linuxcnc.org/cgi-bin/wiki.pl?action...tal/Analog_Interface
The one I posted a link to works better.
Please Log in or Create an account to join the conversation.
02 Jul 2013 04:41 #36219
by PCW
Replied by PCW on topic Some advices for a noob
The pulse can be counted with linuxCNCs encoder component,
Note that since the SP output is just a single pulse (not quadrature),
it cannot be used for accurate position information if the gearmotor reverses
as it may possibly gain/lose counts at reversals
Note that since the SP output is just a single pulse (not quadrature),
it cannot be used for accurate position information if the gearmotor reverses
as it may possibly gain/lose counts at reversals
Please Log in or Create an account to join the conversation.
02 Jul 2013 21:49 #36237
by kenran
Replied by kenran on topic Some advices for a noob
Ok i've done Andy's PWM to analog interface but i don't get how to connect signals.
I want to move axis X using LPT and PWMGEN
Here my files :
# INI
[EMC]
MACHINE = chariot
DEBUG = 0
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/tereo/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = chariot.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 50000
SERVO_PERIOD = 50000
[HAL]
HALFILE = chariot.hal
POSTGUI_HALFILE = custom_postgui.hal
[TRAJ]
AXES = 1
COORDINATES = X
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 30.0
SCALE = 1.8
FERROR = 1.0
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 500.0
HOME_OFFSET = 0.0
and HAL file :
loadrt threads
# load parport driver
loadrt hal_parport cfg="0x378"
# connect parport to threads
# read input first
here i don't have servo_thread or base_thread only thread1
addf parport.0.read thread1 1
# write output last
addf parport.0.write thread1 -1
# connect physical pins to the signals
net Xstep => parport.0.pin-03-out
net Xdir => parport.0.pin-02-out
# create a signal for the estop loopback
#net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
# i have a pwm and a dir
loadrt pwmgen output_type=1
addf pwmgen.update thread1
addf pwmgen.make-pulses thread1
here how i connect pwmgen.0.value ,and pwmgen.0.pwm to parport.0.pin-09.out ?
setp pwmgen.0.pwm-freq 500.0
I want to move axis X using LPT and PWMGEN
Here my files :
# INI
[EMC]
MACHINE = chariot
DEBUG = 0
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/tereo/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = chariot.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 50000
SERVO_PERIOD = 50000
[HAL]
HALFILE = chariot.hal
POSTGUI_HALFILE = custom_postgui.hal
[TRAJ]
AXES = 1
COORDINATES = X
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 30.0
STEPGEN_MAXACCEL = 30.0
SCALE = 1.8
FERROR = 1.0
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 500.0
HOME_OFFSET = 0.0
and HAL file :
loadrt threads
# load parport driver
loadrt hal_parport cfg="0x378"
# connect parport to threads
# read input first
here i don't have servo_thread or base_thread only thread1
addf parport.0.read thread1 1
# write output last
addf parport.0.write thread1 -1
# connect physical pins to the signals
net Xstep => parport.0.pin-03-out
net Xdir => parport.0.pin-02-out
# create a signal for the estop loopback
#net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
# i have a pwm and a dir
loadrt pwmgen output_type=1
addf pwmgen.update thread1
addf pwmgen.make-pulses thread1
here how i connect pwmgen.0.value ,and pwmgen.0.pwm to parport.0.pin-09.out ?
setp pwmgen.0.pwm-freq 500.0
Please Log in or Create an account to join the conversation.
Time to create page: 0.241 seconds