installed emc2, lathe application, X axis rough

More
08 Apr 2011 12:03 #8701 by mkdutchman
Hi all,

I installed emc2 on a Pentium 4 desktop, lathe is setup with 2 step/dir controllers for X and Z (Geckodrives) with a mesa 5i20 and daughter board, I used pncconf to set it up as stepconf didn't seem to support the hardware stepgen

trying to run it triggers the x axis to slowly turn, very rough and jerkily and the Z not at all. Once it starts I can't stop it until the PC is restarted.

I think I need to hand edit the hal file, but oh dear me, where to start? I am very familiar with linux but have never used emc2 before. (But look forward to doing so)

I read through the integrators manual, the hal user manual, and the emc2 user manual, I think the fog is slowly starting to clear now. :cheer: But a couple of questions.

1. => Is the hardware mesa stepgen treated just like the software stepgen in the hal file? Same pin out and pin in?

2. => Is there a list somewhere of all available hal components complete with pin outs and pin ins and attributes? Searching and googling turns up only inconclusive results. I want to add some more stuff to this thing in the future and figure I might as well learn the nuts and bolts now.

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

More
08 Apr 2011 13:01 #8704 by andypugh
mkdutchman wrote:

trying to run it triggers the x axis to slowly turn, very rough and jerkily and the Z not at all. Once it starts I can't stop it until the PC is restarted.

