Brother TC-225 Retrofit and Robot integration

More
04 Apr 2021 11:29 #204736 by andypugh
Here is a debian package of the latest build.

You can install with
sudo apt-get install ./mesaflash_3.4.0~pre1-1_amd64.deb
The ./ in front of the file name is a hint to apt-get to look for a local file rather than look on the repositories.
Attachments:

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

More
04 Apr 2021 11:32 #204737 by andypugh

Now i think this shouldn't stop me from continuing. Tried to make myself familiar with the hal and ini concept. if i understand correctly the hal file connects certain components with signals and the ini file has your parameters stored which the hal file references. Now are these two file in the most basic form all you need to run linuxcnc?


You don't even need those.

You can get a basic connection to your card with
halrun
loadrt hostmot2
loadrt hm2_eth board_ip=10.10.10.10

show pin

That won't actually do anything without a realtime thread running. (which you can also do from the command line)

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

More
04 Apr 2021 11:55 #204746 by timfaber

Here is a debian package of the latest build.

You can install with
sudo apt-get install ./mesaflash_3.4.0~pre1-1_amd64.deb
The ./ in front of the file name is a hint to apt-get to look for a local file rather than look on the repositories.


That didn't work for me
timfaber@Brother:~$ sudo apt-get install /mesaflash_3.4.0~pre1-1_amd64.deb
Reading package lists... Done
E: Unsupported file /mesaflash_3.4.0~pre1-1_amd64.deb given on commandline

Used this instead, dont know if it did the trick?
timfaber@Brother:~$ sudo dpkg -i ./mesaflash_3.4.0~pre1-1_amd64.deb
(Reading database ... 93359 files and directories currently installed.)
Preparing to unpack .../mesaflash_3.4.0~pre1-1_amd64.deb ...
Unpacking mesaflash (3.4.0~pre1-1) over (3.4.0~pre1-1) ...
Setting up mesaflash (3.4.0~pre1-1) ...
Processing triggers for man-db (2.8.5-2) ...

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

