Skip to main content
Version 0.1

NCoder CAN

Version:

The NCoder is a modular encoder system that combines high-resolution angular position encoder unit with user-friendly software tools, enabling precise motion tracking and simplified integration into a wide range of control applications. With a built-in CAN interface, the NCoder connects seamlessly to the NLink Adapter, providing full control and effortless configuration through our intuitive Software SDKs.

Specifications

  • 12-48 V DC Input Voltage
  • External SPI Interface to connect the encoder module.
  • External encoder board provides more flexible mounting options for encoder.
  • Can output various encoder data points: Position, velocity, acceleration and angular angle.
  • Scaled, filtered velocity and acceleration outputs available from the encoder.
  • Flexible support for multiple SPI-based encoder modules such as NCoder 732 & NCoder 600.
  • Onboard USB-C port enables standalone operation for NCoder device.
  • CAN 2.0B @500kbps (1Mbps Comming soon).
  • Has Daisy Chainable CAN Bus Interface. Provides hassle free connection with other CAN components including our NMotion Components.
  • Can be easily configured & controlled by using our Python / C++ SDKs and NMotion CLI Tool.

Two-Part Architecture

The NCoder system consists of two main hardware components, designed to offer flexible mounting options for a wide range of applications:

  • Sensor Element – A high-resolution external magnetic encoder responsible for precise position measurement.
  • Control Shield – A power and communication interface that manages configuration, transmits data over CAN, and handles control and position data processing.

Hardware

LED Status Indications​

The NCoder device incorporates three LEDs to indicate various operational states:

  • Power LED: Turns ON when the board is powered ON.
  • CAN Communication LED: Flashes to signify ongoing CAN bus communication (both incoming and outgoing data).
  • Error LED: Turns ON when an error is encountered, and turns OFF when the errors are cleared.

Power Interface

The board supports a wide input voltage range of 12–48 V and uses terminal blocks for power connection.

danger
  • DC power input pins can't tolerate reverse polarity, please verify all power connections before energizing the NCoder
  • DC power supply line can't tolerate voltages above 56 V.
  • Never hot plug the NCoder, make sure that the power connections are connected before turning on the power.

Absolute Encoder Interface

The board supports an external absolute encoder with an SPI interface. To utilize this feature, connect the encoder's MOSI, MISO, CLK, and CS pins to the corresponding pins on the board. The encoder can be powered using the 3.3 V and GND pins available on the board.

A 6-pin JST connector with a 1.25 mm pitch is suitable for connecting the absolute encoder.

danger

Ensure that the connected absolute encoder's current consumption does not exceed 150mA.

CAN Bus Interface

The board features a daisy chainable CAN bus interface with two CAN ports. One port is designated for incoming CAN bus connections from the main device, while the other port is intended for connecting to the subsequent device in the bus chain.

A 2-pin JST PH connector with a 2mm pitch is suitable for both CAN ports.

warning

If the NCoder is the last component in the CAN bus chain, ensure that the termination resistor is in ON position to enable the termination resistor. Failure to do so may result in communication errors.

USB Interface

The board includes a USB-C interface for direct connection to a host computer. This interface can be used for configuration, firmware updates, and data monitoring without requiring a CAN bus connection.

info

The device can be powered via USB connection alone.

Drawing

All dimensions are in mm

The four M3 inserts at the bottom of the box can be used for mounting this component as per your requirements.

Configuration

The NCoder can be controlled via either the CAN bus interface or the onboard USB-C port. USB communication for configuration and control using the NMotion CLI Tool and the NMotion Transport Library is supported both through the NLink Adapter, enabling multi-device management, and directly via the onboard USB-C port for standalone operation with a single device.

API functions for interacting with the NCoder are available in the NCoder API Documentation.

CAN Bus Configuration

info

This is not necessary when NCoder is connected via USB-C and used as a standalone device.

The NCoder device utilizes a daisy chainable CAN bus for control. If multiple devices are present on the CAN bus, ensure that a unique CAN Node ID is assigned to the device. The allowable values of CAN Node ID is in the range of 0 to 127. The default CAN Node ID is 0 and must be modified to avoid communication conflicts.

