Geckodrive G540 won't come out of fault. Charge Pump issue?

More
9 years 1 month ago #99152 by Evan
The config below works as long as I have the charge pump switch turned off on the G540. The motors have holding torque & I can jog around no problems. But when I flip the switch back it just sits with the fault light on. But I'd very much like to have it work properly.

I'm new to both LinuxCNC & using the G540. Here's my HAL file:
Code:
# Generated by stepconf 1.1 at Tue Sep 19 22:40:25 2017 # If you make changes to this file, they will be # overwritten when you run stepconf again loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES loadrt hal_parport cfg="0xcc00 out" setp parport.0.reset-time 1000 loadrt stepgen step_type=0,0,0,0 loadrt charge_pump net estop-out charge-pump.enable iocontrol.0.user-enable-out net charge-pump <= charge-pump.out addf parport.0.read base-thread addf stepgen.make-pulses base-thread addf charge-pump 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 net spindle-cmd-rpm <= motion.spindle-speed-out net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs net spindle-cmd-rps <= motion.spindle-speed-out-rps net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs net spindle-at-speed => motion.spindle-at-speed net xstep => parport.0.pin-02-out setp parport.0.pin-02-out-reset 1 net xdir => parport.0.pin-03-out net ystep => parport.0.pin-04-out setp parport.0.pin-04-out-reset 1 setp parport.0.pin-05-out-invert 1 net ydir => parport.0.pin-05-out net zstep => parport.0.pin-06-out setp parport.0.pin-06-out-reset 1 setp parport.0.pin-07-out-invert 1 net zdir => parport.0.pin-07-out net astep => parport.0.pin-08-out setp parport.0.pin-08-out-reset 1 net adir => parport.0.pin-09-out net charge-pump => parport.0.pin-16-out net estop-ext <= parport.0.pin-15-in-not setp stepgen.0.position-scale [AXIS_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 25200 setp stepgen.0.dirsetup 25200 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 setp stepgen.1.position-scale [AXIS_1]SCALE setp stepgen.1.steplen 1 setp stepgen.1.stepspace 0 setp stepgen.1.dirhold 25200 setp stepgen.1.dirsetup 25200 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 setp stepgen.2.position-scale [AXIS_2]SCALE setp stepgen.2.steplen 1 setp stepgen.2.stepspace 0 setp stepgen.2.dirhold 25200 setp stepgen.2.dirsetup 25200 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 setp stepgen.3.position-scale [AXIS_3]SCALE setp stepgen.3.steplen 1 setp stepgen.3.stepspace 0 setp stepgen.3.dirhold 25200 setp stepgen.3.dirsetup 25200 setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb net astep <= stepgen.3.step net adir <= stepgen.3.dir net aenable axis.3.amp-enable-out => stepgen.3.enable net estop-out <= iocontrol.0.user-enable-out net estop-ext => iocontrol.0.emc-enable-in 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

I was thinking it may be the way I have the estop configured, but I've tried a couple different combinations so far based on what I've seen in other solutions on this forum, including both inverting pin 15 & just unsetting it entirely. The only physical e-stop is connected to the power supply, and doesn't communicate with the G540. The terminal-block pins #10 & #12 on the bottom of the G540 are shorted to have the "input disabled" state kept at 0v.

Now I'm assuming it's an issue with the charge pump signal. I read that the G540 pulls too much current on this pin? Here's a photograph of my oscilloscope probing pin #16 (ground is on pin #25):

So it's putting out the required signal of over >10kHz that the G540 requires, but since this isn't probing in-line, I'm not sure what it's like when the drive is pulling it. Also, I'm not sure why the voltage is shown so high at max=51.2v & min=10v. Seems weird.

Here are my PCI Parallel port details:
Code:
$ lspci -v 01:0a.0 Communication controller: MosChip Semiconductor Technology Ltd. PCI 1 port parallel adapter (rev 01) Subsystem: LSI Logic / Symbios Logic PCI 1 port parallel adapter Flags: medium devsel, IRQ 18 I/O ports at cc00 [size=8] I/O ports at c800 [size=8] I/O ports at c400 [size=8] I/O ports at c000 [size=8] I/O ports at bc00 [size=8] I/O ports at b800 [size=16] Kernel driver in use: parport_pc Kernel modules: parport_pc $ dmesg | grep parport [ 10.631746] parport0: PC-style at 0xcc00 (0xc800), irq 18 [PCSPP,TRISTATE,EPP] [ 10.728182] lp0: using parport0 (interrupt-driven).

