NAME
hm2_eth - LinuxCNC HAL driver for the Mesa Electronics Ethernet Anything IO boards, with HostMot2 firmware.SYNOPSIS
loadrt
hm2_eth [config= "str[,str...]"]
[board_ip=ip[,ip...] ]
[board_mac=mac[,mac...]]
- config [default: ""]
- HostMot2 config strings, described in the hostmot2(9) manpage.
- board_ip [default: ""]
- The IP address of the board(s), separated by commas. As shipped, the board address is 192.168.1.121.
DESCRIPTION
hm2_eth is a device driver that interfaces Mesa's ethernet based Anything I/O boards (with the HostMot2 firmware) to the LinuxCNC HAL. The supported boards are: 7I76E, 7I80DB, 7I80HD, 7I92, 7I93, 7I94, 7I95, 7I96, 7I96S, 7I97, 7I98. The board must have its firmware loaded on the board by the mesaflash(1) program.INTERFACE CONFIGURATION
hm2_eth should be used on a dedicated network interface, with only a cable between the PC and the board. Wireless and USB network interfaces are not suitable.Configure network with static address
Add these lines to the file /etc/network/interfaces to configure eth1 with a static address:auto eth1 iface eth1 inet static address 192.168.1.1 hardware-irq-coalesce-rx-usecs 0
PACKET LOSS
While ethernet is fairly resistant to electrical noise, many systems will not have 100% perfect packet reception. The hm2_eth driver has a limited ability to deal with lost packets. Packet loss is detected by transmitting an expected read or write packet count with each request, and checking the value with each read response. When a lost packet is detected, the packet-error pin is asserted in that cycle, the packet-error-level pin is increased, and if it reaches a threshold then a permanent low-level I/O error is signaled.PINS
In addition to the pins documented in hostmot2(9), creates additional pins:- (bit, out) hm2_<BoardType>.<BoardNum>.packet-error
- This pin is TRUE when the most recent cycle detected a read or write error, and FALSE at other times.
- (s32, out) hm2_<BoardType>.<BoardNum>.packet-error-level
- This pin shows the current error level, with higher numbers indicating a greater number of recent detected errors. The error level is always in the range from 0 to packet-error-limit, inclusive.
- (bit, out) hm2_<BoardType>.<BoardNum>.packet-error-exceeded
- This pin is TRUE when the current error level is equal to the maximum, and FALSE at other times.
PARAMETERS
In addition to the parameters documented in hostmot2(9), creates additional parameters:- (s32, rw) hm2_<BoardType>.<BoardNum>.packet-error-decrement
- The amount deducted from packet-error-level in a cycle without detected read or write errors, without going below zero.
- (s32, rw) hm2_<BoardType>.<BoardNum>.packet-error-increment
- The amount added to packet-error-level in a cycle without detected read or write errors, without going above packet-error-limit.
- (s32, rw) hm2_<BoardType>.<BoardNum>.packet-error-limit
- The level at which a detected read or write error is treated as a permanent error. When this error level is reached, the board's io-error pin becomes TRUE and the condition must be manually reset.
- (s32, rw) hm2_<BoardType>.<BoardNum>.packet-read-timeout
- The length of time that must pass before a read request times out. If the value is less than or equal to 0, it is interpreted as 80% of the thread period. If the value is less than 100, it is interpreted as a percentage of the thread period. Otherwise, it is interpreted as a time in nanoseconds. In any case, the timeout is never less than 100 microseconds. Setting this value too low can cause spurious read errors. Setting it too high can cause realtime delay errors.
NOTES
hm2_eth uses an iptables chain called "hm2-eth-rules-output. That technology is common to control network access to (INPUT chain), through (FORWARD chain) or from (OUTPUT chain) your computer. Someone who has configured a firewall on Linux has encountered iptables and is familiar with that technology. This chain contains addtional rules to control network interface while HAL is running. The chain is created if it does not exist, and a jump to it is inserted at the beginning of the OUTPUT chain if it is not there already. If you have an existing iptables setup, you can insert a direct jump from OUTPUT to hm2-eth-rules-output in an order appropriate to your local network.BUGS
Some hostmot2 functions such uart are coded in a way that causes additional latency when used with hm2_eth.elbpcom 01D914000000
SEE ALSO
hostmot2(9), elbpcom(1)LICENSE
GPL2008-05-13 | LinuxCNC Documentation |