uirSDK3 - UIROBOT System Development Kit
uirSDK3 — UIROBOT System Development Kit uirSDK3 is a cross-platform development kit for programming
uirSDK3 is a cross-platform development kit for programming UIROBOT's CAN bus motion controllers, servo stepper motors, and I/O modules. It provides a comprehensive set of C/C++ API functions for Windows, Linux, and Raspberry Pi systems, enabling developers to build custom control applications with full access to motor control, I/O operations, and real-time notifications.
---
## Key Features
:::grid{cols=2 style=card}
**Cross-Platform Support**
Native libraries for Windows (32/64-bit), Linux, and Raspberry Pi (32/64-bit). Use the same API across all platforms with platform-specific DLL/SO files.
**Complete API Coverage**
Access all device functions including CAN network management, motor control, I/O operations, encoder reading, and real-time notifications through a unified API.
**Multi-Gateway Support**
Connect through UIM2513 (RS232-CAN), UIM2523 (Ethernet-CAN), or UIC320/UIC322 (USB-CAN) gateways. Single API handles all gateway types.
**Real-Time Notifications**
Register callback functions to receive real-time events including motion completion, input changes, stall detection, and error alerts.
:::
:::grid{cols=2 style=card}
**C++ and C# Sample Code**
Ready-to-use demo projects for Visual Studio (C++) and C# with full source code. Includes Win32 and Win64 builds.
**Simple Programming Model**
Open gateway → Get member list → Send commands. Minimal boilerplate code to get started.
**Error Handling**
Comprehensive error codes with descriptive definitions. Easy debugging with detailed error reporting.
**Comprehensive Documentation**
Complete programmer's manual with function descriptions, parameter tables, data structures, and code examples for every API function.
:::
---
## Supported Platforms
| Platform | Library File | Architecture |
|----------|-------------|--------------|
| Windows | libUirSdkWin32.dll / .lib | 32-bit |
| Windows | libUirSdkWin64.dll / .lib | 64-bit |
| Linux | libUirSdk.so | 64-bit |
| Raspberry Pi | libUirSdkRaspi32.so | 32-bit |
| Raspberry Pi | libUirSDKRaspi64.so | 64-bit |
---
## SDK Package Contents
```
uirSDK/
├── uirSDKFiles/
│ ├── CAN30SDK.h # Static library function API
│ ├── CAN30SDK_DLL.h # Dynamic library function API
│ ├── UIError.h # Error type definitions
│ └── uirSDKgen3.h # All structures and type definitions
└── UirSdkLib/
├── libUirSdk.so # Linux static library
├── libUirSdkWin32.dll # Windows 32-bit dynamic library
├── libUirSdkWin64.dll # Windows 64-bit dynamic library
├── libUirSdkWin32.lib # Windows 32-bit static library
└── libUirSdkWin64.lib # Windows 64-bit static library
```
---
## Supported Devices
| Device | Type | Description |
|--------|------|-------------|
| UIM342 / UIM342A | Motion Controller | CAN bus smart servo stepper motor controller |
| UIM620 | Motion Controller | CAN bus motion controller series |
| UIM720 | Motion Controller | CAN bus motion controller series |
| UIM1616 / UIM0808 | I/O Controller | CAN bus digital I/O controller |
---
## API Function List
### CAN Network
| Function | Description |
|----------|-------------|
| `SdkStartCanNet` | Open CAN network and discover devices |
| `SdkCloseCanNet` | Close CAN network connection |
| `SdkGetGtwyInfo` | Get gateway information |
| `SdkGetMemberList` | Get list of connected devices |
| `SdkSetIPaddr` | Set Ethernet gateway IP address |
### Communication Parameters
| Function | Description |
|----------|-------------|
| `SdkSetProtocolPara` | Set communication parameters |
| `SdkGetProtocolPara` | Get communication parameters |
### System Information
| Function | Description |
|----------|-------------|
| `SdkGetSerial` | Get device serial number |
| `SdkGetModel` | Get device model information |
| `SdkGetErrReport` | Get error report |
| `SdkClrErrReport` | Clear error report |
| `SdkGetLastErr` | Get latest error |
| `SdkGetMotionStatus` | Get motion status |
| `SdkRstMotionStatus` | Reset motion status |
| `SdkGetSystemTime` | Get system power-on time |
| `SdkRstSystemTime` | Reset system power-on time |
| `SdkSetSystem` | System operation (reboot/factory reset) |
### Motion Control — Static Parameters
| Function | Description |
|----------|-------------|
| `SdkSetMotorConfig` | Set motor configuration |
| `SdkGetMotorConfig` | Get motor configuration |
| `SdkSetAcceleration` | Set acceleration |
| `SdkGetAcceleration` | Get acceleration |
| `SdkSetDeceleration` | Set deceleration |
| `SdkGetDeceleration` | Get deceleration |
| `SdkSetCutInSpeed` | Set cut-in speed |
| `SdkGetCutInSpeed` | Get cut-in speed |
| `SdkSetStopDeceleration` | Set emergency stop deceleration |
| `SdkGetStopDeceleration` | Get emergency stop deceleration |
| `SdkSetEncoderConfig` | Set encoder parameters |
| `SdkGetEncoderConfig` | Get encoder parameters |
| `SdkSetBacklashComp` | Set backlash compensation |
| `SdkGetBacklashComp` | Get backlash compensation |
| `SdkSetMotionLimits` | Set motion limits |
| `SdkGetMotionLimits` | Get motion limits |
| `SdkRstMotionLimits` | Reset motion limits |
| `SdkSetLimitCheck` | Set limit check status |
| `SdkGetLimitCheck` | Get limit check status |
| `SdkGetDesiredValue` | Get desired value |
### Motion Control — Dynamic Parameters
| Function | Description |
|----------|-------------|
| `SdkSetMotorOn` | Enable/disable motor driver |
| `SdkGetMotorOn` | Get motor enable status |
| `SdkSetBeginMxn` | Begin motion |
| `SdkSetStopMxn` | Emergency stop |
| `SdkSetOrigin` | Set origin position |
| `SdkSetJogMxn` | Set JOG motion speed |
| `SdkGetJogMxn` | Get JOG motion speed |
| `SdkSetPtpMxnA` | Set PTP absolute position |
| `SdkGetPtpMxnA` | Get PTP absolute position |
| `SdkSetPtpMxnR` | Set PTP relative position |
| `SdkGetPtpMxnR` | Get PTP relative position |
### I/O Operations
| Function | Description |
|----------|-------------|
| `SdkSetTriggerMode` | Set port trigger mode |
| `SdkGetTriggerMode` | Get port trigger mode |
| `SdkSetDigitalOutput` | Set digital output |
| `SdkGetDIOport` | Get I/O port digital status |
| `SdkSetInputLogicAC` | Set input logic acceleration |
| `SdkGetInputLogicAC` | Get input logic acceleration |
| `SdkSetInputLogicDC` | Set input logic deceleration |
| `SdkGetInputLogicDC` | Get input logic deceleration |
| `SdkSetInputLogicSP` | Set input logic speed |
| `SdkGetInputLogicSP` | Get input logic speed |
| `SdkSetInputLogicPR` | Set input logic relative position |
| `SdkGetInputLogicPR` | Get input logic relative position |
| `SdkSetInputLogicPA` | Set input logic absolute position |
| `SdkGetInputLogicPA` | Get input logic absolute position |
| `SdkSetInputLogic` | Set input logic action |
| `SdkGetInputLogic` | Get input logic action |
### I/O Module (UIM1616)
| Function | Description |
|----------|-------------|
| `SdkSetEncoderPeriod` | Set auxiliary encoder period |
| `SdkRstEncoderCount` | Reset auxiliary encoder count |
| `SdkGetEncoderSpeed` | Get auxiliary encoder speed |
| `SdkGetEncoderCount` | Get auxiliary encoder count |
| `SdkGetEncoderIncrement` | Get auxiliary encoder increment |
### Real-Time Notification
| Function | Description |
|----------|-------------|
| `SdkGetRTCN` | Get real-time notification message |
---
## Key Data Structures
### Gateway Info
```cpp
typedef union _GATEWAY_INFO_OBJ {
struct {
uint GtwyHandle; // Gateway handle
uint COMidx; // Serial port number
uint COMbaud; // Baud rate
uint BTRidx; // CAN bit rate
uint SerialNo; // Gateway SN
uint FirmVer; // Firmware version
char ModelStr[64]; // Model information
uint MemberQty; // Number of members
uchar MemberCid[100]; // Members CAN-ID list
};
struct { // For Ethernet gateways
uint GtwyHandle;
uint IPaddr;
uint IPport;
// ... same fields
} tcp;
} GATEWAY_INFO_OBJ;
```
### Member Info
```cpp
typedef struct _MEMBER_INFO_OBJ {
uint GtwyHandle; // Gateway handle
uchar CANnid; // Device CAN-ID
uchar CANgid; // Group CAN-ID
ushort COMbaud; // Baud rate
uint SerialNo; // Device serial number
MODEL_INFO_OBJ Model; // Model information
} MEMBER_INFO_OBJ;
```
### UI Message
```cpp
typedef struct _UI_MSG_OBJ {
uchar id; // CAN ID
uchar cw; // Control Word
uchar dl; // Data Length
uchar data[9]; // Data array
uint ix; // Sub-Index (reserved)
} UI_MSG_OBJ;
```
---
## Quick Start
### Step 1 — Include Headers
```cpp
#include "CAN30SDK_DLL.h"
#include "uirSDKgen3.h"
```
### Step 2 — Open CAN Network
```cpp
GATEWAY_INFO_OBJ Gtwy = {0};
MEMBER_INFO_OBJ Member[100];
// For RS232 gateway (UIM2513)
Gtwy.detail.type = UIGW3_GW2513;
Gtwy.COMidx = 7; // COM port number
Gtwy.COMbaud = 57600; // Baud rate
// Open network
ERRO err = SdkStartCanNet(&Gtwy, Member, 0);
if (err) {
printf("Failed to open CAN network\n");
return -1;
}
uint g_GtwyHandle = Gtwy.GtwyHandle;
int memberCount = Gtwy.MemberQty;
```
### Step 3 — Control Motor
```cpp
uint NodeID = 5; // Motor Node ID
// Enable motor
SdkSetMotorOn(g_GtwyHandle, NodeID, 1, NULL);
// Set speed and start JOG motion
int speed = 1000; // 1000 pulses/sec
SdkSetJogMxn(g_GtwyHandle, NodeID, speed, NULL);
SdkSetBeginMxn(g_GtwyHandle, NodeID, 0, NULL);
// ... motion in progress ...
// Emergency stop
SdkSetStopMxn(g_GtwyHandle, NodeID, 0, NULL);
// Disable motor
SdkSetMotorOn(g_GtwyHandle, NodeID, 0, NULL);
```
### Step 4 — Close Network
```cpp
SdkCloseCanNet(g_GtwyHandle);
```
---
## Programming Workflow
```
┌─────────────────────────────────────────────────────────────┐
│ uirSDK3 Programming Flow │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. Open CAN Network │
│ └──> SdkStartCanNet() │
│ │
│ 2. Get Device List │
│ └──> SdkGetMemberList() │
│ │
│ 3. Configure Motor (optional) │
│ ├──> SdkSetMotorConfig() │
│ ├──> SdkSetAcceleration() │
│ └──> SdkSetMotionLimits() │
│ │
│ 4. Enable Motor │
│ └──> SdkSetMotorOn(1) │
│ │
│ 5. Execute Motion │
│ ├──> JOG: SdkSetJogMxn() + SdkSetBeginMxn() │
│ └──> PTP: SdkSetPtpMxnA/R() + SdkSetBeginMxn() │
│ │
│ 6. Monitor Status │
│ ├──> SdkGetMotionStatus() │
│ └──> SdkGetRTCN() (real-time notifications) │
│ │
│ 7. Stop & Disable │
│ ├──> SdkSetStopMxn() │
│ └──> SdkSetMotorOn(0) │
│ │
│ 8. Close Network │
│ └──> SdkCloseCanNet() │
│ │
└─────────────────────────────────────────────────────────────┘
```
---
## Sample Code Projects
| Project | Platform | Language | Description |
|---------|----------|----------|-------------|
| Win32_Cpp_libUirSdkWin32_UIM342 | Windows 32-bit | C++ | UIM342 motor control example |
| Win64_Cpp_libUirSdkWin64_UIM342 | Windows 64-bit | C++ | UIM342 motor control example |
| Win32_Cpp_libUirSdkWin32_UIM1616 | Windows 32-bit | C++ | UIM1616 I/O control example |
| Win64_Cpp_libUirSdkWin64_UIM1616 | Windows 64-bit | C++ | UIM1616 I/O control example |
| Win32_C#_libUirSdkWin32_UIM342 | Windows 32-bit | C# | UIM342 motor control example |
| Win64_C#_libUirSdkWin64_UIM342 | Windows 64-bit | C# | UIM342 motor control example |
| Win32_C#_libUirSdkWin32_UIM1616 | Windows 32-bit | C# | UIM1616 I/O control example |
| Win64_C#_libUirSdkWin64_UIM1616 | Windows 64-bit | C# | UIM1616 I/O control example |
---
## Error Codes
| Error Code | Description |
|------------|-------------|
| 0 | No error (success) |
| !0 | Error code (refer to UIError.h) |
---
## Applications
:::grid{cols=3 style=card}
**Custom Control Software**
Build tailor-made control interfaces for specific production lines or medical devices. Full access to all motor and I/O functions.
**System Integration**
Integrate UIROBOT motors into existing PLC or SCADA systems. The SDK provides a clean API layer above the raw CAN protocol.
**Multi-Axis Coordination**
Control multiple motors simultaneously for coordinated motion. Use real-time notifications for synchronized operations.
:::
---
## Related Products
| Product | Description |
|---------|-------------|
| UIM342 / UIM342A | CAN bus smart motor controller |
| UIM620 | CAN bus motion controller |
| UIM720 | CAN bus motion controller |
| UIM1616 / UIM0808 | CAN bus digital I/O controller |
| UIM2513 | RS232 to CAN gateway |
| UIM2523 | Ethernet to CAN gateway |
---
## Resources
:::tip
Download the uirSDK package, sample code, and documentation from the [UIROBOT Download Center](https://www.uirobot.com/serve/list-437.html).
:::
- 📖 [uirSDK3 User Manual V4.7 (PDF)](https://www.uirobot.com/uploads/files/f30fdec2ef52855e328edf9abcbd1d4e.pdf)
- 💻 [Sample Code (C++, C#)](https://www.uirobot.com/serve/list-437.html)
---
*Last Updated: 2026-06-23 | Based on uirSDK3 User Manual V4.7*