Mesa 7i49 Board configuration

More
03 Mar 2012 14:41 #18319 by hatch789
Hey Guys,

In trying to get my servo motors to turn I have discovered that my pwmgens are enabled as per the watch list, but my values are locked at zero. I have confirmed this also by my volt meter never moving from 0v as I try to move the X&Y axis of my machine.

So a bit of exploration (Page 7 on the 7i49 documentation) and I see that I need /ENA0 and /ENA1 to be be enabled. So I think this is my problem. How do I know if I have these enabled or more simply, how do I enable them? It appears these settings or toggles come from the 7i43 card on the 50pin cable.

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 15:31 #18320 by PCW
If you have no PWM its likely you either have no enables or the PWM value is 0 or close to 0.

To check the enables test for conductivity with an Ohmmeter between say ENA0+ (red lead) and ENA0- (black lead) These should show conductivity when LinuxCNC in ON

The other thing that is needed is a PWM value that is good sized relative to PWM scale so I would halmeter/show these pins/parameters for at least at least one of the axis
to see if you are actually requesting any significant output voltage

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 19:33 #18325 by hatch789
Hi guys... I need help. Yesterday we succeeded in getting my resolvers working but now that they're operating I can't seem to get any movement out of my servos. I'm posting my ini file and my hal file in hopes that someone might see a problem and steer me in the proper direction. CNCBasher has been helping me but we're at the end of our ideas.

# Generated by PNCconf at Fri Mar 2 16:34:03 2012
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

[EMC]
MACHINE = Tree
DEBUG = 0

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/chris/linuxcnc/nc_files
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 1.000000
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 1.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = gedit
GEOMETRY = xyz

[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 = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 2000000

[HOSTMOT2]
# **** This is for info only ****
# DRIVER0=hm2_7i43
# BOARD0=7i43

[HAL]
HALUI = halui
HALFILE = Tree.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]

