spindle encoder question gmoccapy/Orac/7i96 ***Solved***
20 Jun 2021 13:25 #212483
by Boris
Another spindle encoder question Orac/7i96 was created by Boris
Hello all,
Hoping someone may be able to point in the right direction having come to a bit of a halt with the spindle encoder on a Denford Orac conversion I'm very slowly working through.
I have managed to get GMOCCAPY running with a 7i96 and have got the X & Z axes moving with it. I also have a VFD fitted that but I am controlling the spindle with the VFD panel for the moment.
The next stage is to install an encoder and once the software is displaying the correct spindle RPM I will set the VFD to be controlled from the 7i96 with a PWM board.
The problem I'm having is that I cannot get an RPM indication on the screen. The Encoder is an OMROM E6B2-CWZ6C and is wired to the board as follows;
TB2 pin 7 ENCA = OUTA
TB2 pin 9 GND = 0V (common)
TB2 pin 10 ENCB = OUTB
TB2 pin 12 +5V = 5to24VDC
TB2 pin 13 IDX+ = OUTZ
I've updated the firmware ready to use PWM to control the spindle VFD the same way Rotary SMP did on his minilathe project. The configuration I pulled from the terminal is below;
cnclathe@CNCLathe:~$ mesaflash --device 7i96 --addr 10.10.10.10 --readhmid
Configuration Name: HOSTMOT2
General configuration information:
BoardName : MESA7I96
FPGA Size: 9 KGates
FPGA Pins: 144
Number of IO Ports: 3
Width of one I/O port: 17
Clock Low frequency: 100.0000 MHz
Clock High frequency: 200.0000 MHz
IDROM Type: 3
Instance Stride 0: 4
Instance Stride 1: 64
Register Stride 0: 256
Register Stride 1: 256
Modules in configuration:
Module: DPLL
There are 1 of DPLL in configuration
Version: 0
Registers: 7
BaseAddress: 7000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: WatchDog
There are 1 of WatchDog in configuration
Version: 0
Registers: 3
BaseAddress: 0C00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: IOPort
There are 3 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: PWM
There are 1 of PWM in configuration
Version: 0
Registers: 5
BaseAddress: 4100
ClockFrequency: 200.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: StepGen
There are 4 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: QCount
There are 1 of QCount in configuration
Version: 2
Registers: 5
BaseAddress: 3000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: SSerial
There are 1 of SSerial in configuration
Version: 0
Registers: 6
BaseAddress: 5B00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 64 bytes
Module: SSR
There are 1 of SSR in configuration
Version: 0
Registers: 2
BaseAddress: 7D00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: LED
There are 1 of LED in configuration
Version: 0
Registers: 1
BaseAddress: 0200
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Configuration pin-out:
IO Connections for TB3
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
1 0 IOPort None
14 1 IOPort None
2 2 IOPort None
15 3 IOPort None
3 4 IOPort None
16 5 IOPort None
4 6 IOPort None
17 7 IOPort None
5 8 IOPort None
6 9 IOPort None
7 10 IOPort None
8 11 IOPort SSR 0 Out-00 (Out)
9 12 IOPort SSR 0 Out-01 (Out)
10 13 IOPort SSR 0 Out-02 (Out)
11 14 IOPort SSR 0 Out-03 (Out)
12 15 IOPort SSR 0 Out-04 (Out)
13 16 IOPort SSR 0 Out-05 (Out)
IO Connections for TB1/TB2
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
1 17 IOPort StepGen 0 Step/Table1 (Out)
14 18 IOPort StepGen 0 Dir/Table2 (Out)
2 19 IOPort StepGen 1 Step/Table1 (Out)
15 20 IOPort StepGen 1 Dir/Table2 (Out)
3 21 IOPort StepGen 2 Step/Table1 (Out)
16 22 IOPort StepGen 2 Dir/Table2 (Out)
4 23 IOPort StepGen 3 Step/Table1 (Out)
17 24 IOPort StepGen 3 Dir/Table2 (Out)
5 25 IOPort PWM 0 PWM (Out)
6 26 IOPort PWM 0 Dir (Out)
7 27 IOPort QCount 0 Quad-A (In)
8 28 IOPort QCount 0 Quad-B (In)
9 29 IOPort QCount 0 Quad-IDX (In)
10 30 IOPort SSerial 0 RXData0 (In)
11 31 IOPort SSerial 0 TXData0 (Out)
12 32 IOPort SSerial 0 TXEn0 (Out)
13 33 IOPort SSR 0 AC Ref (Out)
IO Connections for P1
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
1 34 IOPort None
14 35 IOPort None
2 36 IOPort None
15 37 IOPort None
3 38 IOPort None
16 39 IOPort None
4 40 IOPort None
17 41 IOPort None
5 42 IOPort None
6 43 IOPort None
7 44 IOPort None
8 45 IOPort None
9 46 IOPort None
10 47 IOPort None
11 48 IOPort None
12 49 IOPort None
13 50 IOPort None
cnclathe@CNCLathe:~$
Can anyone see any obvious error with my wiring or configuration? I am at a loss. For info, the encoder is getting power and appears to be sending back a variable voltage the mesacard. I haven't attempted to edit the INI or HAL files yet as that will be another learning curve. Cheers
Hoping someone may be able to point in the right direction having come to a bit of a halt with the spindle encoder on a Denford Orac conversion I'm very slowly working through.
I have managed to get GMOCCAPY running with a 7i96 and have got the X & Z axes moving with it. I also have a VFD fitted that but I am controlling the spindle with the VFD panel for the moment.
The next stage is to install an encoder and once the software is displaying the correct spindle RPM I will set the VFD to be controlled from the 7i96 with a PWM board.
The problem I'm having is that I cannot get an RPM indication on the screen. The Encoder is an OMROM E6B2-CWZ6C and is wired to the board as follows;
TB2 pin 7 ENCA = OUTA
TB2 pin 9 GND = 0V (common)
TB2 pin 10 ENCB = OUTB
TB2 pin 12 +5V = 5to24VDC
TB2 pin 13 IDX+ = OUTZ
I've updated the firmware ready to use PWM to control the spindle VFD the same way Rotary SMP did on his minilathe project. The configuration I pulled from the terminal is below;
cnclathe@CNCLathe:~$ mesaflash --device 7i96 --addr 10.10.10.10 --readhmid
Configuration Name: HOSTMOT2
General configuration information:
BoardName : MESA7I96
FPGA Size: 9 KGates
FPGA Pins: 144
Number of IO Ports: 3
Width of one I/O port: 17
Clock Low frequency: 100.0000 MHz
Clock High frequency: 200.0000 MHz
IDROM Type: 3
Instance Stride 0: 4
Instance Stride 1: 64
Register Stride 0: 256
Register Stride 1: 256
Modules in configuration:
Module: DPLL
There are 1 of DPLL in configuration
Version: 0
Registers: 7
BaseAddress: 7000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: WatchDog
There are 1 of WatchDog in configuration
Version: 0
Registers: 3
BaseAddress: 0C00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: IOPort
There are 3 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: PWM
There are 1 of PWM in configuration
Version: 0
Registers: 5
BaseAddress: 4100
ClockFrequency: 200.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: StepGen
There are 4 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: QCount
There are 1 of QCount in configuration
Version: 2
Registers: 5
BaseAddress: 3000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: SSerial
There are 1 of SSerial in configuration
Version: 0
Registers: 6
BaseAddress: 5B00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 64 bytes
Module: SSR
There are 1 of SSR in configuration
Version: 0
Registers: 2
BaseAddress: 7D00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: LED
There are 1 of LED in configuration
Version: 0
Registers: 1
BaseAddress: 0200
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Configuration pin-out:
IO Connections for TB3
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
1 0 IOPort None
14 1 IOPort None
2 2 IOPort None
15 3 IOPort None
3 4 IOPort None
16 5 IOPort None
4 6 IOPort None
17 7 IOPort None
5 8 IOPort None
6 9 IOPort None
7 10 IOPort None
8 11 IOPort SSR 0 Out-00 (Out)
9 12 IOPort SSR 0 Out-01 (Out)
10 13 IOPort SSR 0 Out-02 (Out)
11 14 IOPort SSR 0 Out-03 (Out)
12 15 IOPort SSR 0 Out-04 (Out)
13 16 IOPort SSR 0 Out-05 (Out)
IO Connections for TB1/TB2
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
1 17 IOPort StepGen 0 Step/Table1 (Out)
14 18 IOPort StepGen 0 Dir/Table2 (Out)
2 19 IOPort StepGen 1 Step/Table1 (Out)
15 20 IOPort StepGen 1 Dir/Table2 (Out)
3 21 IOPort StepGen 2 Step/Table1 (Out)
16 22 IOPort StepGen 2 Dir/Table2 (Out)
4 23 IOPort StepGen 3 Step/Table1 (Out)
17 24 IOPort StepGen 3 Dir/Table2 (Out)
5 25 IOPort PWM 0 PWM (Out)
6 26 IOPort PWM 0 Dir (Out)
7 27 IOPort QCount 0 Quad-A (In)
8 28 IOPort QCount 0 Quad-B (In)
9 29 IOPort QCount 0 Quad-IDX (In)
10 30 IOPort SSerial 0 RXData0 (In)
11 31 IOPort SSerial 0 TXData0 (Out)
12 32 IOPort SSerial 0 TXEn0 (Out)
13 33 IOPort SSR 0 AC Ref (Out)
IO Connections for P1
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir
1 34 IOPort None
14 35 IOPort None
2 36 IOPort None
15 37 IOPort None
3 38 IOPort None
16 39 IOPort None
4 40 IOPort None
17 41 IOPort None
5 42 IOPort None
6 43 IOPort None
7 44 IOPort None
8 45 IOPort None
9 46 IOPort None
10 47 IOPort None
11 48 IOPort None
12 49 IOPort None
13 50 IOPort None
cnclathe@CNCLathe:~$
Can anyone see any obvious error with my wiring or configuration? I am at a loss. For info, the encoder is getting power and appears to be sending back a variable voltage the mesacard. I haven't attempted to edit the INI or HAL files yet as that will be another learning curve. Cheers
Please Log in or Create an account to join the conversation.
20 Jun 2021 14:22 #212487
by PCW
Replied by PCW on topic Another spindle encoder question Orac/7i96
Do you have the 7I96 encoder inputs jumpered for single ended (TTL) mode?
Please Log in or Create an account to join the conversation.
20 Jun 2021 14:38 #212488
by Boris
Replied by Boris on topic Another spindle encoder question Orac/7i96
Thanks for looking.
Yep, W2, W3 & W4 are all in the TTL position. I'm pretty sure I tried the other position just in case but no dice.
Yep, W2, W3 & W4 are all in the TTL position. I'm pretty sure I tried the other position just in case but no dice.
Please Log in or Create an account to join the conversation.
20 Jun 2021 15:03 #212489
by PCW
Replied by PCW on topic Another spindle encoder question Orac/7i96
Did you check the encoder position and velocity with halshow?
Please Log in or Create an account to join the conversation.
20 Jun 2021 15:26 #212491
by Boris
Replied by Boris on topic Another spindle encoder question Orac/7i96
I haven't as I have absolutely no idea how to do that (apologies and I appreciate everyone's patience - I'd never used linux before starting this project). Are there any useful references/guides to follow so I can check the position and velocity with halshow?
Please Log in or Create an account to join the conversation.
20 Jun 2021 15:32 #212492
by PCW
Replied by PCW on topic Another spindle encoder question Orac/7i96
Not sure how you launch halshow in GMOCCAPY but you cal always launch it by typing
halshow
in a terminal window when linuxcnc is running
You can now select the "Watch" pane and select/view the desired pins
parameters etc in real time
halshow
in a terminal window when linuxcnc is running
You can now select the "Watch" pane and select/view the desired pins
parameters etc in real time
Please Log in or Create an account to join the conversation.
20 Jun 2021 15:33 #212493
by Boris
Replied by Boris on topic Another spindle encoder question Orac/7i96
Ok great. I'll go do some reading and give it a go.
Please Log in or Create an account to join the conversation.
20 Jun 2021 15:57 #212495
by Boris
Replied by Boris on topic Another spindle encoder question Orac/7i96
Hi PCW
found it - thank you. So in halshow the encoder shows a sensible looking RPM and counter and worked in both directions. It just doesn't show on the gmoccapy screen.
Could that be a problem ini setting or hal setting?
found it - thank you. So in halshow the encoder shows a sensible looking RPM and counter and worked in both directions. It just doesn't show on the gmoccapy screen.
Could that be a problem ini setting or hal setting?
Please Log in or Create an account to join the conversation.
20 Jun 2021 16:59 #212500
by Boris
Replied by Boris on topic Another spindle encoder question Orac/7i96
Ok it's not looking like a hardware issue. I've just redone the Pncconf wizard and included the PyVCP GUI which has a spindle RPM scale. When I set the spindle running in that the small GUI window displays the rpm but the main gmoccapy window does not show any rpm.
Has anyone come across this before? I appreciate all of your time. Cheers.
Has anyone come across this before? I appreciate all of your time. Cheers.
Please Log in or Create an account to join the conversation.
20 Jun 2021 21:03 #212514
by PCW
Replied by PCW on topic Another spindle encoder question Orac/7i96
Its' likely that GMOCCAPY's RPM display pin is not connected
I have no idea what this is called but
halcmd show pin
will show all pins
and
halcmd show pin | grep -e spindle -e speed -e rpm
may narrow it down (but might miss it)
I have no idea what this is called but
halcmd show pin
will show all pins
and
halcmd show pin | grep -e spindle -e speed -e rpm
may narrow it down (but might miss it)
Please Log in or Create an account to join the conversation.
Moderators: piasdom
Time to create page: 0.093 seconds