More
04 Apr 2021 12:04 #204747 by timfaber
Any idea what im doing wrong trying the start linuxcnc
timfaber@Brother:~$ linuxcnc /home/timfaber/linuxcnc/configs/brother/basic7i97.ini
LINUXCNC - 2.8.1
Machine configuration directory is '/home/timfaber/linuxcnc/configs/brother'
Machine configuration file is 'basic7i97.ini'
Starting LinuxCNC...
emc/iotask/ioControl.cc 702: can't load tool table.
Found file(REL): ./basic7i97.hal
Note: Using POSIX realtime
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:17:00:0f
hm2_eth: discovered 7I97
hm2/hm2_7i97.0: Low Level init 0.15
hm2/hm2_7i97.0: Smart Serial Firmware Version 43
hm2/hm2_7i97.0: 51 I/O Pins used:
hm2/hm2_7i97.0:     IO Pin 000 (TB3-04): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i97.0:     IO Pin 001 (TB3-08): PWMGen #1, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i97.0:     IO Pin 002 (TB3-12): PWMGen #2, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i97.0:     IO Pin 003 (TB3-16): PWMGen #3, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i97.0:     IO Pin 004 (TB3-20): PWMGen #4, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i97.0:     IO Pin 005 (AN_ENA4): PWMGen #4, pin Not-Enable (Output)
hm2/hm2_7i97.0:     IO Pin 006 (TB3-24): PWMGen #5, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i97.0:     IO Pin 007 (AN_ENA5): PWMGen #5, pin Not-Enable (Output)
hm2/hm2_7i97.0:     IO Pin 008 (AN-ENA0..3): PWMGen #0, pin Not-Enable (Output)
hm2/hm2_7i97.0:     IO Pin 009 (TB1-01/TB1-09): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_7i97.0:     IO Pin 010 (TB1-04/TB1-12): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_7i97.0:     IO Pin 011 (TB1-07/TB1-15): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_7i97.0:     IO Pin 012 (TB1-17/TB2-01): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_7i97.0:     IO Pin 013 (TB1-20/TB2-04): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_7i97.0:     IO Pin 014 (TB1-23/TB2-07): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_7i97.0:     IO Pin 015 (TB2-09/TB2-17): Muxed Encoder #2, pin Muxed A (Input)
hm2/hm2_7i97.0:     IO Pin 016 (TB2-12/TB2-20): Muxed Encoder #2, pin Muxed B (Input)
hm2/hm2_7i97.0:     IO Pin 017 (TB2-15/TB2-23): Muxed Encoder #2, pin Muxed Index (Input)
hm2/hm2_7i97.0:     IO Pin 018 (Internal EncMux): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_7i97.0:     IO Pin 019 (TB5-13/TB5-14): SSR #0, pin Out-00 (Output)
hm2/hm2_7i97.0:     IO Pin 020 (TB5-15/TB5-16): SSR #0, pin Out-01 (Output)
hm2/hm2_7i97.0:     IO Pin 021 (TB5-17/TB5-18): SSR #0, pin Out-02 (Output)
hm2/hm2_7i97.0:     IO Pin 022 (TB5-19/TB5-20): SSR #0, pin Out-03 (Output)
hm2/hm2_7i97.0:     IO Pin 023 (TB5-21/TB5-22): SSR #0, pin Out-04 (Output)
hm2/hm2_7i97.0:     IO Pin 024 (TB5-23/TB5-24): SSR #0, pin Out-05 (Output)
hm2/hm2_7i97.0:     IO Pin 025 (Internal InMux0): SSR #0, pin AC Ref (internal) (Output)
hm2/hm2_7i97.0:     IO Pin 026 (Internal InMux1): InMux Input Mux #0, pin addr0 (Output)
hm2/hm2_7i97.0:     IO Pin 027 (Internal InMux2): InMux Input Mux #0, pin addr1 (Output)
hm2/hm2_7i97.0:     IO Pin 028 (Internal InMux3): InMux Input Mux #0, pin addr2 (Output)
hm2/hm2_7i97.0:     IO Pin 029 (Internal InMuxData): InMux Input Mux #0, pin addr3 (Output)
hm2/hm2_7i97.0:     IO Pin 030 (TB4-15/TB4-16): InMux Input Mux #0, pin muxdata (Input)
hm2/hm2_7i97.0:     IO Pin 031 (TB4-17/TB4-18): IOPort
hm2/hm2_7i97.0:     IO Pin 032 (TB4-17/TB4-18): IOPort
hm2/hm2_7i97.0:     IO Pin 033 (P1-01): IOPort
hm2/hm2_7i97.0:     IO Pin 034 (P1-02): IOPort
hm2/hm2_7i97.0:     IO Pin 035 (P1-03): IOPort
hm2/hm2_7i97.0:     IO Pin 036 (P1-04): IOPort
hm2/hm2_7i97.0:     IO Pin 037 (P1-05): IOPort
hm2/hm2_7i97.0:     IO Pin 038 (P1-06): IOPort
hm2/hm2_7i97.0:     IO Pin 039 (P1-07): IOPort
hm2/hm2_7i97.0:     IO Pin 040 (P1-08): IOPort
hm2/hm2_7i97.0:     IO Pin 041 (P1-09): IOPort
hm2/hm2_7i97.0:     IO Pin 042 (P1-11): IOPort
hm2/hm2_7i97.0:     IO Pin 043 (P1-13): IOPort
hm2/hm2_7i97.0:     IO Pin 044 (P1-15): IOPort
hm2/hm2_7i97.0:     IO Pin 045 (P1-17): IOPort
hm2/hm2_7i97.0:     IO Pin 046 (P1-19): IOPort
hm2/hm2_7i97.0:     IO Pin 047 (P1-21): IOPort
hm2/hm2_7i97.0:     IO Pin 048 (P1-23): IOPort
hm2/hm2_7i97.0:     IO Pin 049 (P1-25): IOPort
hm2/hm2_7i97.0: registered
./basic7i97.hal:225: Unknown command '3600'
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Could not open command file 'shutdown.hal'
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
Note: Using POSIX realtime
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/timfaber/linuxcnc_debug.txt
and
    /home/timfaber/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

it seems to stop at

