Retrofitting a 1986 Maho MH400E

More
8 years 9 months ago #103922 by RotarySMP
Replied by RotarySMP on topic Retrofitting a 1986 Maho MH400E
Prosit neu Jahr.
I am working on my control panel,


...and want to use Matrix_KB to interface the 26 keys with a 5x5 matrix.

I am a little unsure of the syntax from the documention, and couldn't find examples in the forum here. Appreciate any feedback on this.

loadrt matrix_kb config=R5C5s names=MAHO_Panel # 5x5 Matrix, in scan generation mode.
addf matrix_kb.MAHO_Panel servo-thread

net matrix_kb.MAHO_Panel.col-1-in hm2_5i25.0.7i77.0.0.output-00 # does the column numbering start at 0 or 1? I am netting a pin to a pin. Don't I need a signal?
net matrix_kb.MAHO_Panel.col-2-in hm2_5i25.0.7i77.0.0.output-01
net matrix_kb.MAHO_Panel.col-3-in hm2_5i25.0.7i77.0.0.output-02
net matrix_kb.MAHO_Panel.col-4-in hm2_5i25.0.7i77.0.0.output-03
net matrix_kb.MAHO_Panel.col-5-in hm2_5i25.0.7i77.0.0.output-04


net gmoccapy.v-button-0 matrix_kb.MAHO_Panel.key.r1c1 # same question as above, does the row numbering begin with 1 or 0?
net gmoccapy.v-button-5 matrix_kb.MAHO_Panel.key.r2c1 # What about the net of the five input pins from the 7i77? I feel I've completely missunderstood this syntax
matrix_kb.N.key.rRcC bit out
The pin corresponding to the key at row R column C of the matrix
.
from the documentation.

Mark
Attachments:

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

More
8 years 9 months ago - 8 years 9 months ago #103925 by PCW
Replied by PCW on topic Retrofitting a 1986 Maho MH400E
When I am unsure about a component pins and names I use halcmd to list them:
(this is with linuxcnc running but without the matrix_kb hal file additions )

pcw@pcw-G41M-Combo:~/linuxcnc$ halcmd loadrt matrix_kb config=5x5 names=MAHO_Panel
pcw@pcw-G41M-Combo:~/linuxcnc$ halcmd show pin MAHO
Component Pins:
Owner Type Dir Value Name
42 bit OUT FALSE MAHO_Panel.key.r0c0
42 bit OUT FALSE MAHO_Panel.key.r0c1
42 bit OUT FALSE MAHO_Panel.key.r0c2
42 bit OUT FALSE MAHO_Panel.key.r0c3
42 bit OUT FALSE MAHO_Panel.key.r0c4
42 bit OUT FALSE MAHO_Panel.key.r1c0
42 bit OUT FALSE MAHO_Panel.key.r1c1
42 bit OUT FALSE MAHO_Panel.key.r1c2
42 bit OUT FALSE MAHO_Panel.key.r1c3
42 bit OUT FALSE MAHO_Panel.key.r1c4
42 bit OUT FALSE MAHO_Panel.key.r2c0
42 bit OUT FALSE MAHO_Panel.key.r2c1
42 bit OUT FALSE MAHO_Panel.key.r2c2
42 bit OUT FALSE MAHO_Panel.key.r2c3
42 bit OUT FALSE MAHO_Panel.key.r2c4
42 bit OUT FALSE MAHO_Panel.key.r3c0
42 bit OUT FALSE MAHO_Panel.key.r3c1
42 bit OUT FALSE MAHO_Panel.key.r3c2
42 bit OUT FALSE MAHO_Panel.key.r3c3
42 bit OUT FALSE MAHO_Panel.key.r3c4
42 bit OUT FALSE MAHO_Panel.key.r4c0
42 bit OUT FALSE MAHO_Panel.key.r4c1
42 bit OUT FALSE MAHO_Panel.key.r4c2
42 bit OUT FALSE MAHO_Panel.key.r4c3
42 bit OUT FALSE MAHO_Panel.key.r4c4
42 u32 IN 0x00000000 MAHO_Panel.keycode
42 s32 OUT 0 MAHO_Panel.time