info

Setting the CAN Node ID causes the driver to automatically disconnect and reconnect, and to retain the new ID after a device reboot, you must save the configuration.

The API functions involved in this configuration are as follows:

Encoder Configuration

Connect the external encoder (MA732 or MA600) to the control shield using the SPI interface. The encoder configuration inputs two values, encoder type and resolutions. For the absolute encoder, the resolution value in 2bits value must be configured.

The configuration for different encoders are as follows:

encoder_type valueEncoder TypeDescription
0TYPE_NONEUsing no encoder
4TYPE_SPI_ABS_MA732Using MA732 absolute encoder from Monolith Power Systems
9TYPE_SPI_ABS_MA600Using MA600 absolute encoder from Monolith Power Systems

The API functions involved in this configuration are as follows:

Encoder Direction

Configuration parameter used to define the counting orientation of the encoder. Set to 0 or 1 depending on the spatial mounting position, ensuring that position and velocity values increment in the desired direction.

The API functions involved in this configuration are as follows:

SPI Register Settings

The register value of an externally connected MAxxx-series magnetic encoder module can be set as per application requirements. This operation writes a specified value to a control register of the encoder, such as the MA732 or MA600, using the SPI interface. The register_address parameter identifies the target register, while the data parameter specifies the value to be written. Writing to control registers enables direct configuration and tuning of the encoder’s internal settings through SPI communication.

Saving Configuration

Upon completing the configuration process, the settings can be saved to the NCoder’s non-volatile memory. This ensures that the configurations are retained even after a power cycle or device restart. Saving the configuration will trigger an automatic device reboot. The following configurations in the driver are saved:

  • CAN Bus Configuration : CAN Node ID of the device.
  • Encoder Configuration : Encoder parameters (type & resolution parameter).
  • Encoder Direction : Value of direction parameter.
  • Zero Position : Angle at which zero position was set to.
  • Filter Window Length : Filter window length parameter of the velocity and acceleration filter.
  • Scaling Factor: Scaling parameter of the velocity and acceleration.
warning

The configuration data is stored in the microcontroller's onboard EEPROM memory. To prolong the memory's lifespan, it is recommended to limit the frequency of configuration updates, as EEPROMs have a finite number of write cycles.

The API functions involved with saving configuration are as follows:

Operation

Zero Position

The device supports zero position setting, allowing its current position to be defined as zero for precise position calculation.

info

Saving the configuration is required to preserve this zero position setting and retain it after power loss.

The API functions involved with this are as follows:

Setting Linear Count

The user can set the linear count by manually assigning a specific value to the encoder count, thereby defining a custom reference point for position measurements. Once configured, all subsequent position values are calculated relative to this assigned count, ensuring alignment with a known physical position or an application-specific reference.

info

Saving the configuration is required to preserve this linear count value and retain it after power loss.

The API functions involved with this is as follows:

Position Datapoints

The NCoder provides real-time access to key motion parameters such as raw position data, velocity data, acceleration data, encoder count data and absolute angle. These values can be retrieved using dedicated API functions or via the NMotion CLI Tool. Data is continuously updated and transmitted over the CAN bus, enabling integration with control systems and logging tools.

The API functions involved with getting various data points are as follows:

Velocity and Acceleration Datapoints

Filtering

While calculating velocity and acceleration, the device can apply a digital moving average filter with a rectangular window to the raw velocity and acceleration data, effectively reducing high-frequency components. The filter length, configurable within an inclusive range of 1 to 100, determines the degree of smoothing applied—longer lengths provide greater smoothing but reduce system responsiveness. This setting allows fine-tuning of the balance between noise reduction and real-time response for optimal system performance.

The API functions involved with this setting are:

Scaling

While calculating velocity and acceleration, the device can apply a scaling factor to produce scaled outputs. The scaled velocity or acceleration is obtained by dividing the raw value by the specified scaling factor.

scaled_output = raw_value / scaling_parameter

