MPG Pedant on 7i43

More
08 Mar 2019 14:56 #128080 by mane
MPG Pedant on 7i43 was created by mane
Now i want to hook up a pedant with XYZ and increments 0,01 / 0,1 / 1.
In a first step i want to add the encoder wheel to my configuration.
I checked the documentation, there is an example with 2nd parallel port card and C22 interface card. But with my 7i43 i have enough GPIO.

link MPG Pedant example

question i these sections:
# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= parport.1.pin-09-in
net scale2 mux4.0.sel1 <= parport.1.pin-10-in


# The MPG inputs
net mpg-a encoder.0.phase-A <= parport.1.pin-02-in
net mpg-b encoder.0.phase-B <= parport.1.pin-03-in


I need the correct pins based on my config and what pins i have to add here?

Many thanks in advance.
Manfred

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

More
08 Mar 2019 15:24 #128082 by andypugh
Replied by andypugh on topic MPG Pedant on 7i43
Which firmware are you using on the 7i43?
You might well have some encoder counters available.

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

More
08 Mar 2019 16:02 #128088 by mane
Replied by mane on topic MPG Pedant on 7i43
From my hal setup:
loadrt hm2_7i43 ioaddr=0x378 ioaddr_hi=0 epp_wide=1 config="firmware=hm2/7i43-4/SVST4_4.BIT num_encoders=1 num_pwmgens=0 num_stepgens=3"

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

More
08 Mar 2019 17:04 #128092 by andypugh
Replied by andypugh on topic MPG Pedant on 7i43
I guess that the 1 encoder you currently have enabled is for the spindle?

So change num_encoders to 2, to create one for the MPG.
Then look at the dmesg output after LinuxCNC has started to work out which pins it ends up using.

You don't need an encoder HAL component, you have encdoder counters in the FPGA, and you don't need to "net" the A and B phases either. Just connect hm2_7i43.0.encoder.1.counts to the jog counts inputs.

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

