Trying to get Mesa 5i25 to generate steps for Gecko G320

More
15 Dec 2020 22:07 #192078 by eatond2015
I’m stuck and could use some help please.

I have a ShopTask set up with a servo motor powering x, y, and z. The servos are powered by Gecko G320s, which were originally controlled via a parallel port. When that computer died, I decided to up my game with a Mesa 5i25 and IEEE cable going to a generic BOB which then feeds the Geckos.

I hooked everything up, flashed the 5i25 with the 5i25_prob_rfx2 firmware, and used PNCConf wizard to create a basic LinuxCNC configuration. After checking things over, I fired the mill up. No smoke and everything looked ok until I tried to move an axis. Nothing happened. Since then, I’ve read a lot, tried numerous things, and this problem continues to kick my butt.

Here’s where I’m at now.

Configuration:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
linuxcnc version= 2.8.1

Configuration Name: HOSTMOT2

General configuration information:

BoardName : MESA5I25
FPGA Size: 9 KGates
FPGA Pins: 144
Number of IO Ports: 2
Width of one I/O port: 17
Clock Low frequency: 33.3333 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: WatchDog
There are 1 of WatchDog in configuration
Version: 0
Registers: 3
BaseAddress: 0C00
ClockFrequency: 33.333 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: IOPort
There are 2 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 33.333 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: QCount
There are 2 of QCount in configuration
Version: 2
Registers: 5
BaseAddress: 3000
ClockFrequency: 33.333 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: StepGen
There are 8 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 33.333 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Module: PWM
There are 2 of PWM in configuration
Version: 0
Registers: 5
BaseAddress: 4100
ClockFrequency: 200.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: 33.333 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes

Configuration pin-out:

IO Connections for P3
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

1 0 IOPort None
14 1 IOPort PWM 0 PWM (Out)
2 2 IOPort StepGen 0 Step/Table1 (Out)
15 3 IOPort None
3 4 IOPort StepGen 0 Dir/Table2 (Out)
16 5 IOPort PWM 0 Dir (Out)
4 6 IOPort StepGen 1 Step/Table1 (Out)
17 7 IOPort None
5 8 IOPort StepGen 1 Dir/Table2 (Out)
6 9 IOPort StepGen 2 Step/Table1 (Out)
7 10 IOPort StepGen 2 Dir/Table2 (Out)
8 11 IOPort StepGen 3 Step/Table1 (Out)
9 12 IOPort StepGen 3 Dir/Table2 (Out)
10 13 IOPort None
11 14 IOPort QCount 0 Quad-A (In)
12 15 IOPort QCount 0 Quad-B (In)
13 16 IOPort QCount 0 Quad-IDX (In)

IO Connections for P2
Pin# I/O Pri. func Sec. func Chan Pin func Pin Dir

1 17 IOPort None
14 18 IOPort PWM 1 PWM (Out)
2 19 IOPort StepGen 4 Step/Table1 (Out)
15 20 IOPort None
3 21 IOPort StepGen 4 Dir/Table2 (Out)
16 22 IOPort PWM 1 Dir (Out)
4 23 IOPort StepGen 5 Step/Table1 (Out)
17 24 IOPort None
5 25 IOPort StepGen 5 Dir/Table2 (Out)
6 26 IOPort StepGen 6 Step/Table1 (Out)
7 27 IOPort StepGen 6 Dir/Table2 (Out)
8 28 IOPort StepGen 7 Step/Table1 (Out)
9 29 IOPort StepGen 7 Dir/Table2 (Out)
10 30 IOPort None
11 31 IOPort QCount 1 Quad-A (In)
12 32 IOPort QCount 1 Quad-B (In)
13 33 IOPort QCount 1 Quad-IDX (In)


My understanding is that should be giving me Step X on pin 2 and Dir X on pin 3. With
The computer on but linuxcnc unloaded, I see all the output pins on the IEEE cable floating at 5 volts. Same thing for the outputs on the BOB.

At this point, I can play with the following hal commands and turn the two LEDs on the 5i25 on and off.

$ halrun
halcmd: loadrt hostmot2
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
halcmd: loadrt hm2_pci
hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
hm2_pci: discovered 5i25 at 0000:01:05.0
hm2/hm2_5i25.0: Low Level init 0.15
hm2/hm2_5i25.0: 34 I/O Pins used:
hm2/hm2_5i25.0: IO Pin 000 (P3-01): IOPort
hm2/hm2_5i25.0: IO Pin 001 (P3-14): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_5i25.0: IO Pin 002 (P3-02): StepGen #0, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 003 (P3-15): IOPort
hm2/hm2_5i25.0: IO Pin 004 (P3-03): StepGen #0, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 005 (P3-16): PWMGen #0, pin Out1 (Dir or Down) (Output)
hm2/hm2_5i25.0: IO Pin 006 (P3-04): StepGen #1, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 007 (P3-17): IOPort
hm2/hm2_5i25.0: IO Pin 008 (P3-05): StepGen #1, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 009 (P3-06): StepGen #2, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 010 (P3-07): StepGen #2, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 011 (P3-08): StepGen #3, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 012 (P3-09): StepGen #3, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 013 (P3-10): IOPort
hm2/hm2_5i25.0: IO Pin 014 (P3-11): Encoder #0, pin A (Input)
hm2/hm2_5i25.0: IO Pin 015 (P3-12): Encoder #0, pin B (Input)
hm2/hm2_5i25.0: IO Pin 016 (P3-13): Encoder #0, pin Index (Input)
hm2/hm2_5i25.0: IO Pin 017 (P2-01): IOPort
hm2/hm2_5i25.0: IO Pin 018 (P2-14): PWMGen #1, pin Out0 (PWM or Up) (Output)
hm2/hm2_5i25.0: IO Pin 019 (P2-02): StepGen #4, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 020 (P2-15): IOPort
hm2/hm2_5i25.0: IO Pin 021 (P2-03): StepGen #4, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 022 (P2-16): PWMGen #1, pin Out1 (Dir or Down) (Output)
hm2/hm2_5i25.0: IO Pin 023 (P2-04): StepGen #5, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 024 (P2-17): IOPort
hm2/hm2_5i25.0: IO Pin 025 (P2-05): StepGen #5, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 026 (P2-06): StepGen #6, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 027 (P2-07): StepGen #6, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 028 (P2-08): StepGen #7, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 029 (P2-09): StepGen #7, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 030 (P2-10): IOPort
hm2/hm2_5i25.0: IO Pin 031 (P2-11): Encoder #1, pin A (Input)
hm2/hm2_5i25.0: IO Pin 032 (P2-12): Encoder #1, pin B (Input)
hm2/hm2_5i25.0: IO Pin 033 (P2-13): Encoder #1, pin Index (Input)
hm2/hm2_5i25.0: registered
hm2_5i25.0: initialized AnyIO board at 0000:01:05.0
halcmd: loadrt threads
halcmd: addf hm2_5i25.0.read thread1
halcmd: addf hm2_5i25.0.write thread1
halcmd: start
halcmd: show pin
Component Pins:
Owner Type Dir Value Name
7 s32 OUT 0 hm2_5i25.0.encoder.00.count
7 s32 OUT 0 hm2_5i25.0.encoder.00.count-latched
7 bit I/O FALSE hm2_5i25.0.encoder.00.index-enable
7 bit OUT TRUE hm2_5i25.0.encoder.00.input-a
7 bit OUT TRUE hm2_5i25.0.encoder.00.input-b
7 bit OUT FALSE hm2_5i25.0.encoder.00.input-index
7 bit IN FALSE hm2_5i25.0.encoder.00.latch-enable
7 bit IN FALSE hm2_5i25.0.encoder.00.latch-polarity
7 float OUT 0 hm2_5i25.0.encoder.00.position
7 float OUT 0 hm2_5i25.0.encoder.00.position-latched
7 bit OUT FALSE hm2_5i25.0.encoder.00.quad-error
7 bit IN FALSE hm2_5i25.0.encoder.00.quad-error-enable
7 s32 OUT 65532 hm2_5i25.0.encoder.00.rawcounts
7 s32 OUT 65532 hm2_5i25.0.encoder.00.rawlatch
7 bit IN FALSE hm2_5i25.0.encoder.00.reset
7 float OUT 0 hm2_5i25.0.encoder.00.velocity
7 float OUT 0 hm2_5i25.0.encoder.00.velocity-rpm
7 s32 OUT 0 hm2_5i25.0.encoder.01.count
7 s32 OUT 0 hm2_5i25.0.encoder.01.count-latched
7 bit I/O FALSE hm2_5i25.0.encoder.01.index-enable
7 bit OUT TRUE hm2_5i25.0.encoder.01.input-a
7 bit OUT TRUE hm2_5i25.0.encoder.01.input-b
7 bit OUT FALSE hm2_5i25.0.encoder.01.input-index
7 bit IN FALSE hm2_5i25.0.encoder.01.latch-enable
7 bit IN FALSE hm2_5i25.0.encoder.01.latch-polarity
7 float OUT 0 hm2_5i25.0.encoder.01.position
7 float OUT 0 hm2_5i25.0.encoder.01.position-latched
7 bit OUT FALSE hm2_5i25.0.encoder.01.quad-error
7 bit IN FALSE hm2_5i25.0.encoder.01.quad-error-enable
7 s32 OUT 65534 hm2_5i25.0.encoder.01.rawcounts
7 s32 OUT 65534 hm2_5i25.0.encoder.01.rawlatch
7 bit IN FALSE hm2_5i25.0.encoder.01.reset
7 float OUT 0 hm2_5i25.0.encoder.01.velocity
7 float OUT 0 hm2_5i25.0.encoder.01.velocity-rpm
7 bit IN FALSE hm2_5i25.0.encoder.hires-timestamp
7 u32 IN 0x00001FC8 hm2_5i25.0.encoder.sample-frequency
7 bit OUT TRUE hm2_5i25.0.gpio.000.in
7 bit OUT FALSE hm2_5i25.0.gpio.000.in_not
7 bit IN FALSE hm2_5i25.0.gpio.000.out
7 bit OUT FALSE hm2_5i25.0.gpio.001.in
7 bit OUT TRUE hm2_5i25.0.gpio.001.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.002.in
7 bit OUT TRUE hm2_5i25.0.gpio.002.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.003.in
7 bit OUT FALSE hm2_5i25.0.gpio.003.in_not
7 bit IN FALSE hm2_5i25.0.gpio.003.out
7 bit OUT FALSE hm2_5i25.0.gpio.004.in
7 bit OUT TRUE hm2_5i25.0.gpio.004.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.005.in
7 bit OUT TRUE hm2_5i25.0.gpio.005.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.006.in
7 bit OUT TRUE hm2_5i25.0.gpio.006.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.007.in
7 bit OUT FALSE hm2_5i25.0.gpio.007.in_not
7 bit IN FALSE hm2_5i25.0.gpio.007.out
7 bit OUT FALSE hm2_5i25.0.gpio.008.in
7 bit OUT TRUE hm2_5i25.0.gpio.008.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.009.in
7 bit OUT TRUE hm2_5i25.0.gpio.009.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.010.in
7 bit OUT TRUE hm2_5i25.0.gpio.010.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.011.in
7 bit OUT TRUE hm2_5i25.0.gpio.011.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.012.in
7 bit OUT TRUE hm2_5i25.0.gpio.012.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.013.in
7 bit OUT FALSE hm2_5i25.0.gpio.013.in_not
7 bit IN FALSE hm2_5i25.0.gpio.013.out
7 bit OUT TRUE hm2_5i25.0.gpio.014.in
7 bit OUT FALSE hm2_5i25.0.gpio.014.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.015.in
7 bit OUT FALSE hm2_5i25.0.gpio.015.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.016.in
7 bit OUT FALSE hm2_5i25.0.gpio.016.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.017.in
7 bit OUT FALSE hm2_5i25.0.gpio.017.in_not
7 bit IN FALSE hm2_5i25.0.gpio.017.out
7 bit OUT FALSE hm2_5i25.0.gpio.018.in
7 bit OUT TRUE hm2_5i25.0.gpio.018.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.019.in
7 bit OUT TRUE hm2_5i25.0.gpio.019.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.020.in
7 bit OUT FALSE hm2_5i25.0.gpio.020.in_not
7 bit IN FALSE hm2_5i25.0.gpio.020.out
7 bit OUT FALSE hm2_5i25.0.gpio.021.in
7 bit OUT TRUE hm2_5i25.0.gpio.021.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.022.in
7 bit OUT TRUE hm2_5i25.0.gpio.022.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.023.in
7 bit OUT TRUE hm2_5i25.0.gpio.023.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.024.in
7 bit OUT FALSE hm2_5i25.0.gpio.024.in_not
7 bit IN FALSE hm2_5i25.0.gpio.024.out
7 bit OUT FALSE hm2_5i25.0.gpio.025.in
7 bit OUT TRUE hm2_5i25.0.gpio.025.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.026.in
7 bit OUT TRUE hm2_5i25.0.gpio.026.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.027.in
7 bit OUT TRUE hm2_5i25.0.gpio.027.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.028.in
7 bit OUT TRUE hm2_5i25.0.gpio.028.in_not
7 bit OUT FALSE hm2_5i25.0.gpio.029.in
7 bit OUT TRUE hm2_5i25.0.gpio.029.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.030.in
7 bit OUT FALSE hm2_5i25.0.gpio.030.in_not
7 bit IN FALSE hm2_5i25.0.gpio.030.out
7 bit OUT TRUE hm2_5i25.0.gpio.031.in
7 bit OUT FALSE hm2_5i25.0.gpio.031.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.032.in
7 bit OUT FALSE hm2_5i25.0.gpio.032.in_not
7 bit OUT TRUE hm2_5i25.0.gpio.033.in
7 bit OUT FALSE hm2_5i25.0.gpio.033.in_not
7 bit IN FALSE hm2_5i25.0.led.CR01
7 bit IN FALSE hm2_5i25.0.led.CR02
7 bit IN FALSE hm2_5i25.0.pwmgen.00.enable
7 float IN 0 hm2_5i25.0.pwmgen.00.value
7 bit IN FALSE hm2_5i25.0.pwmgen.01.enable
7 float IN 0 hm2_5i25.0.pwmgen.01.value
7 s32 OUT 25120 hm2_5i25.0.read.time
7 s32 OUT 0 hm2_5i25.0.read_gpio.time
7 bit IN FALSE hm2_5i25.0.stepgen.00.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.00.counts
7 float OUT 0 hm2_5i25.0.stepgen.00.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.00.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.00.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.00.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.00.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.00.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.00.enable
7 float IN 0 hm2_5i25.0.stepgen.00.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.00.position-fb
7 float IN 0 hm2_5i25.0.stepgen.00.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.00.velocity-fb
7 bit IN FALSE hm2_5i25.0.stepgen.01.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.01.counts
7 float OUT 0 hm2_5i25.0.stepgen.01.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.01.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.01.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.01.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.01.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.01.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.01.enable
7 float IN 0 hm2_5i25.0.stepgen.01.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.01.position-fb
7 float IN 0 hm2_5i25.0.stepgen.01.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.01.velocity-fb
7 bit IN FALSE hm2_5i25.0.stepgen.02.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.02.counts
7 float OUT 0 hm2_5i25.0.stepgen.02.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.02.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.02.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.02.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.02.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.02.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.02.enable
7 float IN 0 hm2_5i25.0.stepgen.02.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.02.position-fb
7 float IN 0 hm2_5i25.0.stepgen.02.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.02.velocity-fb
7 bit IN FALSE hm2_5i25.0.stepgen.03.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.03.counts
7 float OUT 0 hm2_5i25.0.stepgen.03.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.03.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.03.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.03.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.03.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.03.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.03.enable
7 float IN 0 hm2_5i25.0.stepgen.03.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.03.position-fb
7 float IN 0 hm2_5i25.0.stepgen.03.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.03.velocity-fb
7 bit IN FALSE hm2_5i25.0.stepgen.04.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.04.counts
7 float OUT 0 hm2_5i25.0.stepgen.04.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.04.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.04.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.04.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.04.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.04.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.04.enable
7 float IN 0 hm2_5i25.0.stepgen.04.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.04.position-fb
7 float IN 0 hm2_5i25.0.stepgen.04.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.04.velocity-fb
7 bit IN FALSE hm2_5i25.0.stepgen.05.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.05.counts
7 float OUT 0 hm2_5i25.0.stepgen.05.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.05.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.05.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.05.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.05.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.05.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.05.enable
7 float IN 0 hm2_5i25.0.stepgen.05.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.05.position-fb
7 float IN 0 hm2_5i25.0.stepgen.05.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.05.velocity-fb
7 bit IN FALSE hm2_5i25.0.stepgen.06.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.06.counts
7 float OUT 0 hm2_5i25.0.stepgen.06.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.06.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.06.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.06.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.06.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.06.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.06.enable
7 float IN 0 hm2_5i25.0.stepgen.06.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.06.position-fb
7 float IN 0 hm2_5i25.0.stepgen.06.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.06.velocity-fb
7 bit IN FALSE hm2_5i25.0.stepgen.07.control-type
7 s32 OUT 0 hm2_5i25.0.stepgen.07.counts
7 float OUT 0 hm2_5i25.0.stepgen.07.dbg_err_at_match
7 float OUT 0 hm2_5i25.0.stepgen.07.dbg_ff_vel
7 float OUT 0 hm2_5i25.0.stepgen.07.dbg_pos_minus_prev_cmd
7 float OUT 0 hm2_5i25.0.stepgen.07.dbg_s_to_match
7 s32 OUT 0 hm2_5i25.0.stepgen.07.dbg_step_rate
7 float OUT 0 hm2_5i25.0.stepgen.07.dbg_vel_error
7 bit IN FALSE hm2_5i25.0.stepgen.07.enable
7 float IN 0 hm2_5i25.0.stepgen.07.position-cmd
7 float OUT 0 hm2_5i25.0.stepgen.07.position-fb
7 float IN 0 hm2_5i25.0.stepgen.07.velocity-cmd
7 float OUT 0 hm2_5i25.0.stepgen.07.velocity-fb
7 bit I/O FALSE hm2_5i25.0.watchdog.has_bit
7 s32 OUT 12264 hm2_5i25.0.write.time
7 s32 OUT 0 hm2_5i25.0.write_gpio.time
11 s32 OUT 44560 thread1.time