./basic7i97.hal:225: Unknown command '3600'

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

More
04 Apr 2021 12:18 #204750 by timfaber
Went around back to my control cabinet where the mesa card is, found that CR11 (init) was red (yellow according to the manual). " in normal operation CR11 and CR12 will be off. If either is on after power-up thereis a problem with configuring the FPGA" Maybe this is the reason why mesaflash cant find the board. Now to figure out what the problem is

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

More
04 Apr 2021 12:41 - 04 Apr 2021 12:41 #204752 by andypugh

sudo apt-get install ./mesaflash_3.4.0~pre1-1_amd64.deb
timfaber@Brother:~$ sudo apt-get install /mesaflash_3.4.0~pre1-1_amd64.deb


Not the same command. You missed out the dot in the dot-slash
Last edit: 04 Apr 2021 12:41 by andypugh.

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

More
04 Apr 2021 12:42 #204754 by andypugh

it seems to stop at

./basic7i97.hal:225: Unknown command '3600'


What does line 225 of basic7i97.hal say? (At a guess, there is a spurious linefeed)
The following user(s) said Thank You: timfaber

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

More
04 Apr 2021 13:18 #204761 by timfaber
Yes there was, I can run axis now. Its very slow.
Next step will be to let a led blink or something, also I made a quick video about my machine. If anyone is interested:

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

More
04 Apr 2021 16:34 #204777 by tommylight

That didn't work for me
timfaber@Brother:~$ sudo apt-get install /mesaflash_3.4.0~pre1-1_amd64.deb

Used this instead, dont know if it did the trick?
timfaber@Brother:~$ sudo dpkg -i ./mesaflash_3.4.0~pre1-1_amd64.deb

Missing . in front of the / in the apt-get line.
Use of dpkg is not advised as it does not check for dependencies in some cases.

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

More
04 Apr 2021 16:43 #204778 by timfaber
Been digging a bit more in the docs and my hal file, came up with some things still a bit unclear to me.
readhmi gave me the following:
timfaber@Brother:~$ mesaflash --device ethernet --addr 10.10.10.10 --readhmid
Configuration Name: HOSTMOT2

General configuration information:

  BoardName : MESA7I97
  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: MuxedQCount
  There are 6 of MuxedQCount in configuration
  Version: 3
  Registers: 5
  BaseAddress: 3600
  ClockFrequency: 100.000 MHz
  Register Stride: 256 bytes
  Instance Stride: 4 bytes

  Module: MuxedQCountSel
  There are 1 of MuxedQCountSel in configuration
  Version: 0
  Registers: 0
  BaseAddress: 0000
  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: PWM
  There are 6 of PWM in configuration
  Version: 0
  Registers: 5
  BaseAddress: 4100
  ClockFrequency: 200.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: InMux
  There are 1 of InMux in configuration
  Version: 0
  Registers: 5
  BaseAddress: 8000
  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 TB1/TB2/TB3
Pin#                  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

TB3-4                   0   IOPort       PWM              0        PWM             (Out)
TB3-8                   1   IOPort       PWM              1        PWM             (Out)
TB3-12                  2   IOPort       PWM              2        PWM             (Out)
TB3-16                  3   IOPort       PWM              3        PWM             (Out)
TB3-20                  4   IOPort       PWM              4        PWM             (Out)
TB3-20                  5   IOPort       PWM              4        /Enable         (Out)
TB3-24                  6   IOPort       PWM              5        PWM             (Out)
TB3-24                  7   IOPort       PWM              5        /Enable         (Out)
TB3-4,8,12,16           8   IOPort       PWM              0        /Enable         (Out)
TB1-1,2,9,10            9   IOPort       MuxedQCount      0        MuxQ-A          (In)
TB1-4,5,12,13          10   IOPort       MuxedQCount      0        MuxQ-B          (In)
TB1-7,8,15,16          11   IOPort       MuxedQCount      0        MuxQ-IDX        (In)
TB1-17,18,TB2 1,2      12   IOPort       MuxedQCount      1        MuxQ-A          (In)
TB1-20,21,TB2-4,5      13   IOPort       MuxedQCount      1        MuxQ-B          (In)
TB1-23,24,TB2-7,8      14   IOPort       MuxedQCount      1        MuxQ-IDX        (In)
TB2-9,10,17,18         15   IOPort       MuxedQCount      2        MuxQ-A          (In)
TB2-12,13,20,21        16   IOPort       MuxedQCount      2        MuxQ-B          (In)

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

TB2-15,16,23,24        17   IOPort       MuxedQCount      2        MuxQ-IDX        (In)
Internal               18   IOPort       MuxedQCountSel   0        MuxSel0         (Out)
TB5-13,14              19   IOPort       SSR              0        Out-00          (Out)
TB5-15,16              20   IOPort       SSR              0        Out-01          (Out)
TB5-17,18              21   IOPort       SSR              0        Out-02          (Out)
TB5-19,20              22   IOPort       SSR              0        Out-03          (Out)
TB5-21,22              23   IOPort       SSR              0        Out-04          (Out)
TB5-23,24              24   IOPort       SSR              0        Out-05          (Out)
Internal               25   IOPort       SSR              0        AC Ref          (Out)
Internal               26   IOPort       InMux            0        Addr0           (Out)
Internal               27   IOPort       InMux            0        Addr1           (Out)
Internal               28   IOPort       InMux            0        Addr2           (Out)
Internal               29   IOPort       InMux            0        Addr3           (Out)
Internal               30   IOPort       InMux            0        Data0           (In)
TB4-15,16              31   IOPort       SSerial          0        RXData0         (In)
TB4-17,18              32   IOPort       SSerial          0        TXData0         (Out)
Internal               33   IOPort       SSerial          0        TXEn0           (Out)

IO Connections for P1
Pin#                  I/O   Pri. func    Sec. func       Chan      Pin func        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           
and now inparticular:
Pin#                  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

TB3-4                   0   IOPort       PWM              0        PWM             (Out)
TB3-8                   1   IOPort       PWM              1        PWM             (Out)
TB3-12                  2   IOPort       PWM              2        PWM             (Out)
TB3-16                  3   IOPort       PWM              3        PWM             (Out)
TB3-20                  4   IOPort       PWM              4        PWM             (Out)
TB3-20                  5   IOPort       PWM              4        /Enable         (Out)
TB3-24                  6   IOPort       PWM              5        PWM             (Out)
TB3-24                  7   IOPort       PWM              5        /Enable         (Out)
TB3-4,8,12,16           8   IOPort       PWM              0        /Enable         (Out)
TB1-1,2,9,10            9   IOPort       MuxedQCount      0        MuxQ-A          (In)
TB1-4,5,12,13          10   IOPort       MuxedQCount      0        MuxQ-B          (In)
TB1-7,8,15,16          11   IOPort       MuxedQCount      0        MuxQ-IDX        (In)
TB1-17,18,TB2 1,2      12   IOPort       MuxedQCount      1        MuxQ-A          (In)
TB1-20,21,TB2-4,5      13   IOPort       MuxedQCount      1        MuxQ-B          (In)
TB1-23,24,TB2-7,8      14   IOPort       MuxedQCount      1        MuxQ-IDX        (In)
TB2-9,10,17,18         15   IOPort       MuxedQCount      2        MuxQ-A          (In)
TB2-12,13,20,21        16   IOPort       MuxedQCount      2        MuxQ-B          (In)
Now does IO 0 get referenced in here(below)? and why are there 4 pins on IO 8 and how are they enabled idividually in the hal file?
# ---PWM Generator signals/setup---
setp   [HMOT](CARD0).pwmgen.00.output-type 1 #PWM pin0
setp   [HMOT](CARD0).pwmgen.00.offset-mode 1 # offset mode so 50% = 0
setp   [HMOT](CARD0).pwmgen.00.scale   [JOINT_0]OUTPUT_SCALE 

net x-output     => [HMOT](CARD0).pwmgen.00.value
net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-enable     <= joint.0.amp-enable-out
# enable first 4 PWMGens on x-enable
net x-enable   => [HMOT](CARD0).pwmgen.00.enable

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

Moderators: cncbasher
Time to create page: 0.090 seconds
Powered by Kunena Forum