More
08 Mar 2019 20:52 - 08 Mar 2019 21:26 #128108 by mane
Replied by mane on topic MPG Pedant on 7i43
No, at the moment spindle is in manual mode. Only a motor switch and a small gearbox.
I choose one encoder only for the MPG pedant.
I will take a look with dmesg tomorrow. Thanks so far.
118.803346] I-pipe: head domain RTAI registered.
[  118.803356] RTAI[hal]: compiled with gcc version 4.7.2 (Debian 4.7.2-5) .
[  118.803478] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[  118.803485] SYSINFO: CPUs 4, LINUX APIC IRQ 2312, TIM_FREQ 5208254, CLK_FREQ 2000007000, CPU_FREQ 2000007000
[  118.803490] RTAI_APIC_TIMER_IPI: RTAI DEFINED 2314, VECTOR 2314; LINUX_APIC_TIMER_IPI: RTAI DEFINED 2312, VECTOR 2312
[  118.803497] TIMER NAME: lapic; VARIOUSLY FOUND APIC FREQs: 5208254, 5208254, 5189250
[  118.812943] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[  118.812995] , <uses LINUX SYSCALLs>, kstacks pool size = 524288 bytes.
[  118.813004] RTAI[sched]: hard timer type/freq = APIC/5208254(Hz); default timing: oneshot; linear timed lists.
[  118.813010] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2000007000 hz.
[  118.813015] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[  118.821514] RTAI[math]: loaded.
[  118.991929] hm2: loading Mesa HostMot2 driver version 0.15
[  118.995051] hm2_7i43: loading HostMot2 Mesa 7i43 driver version 0.3
[  119.541734] hm2/hm2_7i43.0: 48 I/O Pins used:
[  119.541742] hm2/hm2_7i43.0:     IO Pin 000 (P4-01): IOPort
[  119.541747] hm2/hm2_7i43.0:     IO Pin 001 (P4-03): IOPort
[  119.541753] hm2/hm2_7i43.0:     IO Pin 002 (P4-05): Encoder #0, pin B (Input)
[  119.541758] hm2/hm2_7i43.0:     IO Pin 003 (P4-07): Encoder #0, pin A (Input)
[  119.541763] hm2/hm2_7i43.0:     IO Pin 004 (P4-09): IOPort
[  119.541768] hm2/hm2_7i43.0:     IO Pin 005 (P4-11): Encoder #0, pin Index (Input)
[  119.541773] hm2/hm2_7i43.0:     IO Pin 006 (P4-13): IOPort
[  119.541777] hm2/hm2_7i43.0:     IO Pin 007 (P4-15): IOPort
[  119.541782] hm2/hm2_7i43.0:     IO Pin 008 (P4-17): IOPort
[  119.541786] hm2/hm2_7i43.0:     IO Pin 009 (P4-19): IOPort
[  119.541791] hm2/hm2_7i43.0:     IO Pin 010 (P4-21): IOPort
[  119.541795] hm2/hm2_7i43.0:     IO Pin 011 (P4-23): IOPort
[  119.541800] hm2/hm2_7i43.0:     IO Pin 012 (P4-25): IOPort
[  119.541804] hm2/hm2_7i43.0:     IO Pin 013 (P4-27): IOPort
[  119.541808] hm2/hm2_7i43.0:     IO Pin 014 (P4-29): IOPort
[  119.541813] hm2/hm2_7i43.0:     IO Pin 015 (P4-31): IOPort
[  119.541817] hm2/hm2_7i43.0:     IO Pin 016 (P4-33): IOPort
[  119.541822] hm2/hm2_7i43.0:     IO Pin 017 (P4-35): IOPort
[  119.541826] hm2/hm2_7i43.0:     IO Pin 018 (P4-37): IOPort
[  119.541831] hm2/hm2_7i43.0:     IO Pin 019 (P4-39): IOPort
[  119.541835] hm2/hm2_7i43.0:     IO Pin 020 (P4-41): IOPort
[  119.541840] hm2/hm2_7i43.0:     IO Pin 021 (P4-43): IOPort
[  119.541844] hm2/hm2_7i43.0:     IO Pin 022 (P4-45): IOPort
[  119.541848] hm2/hm2_7i43.0:     IO Pin 023 (P4-47): IOPort
[  119.541854] hm2/hm2_7i43.0:     IO Pin 024 (P3-01): StepGen #0, pin Step (Output)
[  119.541859] hm2/hm2_7i43.0:     IO Pin 025 (P3-03): StepGen #0, pin Direction (Output)
[  119.541864] hm2/hm2_7i43.0:     IO Pin 026 (P3-05): IOPort
[  119.541868] hm2/hm2_7i43.0:     IO Pin 027 (P3-07): IOPort
[  119.541873] hm2/hm2_7i43.0:     IO Pin 028 (P3-09): IOPort
[  119.541877] hm2/hm2_7i43.0:     IO Pin 029 (P3-11): IOPort
[  119.541882] hm2/hm2_7i43.0:     IO Pin 030 (P3-13): StepGen #1, pin Step (Output)
[  119.541887] hm2/hm2_7i43.0:     IO Pin 031 (P3-15): StepGen #1, pin Direction (Output)
[  119.541892] hm2/hm2_7i43.0:     IO Pin 032 (P3-17): IOPort
[  119.541897] hm2/hm2_7i43.0:     IO Pin 033 (P3-19): IOPort
[  119.541901] hm2/hm2_7i43.0:     IO Pin 034 (P3-21): IOPort
[  119.541906] hm2/hm2_7i43.0:     IO Pin 035 (P3-23): IOPort
[  119.541911] hm2/hm2_7i43.0:     IO Pin 036 (P3-25): StepGen #2, pin Step (Output)
[  119.541916] hm2/hm2_7i43.0:     IO Pin 037 (P3-27): StepGen #2, pin Direction (Output)
[  119.541921] hm2/hm2_7i43.0:     IO Pin 038 (P3-29): IOPort
[  119.541925] hm2/hm2_7i43.0:     IO Pin 039 (P3-31): IOPort
[  119.541930] hm2/hm2_7i43.0:     IO Pin 040 (P3-33): IOPort
[  119.541934] hm2/hm2_7i43.0:     IO Pin 041 (P3-35): IOPort
[  119.541939] hm2/hm2_7i43.0:     IO Pin 042 (P3-37): IOPort
[  119.541943] hm2/hm2_7i43.0:     IO Pin 043 (P3-39): IOPort
[  119.541947] hm2/hm2_7i43.0:     IO Pin 044 (P3-41): IOPort
[  119.541952] hm2/hm2_7i43.0:     IO Pin 045 (P3-43): IOPort
[  119.541956] hm2/hm2_7i43.0:     IO Pin 046 (P3-45): IOPort
[  119.541961] hm2/hm2_7i43.0:     IO Pin 047 (P3-47): IOPort
[  119.542056] hm2/hm2_7i43.0: registered
[  119.542061] hm2_7i43.0: board at (ioaddr=0x0378, ioaddr_hi=0x0778, epp_wide ON) found[color=orange][/color]

Powered the MPG with 5V and connected A and B form MPG to mesa to these pins.
(P4-05): Encoder #0, pin B (Input)
(P4-07): Encoder #0, pin A (Input)
But i guess thats not all. At the moment MPG has no effect on my system. At the moment its only a configuration with no machine behind.
Last edit: 08 Mar 2019 21:26 by mane. Reason: message edit done

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

More
09 Mar 2019 15:03 #128166 by andypugh
Replied by andypugh on topic MPG Pedant on 7i43
You should see the 7i43.0.encoder.0.counts pin change when you move the mpg (you can see this with Halmeter)

But the counts need to be connected to the axis (and joint, in 2.8) jog inputs in the HAL file. That part will be the same as the parallel port config.

You can ignore the index.

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

More
09 Mar 2019 19:30 #128174 by mane
Replied by mane on topic MPG Pedant on 7i43
I tried to do as you described in halmeter. 7i43.0.encoder.0.counts pin watched but nothing changed by by rotate the encoder.
Added a pricture of my setup. The encoder is connected to 5V and A and B are connected to connector 4.

Maybe there is something wrong with my cabeling.
Attachments:

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

More
09 Mar 2019 20:37 #128178 by PCW
Replied by PCW on topic MPG Pedant on 7i43
Yes, you have your wires connected to P4 pins 9 and 13

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

More
10 Mar 2019 02:47 #128198 by andypugh
Replied by andypugh on topic MPG Pedant on 7i43
A good example of why a picture is a great idea, we would have been chasing this for weeks. :-)

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

More
10 Mar 2019 07:53 #128204 by mane
Replied by mane on topic MPG Pedant on 7i43
Connecting to the correct pins i see now encoder signals A and B in halscope.
Next i have to connect the inputs.

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

Time to create page: 0.142 seconds
Powered by Kunena Forum