SSERIAL

NAME
SYNOPSIS
PORTS
DEVICES
8I20
7I64
7I76
7I77
7I69
7I70
7I71
7I73

NAME

sserial - Smart Serial LinuxCNC HAL driver for the Mesa Electronics HostMot2 Smart-Serial remote cards

SYNOPSIS

The Mesa Smart-Serial interface is a 2.5Mbs proprietary interface between the Mesa Anything-IO cards and a range of subsidiary devices termed "smart-serial remotes". The remote cards perform a variety of functions, but typically they combine various classes of IO. The remote cards are self-configuring, in that they tell the main LinuxCNC Hostmot2 driver what their pin functions are and what they should be named.

Many sserial remotes offer different pinouts depending on the mode they are started up in. This is set using the sserial_port_N= option in the hm2_pci modparam. See the hostmot2 manpage for further details.

It is likely that this documentation will be permanently out of date.

Each Anything-IO board can attach up to 8 sserial remotes to each header (either the 50-pin headers on the 5I20/5I22/5I23/7I43 or the 25-pin connectors on the 5I25, 6I25 and 7I80). The remotes are grouped into "ports" of up to 8 "channels". Typically each header will be a single 8 channel port, but this is not necessarily always the case.

PORTS

In addition to the per-channel/device pins detailed below there are three per-port pins and three parameters.

Pins:

sserial.port-N.run (bit, in):: Enables the specific Smart Serial module..

Setting this pin low will disable all boards on the port and puts the
port in a pass-through mode where device parameter setting is possible.
It is necessary to toggle the state of this pin if there is a
requirement to alter a remote parameter on a live system.
This pin defaults to TRUE and can be left unconnected.
However, toggling the pin low-to-high will re-enable a faulted drive,
so the pin could usefully be connected to the ‘iocontrol.0.user-enable-out‘ pin.

run_state (u32, ro)::.

Shows the state of the sserial communications state-machine.
This pin will generally show a value of 0x03 in normal operation,
0x07 in setup mode and 0x00 when the "run" pin is false.

error-count (u32, ro)::.

Indicates the state of the Smart Serial error handler,
see the parameters section for more details.

Parameters:

fault-inc (u32 r/w):: Any over-run or handshaking error in the.

SmartSerial communications will increment the .fault-count pin by the
amount specified by this parameter. Default = 10.

fault-dec (u32 r/w):: Every successful read/write cycle decrements the.

fault counter by this amount. Default = 1.

fault-lim (u32 r/w):: When the fault counter reaches this threshold the.

Smart Serial interface on the corresponding port will be stopped and an
error printed in dmesg. Together these three pins allow for control over
the degree of fault- tolerance allowed in the interface. The default
values mean that if more than one transaction in ten fails, more than 20
times, then a hard error will be raised. If the increment were to be set
to zero then no error would ever be raised, and the system would carry
on regardless. Conversely setting decrement to zero, threshold to 1 and
limit to 1 means that absolutely no errors will be tolerated. (This
structure is copied directly from vehicle ECU practice.)

Any other parameters than the ones above are created by the card itself from data in the remote firmware. They may be set in the HAL file using "setp" in the usual way.

Note
Because a Smart-Serial remote can only communicate non-process data to the host card in setup mode, it is necessary to stop and re-start the smart-serial port associated with the card to alter the value of a parameter.

Note
in the case of parameters beginning with "nv" (which are stored in non-volatile memory) the effect will not be seen until after the next power cycle of the drive.

Unchanged values will not be re-written so it is safe to leave the "setp" commands in the HAL file or delete them as you see fit.

DEVICES

The other pins and parameters created in HAL depend on the devices detected. The following list of Smart Serial devices is by no means exhaustive.

8I20

The 8I20 is a 2.2 kW three-phase drive for brushless DC motors and AC servo motors. 8I20 pins and parameters have names like "hm2__<BoardType>_.<BoardNum>.8i20.<PortNum>.<ChanNum>.<Pin>", for example "hm2_5i23.0.8i20.1.3.current" would set the phase current for the drive connected to the fourth channel of the second sserial port of the first 5I23 board. Note that the sserial ports do not necessarily correlate in layout or number to the physical ports on the card.

Pins:

angle (float in)

The rotor angle of the motor in fractions of a full phase revolution. An angle of 0.5 indicates that the motor is half a turn / 180 degrees / Ï radians from the zero position. The zero position is taken to be the position that the motor adopts under no load with a positive voltage applied to the A (or U) phase and both B and C (or V and W) connected to -V or 0 V. A 6 pole motor will have 3 zero positions per physical rotation. Note that the 8I20 drive automatically adds the phase lead/lag angle, and that this pin should see the raw rotor angle. There is a HAL module (bldc) which handles the complexity of differing motor and drive types.

