a very odd problem.....
11 Mar 2015 06:11 - 11 Mar 2015 06:11 #56649
by Roguish
a very odd problem..... was created by Roguish
I have a Mesanet 5i20 based system using a small SBC. DC brush motors driven with 3
LMD18200
Using the 2.8-pre vesion with latest updates. In cleaning up the wiring rat's nest, the system has quit!
So, lots of frustration. I think I have a grounding problem but I am not sure (mechanical here, not electrical).
I set up a small single axis (single motor) system on my desk with an a different SBC. Works fine. Disconnect the sytem from the SBC keeping the motor, power supply, breakout board, and LMD18200 drive in one piece. Take it to the shop, attach it to the mill SBC and it does not work!!!!
I have isolated the entire shop system to one SC circuit. no joy yet.
I am using the same configuration files, stripped down to be single axis. no joy.
I am at a loss. Any ideas would be greatly appreciate. I need the mill to run 'cause there is a paying project waiting.
Help please.
Using the 2.8-pre vesion with latest updates. In cleaning up the wiring rat's nest, the system has quit!
So, lots of frustration. I think I have a grounding problem but I am not sure (mechanical here, not electrical).
I set up a small single axis (single motor) system on my desk with an a different SBC. Works fine. Disconnect the sytem from the SBC keeping the motor, power supply, breakout board, and LMD18200 drive in one piece. Take it to the shop, attach it to the mill SBC and it does not work!!!!
I have isolated the entire shop system to one SC circuit. no joy yet.
I am using the same configuration files, stripped down to be single axis. no joy.
I am at a loss. Any ideas would be greatly appreciate. I need the mill to run 'cause there is a paying project waiting.
Help please.
Last edit: 11 Mar 2015 06:11 by Roguish.
Please Log in or Create an account to join the conversation.
11 Mar 2015 06:28 #56650
by PCW
Replied by PCW on topic a very odd problem.....
What does not work?
linuxcnc wont start?
if that the case, posting the end of the kernel log might help:
sudo dmesg -c
linuxcnc
(exit linuxcnc)
dmesg
linuxcnc wont start?
if that the case, posting the end of the kernel log might help:
sudo dmesg -c
linuxcnc
(exit linuxcnc)
dmesg
Please Log in or Create an account to join the conversation.
11 Mar 2015 06:39 - 11 Mar 2015 06:54 #56651
by Roguish
Replied by Roguish on topic a very odd problem.....
Peter. no Lcnc is fine (as far as I can tell).
the motor does not run.
I have been checking the pins. the 18200 takes a pwm, dir, and 'brake' signal.
pwm and dir are fine (I think) i have put the pwm on my scope and it looks ok.
dir goes up and down as it should for the cw or ccw motion.
I have the brake on the NOT ENABLE pin. it goes up and down also. up to 3.3 down to .01 v measured relative to the 5i20 5v source ground. (i hope that is how it is described)
*********** .ini file
#*******************************************************************************
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i20
CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=1 num_pwmgens=1 num_stepgens=0"
[EMC]
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo_5i20_xavien
# Name of NML file to use, default is emc.nml DO NOT SO THIS
#NML_FILE = emc.nml
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# define EMC_DEBUG_INVALID 0x00000001
# define EMC_DEBUG_CONFIG 0x00000002
# define EMC_DEBUG_DEFAULTS 0x00000004
# define EMC_DEBUG_VERSIONS 0x00000008
# define EMC_DEBUG_TASK_ISSUE 0x00000010
# define EMC_DEBUG_IO_POINTS 0x00000020
# define EMC_DEBUG_NML 0x00000040
# define EMC_DEBUG_MOTION_TIME 0x00000080
# define EMC_DEBUG_INTERP 0x00000100
# define EMC_DEBUG_RCS 0x00000200
# define EMC_DEBUG_TRAJ 0x00000400
# define EMC_DEBUG_INTERP_LIST 0x00000800
# define EMC_DEBUG_ALL 0x7FFFFFFF
#DEBUG = 0
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0X7FFFFFFF
# Start up codes
RS274NGC_STARTUP_CODE = G21 G90
#*******************************************************************************
[DISPLAY]
# Name of display program, e.g., tkemc, axis
DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.0500
# Path to help file
HELP_FILE = tkemc.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.5
INCREMENTS = 1.000 0.5000 0.0200 0.1000 0.0100 0.0010
#INCREMENTS = 1 0.1 0.01 0.001
# Prefix to be used
PROGRAM_PREFIX = /home/noel/emc2/nc_files
#PROGRAM_PREFIX = ../../nc_files/
#OPEN_FILE = /home/noel/emc2/nc_files/X1Y1-SQR.ncg
OPEN_FILE = /home/noel/emc2/nc_files/chainring.ngc
# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 1
#add extra screen objects
#PYVCP = on-led.xml
# code editor
EDITOR = gedit
GEOMETRY = XYZ #ABCUVW
ARCDIVISION = 64
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py, .g Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
#*******************************************************************************
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
#*******************************************************************************
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2_servo_x.var
RS274NGC_STARTUP_CODE = G20 G90 M9 G49 G40
#*******************************************************************************
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
#*******************************************************************************
[APPLICATIONS]
#APP = halscope
APP = halshow my.halshow
DELAY = 1
#*******************************************************************************
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = hm2_servo_x1.hal
HALFILE = hm2_io_x1.hal
HALUI = halui
#POSTGUI_HALFILE = on-led.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
HALCMD = loadrt scope_rt num_samples=40000
#*******************************************************************************
[TRAJ]
POSITION_FILE = last_position.txt
AXES = 1
# COORDINATES = X Y Z A B C U V W
COORDINATES = X
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.5
# 1.0 == 60 ipm : 1.66666 == 100 ipm : 0.5 == 30 ipm
MAX_VELOCITY = 1.66666
# accel > 386. = 1g : 77.2 == .2g
DEFAULT_ACCELERATION = 38.6
MAX_ACCELERATION = 144.
NO_FORCE_HOMING = 1
#*******************************************************************************
[AXIS_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.2000
MAX_ACCELERATION = 80.000
BACKLASH = 0.000
INPUT_SCALE = 2000.000
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.000
MIN_LIMIT = -100.000
MAX_LIMIT = 100.000
FERROR = 1.000
MIN_FERROR = 0.200
HOME_OFFSET = 0.000
HOME_SEARCH_VEL = 0.000
HOME_LATCH_VEL = 0.000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
#HOME_SEQUENCE = 0
MAX_OUTPUT = 5.000
# PID tuning params
DEADBAND = 0.00015
P = 20.000
I = 1.000
D = 0.1000
FF0 = 0.000
FF1 = 0.000
FF2 = 0.000
BIAS = 0.000
#*******************************************************************************
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
TOOL_CHANGE_POSITION = 0 0 0
#*******************************************************************************
#*******************************************************************************
************************
* io file
*************************
##############################################################################
# HAL config file for Mesa Electronics 5i20 PCI board
##############################################################################
addf hm2_5i20.0.read_gpio servo-thread 1
addf hm2_5i20.0.write_gpio servo-thread -1
###########################################################
# HOMES and LIMITS
##########################################################
# ios are 00 - 23 for cable #1 <- encoders, pwms, dirs, enables
# 24 - 35 for cable #2 <- external switches
# 48 - 59 for cable #3 and 7i37 opto board > limits, homes, outputs
# Connect limit/home switch outputs to motion controller.
net Xminlim <= hm2_5i20.0.gpio.049.in_not => axis.0.neg-lim-sw-in
net Xmaxlim <= hm2_5i20.0.gpio.048.in_not => axis.0.pos-lim-sw-in
net Xhome <= hm2_5i20.0.gpio.050.in => axis.0.home-sw-in
#net Xfault <= hm2_5i20.0.gpio.051.in_not => axis.0.amp-fault-in
#net Xminlim <= hm2_5i20.0.gpio.064.in_not => axis.0.neg-lim-sw-in
#net Xmaxlim <= hm2_5i20.0.gpio.065.in_not => axis.0.pos-lim-sw-in
#net Xhome <= hm2_5i20.0.gpio.066.in_not => axis.0.home-sw-in
#net Xfault <= hm2_5i20.0.gpio.067.in_not => axis.0.amp-fault-in
############################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# create a signal for the estop loopback -- remove for external
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
#
############################################################
*****************************
**** servo file
*****************************
# ###################################
# Core EMC/HAL Loads
# ###################################
# kinematics
loadrt trivkins
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
# PID module, for three PID loops
loadrt pid num_chan=3
# hostmot2 driver
# if you have any firmware trouble, enable the debug flags here and see what's going on in the syslog
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
#loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency 50000
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 10000000
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
#addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
net emcmot.00.enable <= axis.0.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [AXIS_0]INPUT_SCALE
net motor.00.pos-fb => hm2_[HOSTMOT2](BOARD).0.encoder.00.position => pid.0.feedback
net motor.00.pos-fb => axis.0.motor-pos-fb #push copy back to Axis GUI
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_VELOCITY
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale [AXIS_0]OUTPUT_SCALE
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net motor.00.command pid.0.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
################################################################################
the motor does not run.
I have been checking the pins. the 18200 takes a pwm, dir, and 'brake' signal.
pwm and dir are fine (I think) i have put the pwm on my scope and it looks ok.
dir goes up and down as it should for the cw or ccw motion.
I have the brake on the NOT ENABLE pin. it goes up and down also. up to 3.3 down to .01 v measured relative to the 5i20 5v source ground. (i hope that is how it is described)
*********** .ini file
#*******************************************************************************
[HOSTMOT2]
DRIVER=hm2_pci
BOARD=5i20
CONFIG="firmware=hm2/5i20/SVST8_4.BIT num_encoders=1 num_pwmgens=1 num_stepgens=0"
[EMC]
# Name of machine, for use with display, etc.
MACHINE = HM2-Servo_5i20_xavien
# Name of NML file to use, default is emc.nml DO NOT SO THIS
#NML_FILE = emc.nml
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
# define EMC_DEBUG_INVALID 0x00000001
# define EMC_DEBUG_CONFIG 0x00000002
# define EMC_DEBUG_DEFAULTS 0x00000004
# define EMC_DEBUG_VERSIONS 0x00000008
# define EMC_DEBUG_TASK_ISSUE 0x00000010
# define EMC_DEBUG_IO_POINTS 0x00000020
# define EMC_DEBUG_NML 0x00000040
# define EMC_DEBUG_MOTION_TIME 0x00000080
# define EMC_DEBUG_INTERP 0x00000100
# define EMC_DEBUG_RCS 0x00000200
# define EMC_DEBUG_TRAJ 0x00000400
# define EMC_DEBUG_INTERP_LIST 0x00000800
# define EMC_DEBUG_ALL 0x7FFFFFFF
#DEBUG = 0
#DEBUG = 0x00000003
#DEBUG = 0x00000007
DEBUG = 0X7FFFFFFF
# Start up codes
RS274NGC_STARTUP_CODE = G21 G90
#*******************************************************************************
[DISPLAY]
# Name of display program, e.g., tkemc, axis
DISPLAY = axis
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.0500
# Path to help file
HELP_FILE = tkemc.txt
# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE
# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL
# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.5
INCREMENTS = 1.000 0.5000 0.0200 0.1000 0.0100 0.0010
#INCREMENTS = 1 0.1 0.01 0.001
# Prefix to be used
PROGRAM_PREFIX = /home/noel/emc2/nc_files
#PROGRAM_PREFIX = ../../nc_files/
#OPEN_FILE = /home/noel/emc2/nc_files/X1Y1-SQR.ncg
OPEN_FILE = /home/noel/emc2/nc_files/chainring.ngc
# Introductory graphic
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 1
#add extra screen objects
#PYVCP = on-led.xml
# code editor
EDITOR = gedit
GEOMETRY = XYZ #ABCUVW
ARCDIVISION = 64
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py, .g Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
#*******************************************************************************
[TASK]
# Name of task controller program, e.g., milltask
TASK = milltask
# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010
#*******************************************************************************
[RS274NGC]
# File containing interpreter variables
PARAMETER_FILE = hm2_servo_x.var
RS274NGC_STARTUP_CODE = G20 G90 M9 G49 G40
#*******************************************************************************
[EMCMOT]
EMCMOT = motmod
# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0
# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010
# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000
#*******************************************************************************
[APPLICATIONS]
#APP = halscope
APP = halshow my.halshow
DELAY = 1
#*******************************************************************************
[HAL]
# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = hm2_servo_x1.hal
HALFILE = hm2_io_x1.hal
HALUI = halui
#POSTGUI_HALFILE = on-led.hal
# list of halcmd commands to execute
# commands are executed in the order in which they appear
#HALCMD = save neta
HALCMD = loadrt scope_rt num_samples=40000
#*******************************************************************************
[TRAJ]
POSITION_FILE = last_position.txt
AXES = 1
# COORDINATES = X Y Z A B C U V W
COORDINATES = X
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.5
# 1.0 == 60 ipm : 1.66666 == 100 ipm : 0.5 == 30 ipm
MAX_VELOCITY = 1.66666
# accel > 386. = 1g : 77.2 == .2g
DEFAULT_ACCELERATION = 38.6
MAX_ACCELERATION = 144.
NO_FORCE_HOMING = 1
#*******************************************************************************
[AXIS_0]
TYPE = LINEAR
HOME = 0.000
MAX_VELOCITY = 1.2000
MAX_ACCELERATION = 80.000
BACKLASH = 0.000
INPUT_SCALE = 2000.000
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.000
MIN_LIMIT = -100.000
MAX_LIMIT = 100.000
FERROR = 1.000
MIN_FERROR = 0.200
HOME_OFFSET = 0.000
HOME_SEARCH_VEL = 0.000
HOME_LATCH_VEL = 0.000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
#HOME_SEQUENCE = 0
MAX_OUTPUT = 5.000
# PID tuning params
DEADBAND = 0.00015
P = 20.000
I = 1.000
D = 0.1000
FF0 = 0.000
FF1 = 0.000
FF2 = 0.000
BIAS = 0.000
#*******************************************************************************
[EMCIO]
# Name of IO controller program, e.g., io
EMCIO = io
# cycle time, in seconds
CYCLE_TIME = 0.100
# tool table file
TOOL_TABLE = tool.tbl
TOOL_CHANGE_POSITION = 0 0 0
#*******************************************************************************
#*******************************************************************************
************************
* io file
*************************
##############################################################################
# HAL config file for Mesa Electronics 5i20 PCI board
##############################################################################
addf hm2_5i20.0.read_gpio servo-thread 1
addf hm2_5i20.0.write_gpio servo-thread -1
###########################################################
# HOMES and LIMITS
##########################################################
# ios are 00 - 23 for cable #1 <- encoders, pwms, dirs, enables
# 24 - 35 for cable #2 <- external switches
# 48 - 59 for cable #3 and 7i37 opto board > limits, homes, outputs
# Connect limit/home switch outputs to motion controller.
net Xminlim <= hm2_5i20.0.gpio.049.in_not => axis.0.neg-lim-sw-in
net Xmaxlim <= hm2_5i20.0.gpio.048.in_not => axis.0.pos-lim-sw-in
net Xhome <= hm2_5i20.0.gpio.050.in => axis.0.home-sw-in
#net Xfault <= hm2_5i20.0.gpio.051.in_not => axis.0.amp-fault-in
#net Xminlim <= hm2_5i20.0.gpio.064.in_not => axis.0.neg-lim-sw-in
#net Xmaxlim <= hm2_5i20.0.gpio.065.in_not => axis.0.pos-lim-sw-in
#net Xhome <= hm2_5i20.0.gpio.066.in_not => axis.0.home-sw-in
#net Xfault <= hm2_5i20.0.gpio.067.in_not => axis.0.amp-fault-in
############################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# create a signal for the estop loopback -- remove for external
net estop-loop iocontrol.0.user-enable-out iocontrol.0.emc-enable-in
#
############################################################
*****************************
**** servo file
*****************************
# ###################################
# Core EMC/HAL Loads
# ###################################
# kinematics
loadrt trivkins
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
# PID module, for three PID loops
loadrt pid num_chan=3
# hostmot2 driver
# if you have any firmware trouble, enable the debug flags here and see what's going on in the syslog
loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
#loadrt hostmot2
# load low-level driver
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.pwm_frequency 50000
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 10000000
# ################################################
# THREADS
# ################################################
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
#addf hm2_[HOSTMOT2](BOARD).0.pet_watchdog servo-thread
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
net emcmot.00.enable <= axis.0.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [AXIS_0]INPUT_SCALE
net motor.00.pos-fb => hm2_[HOSTMOT2](BOARD).0.encoder.00.position => pid.0.feedback
net motor.00.pos-fb => axis.0.motor-pos-fb #push copy back to Axis GUI
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_VELOCITY
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale [AXIS_0]OUTPUT_SCALE
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net motor.00.command pid.0.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
################################################################################
Last edit: 11 Mar 2015 06:54 by Roguish. Reason: added hal files
Please Log in or Create an account to join the conversation.
11 Mar 2015 07:04 #56654
by PCW
Replied by PCW on topic a very odd problem.....
If the signals look OK but you get no motor drive, I would suspect electrical issues
is it possible that the LMD1800 chips or interface will not work reliably with 3.3V signals?
is it possible that the LMD1800 chips or interface will not work reliably with 3.3V signals?
Please Log in or Create an account to join the conversation.
11 Mar 2015 07:21 #56656
by Roguish
Replied by Roguish on topic a very odd problem.....
PCW.
I have been using them for quite some time without issues. I don't get why my 'test setup' works on the desk but not in the shop.
Here's the spec on the 18200. look to page 3 for the ratings.
Each SBC has it's own 5i20, but all the jumpers are set the same.
I drive the HEDS encoder with the on-ribbon-cable power. On the desk the motor runs using either a lab PS or a small din rail mount PS. The PS and SBC are on the same AC circuits.
Should the SBC and PS and 18200 be grounded together? How?
Did you mention about an 'inverter' to prevent start up run-away?
I have been using them for quite some time without issues. I don't get why my 'test setup' works on the desk but not in the shop.
Here's the spec on the 18200. look to page 3 for the ratings.
Each SBC has it's own 5i20, but all the jumpers are set the same.
I drive the HEDS encoder with the on-ribbon-cable power. On the desk the motor runs using either a lab PS or a small din rail mount PS. The PS and SBC are on the same AC circuits.
Should the SBC and PS and 18200 be grounded together? How?
Did you mention about an 'inverter' to prevent start up run-away?
Please Log in or Create an account to join the conversation.
11 Mar 2015 08:08 - 11 Mar 2015 08:08 #56658
by PCW
Replied by PCW on topic a very odd problem.....
The LMD18200 ground is common to the logic signals and motor power
Runaway is possible at startup because the 5I20 outputs are all high (so enable and PWM are both one at startup)
runaway may be prevented by the fact that the top side drivers need a active PWM signal to charge the boostrap circuit
One (probably unrelated) thing that needs to be done with Hbridges that have bootstrap circuits is to
bound the maximum PID output so it never fully saturates (sticking high or low)
like
setp pid.0.maxoutput 0.95
Runaway is possible at startup because the 5I20 outputs are all high (so enable and PWM are both one at startup)
runaway may be prevented by the fact that the top side drivers need a active PWM signal to charge the boostrap circuit
One (probably unrelated) thing that needs to be done with Hbridges that have bootstrap circuits is to
bound the maximum PID output so it never fully saturates (sticking high or low)
like
setp pid.0.maxoutput 0.95
Last edit: 11 Mar 2015 08:08 by PCW.
The following user(s) said Thank You: Roguish
Please Log in or Create an account to join the conversation.
11 Mar 2015 08:36 - 11 Mar 2015 08:55 #56659
by Roguish
Replied by Roguish on topic a very odd problem.....
Ok, I got that. Thanks for the setp parameter. I am running these at 24v and am current limited by my power supplies, though I have just purchased a new PS just for this. How can I make sure the PS (motor power) ground is common to the logic signal coming from the 5i20?
and how can I start up with Low signals?
for the startup, how about setting DIR to the X state? looking at the Logic Truth Table (page 6 of the pdf) if DIR is X (high impedance? right?)
Use the .is_output and/or .is_opendrain ???
start up with PWM low, DIR X and brake HIGH???
PWM Dir Brake Active Output Drivers
H H L Source 1, Sink 2
H L L Sink 1, Source 2
L X L Source 1, Source 2
H H H Source 1, Source 2
H L H Sink 1, Sink 2
L X H NONE
and how can I start up with Low signals?
for the startup, how about setting DIR to the X state? looking at the Logic Truth Table (page 6 of the pdf) if DIR is X (high impedance? right?)
Use the .is_output and/or .is_opendrain ???
start up with PWM low, DIR X and brake HIGH???
PWM Dir Brake Active Output Drivers
H H L Source 1, Sink 2
H L L Sink 1, Source 2
L X L Source 1, Source 2
H H H Source 1, Source 2
H L H Sink 1, Sink 2
L X H NONE
Last edit: 11 Mar 2015 08:55 by Roguish.
Please Log in or Create an account to join the conversation.
11 Mar 2015 23:58 #56705
by PCW
Replied by PCW on topic a very odd problem.....
Theres no way to start up with low signal on a 5I20 except to use an external inverter circuit
(Our old 7I25 bridge card that uses LMD18200s has logic on board that does this)
(Our old 7I25 bridge card that uses LMD18200s has logic on board that does this)
The following user(s) said Thank You: Roguish
Please Log in or Create an account to join the conversation.
12 Mar 2015 03:45 #56711
by Roguish
Replied by Roguish on topic a very odd problem.....
PCW.
THANK YOU VERY MUCH FOR THE HELP.
Noel.
THANK YOU VERY MUCH FOR THE HELP.
Noel.
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds