Network Servo Interface Adapters for LinuxCNC

This release required card firmware 2.4.0 or later. Please contact me for update instructions.

Installation - Debian 10 Buster (PREEMPT_RT)

Installation - Debian 7 Wheezy (RTAI)


  • Check realtime latency. Should be somewhere under plus/minus 50us:
    $ latency-histogram --nobase --servo 888888
  • Verify the YxxxxP PCI card has been detected:
    $ sudo nyxq info
    NYX v2.4.0 YSSC2P -- Jun  2 2020 20:16:07,
    axes:7 mds:7 gpi:12+17 gpo:8 enc:2+4 dac:2 yio:12
  • If required, edit ~/linuxcnc/configs/nyx/par/*.par parameter file for your servo drives. Initially those files contain default parameters which will be transfered to drives (and will overwrite EEPROM contents on J2/J2S/J3/J4 amps - backup servo drive parameters using MR Configurator software if you need them)
  • Start LinuxCNC and select sample config matching your card/drives from the tree under "nyx" node.
  • Connected amps should get initialized, corresponding green indicators in the LinuxCNC Axis window should turn on.
  • LinuxCNC driver v2.4.7 and up

    LinuxCNC HAL driver module name is nyx. During operation the controller and SSCNET network are synchronized to servo thread of the LinuxCNC. Servo thread period should be set to 888888 ns for YSSC1P, YSSC2P, YMDS2P; to 222222 ns for YSSC3P, YMDS3P; 1000000ns for YMTL2P. Module parameters:

    The following HAL commands load the driver and add its callback function to the servo thread:

    loadrt motmod servo_period_nsec=888888 ...
    loadrt nyx maxdrives=6 param_file=/usr/share/nyx/j2s.par
    addf nyx.0 servo-thread

    servo parameter file

    Servo parameters are transfered to drives during initialization after LinuxCNC startup. Sample files are located in /usr/share/nyx. For MR-J*-B and SGD* parameter file is optional - drives will use values from the EEPROM. For MDS drives parameter file is mandatory.

    Consult servo drive manual for parameters description.


    Controller status pins:


    Depending on adapter the driver supports up to 16 servo amplifiers, AX number is 00 thru 15. Parameters:

    Mechatrolink-II uses a fraction of max motor speed/torque as units during velocity control, see [NYX] section in nyx-mtl2.ini sample config for sample values.



    An encoder input channel converts quadrature signals on CN2 Phase A, Phase B, Index Z into 32-bit up/down counter values. The sampling requency is 45 MHz. NN is encoder channel: 00 or 01. Parameter:


    The interface is intended for use with motion.spindle-index-enable and motion.spindle-revs.


    Digital input signals IN0..IN11 connected to CN1. Pins:

    Expansion connector CN2 as GP inputs IN12..IN29. Pins:

    Digital output signals OUT0..OUT7 going to CN3:


    2-channel 12-bit digital-to-analog converter on YEX1-A expansion board. Paramaters:



    Connected YIO modules are detected, pins are created for each on nyx module load. ID is by DIP switches, 00 thru 15.


    YAO2 params:

    YAO2 pins:

    Absolute encoder support

    Motors with absolute encoders allow to skip LinuxCNC homing operation on each startup. Patched version of LinuxCNC adds the folloing pins to halui module:

    Those pins can be connected to

    net x-abs-ok   halui.joint.0.set-homed <= nyx.0.servo-00.abs-ok
    net x-abs-lost halui.joint.0.unhome <= nyx.0.servo-00.abs-lost

    To enable absolute encoder mode, set parameters:

    For Yaskawa drives write Pn002 to NVRAM. Start LinuxCNC and execute the following commands (should be in servo-off):

    $ sudo nyxq servo pwnv 0-2:Pn002=0x13 # axes 0..2. power cycle amps, will show A.810
    $ sudo nyxq servo abs 0 1 2 # execute encoder setup op and power cycle again

    Add [JOINT_n]ABSOLUTE_ENCODER=1 var to .ini configuration file. LinuxCNC will save the motor_offset to the position file instead of current position.

    Mitsubishi MDS-x-SP spindle drive sync moves

    The mdssp component emulates ABZ incremental encoder using spindle drive postion feedback. To use it for lathe threading or rigid tapping make sure SP038 bit 2 (0x0004) is set to 1 and make the following HAL connections:

    loadrt mdssp
    addf mdssp.0 servo-thread
    net s-counts   nyx.0.servo-05.counts => mdssp.0.spindle-counts-in
    net s-oriented nyx.0.servo-05.spindle-oriented => mdssp.0.spindle-oriented-in
    net s-index    spindle.0.index-enable  => mdssp.0.index-request
    net s-revs     spindle.0.revs          <= mdssp.0.revs

    To make emulated spindle index postiion repeatable between LinuxCNC restarts, execute the "orient spindle" op once.

    Z-index homing

    When using MR-J3-BS or MR-J4-B-RJ amps in fully-closed mode with an ABZ incremental linear/rotary load-side encoder LinuxCNC's Z-index homing is supported. To use it add to HAL/INI:

    net x-home   nyx.0.servo-00.di3           => joint.0.home-sw-in
    net x-index  nyx.0.servo-00.index-enable <=> joint.0.index-enable
    net x-homing nyx.0.servo-00.undroop      <=  joint.0.homing

    nyxq utility