MESA 7i80 hm2_eth unable to read static internal configuration

174 views
Skip to first unread message

fairbanks-john

unread,
Apr 21, 2018, 4:29:16 AM4/21/18
to Machinekit
I'm finally continuing my work on building a new gui and switching this in progress work from linuxcnc to machinekit. I'm using my ACRA milling machine as a test bed which I do need to be able to use normally while this work progresses. It runs on linuxcnc 2.8pre with gmoccapy.

The interface board between the machine is a Mesa 7i80hd board with a custom pre-reloaded and stored bit file file. Linuxcnc has no problem reading the internal programming of the Mesa board and runs mill just fine. Machine kit on the other hand appears to be a little confused as to handle the programming of the board.  This to me is strange since the driver that was developed for this board is known to very reliable. So I suspect that machine kit may read and write to this card in a slightly different manner.

There does appear to be some differences in the hm_eth driver  files used by machinekit and linuxcnc which could be causing a incompatibility issue. As I recall coping the hm_eth driver .c and .h files and recompiling causes a make to fail.

I'm thinking that this may be a problem with differences in the way machinekit and linuxcnc communicate with the Mesa card. Something appears to get lost between the TCP network functiosn and the cards input and outputs. I'm open to any suggestions.

If it turns out that machine kit needs to load the bit file on each power up it will make things more difficult for compatibility between using and developing for awhile since linuxcnc is not designed to do that to the best of my knowledge.

Machinekit's ability to tie into raspberry pi and others makes machine kit very attractive to me. Just for additional info I have attached a file that lists the actual 7i80 pin out.


Here are my configurations.
From .INI file
HOSTMOT2]
# BOARD=7i80hd
#board_mac="00:60:1b:11:80:23"
DRIVER = hm2_eth board_ip="10.10.10.2"
BOARD_IP="10.10.10.2"
BOARD=7i80
CONFIG="num_encoders=6 num_stepgens=5 num_pwmgens=1 sserial_port_0=20xxxxxx"


From .HAL file
loadrt [KINS]KINEMATICS
loadrt tp
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES tp=tp kins=trivkins
loadrt pid count=7
loadrt hostmot2
loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG)
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 30000000

Part of the debug printout.
Starting Machinekit...
rtapi_msgd command:  /home/cnc/cnc-mk1.1/libexec/rtapi_msgd --instance=0 --rtmsglevel=5 --usrmsglevel=5 --halsize=524288
rtapi_app command:  /home/cnc/cnc-mk1.1/libexec/rtapi_app_posix --instance=0
io started
<commandline>:0: Component 'iocontrol' ready
<commandline>:0: Program 'io' started
halcmd loadusr io started
<commandline>:0: Component 'halui' ready
<commandline>:0: Program 'halui' started
cnc1.hal:5: Realtime module 'trivkins' loaded
cnc1.hal:8: Realtime module 'tp' loaded
cnc1.hal:9: Realtime module 'motmod' loaded
cnc1.hal:10: Realtime module 'pid' loaded
cnc1.hal:11: Realtime module 'hostmot2' loaded
cnc1.hal:12: Realtime module 'hm2_eth' loaded
cnc1.hal:13: setting parameter 'hm2_7i80.0.watchdog.timeout_ns' to '30000000'
cnc1.hal:13: Parameter 'hm2_7i80.0.watchdog.timeout_ns' set to 30000000
cnc1.hal:50: Function 'hm2_7i80.0.read' added to thread 'servo-thread', rmb=0 wmb=0
cnc1.hal:51: Function 'hm2_7i80.0.write' added to thread 'servo-thread', rmb=0 wmb=0
mesa-7I80-board-pin-out.txt

schoo...@btinternet.com

unread,
Apr 24, 2018, 7:44:02 AM4/24/18
to machi...@googlegroups.com

On 21/04/18 09:29, fairbanks-john wrote:
I'm finally continuing my work on building a new gui and switching this in progress work from linuxcnc to machinekit. I'm using my ACRA milling machine as a test bed which I do need to be able to use normally while this work progresses. It runs on linuxcnc 2.8pre with gmoccapy.

The interface board between the machine is a Mesa 7i80hd board with a custom pre-reloaded and stored bit file file. Linuxcnc has no problem reading the internal programming of the Mesa board and runs mill just fine. Machine kit on the other hand appears to be a little confused as to handle the programming of the board.  This to me is strange since the driver that was developed for this board is known to very reliable. So I suspect that machine kit may read and write to this card in a slightly different manner.

There does appear to be some differences in the hm_eth driver  files used by machinekit and linuxcnc which could be causing a incompatibility issue. As I recall coping the hm_eth driver .c and .h files and recompiling causes a make to fail.

There are major differences between the hm2_eth files in Linuxcnc and those in Machinekit

At the most trivial basic level, it uses rtapi_xxx types which are just redefinitions of standard types, but sufficient to prevent compilation.
Getting past those, there are major incompatibilities.

Just a glance at hm2_eth.h, shows that there is a big hm2_eth_t struct that did not exist before.
The hm2_eth.c file is 70% larger, partly as a consequence.

Errors indicate that hm2_lowlevel_io_t has changed markedly too and within this and elsewhere, there are other functions used which only exist in Linuxcnc,
such as need_soft_reboot(), rtapi_spawn_as_root().

If your 7i80 with its custom config works with Linuxcnc, I would use use that.

Other people may be using 7i80s and be able to see why the existing driver does not like your bitfile, I don't own one, so cannot test anything.


Reply all
Reply to author
Forward
0 new messages