That's odd. Are you sure that you have the correct firmware loaded, and the daughter board connected on the correct header?
(I don't know about the 5i20, but on the 5i23 the headers are numbered 2,3,and4 not 1,2,3. )

Which firmware is being loaded, and which daughter board are you using.

I think I need to hand edit the hal file, but oh dear me, where to start? I am very familiar with linux but have never used emc2 before. (But look forward to doing so)

You should still be within the bounds of what pncconf is meant for, I would check that first.

1. => Is the hardware mesa stepgen treated just like the software stepgen in the hal file? Same pin out and pin in?

Yes, they are designed to look the same. (but with different names)

2. => Is there a list somewhere of all available hal components complete with pin outs and pin ins and attributes?

Have a look about half way down this page:
www.linuxcnc.org/docview/html/ "Realtime Components and Kernel Modules"
You will find
www.linuxcnc.org/docview/html/man/man9/hostmot2.9.html
Especially interesting. Skim past the Synopsis and straight to "config modparam" for the individual function modules.

Also worth reading
linuxcnc.org/docs/html/hal_basic_hal.html

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

More
08 Apr 2011 20:59 #8715 by mkdutchman
Woohoo

Those links are precisely what I was looking for.......

I'll let you know how it turns out

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

More
08 Apr 2011 22:33 - 08 Apr 2011 22:34 #8718 by PCW
Which daughter card? If you use the FPGA pins directly or use a 7I42/7I42TA and a step drive that has+5V referred inputs (like Gecko) you need to set the outputs that drive the step and direction signals to open drain mode, otherwise you will have the step/dir inputs partially driven when the are supposed to be off. This may well cause the drives to creep about noisily...
Last edit: 08 Apr 2011 22:34 by PCW. Reason: fix

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

More
09 Apr 2011 01:54 #8719 by cmorley
does it creep before EMC is started, or just after estop is released and the machine is turned on or when trying to jog?
What version of EMC are you using?
I have some parker drives that go crazy if power is applied before EMC is loaded but then are fine.
I of course should add a relay so they never power up till EMC is ready.....

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

More
09 Apr 2011 21:24 #8725 by mkdutchman
I'm using a 7i42TA with a gecko 201 and 210, and it creeps around whenever EMC2 isn't running or when the AXIS interface isn't running. How do I set the pins to open ground, pncconf doesn't let me do that with the step/dir outputs?

I still haven't gotten the Z axis to move at all, I must recheck the hardware, I guess

The X axis motor turns in one direction and one direction only.......not sure what's going on there

FWIW I'm using the SVST8_4 firmware in the Mesa 5i20, is there another one I should be using?

Thanks for your time and effort, you guys are a big help

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

More
09 Apr 2011 22:31 #8727 by BigJohnT
The SVST8_4 is the same one I use on my plasma.

How to set the pins.

www.linuxcnc.org/docview/html/drivers_hostmot2.html#r1_13

You might have to put that in your custom.hal file

John

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

More
10 Apr 2011 06:21 - 10 Apr 2011 06:22 #8729 by cmorley
Yes pncconf currently does not help you set the step gens to open drain, but you can do it in a custom hal file.
the line to add looks like this:

setp hm2_5i20.0.gpio.048.is_opendrain true
setp hm2_5i20.0.gpio.049.is_opendrain true

this sets both the step and direction pin to open drain for one stepgen.
of course the number 048 (and 049) must correspond to the gpio that represents the step gen.

the formula is : number = pinnum+(connector count*24)
pinnumber is 0-23 (note that pncconf's pin numbers on the mesa page is the connectors's electrical pinout - not what you need)
connector count for the 5i20 is 0,1,2 corresponding to connectors 2,3,4 respectably

so for the svst8_4:
step gen 0 on connector 4 ( which corresponds to 2 see above)
step is pin 0
0 + (2 X 24) = 48

direction is pin 1
1 + (2 X 24) = 49

since that is a little hard to follow another way is to use pncconf to select a gpio signal on a pin close to a stepgen
then you can look at that gpio number and add or subtract the number of positions away from the stepgen.

for the SVST8_4 here are the numbers:
stepgen 0 gpio number 048 and 049
stepgen 1 gpio number 054 and 055
stepgen 2 gpio number 060 and 061
stepgen 3 gpio number 066 and 067

hope that helps but If you are talking about movement that happens before EMC is started then I doubt it.
What you need in that case is either a relay to disconnect power to the drivers or if the drivers have an enable connect the signal amplifier enable to them.
This way there is no movement until EMC is ready to control it.
Last edit: 10 Apr 2011 06:22 by cmorley.

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

More
12 Apr 2011 12:17 #8800 by mkdutchman
thanks for the replies, I'll set the pins to open drain. There is no movement until EMC is started, so the open drain setting might help.

Now, next problem

I'm not seeing the signals output on the geckodrives, I'm not sure why. Taking an oscilloscope and checking shows no pulses output when jogging. I doublechecked the pinout on the drive, that seems to be in order. The strange part is that when inverting the motor signal in the pncconf test/tune window it slowly drives the axis, but only one way.

FWIW, I have my pncconf generated hal file below (without the custom additions)
# Generated by PNCconf at Tue Apr 12 07:54:44 2011
# 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_pci config="firmware=hm2/5i20/SVST8_4.BIT num_encoders=0 num_pwmgens=0 num_stepgens=2" 
setp     hm2_5i20.0.watchdog.timeout_ns 10000000
loadrt near

addf hm2_5i20.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf near.0                   servo-thread
addf hm2_5i20.0.write         servo-thread
addf hm2_5i20.0.pet_watchdog  servo-thread

# external output signals



# external input signals


# --- ALL-HOME ---
net all-home     <=  hm2_5i20.0.gpio.050.in

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

# Step Gen signals/setup

setp   hm2_5i20.0.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp   hm2_5i20.0.stepgen.00.dirhold         [AXIS_0]DIRHOLD
setp   hm2_5i20.0.stepgen.00.steplen         [AXIS_0]STEPLEN
setp   hm2_5i20.0.stepgen.00.stepspace       [AXIS_0]STEPSPACE
setp   hm2_5i20.0.stepgen.00.position-scale  [AXIS_0]SCALE
setp   hm2_5i20.0.stepgen.00.maxaccel         0
setp   hm2_5i20.0.stepgen.00.maxvel           0
setp   hm2_5i20.0.stepgen.00.step_type        0

net xpos-fb     axis.0.motor-pos-fb   <=  hm2_5i20.0.stepgen.00.position-fb
net xpos-cmd    axis.0.motor-pos-cmd  =>  hm2_5i20.0.stepgen.00.position-cmd
net xenable     axis.0.amp-enable-out =>  hm2_5i20.0.stepgen.00.enable

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

net all-home     =>  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 Z
#*******************

# Step Gen signals/setup

setp   hm2_5i20.0.stepgen.01.dirsetup        [AXIS_2]DIRSETUP
setp   hm2_5i20.0.stepgen.01.dirhold         [AXIS_2]DIRHOLD
setp   hm2_5i20.0.stepgen.01.steplen         [AXIS_2]STEPLEN
setp   hm2_5i20.0.stepgen.01.stepspace       [AXIS_2]STEPSPACE
setp   hm2_5i20.0.stepgen.01.position-scale  [AXIS_2]SCALE
setp   hm2_5i20.0.stepgen.01.maxaccel         0
setp   hm2_5i20.0.stepgen.01.maxvel           0
setp   hm2_5i20.0.stepgen.01.step_type        0

net zpos-fb     axis.2.motor-pos-fb   <=  hm2_5i20.0.stepgen.01.position-fb
net zpos-cmd    axis.2.motor-pos-cmd  =>  hm2_5i20.0.stepgen.01.position-cmd
net zenable     axis.2.amp-enable-out =>  hm2_5i20.0.stepgen.01.enable

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

net all-home     =>  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
#******************************

#  ---coolant signals---

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

#  ---probe signal---

net probe-in     =>  motion.probe-input

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

#  ---estop signals---

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

#  ---toolchange signals for custom tool changer---

net tool-number             <=  iocontrol.0.tool-prep-number
net tool-change-request     <=  iocontrol.0.tool-change
net tool-change-confirmed   =>  iocontrol.0.tool-changed
net tool-prepare-request    <=  iocontrol.0.tool-prepare
net tool-prepare-confirmed  =>  iocontrol.0.tool-prepared

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

More
13 Apr 2011 04:54 #8823 by cmorley
You say you checked the gecko drive output but can you check the mesa output directly?
This sounds a little similar to this:
www.cnczone.com/forums/emc_linux_enhance...xis_not_working.html

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

Time to create page: 0.087 seconds
Powered by Kunena Forum