The API functions involved with this setting are:

Getting Processed and Raw Datapoints

The user can retrieve velocity and acceleration data from the device in scaled, filtered, or raw form.

The API functions involved with getting these datapoints are:

Quick Setup

  1. 1

    Connect your encoder board (MA732 or MA600) to the SPI connector on the NCoder Module.

  2. 2

    Connect your NCoder module to your system either directly via USB or through CAN by using NLink Adapter.

  3. 3

    Power up your NCoder Module, and then start NMotion CLI tool, where you would see it being detected.

    In case the NLink Adapter or NCoder module is not getting detected please follow these Troubleshooting guidelines.

  4. 4

    Select and configure the encoder type, then save the configuration to ensure it is retained after power cycles.

    info

    You need to configure CAN Node IDs as well if you're using multiple NCoder modules.

  5. 5

    Start using the NCoder Module via the NMotion CLI or the NMotion Transport Library to access raw, filtered, or scaled values based on your application needs.

API Reference

C/C++ API Reference

NCoder.NCoder()

NCoder::NCoder(uint32_t device_id, Interface *interface)
Description

Construct a new NCoder object.

Parameters
DatatypeVariableDescription
uint32_tdevice_idDevice Id for the NCoder device
Interface *interfaceCAN Interface object for the interface to which the actuator is connected

NCoder.NCoder()

NCoder::NCoder(Interface *interface)
Description

Construct a new NCoder object.

Parameters
DatatypeVariableDescription
Interface *interfaceDevice Id for the NCoder device

NCoder.configureEncoder()

ret_status_t NCoder::configureEncoder(uint8_t encoder_type, int32_t resolution_param)
Description

Configure the encoder parameters.

encoder_type valueEncoder TypeDescription
0TYPE_NONEUsing no encoder
4TYPE_SPI_ABS_MA732Using MA732 absolute encoder from Monolith Power Systems
9TYPE_SPI_ABS_MA600Using MA600 absolute encoder from Monolith Power Systems
Parameters
DatatypeVariableDescription
uint8_tencoder_typeSet the encoder type
int32_tresolution_paramSet the encoder resolution [in bits]
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.enterDFUMode()

ret_status_t NCoder::enterDFUMode()
Description

Enter the Device Firmware Update (DFU) mode.

Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.eraseConfigurations()

ret_status_t NCoder::eraseConfigurations()
Description

Erase the saved configurations from non-volatile memory.

Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getAbsoluteAngle()

ret_status_t NCoder::getAbsoluteAngle(float *abs_angle)
Description

Get the current absolute angle measurement from the encoder (in degrees)

Parameters
DatatypeVariableDescription
float *abs_anglePointer to the variable where the absolute angle value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getEncoderConfiguration()

ret_status_t NCoder::getEncoderConfiguration(uint8_t *encoder_type, int32_t *resolution_param)
Description

Retrieve the current encoder configuration parameters.

encoder_type valueEncoder TypeDescription
0TYPE_NONEUsing no encoder
4TYPE_SPI_ABS_MA732Using MA732 absolute encoder from Monolith Power Systems
9TYPE_SPI_ABS_MA600Using MA600 absolute encoder from Monolith Power Systems
Parameters
DatatypeVariableDescription
uint8_t *encoder_typePointer to the variable where the encoder type value is to be saved
int32_t *resolution_paramPointer to the variable where the encoder resolution [in bits] is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getEncoderCount()

ret_status_t NCoder::getEncoderCount(int32_t *encoder_count)
Description

Get the current encoder count (angular Increment)

Parameters
DatatypeVariableDescription
int32_t *encoder_countPointer to the variable where the encoder count value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getEncoderDirection()

ret_status_t NCoder::getEncoderDirection(uint8_t *direction)
Description

Get the encoder direction.

Parameters
DatatypeVariableDescription
uint8_t *directionPointer to the variable where the encoder direction is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getEncoderRawData()

ret_status_t NCoder::getEncoderRawData(uint32_t *abs_position)
Description

Get the raw absolute position data directly from encoder hardware.

Parameters
DatatypeVariableDescription
uint32_t *abs_positionPointer to the variable where the raw data value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getFilterWindowLength()

ret_status_t NCoder::getFilterWindowLength(uint32_t *filter_window_length)
Description

Get the filter window length for the encoder.

Parameters
DatatypeVariableDescription
uint32_t *filter_window_lengthPointer to the variable where the filter window length value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getFilteredAcceleration()

ret_status_t NCoder::getFilteredAcceleration(float *acceleration_filtered)
Description

Get the filtered acceleration value.

Parameters
DatatypeVariableDescription
float *acceleration_filteredPointer to the variable where the filtered acceleration value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getFilteredVelocity()

ret_status_t NCoder::getFilteredVelocity(float *velocity_filtered)
Description

Get the filtered velocity value.

Parameters
DatatypeVariableDescription
float *velocity_filteredPointer to the variable where the filtered velocity value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getFirmwareCommit()

ret_status_t NCoder::getFirmwareCommit(std::string *commit)
Description

Get the firmware commit hash of the NCoder device.

Parameters
DatatypeVariableDescription
std::string *commitPointer to the string where the commit hash is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getFirmwareVersion()

ret_status_t NCoder::getFirmwareVersion(uint8_t *major, uint8_t *minor, uint16_t *revision)
Description

Get the firmware version of the NCoder device.

Parameters
DatatypeVariableDescription
uint8_t *majorPointer to the variable where the major version is to be saved
uint8_t *minorPointer to the variable where the minor version is to be saved
uint16_t *revisionPointer to the variable where the revision number is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getHardwareVersion()

ret_status_t NCoder::getHardwareVersion(uint8_t *tag, uint8_t *major, uint8_t *minor, uint8_t *variant)
Description

Get the hardware version of the NCoder device.

Parameters
DatatypeVariableDescription
uint8_t *tagPointer to the variable where the hardware tag is to be saved
uint8_t *majorPointer to the variable where the major version is to be saved
uint8_t *minorPointer to the variable where the minor version is to be saved
uint8_t *variantPointer to the variable where the variant is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getMAxxxSPIRegister()

ret_status_t NCoder::getMAxxxSPIRegister(uint8_t register_address, uint8_t *data, bool *status)
Description

Get a value from the MAxxx SPI register.

Parameters
DatatypeVariableDescription
uint8_tregister_addressAddress of the register to be read
uint8_t *dataPointer to the variable where the register data is to be saved
bool *statusPointer to the variable where the status of the operation is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getMultiturnAngle()

ret_status_t NCoder::getMultiturnAngle(float *multiturn_angle)
Description

Get the multiturn angle of the encoder.

Parameters
DatatypeVariableDescription
float *multiturn_anglePointer to the variable where the multiturn angle is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getNodeId()

ret_status_t NCoder::getNodeId(uint32_t *node_id)
Description

Get current CAN Node ID of the NCoder device.

Parameters
DatatypeVariableDescription
uint32_t *node_idPointer to the variable to which the current CAN Node ID of the NCoder device is to be saved.
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getRawAcceleration()

ret_status_t NCoder::getRawAcceleration(float *acceleration_raw)
Description

Get the raw acceleration value.

Parameters
DatatypeVariableDescription
float *acceleration_rawPointer to the variable where the raw acceleration value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getRawVelocity()

ret_status_t NCoder::getRawVelocity(float *velocity_raw)
Description

Get the raw velocity value.

Parameters
DatatypeVariableDescription
float *velocity_rawPointer to the variable where the raw velocity value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getScaledAcceleration()

ret_status_t NCoder::getScaledAcceleration(float *acceleration_scaled)
Description

Get the scaled acceleration value.

Parameters
DatatypeVariableDescription
float *acceleration_scaledPointer to the variable where the scaled acceleration value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getScaledFilteredAcceleration()

ret_status_t NCoder::getScaledFilteredAcceleration(float *acceleration_scaled_filtered)
Description

Get the scaled and filtered acceleration value.

Parameters
DatatypeVariableDescription
float *acceleration_scaled_filteredPointer to the variable where the scaled and filtered acceleration value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getScaledFilteredVelocity()

ret_status_t NCoder::getScaledFilteredVelocity(float *velocity_scaled_filtered)
Description

Get the scaled and filtered velocity value.

Parameters
DatatypeVariableDescription
float *velocity_scaled_filteredPointer to the variable where the scaled and filtered velocity value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getScaledVelocity()

ret_status_t NCoder::getScaledVelocity(float *velocity_scaled)
Description

Get the scaled velocity value.

Parameters
DatatypeVariableDescription
float *velocity_scaledPointer to the variable where the scaled velocity value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getScalingFactor()

ret_status_t NCoder::getScalingFactor(float *scaling_factor)
Description

Get the scaling factor for the encoder.

Parameters
DatatypeVariableDescription
float *scaling_factorPointer to the variable where the scaling factor is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.getZeroPosition()

ret_status_t NCoder::getZeroPosition(float *zero_position)
Description

Get the zero position of the encoder.

Parameters
DatatypeVariableDescription
float *zero_positionPointer to the variable where the zero position value is to be saved
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.isConnected()

bool NCoder::isConnected()
Description

Check if the device is still connected or not.

Returns
DatatypeDescription
booltrue

NCoder.rebootNCoder()

ret_status_t NCoder::rebootNCoder()
Description

Reboot the NCoder device.

Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.saveConfigurations()

ret_status_t NCoder::saveConfigurations()
Description

Save the current configurations to non-volatile memory.

Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.setCurrentPositionToZero()

ret_status_t NCoder::setCurrentPositionToZero()
Description

Set the current position of the encoder to zero.

Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.setEncoderDirection()

ret_status_t NCoder::setEncoderDirection(uint8_t direction)
Description

Set the encoder direction.

Parameters
DatatypeVariableDescription
uint8_tdirectionEncoder direction to be set
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.setFilterWindowLength()

ret_status_t NCoder::setFilterWindowLength(uint32_t filter_window_length)
Description

Set the filter window length for the encoder.

Parameters
DatatypeVariableDescription
uint32_tfilter_window_lengthFilter window length value to be set
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.setLinearCount()

ret_status_t NCoder::setLinearCount(uint32_t count)
Description

Set the linear count for the encoder.

Parameters
DatatypeVariableDescription
uint32_tcountLinear count value to be set
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.setMAxxxSPIRegister()

ret_status_t NCoder::setMAxxxSPIRegister(uint8_t register_address, uint8_t data)
Description

Set a value in the MAxxx SPI register.

Parameters
DatatypeVariableDescription
uint8_tregister_addressAddress of the register to be set
uint8_tdataData to be written to the register
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.setNodeId()

ret_status_t NCoder::setNodeId(uint32_t id)
Description

Set the node id for the NCoder device.

Parameters
DatatypeVariableDescription
uint32_tidCAN Node ID of the NCoder device
Returns
DatatypeDescription
ret_status_tReturn Status

NCoder.setScalingFactor()

ret_status_t NCoder::setScalingFactor(float scaling_factor)
Description

Set the scaling factor for the encoder.

Parameters
DatatypeVariableDescription
floatscaling_factorScaling factor to be set
Returns
DatatypeDescription
ret_status_tReturn Status

Python API Reference

NCoder.__init__()

__init__(id: int = -1, interface: USBInterface = None) 
Description

NCoder class constructor.

Parameters
DatatypeVariableDescription
intidCAN Node ID of the NCoder device
USBInterfaceinterfaceInitialised CANInterface or USBInterface object

NCoder.configureEncoder()

configureEncoder(encoder_type: int, resolution_param: int = 4096) -> int
Description

Configure the encoder parameters.

encoder_type valueEncoder TypeDescription
0TYPE_NONEUsing no encoder
4TYPE_SPI_ABS_MA732Using MA732 absolute encoder from Monolith Power Systems
9TYPE_SPI_ABS_MA600Using MA600 absolute encoder from Monolith Power Systems
Parameters
DatatypeVariableDescription
intencoder_typeType of encoder used
intresolution_paramEncoder resolution (in bit)
Returns
DatatypeDescription
intReturn status