And yes, all net commands need a signal and the first token after the "net" command
( you can also verify this with halcmd)

This can save a lot of time by quickly testing hal commands and components without re-editing
your hal file over and over (once you have things working you can copy/paste names/commands from your
terminal history into you hal file)
Last edit: 8 years 9 months ago by PCW.
The following user(s) said Thank You: RotarySMP

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

More
8 years 9 months ago - 8 years 9 months ago #103928 by RotarySMP
Replied by RotarySMP on topic Retrofitting a 1986 Maho MH400E
Thanks. That is very helpful. I forgot that hal pins get automatically created by the function, and thought I needed to define them.
Thanks for confirming that the numbering of columns and rows starts with 0.

Now I understand better this line of the documentation.
In the optional scan-generation mode the matrix_kb.N.keycode pin changes to an output pin and a set of output row pins and input column pins are created.

So my HAL entry will be:
loadrt matrix_kb config=5x5s names=MAHO_Panel

When the signal is irrelevant, and is only used as glue bettweens pins, like in this case...
net signal name MAHO_Panel.col-2-in hm2_5i25.0.7i77.0.0.output-01
... is there a convention or standard in the the linuxcnc community for signal naming?

Here is my button matrix


And a rough wiring diagram.

Mark
Attachments:
Last edit: 8 years 9 months ago by RotarySMP.

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

More
8 years 9 months ago - 8 years 9 months ago #104028 by RotarySMP
Replied by RotarySMP on topic Retrofitting a 1986 Maho MH400E
I've been working on the button assemblies.


The top RH button needs two switches, one for 110VAC physical E-Stop release, and the other 24VDC to the 7i77 and Linuxcnc.
When I designed the laser part, I didn't realise that those buttons are stackable. Duh!


I'll need to reprint the entire set of buttons one more time, as they need to be another 2mm thicker to avoid jamming in the the front panel cut outs.


Using my daughters yellow nail polish to bring out the text doesn't really work, as the solvent in the polish attacks the PLA. Next attempt will be with acylic paint.


Mark
Attachments:
Last edit: 8 years 9 months ago by RotarySMP.

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

More
8 years 9 months ago #104088 by RotarySMP
Replied by RotarySMP on topic Retrofitting a 1986 Maho MH400E
About 6 hours into a 7 hour print, I left to see a friend... not a good plan!


This is hopefully the last iteration of these buttons, as I must have printed at least 60, in various different thicknesses.
Mark
Attachments:

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

More
8 years 8 months ago #105348 by J Green
Replied by J Green on topic Retrofitting a 1986 Maho MH400E
Have been wanting to send this information about glass scale cleaning. Better late than never? From what I have read-seen and had my hands on, be very careful when messing with glass scales. they are easy to damage and big cost to replace. When removing the scale ,check the mounting places for tiny shims between the machine and the scale body/spar. Think about getting new replacement lip seals before the scale removal. To me , the hard part is getting the scale and read head aligned correctly when remounting to the machine. Remember those very tiny shims when the spar an read head were removed from the machine ?
When the read head is removed from the spar ,have a good look at the tiny light bulbs and think about how they could be replaced if it became necessary For a real adventure try finding a LED to replace the grain of wheat bulbs.
The spar end caps have a small hole that is intended. for attachment of a air hose. this is so clean dry air can help keep junk out of or entering the scale/spar.. Note the pressurized air has to be clean an dry an no oil,also the lip seals need to be in good condition.
For testing the scale, all I have seen is to use a O-scope to compare the scales output sin/cos values . Using either sin or cos for Horizontal sweep input and the other for Vertical input the display should be a circle. The rounder the displayed circle the better..
Do not fry the scale because of O-scope or power supply AC input ground loops,please..
Have been wondering if there has been any thought on checking all the lub-oil lines for quantity of flow. Have read that useing the wrong type of lub-oil causing the rulon glue ,rulon or the other plastic used on the machine ways, to deteriorate.

This browser does not support PDFs. Please download the PDF to view it: Download PDF



A very big Thank - You for all of your effort in documenting this conversion/retrofit. Hope to see more of the progress.
Attachments:

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

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