[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.17
MAX_LINEAR_VELOCITY = 1.67

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

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 300
MAX_ACCELERATION = 2.0
P = 0.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
RESOLVER_SCALE = .2
OUTPUT_SCALE = 10.0
MAX_OUTPUT = 10.0
MIN_LIMIT = -0.001
MAX_LIMIT = 8.0
HOME_OFFSET = 0.000000
#HOME_SEARCH_VEL = -2.050000
#HOME_LATCH_VEL = -0.016667
#HOME_FINAL_VEL = 0.000000
#HOME_USE_INDEX = NO
#HOME_IGNORE_LIMITS = YES

#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 2.0
P = 0.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
RESOLVER_SCALE = .2
OUTPUT_SCALE = 10.0
MAX_OUTPUT = 10.0
MIN_LIMIT = -0.001
MAX_LIMIT = 8.0
HOME_OFFSET = 0.000000
#HOME_SEARCH_VEL = -2.050000
#HOME_LATCH_VEL = -0.016667
#HOME_FINAL_VEL = 0.000000
#HOME_USE_INDEX = NO
#HOME_IGNORE_LIMITS = YES

#********************
# Axis Z
#********************
#[AXIS_2]
#TYPE = LINEAR
#HOME = 0.0
#FERROR = 0.005
#MIN_FERROR = 0.0005
#MAX_VELOCITY = 1.667
#MAX_ACCELERATION = 2.0
#P = 1.0
#I = 0.0
#D = 1.0
#FF0 = 0.0
#FF1 = 0.0
#FF2 = 0.0
#BIAS = 0.0
#DEADBAND = 0.0
#RESOLVER_SCALE = .2
#OUTPUT_SCALE = 4.0
#MAX_OUTPUT = 4.0
#MIN_LIMIT = -0.001
#MAX_LIMIT = 8.0
#HOME_OFFSET = 0.0

#********************
# Spindle
#********************
[SPINDLE_9]
MAX_VELOCITY = 1.667
MAX_ACCELERATION = 2

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 19:33 #18326 by hatch789
# Generated by PNCconf at Sat Feb 25 17:39:43 2012
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hostmot2
loadrt hm2_7i43 config="firmware=hm2/7i43-4/SVRM6.BIT num_encoders=0 num_pwmgens=6 num_3pwmgens=0 num_stepgens=0 num_resolvers=3"

# standard components

#da add pid num_chan
loadrt pid num_chan=3


#setp hm2_7i43.0.pwmgen.pwm_frequency 100000
#setp hm2_7i43.0.pwmgen.pdm_frequency 6000000
setp hm2_7i43.0.pwmgen.pwm_frequency 24000
setp hm2_7i43.0.pwmgen.pdm_frequency 6000
setp hm2_7i43.0.watchdog.timeout_ns 10000000

addf hm2_7i43.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread

#da add pid-calcs
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_7i43.0.write servo-thread
addf hm2_7i43.0.pet_watchdog servo-thread

# external output signals

# external input signals

# --- MIN-HOME-X ---
net min-home-x <= hm2_7i43.0.gpio.036.in_not

# --- MAX-HOME-X ---
net max-home-x <= hm2_7i43.0.gpio.037.in_not

# --- MIN-HOME-Y ---
net min-home-y <= hm2_7i43.0.gpio.038.in_not

# --- MAX-HOME-Y ---
net max-home-y <= hm2_7i43.0.gpio.039.in_not

# --- ESTOP-EXT ---
net estop-ext <= hm2_7i43.0.gpio.047.in_not

#*******************
# AXIS X
#*******************

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_OUTPUT

net x-index-enable <=> pid.0.index-enable
net x-enable => pid.0.enable
net x-output => pid.0.output
net x-pos-cmd => pid.0.command
net x-vel-fb => pid.0.command-deriv
net x-pos-fb => pid.0.feedback

# ---PWM Generator signals/setup---

setp hm2_7i43.0.pwmgen.00.output-type 2
setp hm2_7i43.0.pwmgen.00.scale [AXIS_0]OUTPUT_SCALE

net x-output => hm2_7i43.0.pwmgen.00.value
net x-pos-cmd axis.0.motor-pos-cmd
net x-enable axis.0.amp-enable-out => hm2_7i43.0.pwmgen.00.enable

# ---Resolver feedback signals/setup---

setp hm2_7i43.0.resolver.00.velocity-scale 1 # mptor speed in RPS
setp hm2_7i43.0.resolver.00.scale [AXIS_0]RESOLVER_SCALE

net x-pos-rawcounts <= hm2_7i43.0.resolver.00.rawcounts
net x-pos-fb <= hm2_7i43.0.resolver.00.position

net x-vel-fb <= hm2_7i43.0.resolver.00.velocity
net x-pos-fb => axis.0.motor-pos-fb
net x-index-enable axis.0.index-enable <=> hm2_7i43.0.resolver.00.index-enable

# ---setup home / limit switch signals---

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

#ctm following 3 lines from dave
#net x-home-sw => axis.0.home-sw-in
#net x-neg-limit => axis.0.neg-lim-sw-in
#net x-pos-limit => axis.0.pos-lim-sw-in

#*******************
# AXIS Y
#*******************

setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT

net y-index-enable <=> pid.1.index-enable
net y-enable => pid.1.enable
net y-output => pid.1.output
net y-pos-cmd => pid.1.command
net y-vel-fb => pid.1.command-deriv
net y-pos-fb => pid.1.feedback

# ---PWM Generator signals/setup---

setp hm2_7i43.0.pwmgen.01.output-type 2
setp hm2_7i43.0.pwmgen.01.scale [AXIS_1]OUTPUT_SCALE

net y-output => hm2_7i43.0.pwmgen.01.value
net y-pos-cmd axis.1.motor-pos-cmd
net y-enable axis.1.amp-enable-out => hm2_7i43.0.pwmgen.01.enable

# ---Resolver feedback signals/setup---

setp hm2_7i43.0.resolver.01.velocity-scale 1 # mptor speed in RPS
setp hm2_7i43.0.resolver.01.scale [AXIS_1]RESOLVER_SCALE

net y-pos-rawcounts <= hm2_7i43.0.resolver.01.rawcounts
net y-pos-fb <= hm2_7i43.0.resolver.01.position
net y-vel-fb <= hm2_7i43.0.resolver.01.velocity
net y-pos-fb => axis.1.motor-pos-fb
net y-index-enable axis.1.index-enable <=> hm2_7i43.0.resolver.01.index-enable

# ---setup home / limit switch signals---

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

#ctm following 3 lines from dave
#net y-home-sw => axis.1.home-sw-in
#net y-neg-limit => axis.1.neg-lim-sw-in
#net y-pos-limit => axis.1.pos-lim-sw-in

#*******************
# AXIS Z
#*******************

#setp pid.2.Pgain [AXIS_2]P
#setp pid.2.Igain [AXIS_2]I
#setp pid.2.Dgain [AXIS_2]D
#setp pid.2.bias [AXIS_2]BIAS
#setp pid.2.FF0 [AXIS_2]FF0
#setp pid.2.FF1 [AXIS_2]FF1
#setp pid.2.FF2 [AXIS_2]FF2
#setp pid.2.deadband [AXIS_2]DEADBAND
#setp pid.2.maxoutput [AXIS_2]MAX_OUTPUT

#net z-index-enable <=> pid.2.index-enable
#net z-enable => pid.2.enable
#net z-output => pid.2.output
#net z-pos-cmd => pid.2.command
#net z-vel-fb => pid.2.command-deriv
#net z-pos-fb => pid.2.feedback

## ---PWM Generator signals/setup---

#setp hm2_7i43.0.pwmgen.02.output-type 2
#setp hm2_7i43.0.pwmgen.02.scale [AXIS_2]OUTPUT_SCALE

#net z-output => hm2_7i43.0.pwmgen.02.value
#net z-pos-cmd axis.2.motor-pos-cmd
#net z-enable axis.2.amp-enable-out => hm2_7i43.0.pwmgen.02.enable

## ---Resolver feedback signals/setup---

#setp hm2_7i43.0.resolver.02.velocity-scale 1 # mptor speed in RPS
#setp hm2_7i43.0.resolver.02.scale [AXIS_2]RESOLVER_SCALE

#net z-pos-rawcounts <= hm2_7i43.0.resolver.02.rawcounts
#net z-pos-fb <= hm2_7i43.0.resolver.02.position
#net z-vel-fb <= hm2_7i43.0.resolver.02.velocity
#net z-pos-fb => axis.2.motor-pos-fb
#net z-index-enable axis.2.index-enable <=> hm2_7i43.0.resolver.02.index-enable

# ---setup home / limit switch signals---

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

#*******************
# SPINDLE S
#*******************

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd <= motion.spindle-speed-out
net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
net spindle-at-speed => motion.spindle-at-speed
net spindle-vel-fb => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable

# ---Setup spindle at speed signals---

sets spindle-at-speed true


#******************************
# connect miscellaneous signals
#******************************

# ---HALUI signals---

net joint-select-a halui.joint.0.select
net x-is-homed halui.joint.0.is-homed
net jog-x-pos halui.jog.0.plus
net jog-x-neg halui.jog.0.minus
net jog-x-analog halui.jog.0.analog
net joint-select-b halui.joint.1.select
net y-is-homed halui.joint.1.is-homed
net jog-y-pos halui.jog.1.plus
net jog-y-neg halui.jog.1.minus
net jog-y-analog halui.jog.1.analog
net joint-select-c halui.joint.2.select
net z-is-homed halui.joint.2.is-homed
net jog-z-pos halui.jog.2.plus
net jog-z-neg halui.jog.2.minus
net jog-z-analog halui.jog.2.analog
net jog-selected-pos halui.jog.selected.plus
net jog-selected-neg halui.jog.selected.minus
net spindle-manual-cw halui.spindle.forward
net spindle-manual-ccw halui.spindle.reverse
net spindle-manual-stop halui.spindle.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.jog-speed
net MDI-mode halui.mode.is-mdi

# ---coolant signals---

net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood

# ---probe signal---

net probe-in => motion.probe-input

# ---motion control signals---

net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled

# ---digital in / out signals---

# ---estop signals---

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

# ---manual tool change signals---

loadusr -W hal_manualtoolchange
net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-change-confirmed 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

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 19:39 #18327 by hatch789
also I am getting the following error in my dmesg and can't figure out why? When I run the little tool to see my jitter (delay) it seems to be very stable ...well below 500,000

Yet I am constantly getting these? I have to set my delay up to 2,000,000 just to get it to make that message go away and even then I get it sometimes.


[12136.520818] In recent history there were
[12136.520819] 5985427, 5998905, 5967908, 6486667, and 5512868
[12136.520821] elapsed clocks between calls to the motion controller.
[12136.520826] This time, there were 6692032 which is so anomalously
[12136.520828] large that it probably signifies a problem with your
[12136.520829] realtime configuration. For the rest of this run of
[12136.520831] EMC, this message will be suppressed.

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 19:40 #18328 by PCW
since all your P,I,D terms are 0
it is not possible to have any
PWM value other than 0

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 19:44 - 03 Mar 2012 19:46 #18329 by PCW
"When I run the little tool to see my jitter (delay) it seems to be very stable ...well below 500,000"

500000 nS jitter is fairly terrible. I would look at the suggested jitter/latency fixes in the wiki
Last edit: 03 Mar 2012 19:46 by PCW.

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 20:40 #18330 by hatch789
my jitter is about 32k

Please Log in or Create an account to join the conversation.

More
03 Mar 2012 21:18 #18331 by PCW
If you look at the jitter numbers in the error message, it looks like the bad time (the 6692032 number) is about 11% longer than your nominal period (I think the threshold for reporting errors is >10% of your period)

so at a 1 ms period this is about 110 usec jitter

Have you stressed the PC while running the latency test?
(run glxgears, launch a browser, play flash videos, copy large files etc etc while the latency test is running)

Please Log in or Create an account to join the conversation.

More
04 Mar 2012 04:00 - 04 Mar 2012 04:02 #18332 by hatch789
Yup I have stressed it quite a bit and never get more than about 32k for my jitter number. That's the number in Row2 Column2. (Bottom center number).

I have but I'm going to take a look at the following links tomorrow to see if I can eliminate my RT latency problem. It's a dual core CPU so maybe the suggestion in the 2nd link below to disable my one core would help??

wiki.linuxcnc.org/cgi-bin/wiki.pl?TroubleShooting
wiki.linuxcnc.org/cgi-bin/wiki.pl?RealTime

I have a favor to ask you Peter. The new BIT file you sent me fixed my resolvers. They're working perfectly now. But before the new bit file was installed I would get very sporadic oscillating type movement on my servos if I powered them on while AXIS was Powered on.

So although the movement was not correct (due to the resolvers being all over the place earlier) ...I was getting some voltage through my 7i49 board to at least move my servos. Now however I am getting nothing.

My question / favor is this: could you please look once more at the BIT file and see if perhaps there is a problem with the BIT file which is now preventing my servos from moving? My latency issue (although annoying) should not prevent my servos from moving should they?

By the way I am trying a completely different PC tomorrow, just for the hell of it. This will at least rule out the original PC and its latency issue, whatever that is.
Last edit: 04 Mar 2012 04:02 by hatch789.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.125 seconds
Powered by Kunena Forum