current (float, in)

The phase current command to the drive. This is scaled from -1 to +1 for forwards and reverse maximum currents. The absolute value of the current is set by the max_current parameter.

bus-voltage (float, ro)

The drive bus voltage in V. This will tend to show 25.6 V when the drive is unpowered and the drive will not operate below about 50 V.

temp (float, ro)

The temperature of the driver in degrees C.

comms (u32, ro)

The communication status of the drive. See the manual for more details.

status and fault. (bit, ro)

The following fault/status bits are exported. For further details see the 8I20 manual:

fault.U-current / fault.U-current-not fault.V-current / fault.V-current-not fault.W-current / fault.W-current-not fault.bus-high / fault.bus-high-not fault.bus-overv / fault.bus-overv-not fault.bus-underv / fault.bus-underv-not fault.framingr / fault.framingr-not fault.module / fault.module-not fault.no-enable / fault.no-enable-not fault.overcurrent / fault.overcurrent-not fault.overrun / fault.overrun-not fault.overtemp / fault.overtemp-not fault.watchdog / fault.watchdog-not

status.brake-old / status.brake-old-not status.brake-on / status.brake-on-not status.bus-underv / status.bus-underv-not status.current-lim / status.current-lim-no status.ext-reset / status.ext-reset-not status.no-enable / status.no-enable-not status.pid-on / status.pid-on-not status.sw-reset / status.sw-reset-not status.wd-reset / status.wd-reset-not

Parameters:

The following parameters are exported. See the PDF documentation downloadable from Mesa for further details:

hm2_5i25.0.8i20.0.1.angle-maxlim, hm2_5i25.0.8i20.0.1.angle-minlim, hm2_5i25.0.8i20.0.1.angle-scalemax, hm2_5i25.0.8i20.0.1.current-maxlim, hm2_5i25.0.8i20.0.1.current-minlim, hm2_5i25.0.8i20.0.1.current-scalemax, hm2_5i25.0.8i20.0.1.nvbrakeoffv, hm2_5i25.0.8i20.0.1.nvbrakeonv, hm2_5i25.0.8i20.0.1.nvbusoverv, hm2_5i25.0.8i20.0.1.nvbusundervmax, hm2_5i25.0.8i20.0.1.nvbusundervmin, hm2_5i25.0.8i20.0.1.nvkdihi, hm2_5i25.0.8i20.0.1.nvkdil, hm2_5i25.0.8i20.0.1.nvkdilo, hm2_5i25.0.8i20.0.1.nvkdp, hm2_5i25.0.8i20.0.1.nvkqihi, hm2_5i25.0.8i20.0.1.nvkqil, hm2_5i25.0.8i20.0.1.nvkqilo, hm2_5i25.0.8i20.0.1.nvkqp, hm2_5i25.0.8i20.0.1.nvmaxcurrent, hm2_5i25.0.8i20.0.1.nvrembaudrate, hm2_5i25.0.8i20.0.1.swrevision, hm2_5i25.0.8i20.0.1.unitnumber, max_current (float, rw)

Sets the maximum drive current in Amps. The default value is the maximum current programmed into the drive EEPROM. The value must be positive, and an error will be raised if a current in excess of the drive maximum is requested.

serial_number (u32, ro)

The serial number of the connected drive This is also shown on the label on the drive.

7I64

The 7I64 is a 24-input 24-output IO card. 7I64 pins and parameters have names like "hm2<BoardType>.<BoardNum>.7i64.<PortNum>.<ChanNum>.<Pin>", for example hm2_5i23.0.7i64.1.3.output-01.

Pins:

7i64.0.0.output-NN (bit, in)

Writing a 1 or TRUE to this pin will enable output driver NN. Note that the outputs are drivers (switches) rather than voltage outputs. The LED adjacent to the connector on the board shows the status. The output can be inverted by setting a parameter.

7i64.0.0.input-NN (bit, out)

The value of input NN. Note that the inputs are isolated and both pins of each input must be connected, typically to signal and the ground of the signal. (This need not be the ground of the board.)

7i64.0.0.input-NN-not (bit, out)

An inverted copy of the corresponding input.

7i64.0.0.analog0 & 7i64.0.0.analog1 (float, out)

The two analogue inputs (0 to 3.3 V) on the board.

Parameters:

7i64.0.0.output-NN-invert (bit, rw)

Setting this parameter to 1 / TRUE will invert the output value, such that writing 0 to .gpio.NN.out will enable the output and vice-versa.

7I76

The 7I76 is not really a smart-serial device. It serves as a breakout for a number of other Hostmot2 functions. There are connections for 5 step generators (for which see the main hostmot2 manpage). The stepgen pins are associated with the 5I25 (hm2_5i25.0.stepgen.00....), whereas the smart-serial pins are associated with the 7I76 (hm2_5i25.0.7i76.0.0.output-00).

Pins:

7i76.0.0.spinout (float in):: This controls the analogue output of the 7I76..

This is intended as a speed control signal for a VFD.
.7i76.0.0.output-__NN__ (bit out):: (_NN_ = 0 to 15). 16 digital outputs.
The sense of the signal can be set via a parameter.
.7i76.0.0.input-__NN__ (bit out):: (_NN_ = 0 to 31) 32 digital inputs.
.7i76.0.0.input-__NN__-not (bit in):: (_NN_ = 0 to 31) An inverted copy of the inputs provided for convenience.
The two complementary pins may be connected to different signal nets.

Parameters:

7i76.0.0.nvunitnumber (u32 ro)::.

Indicates the serial number of the device and should match a sticker on the card.
This can be useful for working out which card is which.

7i76.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout..

This is separate from the Anything-IO card timeout.
This is unlikely to need to be changed.

7i76.0.0.spinout-scalemax (float rw):: The spindle speed scaling..

This is the speed request which would correspond to full-scale output from the spindle control pin.
For example with a 10 V drive voltage and a 10000 RPM scalemax a value of 10,000 RPM on the spinout pin would produce 10 V output.
However, if spinout-maxlim were set to 5000 RPM then no voltage above 5 V would be output.

7i76.0.0.swrevision (u32 ro):: The onboard firmware revision number..

Utilities (man setsserial for details) exist to update and change this firmware.

7I77

The 7I77 is an 6-axis servo control card. The analogue outputs are smart-serial devices, but the encoders are conventional hostmot2 encoders and further details of them may be found in the hostmot2 manpage.

Pins:

7i77.0.0.input-NN-not (bit in):: (NN = 0 to 31) An inverted copy of the.

inputs provided for convenience. The two complementary pins may be
connected to different signal nets.

7i77.0.0.output-NN (bit out):: (NN = 0 to 15). 16 digital outputs..

The sense of the signal can be set via a parameter.

7i77.0.0.spindir (bit in):: This pin provides a means to drive the.

spindle VFD direction terminals on the 7I76 board.

7i77.0.0.spinout (float in):: This controls the analog output of the 7I77..

This is intended as a speed control signal for a VFD.

7i77.0.1.analogoutN (float in):: (N = 0 to 5) This controls the analog output of the 7I77.. Parameters:

7i77.0.0.spinout-scalemax (float rw):: The spindle speed scaling..

This is the speed request which would correspond to full-scale output from the spindle control pin.
For example with a 10&#8201;V drive voltage and a 10000&#8201;RPM scalemax
a value of 10000&#8201;RPM on the spinout pin would produce 10&#8201;V output.
However, if spinout-maxlim were set to 5000&#8201;RPM then no voltage above 5&#8201;V would be output.

7i77.0.0.analogoutN-scalemax (float rw):: (N = 0 to 5) The analog speed scaling..

This is the speed request which would correspond to full-scale output from the spindle control pin.
For example with a 10&#8201;V drive voltage and a 10000&#8201;RPM scalemax a value of 10000&#8201;RPM on the spinout pin would produce 10V output.
However, if spinout-maxlim were set to 5000&#8201;RPM then no voltage above 5&#8201;V would be output.

7I69

The 7I69 is a 48 channel digital IO card. It can be configured in four different modes:

MODE 0

Bidirectional mode (48 bits in 48 bits out)

MODE 1

Input only mode (48 bits in)

MODE 2

Output only mode (48 bits out)

MODE 3

24/24mode (24 bits in = bits 0..23 and 24 bits out = bits 24..47)

MODE 4

Bidirectional mode (48 bits in 48 bits out) plus 4 MPG encoder channels oninputs 0 through 7

Pins:

7i69.0.0.output-NN (bit in):: Digital output. Sense can be inverted with. the corresponding Parameter.

7i69.0.0.input-NN-not (bit out):: Digital input, inverted.. Parameters:

7i69.0.0.nvbaudrate (u32 ro):: Indicates the vbaud rate.. This probably should not be altered.

7i69.0.0.nvunitnumber (u32 ro):: Indicates the serial number of the.

