NCoder CAN
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.
- 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.
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.
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.
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
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.
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 value | Encoder Type | Description |
---|---|---|
0 | TYPE_NONE | Using no encoder |
4 | TYPE_SPI_ABS_MA732 | Using MA732 absolute encoder from Monolith Power Systems |
9 | TYPE_SPI_ABS_MA600 | Using 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.
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.
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.
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
Connect your encoder board (MA732 or MA600) to the SPI connector on the NCoder Module.
- 2
Connect your NCoder module to your system either directly via USB or through CAN by using NLink Adapter.
- 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
Select and configure the encoder type, then save the configuration to ensure it is retained after power cycles.
infoYou need to configure CAN Node IDs as well if you're using multiple NCoder modules.
- 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
Datatype | Variable | Description |
---|---|---|
uint32_t | device_id | Device Id for the NCoder device |
Interface * | interface | CAN Interface object for the interface to which the actuator is connected |
NCoder.NCoder()
NCoder::NCoder(Interface *interface)
Description
Construct a new NCoder object.
Parameters
Datatype | Variable | Description |
---|---|---|
Interface * | interface | Device 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 value | Encoder Type | Description |
---|---|---|
0 | TYPE_NONE | Using no encoder |
4 | TYPE_SPI_ABS_MA732 | Using MA732 absolute encoder from Monolith Power Systems |
9 | TYPE_SPI_ABS_MA600 | Using MA600 absolute encoder from Monolith Power Systems |
Parameters
Datatype | Variable | Description |
---|---|---|
uint8_t | encoder_type | Set the encoder type |
int32_t | resolution_param | Set the encoder resolution [in bits] |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.enterDFUMode()
ret_status_t NCoder::enterDFUMode()
Description
Enter the Device Firmware Update (DFU) mode.
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.eraseConfigurations()
ret_status_t NCoder::eraseConfigurations()
Description
Erase the saved configurations from non-volatile memory.
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getAbsoluteAngle()
ret_status_t NCoder::getAbsoluteAngle(float *abs_angle)
Description
Get the current absolute angle measurement from the encoder (in degrees)
Parameters
Datatype | Variable | Description |
---|---|---|
float * | abs_angle | Pointer to the variable where the absolute angle value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return 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 value | Encoder Type | Description |
---|---|---|
0 | TYPE_NONE | Using no encoder |
4 | TYPE_SPI_ABS_MA732 | Using MA732 absolute encoder from Monolith Power Systems |
9 | TYPE_SPI_ABS_MA600 | Using MA600 absolute encoder from Monolith Power Systems |
Parameters
Datatype | Variable | Description |
---|---|---|
uint8_t * | encoder_type | Pointer to the variable where the encoder type value is to be saved |
int32_t * | resolution_param | Pointer to the variable where the encoder resolution [in bits] is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getEncoderCount()
ret_status_t NCoder::getEncoderCount(int32_t *encoder_count)
Description
Get the current encoder count (angular Increment)
Parameters
Datatype | Variable | Description |
---|---|---|
int32_t * | encoder_count | Pointer to the variable where the encoder count value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getEncoderDirection()
ret_status_t NCoder::getEncoderDirection(uint8_t *direction)
Description
Get the encoder direction.
Parameters
Datatype | Variable | Description |
---|---|---|
uint8_t * | direction | Pointer to the variable where the encoder direction is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getEncoderRawData()
ret_status_t NCoder::getEncoderRawData(uint32_t *abs_position)
Description
Get the raw absolute position data directly from encoder hardware.
Parameters
Datatype | Variable | Description |
---|---|---|
uint32_t * | abs_position | Pointer to the variable where the raw data value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getFilterWindowLength()
ret_status_t NCoder::getFilterWindowLength(uint32_t *filter_window_length)
Description
Get the filter window length for the encoder.
Parameters
Datatype | Variable | Description |
---|---|---|
uint32_t * | filter_window_length | Pointer to the variable where the filter window length value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getFilteredAcceleration()
ret_status_t NCoder::getFilteredAcceleration(float *acceleration_filtered)
Description
Get the filtered acceleration value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | acceleration_filtered | Pointer to the variable where the filtered acceleration value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getFilteredVelocity()
ret_status_t NCoder::getFilteredVelocity(float *velocity_filtered)
Description
Get the filtered velocity value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | velocity_filtered | Pointer to the variable where the filtered velocity value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getFirmwareCommit()
ret_status_t NCoder::getFirmwareCommit(std::string *commit)
Description
Get the firmware commit hash of the NCoder device.
Parameters
Datatype | Variable | Description |
---|---|---|
std::string * | commit | Pointer to the string where the commit hash is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return 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
Datatype | Variable | Description |
---|---|---|
uint8_t * | major | Pointer to the variable where the major version is to be saved |
uint8_t * | minor | Pointer to the variable where the minor version is to be saved |
uint16_t * | revision | Pointer to the variable where the revision number is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return 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
Datatype | Variable | Description |
---|---|---|
uint8_t * | tag | Pointer to the variable where the hardware tag is to be saved |
uint8_t * | major | Pointer to the variable where the major version is to be saved |
uint8_t * | minor | Pointer to the variable where the minor version is to be saved |
uint8_t * | variant | Pointer to the variable where the variant is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return 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
Datatype | Variable | Description |
---|---|---|
uint8_t | register_address | Address of the register to be read |
uint8_t * | data | Pointer to the variable where the register data is to be saved |
bool * | status | Pointer to the variable where the status of the operation is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getMultiturnAngle()
ret_status_t NCoder::getMultiturnAngle(float *multiturn_angle)
Description
Get the multiturn angle of the encoder.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | multiturn_angle | Pointer to the variable where the multiturn angle is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getNodeId()
ret_status_t NCoder::getNodeId(uint32_t *node_id)
Description
Get current CAN Node ID of the NCoder device.
Parameters
Datatype | Variable | Description |
---|---|---|
uint32_t * | node_id | Pointer to the variable to which the current CAN Node ID of the NCoder device is to be saved. |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getRawAcceleration()
ret_status_t NCoder::getRawAcceleration(float *acceleration_raw)
Description
Get the raw acceleration value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | acceleration_raw | Pointer to the variable where the raw acceleration value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getRawVelocity()
ret_status_t NCoder::getRawVelocity(float *velocity_raw)
Description
Get the raw velocity value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | velocity_raw | Pointer to the variable where the raw velocity value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getScaledAcceleration()
ret_status_t NCoder::getScaledAcceleration(float *acceleration_scaled)
Description
Get the scaled acceleration value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | acceleration_scaled | Pointer to the variable where the scaled acceleration value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getScaledFilteredAcceleration()
ret_status_t NCoder::getScaledFilteredAcceleration(float *acceleration_scaled_filtered)
Description
Get the scaled and filtered acceleration value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | acceleration_scaled_filtered | Pointer to the variable where the scaled and filtered acceleration value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getScaledFilteredVelocity()
ret_status_t NCoder::getScaledFilteredVelocity(float *velocity_scaled_filtered)
Description
Get the scaled and filtered velocity value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | velocity_scaled_filtered | Pointer to the variable where the scaled and filtered velocity value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getScaledVelocity()
ret_status_t NCoder::getScaledVelocity(float *velocity_scaled)
Description
Get the scaled velocity value.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | velocity_scaled | Pointer to the variable where the scaled velocity value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getScalingFactor()
ret_status_t NCoder::getScalingFactor(float *scaling_factor)
Description
Get the scaling factor for the encoder.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | scaling_factor | Pointer to the variable where the scaling factor is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.getZeroPosition()
ret_status_t NCoder::getZeroPosition(float *zero_position)
Description
Get the zero position of the encoder.
Parameters
Datatype | Variable | Description |
---|---|---|
float * | zero_position | Pointer to the variable where the zero position value is to be saved |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.isConnected()
bool NCoder::isConnected()
Description
Check if the device is still connected or not.
Returns
Datatype | Description |
---|---|
bool | true |
NCoder.rebootNCoder()
ret_status_t NCoder::rebootNCoder()
Description
Reboot the NCoder device.
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.saveConfigurations()
ret_status_t NCoder::saveConfigurations()
Description
Save the current configurations to non-volatile memory.
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.setCurrentPositionToZero()
ret_status_t NCoder::setCurrentPositionToZero()
Description
Set the current position of the encoder to zero.
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.setEncoderDirection()
ret_status_t NCoder::setEncoderDirection(uint8_t direction)
Description
Set the encoder direction.
Parameters
Datatype | Variable | Description |
---|---|---|
uint8_t | direction | Encoder direction to be set |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.setFilterWindowLength()
ret_status_t NCoder::setFilterWindowLength(uint32_t filter_window_length)
Description
Set the filter window length for the encoder.
Parameters
Datatype | Variable | Description |
---|---|---|
uint32_t | filter_window_length | Filter window length value to be set |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.setLinearCount()
ret_status_t NCoder::setLinearCount(uint32_t count)
Description
Set the linear count for the encoder.
Parameters
Datatype | Variable | Description |
---|---|---|
uint32_t | count | Linear count value to be set |
Returns
Datatype | Description |
---|---|
ret_status_t | Return 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
Datatype | Variable | Description |
---|---|---|
uint8_t | register_address | Address of the register to be set |
uint8_t | data | Data to be written to the register |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.setNodeId()
ret_status_t NCoder::setNodeId(uint32_t id)
Description
Set the node id for the NCoder device.
Parameters
Datatype | Variable | Description |
---|---|---|
uint32_t | id | CAN Node ID of the NCoder device |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
NCoder.setScalingFactor()
ret_status_t NCoder::setScalingFactor(float scaling_factor)
Description
Set the scaling factor for the encoder.
Parameters
Datatype | Variable | Description |
---|---|---|
float | scaling_factor | Scaling factor to be set |
Returns
Datatype | Description |
---|---|
ret_status_t | Return Status |
Python API Reference
NCoder.__init__()
__init__(id: int = -1, interface: USBInterface = None)
Description
NCoder class constructor.
Parameters
Datatype | Variable | Description |
---|---|---|
int | id | CAN Node ID of the NCoder device |
USBInterface | interface | Initialised CANInterface or USBInterface object |
NCoder.configureEncoder()
configureEncoder(encoder_type: int, resolution_param: int = 4096) -> int
Description
Configure the encoder parameters.
encoder_type value | Encoder Type | Description |
---|---|---|
0 | TYPE_NONE | Using no encoder |
4 | TYPE_SPI_ABS_MA732 | Using MA732 absolute encoder from Monolith Power Systems |
9 | TYPE_SPI_ABS_MA600 | Using MA600 absolute encoder from Monolith Power Systems |
Parameters
Datatype | Variable | Description |
---|---|---|
int | encoder_type | Type of encoder used |
int | resolution_param | Encoder resolution (in bit) |
Returns
Datatype | Description |
---|---|
int | Return status |
NCoder.enterDFUMode()
enterDFUMode() -> int
Description
Enter Device Firmware Update Mode.
Returns
Datatype | Description |
---|---|
int | Return Status. |
NCoder.eraseConfigurations()
eraseConfigurations() -> int
Description
Erase the saved configurations from the non-volatile memory.
Returns
Datatype | Description |
---|---|
int | Return Status. |
NCoder.getAbsoluteAngle()
getAbsoluteAngle() -> 'tuple[int, float]'
Description
Get the current absolute angle measurement from the encoder (in degrees)
Returns
Datatype | Description |
---|---|
'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 value | Encoder Type | Description |
---|---|---|
0 | TYPE_NONE | Using no encoder |
4 | TYPE_SPI_ABS_MA732 | Using MA732 absolute encoder from Monolith Power Systems |
9 | TYPE_SPI_ABS_MA600 | Using MA600 absolute encoder from Monolith Power Systems |
Returns
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Variable | Description |
---|---|---|
int | register_address | register address from which the data needs to be read |
Returns
Datatype | Description |
---|---|
'tuple[int,int,bool]' | - |
NCoder.getMultiturnAngle()
getMultiturnAngle() -> 'tuple[int, float]'
Description
Get the current multiturn angle of the NCoder.
Returns
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'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
Datatype | Description |
---|---|
'tuple[int,float]' | Tuple containing return status and the zero position value |
NCoder.rebootNCoder()
rebootNCoder() -> int
Description
Reboot the NCoder device.
Returns
Datatype | Description |
---|---|
int | Return status |
NCoder.saveConfigurations()
saveConfigurations() -> int
Description
Save the current configurations to non-volatile memory.
Returns
Datatype | Description |
---|---|
int | Return Status . |
NCoder.setCurrentPositionToZero()
setCurrentPositionToZero() -> int
Description
Set the current position of the NCoder to zero.
Returns
Datatype | Description |
---|---|
int | Return status |
NCoder.setEncoderDirection()
setEncoderDirection(direction: int) -> int
Description
Set the encoder direction for the NCoder.
Parameters
Datatype | Variable | Description |
---|---|---|
int | direction | Encoder direction to be set (0 for normal, 1 for inverted) |
Returns
Datatype | Description |
---|---|
int | Return status |
NCoder.setFilterWindowLength()
setFilterWindowLength(filter_window_length: int) -> int
Description
Set the filter window length for the NCoder.
Parameters
Datatype | Variable | Description |
---|---|---|
int | filter_window_length | Filter window length value to be set |
Returns
Datatype | Description |
---|---|
int | Return status |
NCoder.setLinearCount()
setLinearCount(count: int) -> int
Description
Set the linear count for the NCoder.
Parameters
Datatype | Variable | Description |
---|---|---|
int | count | Linear count value to be set |
Returns
Datatype | Description |
---|---|
int | Return status |
NCoder.setMAxxxSPIRegister()
setMAxxxSPIRegister(register_address: int, data: int) -> int
Description
Set the maxxx encoder spi register.
Parameters
Datatype | Variable | Description |
---|---|---|
int | register_address | register_addres value to be which needs to be modified |
int | data | - |
Returns
Datatype | Description |
---|---|
int | Tuple 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
Datatype | Variable | Description |
---|---|---|
int | id | Device ID of the NCoder |
Returns
Datatype | Description |
---|---|
int | Return Status |
NCoder.setScalingFactor()
setScalingFactor(scaling_factor: float) -> int
Description
Set the scaling factor for the NCoder.
Parameters
Datatype | Variable | Description |
---|---|---|
float | scaling_factor | Scaling factor value to be set |
Returns
Datatype | Description |
---|---|
int | Return status |