NCoder.enterDFUMode()

enterDFUMode() -> int
Description

Enter Device Firmware Update Mode.

Returns
DatatypeDescription
intReturn Status.

NCoder.eraseConfigurations()

eraseConfigurations() -> int
Description

Erase the saved configurations from the non-volatile memory.

Returns
DatatypeDescription
intReturn Status.

NCoder.getAbsoluteAngle()

getAbsoluteAngle() ->  'tuple[int, float]'
Description

Get the current absolute angle measurement from the encoder (in degrees)

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the absolute angle value

NCoder.getEncoderConfiguration()

getEncoderConfiguration() ->  'tuple[int, int, int]'
Description

Retrieve the current encoder configuration parameters.

encoder_type valueEncoder TypeDescription
0TYPE_NONEUsing no encoder
4TYPE_SPI_ABS_MA732Using MA732 absolute encoder from Monolith Power Systems
9TYPE_SPI_ABS_MA600Using MA600 absolute encoder from Monolith Power Systems
Returns
DatatypeDescription
'tuple[int,int,int]'Tuple containing return status, encoder type and resolution parameter (bits)

NCoder.getEncoderCount()

getEncoderCount() ->  'tuple[int, int]'
Description

Get the current encoder count (angular Increment)

Returns
DatatypeDescription
'tuple[int,int]'Tuple containing return status and the encoder count value

NCoder.getEncoderDirection()

getEncoderDirection() ->  'tuple[int, int]'
Description

Get the current encoder direction.

Returns
DatatypeDescription
'tuple[int,int]'Tuple containing return status and the current encoder direction (0 for normal, 1 for inverted)

NCoder.getEncoderRawData()

getEncoderRawData() ->  'tuple[int, int]'
Description

Get the raw absolute position data directly from encoder hardware.

Returns
DatatypeDescription
'tuple[int,int]'Tuple containing return status and the raw data value from the encoder

NCoder.getFilterWindowLength()

getFilterWindowLength() ->  'tuple[int, int]'
Description

Get the filter window length of the NCoder.

Returns
DatatypeDescription
'tuple[int,int]'Tuple containing return status and the filter window length value

NCoder.getFilteredAcceleration()

getFilteredAcceleration() ->  'tuple[int, float]'
Description

Get the filtered acceleration of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the filtered acceleration value (in degrees per second squared)

NCoder.getFilteredVelocity()

getFilteredVelocity() ->  'tuple[int, float]'
Description

Get the filtered velocity of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the filtered velocity value (in degrees per second)

NCoder.getFirmwareCommit()

getFirmwareCommit() ->  'tuple[int, str]'
Description

Get the NCoder firmware's commit hash.

Returns
DatatypeDescription
'tuple[int,str]'Tuple containing return status and the commit hash string.

NCoder.getFirmwareVersion()

getFirmwareVersion() ->  'tuple[int, int, int, int]'
Description

Get the NCoder firmware's major, minor and revision information.

Returns
DatatypeDescription
'tuple[int,int,int,int]'Tuple containing return status, major, minor and revision information.

NCoder.getHardwareVersion()

getHardwareVersion() ->  'tuple[int, int, int, int, int]'
Description

Get the NCoder hardware's current tag, major, minor and variant information.

Returns
DatatypeDescription
'tuple[int,int,int,int,int]'Tuple containing return status, tag, major, minor and variant information.

NCoder.getMAxxxSPIRegister()

getMAxxxSPIRegister(register_address: int) ->  'tuple[int, int, bool]'
Description

Get the data from the maxxx encoder spi register.

Parameters
DatatypeVariableDescription
intregister_addressregister address from which the data needs to be read
Returns
DatatypeDescription
'tuple[int,int,bool]'-

NCoder.getMultiturnAngle()

getMultiturnAngle() ->  'tuple[int, float]'
Description

Get the current multiturn angle of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the multiturn angle value (in degrees)