halcmd: setp hm2_5i25.0.led.CR01 1
halcmd: setp hm2_5i25.0.led.CR01 0
halcmd: setp hm2_5i25.0.led.CR02 1
halcmd: setp hm2_5i25.0.led.CR02 0
Halcmd:


So it looks like the 5i25 is at least minimally functional. Launching linuxcnc, I see the output pins drop to zero volts. If I take the machine out of e-stop, zero the axis, and then fire off a MDI command to move the axis, I see the x dir signal change depending on the direction of the move. Same thing for the other axis. What I don’t see is any activity on the x step pin (or y step, z step).

What I’m expecting to see is a pulse train when the axis should be moving. Currently, I have the computer, cable, and BOB on my workbench in my office where things are more comfortable. I’m using a Tektronix 2215 scope to check the outputs. All I ever see is the step output sitting at zero.

Here’s the config files for linuxcnc:
$ cat ShopTask_Mesa.ini
# Generated by PNCconf at Fri Dec 11 22:46:25 2020
# Using LinuxCNC version: 2.8
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

[EMC]
MACHINE = ShopTask_Mesa
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/dan/linuxcnc/nc_files
PYVCP = pyvcp-panel.xml
INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 0.250000
MAX_LINEAR_VELOCITY = 1.000000
MIN_LINEAR_VELOCITY = 0.016670
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 160000