device and should match a sticker on the card. This can be useful for
working out which card is which.

7i69.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout..

This is separate from the Anything-IO card timeout.
This is unlikely to need to be changed.

7i69.0.0.swrevision (u32 ro):: The onboard firmware revision number..

Utilities exist to update and change this firmware.

7I70

The 7I70 is a remote isolated 48 input card. The 7I70 inputs sense positive inputs relative to a common field ground. Input impedance is 10 KΩ and input voltage can range from 5 VDC to 32 VDC. All inputs have LED status indicators. The input common field ground is galvanically isolated from the communications link.

The 7I70 has three software selectable modes. These different modes select different sets of 7I70 data to be transferred between the host and the 7I70 during real time process data exchanges. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting in higher maximum update rates.

MODE 0

Input mode (48 bits input data only

MODE 1

Input plus analog mode (48 bits input data plus 6 channels of analog data)

MODE 2

Input plus field voltage

Pins:

7i70.0.0.input-NN-not (bit in):: (NN = 0 to 47) An inverted copy of the. inputs provided for convenience. The two complementary pins may be connected to different signal nets.

Parameters:

7i70.0.0.nvbaudrate (u32 ro):: Indicates the vbaud rate..

This probably should not be altered.

7i70.0.0.nvunitnumber (u32 ro):: Indicates the serial number of the.

device and should match a sticker on the card.
This can be useful for working out which card is which.

7i70.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout..

This is separate from the Anything-IO card timeout.
This is unlikely to need to be changed.

7i69.0.0.swrevision (u32 ro):: The onboard firmware revision number..

Utilities exist to update and change this firmware.

7I71

The 7I71 is a remote isolated 48 output card. The 48 outputs are 8 VDC to 28 VDC sourcing drivers (common + field power) with 300 mA maximum current capability. All outputs have LED status indicators.

The 7I71 has two software selectable modes. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting in higher maximum update rates:

MODE 0

Output only mode (48 bits output data only)

MODE 1

Outputs plus read back field voltage

Pins:

7i71.0.0.output-NN (bit out):: (NN = 0 to 47) 48 digital outputs..

The sense may be inverted by the invert parameter.

7i71.0.0.output-NN (bit out):: (NN = 0 to 47) 48 digital outputs..

The sense may be inverted by the invert parameter.

Parameters:

7i71.0.0.nvbaudrate (u32 ro):: Indicates the vbaud rate..

This probably should not be altered.

7i71.0.0.nvunitnumber (u32 ro):: Indicates the serial number of the.

device and should match a sticker on the card.
This can be useful for determining which card is which.

7i71.0.0.nvwatchdogtimeout (u32 ro):: The sserial remote watchdog timeout..

This is separate from the Anything-IO card timeout.
This is unlikely to need to be changed.

7i69.0.0.swrevision (u32 ro):: The onboard firmware revision number..

Utilities exist to update and change this firmware.

7I73

The 7I73 is a remote real time pendant or control panel interface.

The 7I73 supports up to four 50 kHz encoder inputs for MPGs, 8 digital inputs and 6 digital outputs and up to a 64 Key keypad. If a smaller keypad is used, more digital inputs and outputs become available. Up to eight 0.0 V to 3.3 V analog inputs are also provided. The 7I73 can drive a 4 line 20 character LCD for local DRO applications.

The 7I73 has 3 software selectable process data modes. These different modes select different sets of 7I73 data to be transferred between the host and the 7I73 during real time process data exchanges. For high speed applications, choosing the correct mode can reduced the data transfer sizes, resulting in higher maximum update rates

MODE 0

I/O + ENCODER

MODE 1

I/O + ENCODER + ANALOG IN

MODE 2

I/O + ENCODER + ANALOG IN FAST DISPLAY

Pins:

7i73.0.0.analoginN (float out):: Analogue inputs. Up to 8 channels may.

be available dependent on software and hardware configuration modes
(see the PDF manual downloadable from https://www.mesanet.com).

7i73.0.1.display (modes 1 and 2) (u32 in):: Data for LCD display..

This pin may be conveniently driven by the HAL "lcd" component which allows
the formatted display of the values any number of HAL pins and textual content.

7i73.0.1.display32 (mode 2 only) (u32 in):: 4 bytes of data for LCD display..

This mode is not supported by the HAL "lcd" component.

7i73.0.1.output-NN (bit in):: Up to 22 digital outputs (dependent on config). Parameters:

7i73.0.1.output-00-invert (u32 ro)::. For further details of the use of the above see the Mesa manual.