SSCNET II Interface Adapter for LinuxCNC

LinuxCNC driver module

LinuxCNC HAL driver module name is sscii. During operation the controller and SSCNET network are synchronized to servo thread of the LinuxCNC. Therefore servo thread period should be set to 888888 ns - the period of SSCNET-II network. The following HAL commands load the driver and add its callback function to the servo thread:

loadrt motmod servo_period_nsec=888888 ...
loadrt sscii
addf sscii.0 servo-thread

sscii

Controller status pins:

servo

The driver supports up to 6 servo amplifiers, axis number 0 thru 5. Parameters:

Pins:

encoder

An encoder input channel converts quadrature signals on CN2 Phase A, Phase B, Index Z into 32-bit up/down counter values. The maximum count frequency is 20 MHz. Parameter:

Pins:

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

gpio

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

Digital output signals OUT0..OUT7 going to CN3:

dac

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

Pins:

Absolute encoder support

All Mitsubishi J2 Super series motors feature absolute encoders. This allows to eliminate LinuxCNC homing operation on each startup. As LinuxCNC 2.7.4 lacks support of absolute encoders a patch is provided. It adds pins to halui module:

Upon startup a script is executed which inspects if servo amplifiers are in absolute mode and position data is valid. In that case it sets corresponding axes to "homed". Also the patch changes values saved into position.txt file from current position pos_fb to motor_offset. TODO: change to preserve compatibility.

Added INI file parameters MAX_JOG_VELOCITY, MAX_AJOG_VELOCITY to differentiate maximum jogging velocity from absolute maximum velocity that can be used in programs. AXIS UI sliders "Jog Speed" and "Max Velocity" behave consistent.

Firmware upgrade

FPGA configuration and embedded processor firmware are stored in a 16 Mbit FLASH memory chip. Memory is divided to 64K bytes sectors. Sector 0 contains a bootloader, sectors 1-6 - backup configuration, 8-13 - primary configuration. FLASH writing is performed by the nyxflash utility. Examples:

Writing primary configuration:

$ sudo nyxflash nyx_fw_v1.1.bin
writing nyx_fw_v0.12.bin 340604 bytes to 0x80000
erasing sector #8 #9 #10 #11 #12 #13
writing sector #8 #9 #10 #11 #12 #13
programming successful
exiting monitor

Writing bootloader:

$ sudo nyxflash BOOT
writing BOOT 64 bytes to 0x0
erasing sector #0
writing sector #0
programming successful
exiting monitor

Optional second argument specifies starting offset, in hex bytes. For example, writing a backup configuration, which is located at offset 0x10000:

$ sudo nyxflash nyx_fw_v1.1.bin 10000
writing nyx_fw_v0.12.bin 340604 bytes to 0x10000
erasing sector #1 #2 #3 #4 #5 #6
writing sector #1 #2 #3 #4 #5 #6
programming successful
exiting monitor

Giving ERASE as an argument erases a sector at given address:

$ sudo nyxflash ERASE 0
erasing sector #0
exiting monitor

Caution! If the utility reports verification errors do not turn off the computer. Repeat the writing command instead. If the bootloader or both primary and backup configurations are damaged then the board is rendered unusable without FPGA JTAG programmer.

REBOOT argument performs the FPGA reconfiguration