I attached a HAL and INI file that used these drives with steppers.


On 2013/09/22 06:54 AM, Gregg Eshelman wrote:
With my new BOB (HY-JK02-M) I've managed to get a motor to run and run 
smoothly, but only in one direction. (Once I set the parallel port pins to 
match the docs settings for Mach3.) I tried swapping the wires on one phase, 
ran quite rough and still only one direction so I swapped them back. I've 
checked the connection tightness multiple times on everything, all screwed down 
tight.

That's not the weird thing. What is effed up is that when the motor is running 
if I pick it up or move it, it stops running. Doesn't matter if it's laying 
down or standing on its back end, if it's picked straight up or allowed to 
rotate around its shaft axis it locks up and squeals. Tried two of the three, 
both do the same thing.

That is going to be a bit useless on a mill table where the X-axis motor is 
going to be moving back and forth.

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13.
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


--
Regards / Groete

Marius D. Liebenberg
MasterCut cc
Cel: +27 82 698 3251
Tel: +27 12 743 6064
Fax: +27 86 551 8029
Skype: marius_d.liebenberg
# Edited By MDL
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadusr -W /usr/bin/usbio /dev/ttyACM0 2
#loadusr -W /usr/bin/usbio /dev/ttyACM0 2

loadusr -W paramsaver f=10 s=0 b=0 filename=mc200 onstart=0 onexit=0

#loadusr -W paramvoltage
#loadusr -W redisclient

#loadrt trivkins
#loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD 
servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
#loadrt probe_parport
##loadrt hal_parport cfg="0x378 out 0x1020 out "
#loadrt hal_parport cfg="0x2008 out  "

#setp parport.0.reset-time 1000
#loadrt stepgen step_type=0,0,0 ctrl_type=p,p,p
#addf parport.0.read base-thread


#addf stepgen.make-pulses base-thread
#addf parport.0.write base-thread
#addf parport.0.reset base-thread

#addf stepgen.capture-position servo-thread
#addf motion-command-handler servo-thread
#addf motion-controller servo-thread
#addf stepgen.update-freq servo-thread

#loadrt pwmgen output_type=1
#addf pwmgen.make-pulses base-thread
#addf pwmgen.update servo-thread

loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD 
servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x2008 out  "
setp parport.0.reset-time 1000
loadrt stepgen step_type=0,0,0
loadrt abs count=1

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf abs.0 servo-thread


# -- Load the THC Controller
loadrt thcud
addf thcud servo-thread

loadrt timedelay count=2
addf timedelay.0 servo-thread
addf timedelay.1 servo-thread
setp timedelay.1.off-delay 0 

loadrt scale count=1
addf scale.0 servo-thread

# -- Load the THC hardware interface
loadrt thc200
#addf thc200 servo-thread
addf thc200 servo-thread


loadrt and2 count=4
loadrt or2 count=1
loadrt toggle count=1
loadrt toggle2nist count=2

addf and2.0 servo-thread
addf and2.1 servo-thread
addf and2.2 servo-thread
addf and2.3 servo-thread
addf or2.0 servo-thread
addf toggle.0 servo-thread
addf toggle2nist.0 servo-thread

loadrt not
addf not.0 servo-thread

loadrt edge count=2
addf edge.0 servo-thread
addf edge.1 servo-thread
setp edge.0.in-edge 0  #rising edge
setp edge.0.out-width-ns 2000000000
setp edge.1.in-edge 1 #falling edge
setp edge.1.out-width-ns 2000000000



#************************ move this to the right places
#net home-x <= parport.0.pin-11-in
#net home-y <= parport.0.pin-12-in
#net home-z <= parport.0.pin-13-in
#net probe-in <= parport.0.pin-14-in

net both-home-x <= parport.0.pin-13-in-not
net both-home-y <= parport.0.pin-11-in
net both-home-z <= parport.0.pin-12-in-not


#*************************************************************************
#                            MC2000 AXIS PINOUT                          *
#*************************************************************************

#**************************** X AXIS *************************************
#net xenable => parport.0.pin-01-out
setp parport.0.pin-01-out-invert 1

setp parport.0.pin-06-out-reset 1
setp parport.0.pin-08-out-reset 1
net xstep => parport.0.pin-06-out  => parport.0.pin-08-out
setp parport.0.pin-06-out-invert 1
setp parport.0.pin-08-out-invert 1