One last thing, but when I cut power to the G540, it very briefly will exit the fault state where I'll hear the motors engage & the green light comes on, just before power completely fades. This only happens when the parallel port cable is plugged in!

Anyone have some ideas?

Please Log in to join the conversation.

More
9 years 1 month ago #99168 by PCW
This is a known issue on the G540: it needs considerable high side drive from the parallel port to run the charge pump
but Gecko chose Parallel port pin 16 to drive it. Unfortunately pin 16 is a open collector driver with a weak pull-up _unless_
the parallel port is in EPP mode (its a push-pull output in EPP mode)

As a first try I would set the port to EPP mode in the loadrt hal_parport command line in your hal file
and if that fails, add a stiff pullup resistor (say 300 Ohm) to pin 16

Please Log in to join the conversation.

More
9 years 1 month ago #99188 by Evan
Tried setting the loadrt line to:
Code:
loadrt hal_parport cfg="0xcc00 epp"

But when running LinuxCNC I got the following errors:
Code:
Starting LinuxCNC... . Found file(REL): ./sherline2k_gecko540_4axis.hal insmod: ERROR: could not insert module /usr/realtime-4.1.0-1-rtai-686-pae/modules/linuxcnc/hal_parport.ko: Device or resource busy ./sherline2k_gecko540_4axis.hal:6: exit value: 1 ./sherline2k_gecko540_4axis.hal:6: insmod for hal_parport failed, returned -1

And dmesg shows this:
Code:
[ 198.730481] config string '0xcc00 epp' [ 198.730595] PARPORT: ERROR: request_region(0xffff) failed [ 201.171445] RTAI[math]: unloaded. [ 201.192047] SCHED releases registered named ALIEN PEDV$D [ 201.201354] RTAI[malloc]: unloaded. [ 201.300022] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0). [ 201.314217] I-pipe: head domain RTAI unregistered. [ 201.314229] RTAI[hal]: unmounted.

And then if I change it back to use "out", LinuxCNC still won't start up and gives me a dmesg log similar to the one above, but says this error instead:
Code:
PARPORT: ERROR: port parport0 claim failed
The only way to get it working again I've found is to reboot after changing the

I'm guessing my parallel port PCI card doesn't play nice with trying to be put in EPP mode by LinuxCNC? This is the card I installed , and the description says it supports EPP mode.

Unless you see an obvious issue I'm overlooking, I'll probably try to install a pull-up resistor or switch to one of those Mesa cards people seem to like.

Please Log in to join the conversation.

More
9 years 1 month ago #99189 by PCW
What version of LinuxCNC?
Just tried here and it works fine (2.7 and 2.8)

[ 198.730595] PARPORT: ERROR: request_region(0xffff) failed
looks like it does not understand the EPP token and tried to extract an address instead

Please Log in to join the conversation.

More
9 years 1 month ago #99190 by Evan
My version is 2.7.11, running on LinuxMint with rtai kernel realtime-4.1.0-1-rtai-686-pae

Edit:

Also, when trying to start up after changing it back to "out", it gives this error in the console:
Code:
insmod: ERROR: could not insert module /usr/realtime-4.1.0-1-rtai-686-pae/modules/linuxcnc/hal_parport.ko: Resource temporarily unavailable ./sherline2k_gecko540_4axis.hal:6: exit value: 1 ./sherline2k_gecko540_4axis.hal:6: insmod for hal_parport failed, returned -1
Not sure if it's helpful.

Please Log in to join the conversation.

More
9 years 1 month ago #99191 by PCW
I've seen this:

insmod: ERROR: could not insert module /usr/realtime-4.1.0-1-rtai-686-pae/modules/linuxcnc/hal_parport.ko: Device or resource busy

happen when LinuxCNC does not exit gracefully, you may have to re-boot and retry the epp type flag

Please Log in to join the conversation.

More
9 years 1 month ago #99192 by Evan
Yeah, I tried rebooting but it just keeps failing. In order to get it back into a working state (excluding the charge pump, of course), I have up update it back to say "out", and then reboot again.

Please Log in to join the conversation.

More
9 years 1 month ago #99193 by Evan
So I decided to just solder up a pull-up resistor. Connected a 470 ohm resistor between pin-16 and the 5-volt line on the card from pin-62 on the PCI slot. Works great now!

Please Log in to join the conversation.

Time to create page: 0.094 seconds
Powered by Kunena Forum