NCoder.getNodeId()

getNodeId() ->  'tuple[int, int]'
Description

Get current Node ID of the NCoder.

Returns
DatatypeDescription
'tuple[int,int]'Tuple containing return status and the current Node ID.

NCoder.getRawAcceleration()

getRawAcceleration() ->  'tuple[int, float]'
Description

Get the acceleration of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the acceleration value (in degrees per second squared)

NCoder.getRawVelocity()

getRawVelocity() ->  'tuple[int, float]'
Description

Get the raw velocity of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the raw velocity value (in degrees per second)

NCoder.getScaledAcceleration()

getScaledAcceleration() ->  'tuple[int, float]'
Description

Get the scaled acceleration of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the scaled acceleration value (in degrees per second squared)

NCoder.getScaledFilteredAcceleration()

getScaledFilteredAcceleration() ->  'tuple[int, float]'
Description

Get the scaled filtered acceleration of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the scaled filtered acceleration value (in degrees per second squared)

NCoder.getScaledFilteredVelocity()

getScaledFilteredVelocity() ->  'tuple[int, float]'
Description

Get the scaled filtered velocity of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the scaled filtered velocity value (in degrees per second)

NCoder.getScaledVelocity()

getScaledVelocity() ->  'tuple[int, float]'
Description

Get the scaled velocity of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the scaled velocity value (in degrees per second)

NCoder.getScalingFactor()

getScalingFactor() ->  'tuple[int, float]'
Description

Get the scaling factor of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the scaling factor value

NCoder.getZeroPosition()

getZeroPosition() ->  'tuple[int, float]'
Description

Get the zero position of the NCoder.

Returns
DatatypeDescription
'tuple[int,float]'Tuple containing return status and the zero position value

NCoder.rebootNCoder()

rebootNCoder() -> int
Description

Reboot the NCoder device.

Returns
DatatypeDescription
intReturn status

NCoder.saveConfigurations()

saveConfigurations() -> int
Description

Save the current configurations to non-volatile memory.

Returns
DatatypeDescription
intReturn Status .

NCoder.setCurrentPositionToZero()

setCurrentPositionToZero() -> int
Description

Set the current position of the NCoder to zero.

Returns
DatatypeDescription
intReturn status

NCoder.setEncoderDirection()

setEncoderDirection(direction: int) -> int
Description

Set the encoder direction for the NCoder.

Parameters
DatatypeVariableDescription
intdirectionEncoder direction to be set (0 for normal, 1 for inverted)
Returns
DatatypeDescription
intReturn status

NCoder.setFilterWindowLength()

setFilterWindowLength(filter_window_length: int) -> int
Description

Set the filter window length for the NCoder.

Parameters
DatatypeVariableDescription
intfilter_window_lengthFilter window length value to be set
Returns
DatatypeDescription
intReturn status

NCoder.setLinearCount()

setLinearCount(count: int) -> int
Description

Set the linear count for the NCoder.

Parameters
DatatypeVariableDescription
intcountLinear count value to be set
Returns
DatatypeDescription
intReturn status

NCoder.setMAxxxSPIRegister()

setMAxxxSPIRegister(register_address: int, data: int) -> int
Description

Set the maxxx encoder spi register.

Parameters
DatatypeVariableDescription
intregister_addressregister_addres value to be which needs to be modified
intdata-
Returns
DatatypeDescription
intTuple containing return status and the spi register data value value.

NCoder.setNodeId()

setNodeId(id: int) -> int
Description

Set the node id for the NCoder.

Parameters
DatatypeVariableDescription
intidDevice ID of the NCoder
Returns
DatatypeDescription
intReturn Status

NCoder.setScalingFactor()

setScalingFactor(scaling_factor: float) -> int
Description

Set the scaling factor for the NCoder.

Parameters
DatatypeVariableDescription
floatscaling_factorScaling factor value to be set
Returns
DatatypeDescription
intReturn status
  NMotionTM  is a sub-brand of Nawe Robotics
Copyright © 2025 Nawe Robotics Private Limited