net xdir => parport.0.pin-07-out => parport.0.pin-09-out
#setp parport.0.pin-07-out-invert 1 
setp parport.0.pin-09-out-invert 1
#setp parport.0.pin-07-out-reset 1
#setp parport.0.pin-09-out-reset 1


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 210
setp stepgen.0.dirsetup 210
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable

net both-home-x => axis.0.home-sw-in
net both-home-x => axis.0.neg-lim-sw-in
net both-home-x => axis.0.pos-lim-sw-in


#**************************** Y AXIS *************************************
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-04-out-invert 1
setp parport.0.pin-05-out-invert 1
net ydir => parport.0.pin-05-out 

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 20
setp stepgen.1.dirsetup 20
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL

net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb

net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

net both-home-y => axis.1.home-sw-in
net both-home-y => axis.1.neg-lim-sw-in
net both-home-y => axis.1.pos-lim-sw-in

#**************************** Z AXIS *************************************
net zstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
setp parport.0.pin-03-out-invert 1
net zdir => parport.0.pin-03-out

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 20
setp stepgen.2.dirsetup 20
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL

#net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
#net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb


net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

#net estop-out <= iocontrol.0.user-enable-out
#net estop-out => iocontrol.0.emc-enable-in

net both-home-z => axis.2.home-sw-in
net both-home-z => axis.2.neg-lim-sw-in
net both-home-z => axis.2.pos-lim-sw-in


#************************* MANUAL TOOLCHANGE ***************************

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed  <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

# Generated by stepconf at Sun Aug 21 15:16:36 2011
# If you make changes to this file, they will be
# overwritten when you run stepconf again

[EMC]
MACHINE = MC200
DEBUG = 0x7fffffffff

[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 1
#PROGRAM_PREFIX = /home/YOUR_HOME_DIR/emc2/nc_files <----------------------
PROGRAM_PREFIX = /home/plasma/linuxcnc/nc_files
#PROGRAM_PREFIX = /media
INCREMENTS = 100mm 50mm 20mm 10mm 5mm 1mm .5mm
PYVCP = plasma.xml

[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 = emc.var
SUBROUTINE_PATH = subroutines
USER_M_PATH= mcodes

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 35000
SERVO_PERIOD = 1000000

[HAL]
HALUI = halui
HALFILE = mc200.hal
HALFILE = thcio.hal
HALFILE = estop.hal
#POSTGUI_HALFILE = usbio.hal
POSTGUI_HALFILE= postgui.hal
#POSTGUI_HALFILE = custom_postgui.hal

[HALUI]
# add halui MDI commands here (max 64) 
MDI_COMMAND = G0 X0 Y0 Z0

[TRAJ]
AXES = 3
COORDINATES = -X -Y -Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 50
MAX_LINEAR_VELOCITY = 100
NO_FORCE_HOMING = 1
HOME_SEARCH_VEL = 15
HOME_LATCH_VEL = 5


[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[THC]
SWITCH_OFFSET = 17
SPEED = 0.0015
VOLT_SETTING = 133


[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 18000.0
MAX_ACCELERATION = 2000
STEPGEN_MAXACCEL = 2200
SCALE = -155
FERROR = 1000
MIN_FERROR = 250
MIN_LIMIT = -20
MAX_LIMIT = 2500
HOME_OFFSET = -30.0
HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = -5
HOME_FINAL_VEL = 30
HOME_SEQUENCE = 2
HOME_IGNORE_LIMITS = YES

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 18000.0
MAX_ACCELERATION = 1800.0
STEPGEN_MAXACCEL = 1800.0
SCALE = -150
FERROR = 1000
MIN_FERROR = 250
MIN_LIMIT = -20
MAX_LIMIT = 1800
HOME_OFFSET = -30.0
HOME_SEARCH_VEL = -25
HOME_LATCH_VEL = -5
HOME_FINAL_VEL = 30
HOME_SEQUENCE = 1
HOME_IGNORE_LIMITS = YES

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 20
MAX_ACCELERATION = 200
STEPGEN_MAXACCEL = 250
SCALE = -250
FERROR = 1000
MIN_FERROR = 2500
MIN_LIMIT = -1450.0
MAX_LIMIT = 250
HOME_OFFSET = 10
HOME_SEARCH_VEL = 10
HOME_LATCH_VEL = -3
HOME_FINAL_VEL = 100
HOME_SEQUENCE = 0
HOME_IGNORE_LIMITS = YES











---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 130922-0, 2013/09/22
Tested on: 2013/09/22 02:23:33 PM
avast! - copyright (c) 1988-2013 AVAST Software.
http://www.avast.com



------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to