-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
I spent almost a whole day on this.
In the documentation it says:
loadrt hm2_modbus ports="7i96s.0.pktuart.0" mbccbs="/path/to/myfile.mbccb"
and it should be:
loadrt hm2_modbus ports="hm2_7i96s.0.pktuart.0" mbccbs="/path/to/myfile.mbccb"
| loadrt hm2_modbus ports="7i96s.0.pktuart.0" mbccbs="/path/to/myfile.mbccb" |
The problem is that I couldn't figure out from the documentation where to find the port name.
I tried:
zdenek@cnc:~$ sudo mesaflash --device 7i96s --addr 10.10.10.10 --readhmid
Configuration Name: HOSTMOT2
General configuration information:
BoardName : MESA7I96
FPGA Size: 20 KGates
FPGA Pins: 256
Number of IO Ports: 3
Width of one I/O port: 17
Clock Low frequency: 100.0000 MHz
Clock High frequency: 160.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: OutM
There are 1 of OutM in configuration
Version: 0
Registers: 1
BaseAddress: B000
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: 160.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: StepGen
There are 5 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: PktUARTTX
There are 1 of PktUARTTX in configuration
Version: 2
Registers: 4
BaseAddress: 6100
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: PktUARTRX
There are 1 of PktUARTRX in configuration
Version: 2
Registers: 4
BaseAddress: 6500
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 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: InM
There are 1 of InM in configuration
Version: 0
Registers: 5
BaseAddress: 8500
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 -> 7I96_0
Pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
TB3-1 0 IOPort InM 0 Input0 (In)
TB3-2 1 IOPort InM 0 Input1 (In)
TB3-3 2 IOPort InM 0 Input2 (In)
TB3-4 3 IOPort InM 0 Input3 (In)
TB3-5 4 IOPort InM 0 Input4 (In)
TB3-6 5 IOPort InM 0 Input5 (In)
TB3-7 6 IOPort InM 0 Input6 (In)
TB3-8 7 IOPort InM 0 Input7 (In)
TB3-9 8 IOPort InM 0 Input8 (In)
TB3-10 9 IOPort InM 0 Input9 (In)
TB3-11 10 IOPort InM 0 Input10 (In)
TB3-13,14 11 IOPort SSR 0 Out-00 (Out)
TB3-15,16 12 IOPort SSR 0 Out-01 (Out)
TB3-17,18 13 IOPort SSR 0 Out-02 (Out)
TB3-19,20 14 IOPort SSR 0 Out-03 (Out)
TB3-21,22 15 IOPort OutM 0 Output4 (Out)
TB3-23,24 16 IOPort OutM 0 Output5 (Out)
IO Connections for TB1/TB2 -> 7I96_1
Pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
TB1-2,3 17 IOPort StepGen 0 Step/Table1 (Out)
TB1-4,5 18 IOPort StepGen 0 Dir/Table2 (Out)
TB1-8,9 19 IOPort StepGen 1 Step/Table1 (Out)
TB1-10,11 20 IOPort StepGen 1 Dir/Table2 (Out)
TB1-14,15 21 IOPort StepGen 2 Step/Table1 (Out)
TB1-16,17 22 IOPort StepGen 2 Dir/Table2 (Out)
TB1-20,21 23 IOPort StepGen 3 Step/Table1 (Out)
TB1-22,23 24 IOPort StepGen 3 Dir/Table2 (Out)
TB2-2,3 25 IOPort StepGen 4 Step/Table1 (Out)
TB2-4,5 26 IOPort StepGen 4 Dir/Table2 (Out)
TB2-7,8 27 IOPort QCount 0 Quad-A (In)
TB2-10,11 28 IOPort QCount 0 Quad-B (In)
TB2-13,14 29 IOPort QCount 0 Quad-IDX (In)
TB2-16,17 30 IOPort PktUARTRX 0 RXData (In)
TB2-18,19 31 IOPort PktUARTTX 0 TXData (Out)
Internal-TXEn 32 IOPort PktUARTTX 0 TXEna (Out)
Internal 33 IOPort SSR 0 AC Ref (Out)
IO Connections for P1 -> 7I96_2
Pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
P1-01/DB25-01 34 IOPort None
P1-02/DB25-14 35 IOPort None
P1-03/DB25-02 36 IOPort None
P1-04/DB25-15 37 IOPort None
P1-05/DB25-03 38 IOPort None
P1-06/DB25-16 39 IOPort None
P1-07/DB25-04 40 IOPort None
P1-08/DB25-17 41 IOPort None
P1-09/DB25-05 42 IOPort None
P1-11/DB25-06 43 IOPort None
P1-13/DB25-07 44 IOPort None
P1-15/DB25-08 45 IOPort None
P1-17/DB25-09 46 IOPort None
P1-19/DB25-10 47 IOPort None
P1-21/DB25-11 48 IOPort None
P1-23/DB25-12 49 IOPort None
P1-25/DB25-13 50 IOPort None
I tried Halshow. Nothing too.
The problem is that if the name is wrong, it doesn't write any message indicating that there is a problem with the port even with debug=5:
zdenek@cnc:~$ /home/zdenek/linuxcnc/linuxcnc-zz912/scripts/linuxcnc '/home/zdenek/linuxcnc/configs/DedaCNC-010/DedaCNC-010.ini'
LINUXCNC - 2.10.0~pre1
Machine configuration directory is '/home/zdenek/linuxcnc/configs/DedaCNC-010'
Machine configuration file is 'DedaCNC-010.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./DedaCNC-010.hal
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 10.10.10.10: INFO: Hardware address (MAC): 00:60:1b:16:80:30
hm2_eth: discovered 7I96S
hm2/hm2_7i96s.0: Low Level init 0.15
hm2/hm2_7i96s.0: created PktUART Interface function hm2_7i96s.0.pktuart.0.
hm2/hm2_7i96s.0: 51 I/O Pins used:
hm2/hm2_7i96s.0: IO Pin 000 (TB3-01): InM Input Module #0, pin in0,enca0 (Input)
hm2/hm2_7i96s.0: IO Pin 001 (TB3-02): InM Input Module #0, pin in1,encb0 (Input)
hm2/hm2_7i96s.0: IO Pin 002 (TB3-03): InM Input Module #0, pin in2,enca1 (Input)
.......................
hm2/hm2_7i96s.0: IO Pin 049 (P1-23/DB25-12): IOPort
hm2/hm2_7i96s.0: IO Pin 050 (P1-25/DB25-13): IOPort
hm2/hm2_7i96s.0: registered
HAL: initializing component 'hm2_modbus'
smalloc_dn: shmem available 884515
HAL: component 'hm2_modbus' initialized, ID = 41
smalloc_up: shmem available 884424
smalloc_up: shmem available 884384
smalloc_up: shmem available 884344
HAL: exporting function 'hm2_modbus.0.process'
smalloc_dn: shmem available 884232
HAL: creating pin 'hm2_modbus.0.process.time'
smalloc_dn: shmem available 884120
HAL: creating parameter 'hm2_modbus.0.process.tmax'
smalloc_dn: shmem available 884024
HAL: creating parameter 'hm2_modbus.0.process.tmax-increased'
smalloc_dn: shmem available 883928
HAL: creating parameter 'hm2_modbus.0.baudrate'
smalloc_dn: shmem available 883832
HAL: creating parameter 'hm2_modbus.0.parity'
smalloc_dn: shmem available 883736
HAL: creating parameter 'hm2_modbus.0.stopbits'
smalloc_dn: shmem available 883640
HAL: creating parameter 'hm2_modbus.0.icdelay'
smalloc_dn: shmem available 883544
HAL: creating parameter 'hm2_modbus.0.txdelay'
smalloc_dn: shmem available 883448
HAL: creating parameter 'hm2_modbus.0.rxdelay'
smalloc_dn: shmem available 883352
HAL: creating parameter 'hm2_modbus.0.drivedelay'
smalloc_dn: shmem available 883256
HAL: creating pin 'hm2_modbus.0.suspend'
smalloc_dn: shmem available 883144
HAL: creating pin 'hm2_modbus.0.reset'
smalloc_dn: shmem available 883032
HAL: creating pin 'hm2_modbus.0.fault'
smalloc_dn: shmem available 882920
HAL: creating pin 'hm2_modbus.0.fault-command'
smalloc_dn: shmem available 882808
HAL: creating pin 'hm2_modbus.0.last-error-code'
smalloc_dn: shmem available 882696
HAL: removing component 41
HAL: component 41 removed, name = 'hm2_modbus'
./DedaCNC-010.hal:10: waitpid failed /home/zdenek/linuxcnc/linuxcnc-zz912/bin/rtapi_app hm2_modbus
./DedaCNC-010.hal:10: /home/zdenek/linuxcnc/linuxcnc-zz912/bin/rtapi_app exited without becoming ready
./DedaCNC-010.hal:10: insmod for hm2_modbus failed, returned -1
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
USRMOT: ERROR: command 32 timeout (seq: 1)
emcMotionInit: emcTrajInit failed
HAL: removing component 04
HAL: component 04 removed, name = 'tpmod'
HAL: removing component 09
HAL: component 09 removed, name = 'homemod'
HAL: removing component 28
HAL: component 28 removed, name = 'trivkins'
MOTION: cleanup_module() started.
HAL: threads stopped
HAL: removing component 31
HAL: component 31 removed, name = 'motmod'
MOTION: cleanup_module() finished.
hm2: unloading
HAL: removing component 35
HAL: component 35 removed, name = 'hostmot2'
hm2_eth: in hm2_eth_reset
HAL: removing component 38
HAL: component 38 removed, name = 'hm2_eth'
hm2_eth: HostMot2 ethernet driver unloaded
Note: Using POSIX realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/zdenek/linuxcnc_debug.txt
and
/home/zdenek/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels