Retrofitting a 1986 Maho MH400E

More
17 Sep 2018 06:45 - 17 Sep 2018 07:49 #117642 by RotarySMP
This weekend was spent doing some initial testing of the the gearbox.comp, simulator and sim.gui written by my friend.

Source code for MAHO gearbox comp

Sergey has been a champion, as he had to edit parts of the code when it turned out LinuxCNC only accepted the C90 flavour of C, whereas he had used the C99 version. A special thank you also to Andy Pugh for supporting Sergey on IRC with some of our questions.



We could have got more done if I was more versed in linux commands, but Sergey has been patiently navigating me through it all.
First we tested the feedback from the the gearbox shifter cam's, to ensure that the comp has mapped the bit mask to the correct speeds.

Then we tested the control of the twitching relays which intermittantly power the main spindle with 90VAC during the change, to prevent binding. The relay control works correctly, but, I missed a point in the specification. It looks like we need to energise the gearbox start relay 11K8 to allow twitching power to the spindle.

The next step will be manually placing the gear shafts to the mid (blue) position, and then giving speed commands which move a stage to one of the end positions, and ensureing that the use of the reversing relay is a correct.

The keyboard is sitting on brackets I had lasered, which are easily removable. In my mind, once the machine is finished, no keyboard should be necessary.
Mark
Attachments:
Last edit: 17 Sep 2018 07:49 by RotarySMP.

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

More
17 Sep 2018 13:04 - 17 Sep 2018 13:05 #117652 by andypugh
You could have the keyboard on hinges, so it folds away upside-down under the cabinet. (so the swarf fall out rather than in).

Even on my working machines I occasionally want a keyboard, to open a halmeter or rename a file, that sort of thing. On the mill I have one of these in a holster on the side of the cabinet.
Last edit: 17 Sep 2018 13:05 by andypugh.

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

More
17 Sep 2018 13:10 #117654 by RotarySMP
These logitech USB keyboards are really convenient. It has stowage for it's usb blue tooth(?) adapter, in the battery compartment, weighs little and has worked flawlessly with LinuxCNC /debian.

Under the user module won't work as the support arm comes in the bottom, but I will always be handy close by the mill.
Mark

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

More
17 Sep 2018 20:09 - 17 Sep 2018 20:10 #117668 by RotarySMP
WooHooo!!!!!



I'd messed up the spec, reversing CW and CCW, so Sergey had to change the code a bit, but once it re-complied it is working perfectly. The next step will be getting it integrated into the HAL and seeing if there is any screwy behaviour to deal with from the speed input in gmoccapy, mdi, or gcode.

It was compiled with:
sudo halcomplie --install mh400e_gearbox.comp

I added...
loadrt mh400e_gearbox
addf mh400e_gearbox servo_thread
...to the machine.hal, but it errors on start up that it cant find mh400e_gearbox, although the .ko file was created. Any suggestions what I messed up there?
Mark
Last edit: 17 Sep 2018 20:10 by RotarySMP.

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

More
18 Sep 2018 11:39 #117703 by andypugh
You probably need "addf mh400e-gearbox servo-thread (ie, a hyphen not an underscore in the function name)

In theory HAL only uses hyphens, but file-names can not contain hyphens, so the loadrt is underscores)

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

More
18 Sep 2018 13:38 - 18 Sep 2018 13:38 #117716 by RotarySMP
Thanks Andy, Sergey had pointed out that the HALcompiler changes underscores to dashs, and I tried both, but I didn't try the combination of underscore in the name and dash in the addf. I'll try that out tonight.
loadrt mh400e_gearbox
addf mh400e-gearbox servo-thread

Mark
Last edit: 18 Sep 2018 13:38 by RotarySMP.

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

More
19 Sep 2018 06:27 - 19 Sep 2018 06:29 #117738 by RotarySMP
That worked. I then went on to correct at least 45 other typo bugs in my ~45 lines added to the HAL to interface with the gearbox. You guys might have noticed that my typing is pretty rough :)

I wanted to test only the gearbox, and since the glass scale encoder on both Y and Z axis are currently U/S, can't home the machine.
In the ini, I edited the current homing lines to immediate homing :

Are those "o" or zero's? I used zero's, but I see today that they look like "o"'s.

First I just commented out the existing settings like this...
HOME_USE_INDEX = NO # reset to yes.

LinuxCNC can't deal with comments in this line of the ini. I freezes during the GUI load and has to be manually killed. Moving the comment to the line before corrected that. I see that this behaviour is already described in the INI knowledge file .

When I tested it, the X axis raced off till it hit the hard wired end stop and E-Stopped. Does this immediate homing not work on a closed loop servo axis?
Mark
Last edit: 19 Sep 2018 06:29 by RotarySMP.

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

More
19 Sep 2018 07:16 #117739 by andypugh

Are those "o" or zero's? I used zero's, but I see today that they look like "o"'s.

Defintely zeros.

When I tested it, the X axis raced off till it hit the hard wired end stop and E-Stopped. Does this immediate homing not work on a closed loop servo axis?


It should work. But the servo loop won't work without the position feedback, and you already said that was broken. (though the system still should have f-errored).

Maybe don't enable the servos yet?

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

More
19 Sep 2018 09:45 #117742 by RotarySMP
I understand the Z and Y axis being unpredictable without their encoder feedback, but the X axis has a working encoder, and yet it ran away. My understand of that it should have just homed were it was sitting.

Since I did a LiveCD install, the Gmoccapy Simulator is an easy install. I think I'll install that, and only cut paste the HAL lines necessary to continue testing the gearbox.comp interface, rather working with my machine.hal.
Mark

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

More
20 Sep 2018 09:14 #117778 by drimaropoylos
Hello, congratulations on the progress of the gearbox control. The twitching of the motor (800 ms right, 200 ms off, 800ms left, 200 ms off ) is constant during the hole gear change and indepentand from the cams position, or ther is some relation?
John

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

Moderators: piasdom
Time to create page: 0.208 seconds
Powered by Kunena Forum