[HMOT]
# **** This is for info only ****
CARD0=hm2_5i25.0

[HAL]
HALUI = halui
HALFILE = ShopTask_Mesa.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]

[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ

[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_QUILL_UP = 1

#******************************************
[AXIS_X]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -8.0
MAX_LIMIT = 8.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 1.25
STEPGEN_MAXACCEL = 37.50
P = 6000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 2000
DIRHOLD = 2000

STEPLEN = 1500
STEPSPACE = 2500
STEP_SCALE = 200.0
MIN_LIMIT = -8.0
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
#******************************************

#******************************************
[AXIS_Y]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -8.0
MAX_LIMIT = 8.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 1.25
STEPGEN_MAXACCEL = 37.50
P = 10000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 2000
DIRHOLD = 2000
STEPLEN = 1500
STEPSPACE = 2500
STEP_SCALE = 200.0

MIN_LIMIT = -8.0
MAX_LIMIT = 8.0
HOME_OFFSET = 0.0
#******************************************

#******************************************
[AXIS_Z]
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 30.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 1.25
STEPGEN_MAXACCEL = 37.50
P = 10000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 2000
DIRHOLD = 2000
STEPLEN = 1500
STEPSPACE = 2500
STEP_SCALE = 200.0
MIN_LIMIT = -4.0
MAX_LIMIT = 4.0
HOME_OFFSET = 0.0
#******************************************



$ cat ShopTask_Mesa.hal
# Generated by PNCconf at Fri Dec 11 22:46:25 2020
# Using LinuxCNC version: 2.8
# If you make changes to this file, they will be
# overwritten when you run PNCconf again

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=2 num_pwmgens=2 num_stepgens=8"
setp hm2_5i25.0.pwmgen.pwm_frequency 20000
setp hm2_5i25.0.pwmgen.pdm_frequency 6000000
setp hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s

addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf hm2_5i25.0.write servo-thread

# external output signals

# external input signals

#*******************
# AXIS X JOINT 0
#*******************

setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.000500

net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output

# Step Gen signals/setup

setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 1
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable

# ---setup home / limit switch signals---

net x-home-sw => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in

#*******************
# AXIS Y JOINT 1
#*******************

setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y.maxerror 0.000500

net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-pos-fb => pid.y.feedback
net y-output <= pid.y.output

# Step Gen signals/setup

setp hm2_5i25.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 1
setp hm2_5i25.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net y-pos-cmd <= joint.1.motor-pos-cmd
net y-vel-cmd <= joint.1.vel-cmd
net y-output <= hm2_5i25.0.stepgen.01.velocity-cmd
net y-pos-fb <= hm2_5i25.0.stepgen.01.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => hm2_5i25.0.stepgen.01.enable

# ---setup home / limit switch signals---

net y-home-sw => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in

#*******************
# AXIS Z JOINT 2
#*******************

setp pid.z.Pgain [JOINT_2]P
setp pid.z.Igain [JOINT_2]I
setp pid.z.Dgain [JOINT_2]D
setp pid.z.bias [JOINT_2]BIAS
setp pid.z.FF0 [JOINT_2]FF0
setp pid.z.FF1 [JOINT_2]FF1
setp pid.z.FF2 [JOINT_2]FF2
setp pid.z.deadband [JOINT_2]DEADBAND
setp pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.z.maxerror 0.000500

net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output

# Step Gen signals/setup

setp hm2_5i25.0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_5i25.0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_5i25.0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_5i25.0.stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp hm2_5i25.0.stepgen.02.step_type 0
setp hm2_5i25.0.stepgen.02.control-type 1
setp hm2_5i25.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net z-pos-cmd <= joint.2.motor-pos-cmd
net z-vel-cmd <= joint.2.vel-cmd
net z-output <= hm2_5i25.0.stepgen.02.velocity-cmd
net z-pos-fb <= hm2_5i25.0.stepgen.02.position-fb
net z-pos-fb => joint.2.motor-pos-fb
net z-enable <= joint.2.amp-enable-out
net z-enable => hm2_5i25.0.stepgen.02.enable

# ---setup home / limit switch signals---

net z-home-sw => joint.2.home-sw-in
net z-neg-limit => joint.2.neg-lim-sw-in
net z-pos-limit => joint.2.pos-lim-sw-in


#******************************
# connect miscellaneous signals
#******************************

# ---HALUI signals---

net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi

# ---coolant signals---

net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood

# ---probe signal---

net probe-in => motion.probe-input

# ---motion control signals---

net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled

# ---digital in / out signals---

# ---estop signals---

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

# ---manual tool change signals---

loadusr -W hal_manualtoolchange
net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-change-confirmed 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
$


Any thoughts on what to try next would be greatly appreciated.



Dan Eaton

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

More
15 Dec 2020 22:19 #192080 by PCW
1. Set servo period to 1000000 (1 ms)
2. Set all P values to 1000
3. Set all steptime/stepspace values to 5000
4. Set all dirsetup/dirhold values to 10000
5. Try running LinuxCNC again

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

More
17 Dec 2020 22:54 #192277 by eatond2015
Thanks so much for the help. Following your suggestion, I was able to actually see a pulse train on my o-scope. The pulses are still very brief in duration and don't look like they get much over 2 volts in amplitude, but that may just be an artifact of me using an old scope to look at this stuff.

I moved the computer back out to the shop today. Got everything hooked back up and fired LinuxCNC up. Tried moving the x axis with an MDI move, but still no joy.

Before I do anything else, I'll drag the scope out to the shop and verify the step and direction signals are actually getting to the G320. If they are, I guess my next step after that will be to increase steplen and stepspace until I get a longer duration pulse that I can actual measure the correct amplitude of. I'm not interested in speed at this point as much as I am just getting things working again.

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

More
17 Dec 2020 23:26 #192278 by tommylight
If i remember correctly, G320 has an error pin that has to be at 5V for the drive to be enabled, and it has single ended inputs that need to be connected to +5V common and step and dir on the Mesa board. Might need to set the timings wider in the ini as PCW mentioned.
Do not use the 5V for the encoder, use the 5V from a USB cable or separate power supply.

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

More
17 Dec 2020 23:28 #192281 by PCW
Note that the G320 uses active low step pulses so if your BOB is
not inverting, you would need to invert the step pulses in hal:

setp hm2_5i25.0.stepgen.00.step.invert_output true

The 5I25 should have 5V amplitude output signals
though the outputs will only drive significant current
to 3.3V or so.

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

More
18 Dec 2020 01:42 - 18 Dec 2020 01:43 #192294 by jmelson

If i remember correctly, G320 has an error pin that has to be at 5V for the drive to be enabled

Right! It needs to be pulled up to +5V for slightly more than one second to enable the drive. You can release the pull-up after the drive comes ready, then that like will pull loow to indicate it has gone to fault status.

Jon
Last edit: 18 Dec 2020 01:43 by jmelson.
The following user(s) said Thank You: tommylight

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

Moderators: PCWjmelson
Time to create page: 0.168 seconds
Powered by Kunena Forum