Table of Contents
LINX Specification
The LabVIEW Interface for X (LINX) is intended to replace the LabVIEW Interfaces for Arduino and Chipkit and provide a generic protocol for LabVIEW to interface with any programmable device, but specifically targeted at microcontrollers and SoCs.
Overview
LINX will provide a high level G API that allows users to communicate with LINX enabled devices. A firmware spec will be provided for developers to create LINX firmware for their target of choice.
Features
- Standard commands for hardware agnostic actions
- Hardware specific commands for advanced functionality
- Variable length packets with error checking
- TCP and Serial communication
- Firmware version checking
Devices
Error Codes
Flash Memory Config Data
Commands
Command | Function | Status |
---|---|---|
System Commands (0x0000 - 0x003F) | ||
0x0000 | Sync | Required |
0x0001 | Flush | Recommended |
0x0002 | system_reset | Recommended |
0x0003 | Get Device ID | Required |
0x0004 | Get LINX API Version | Required |
0x0005 | Get Max Baud Rate | Required (For Serial Interface) |
0x0006 | Set Baud Rate | Required (For Serial Interface) |
0x0007 | system_get_max_packet_size | Optional |
0x0008 | Get DIO Channels | Recommended |
0x0009 | Get AI Channels | Recommended |
0x000A | Get AO Channels | Recommended |
0x000B | Get PWM Channels | Recommended |
0x000C | Get QE Channels | Recommended |
0x000D | Get UART Channels | Recommended |
0x000E | Get I2C Channels | Recommended |
0x000F | Get SPI Channels | Recommended |
0x0010 | Get CAN Channels | Recommended |
0x0011 | Disconnect | Optional |
0x0012 | Set Device User ID | Required |
0x0013 | Get Device User ID | Required |
0x0014 | Set Device Ethernet IP | Optional (Required For Ethernet Interface) |
0x0015 | Get Device Ethernet IP | Optional (Required For Ethernet Interface) |
0x0016 | Set Device Ethernet Port | Optional (Required For Ethernet Interface) |
0x0017 | Get Device Ethernet Port | Optional (Required For Ethernet Interface) |
0x0018 | Set Device WIFI IP | Optional (Required For WIFI Interface) |
0x0019 | Get Device WIFI IP | Optional (Required For WIFI Interface) |
0x001A | Set Device WIFI Port | Optional (Required For WIFI Interface) |
0x001B | Get Device WIFI Port | Optional (Required For WIFI Interface) |
0x001C | Set Device WIFI SSID | Optional (Required For WIFI Interface) |
0x001D | Get Device WIFI SSID | Optional (Required For WIFI Interface) |
0x001E | Set Device WIFI Security Type | Optional (Required For WIFI Interface) |
0x001F | Get Device WIFI Security Type | Optional (Required For WIFI Interface) |
0x0020 | Set Device WIFI Password | Optional (Required For WIFI Interface) |
0x0021 | Get Device WIFI Password | Optional (Required For WIFI Interface) |
0x0022 | Set Device LINX Max Baud Rate | Optional |
0x0023 | Get Device LINX Max Baud Rate | Optional |
0x0024 | Get Device Name | Required |
0x0025 | Get Servo Channels | Required |
0x0025 - 0x003F | Reserved | |
Digital I/O (0x0040 - 0x005F) | ||
0x0040 | Set Digital Pin Mode | Optional |
0x0041 | Digital Write | Recommended |
0x0042 | Digital Read | Recommended |
0x0043 | Digital Write Square Wave | Recommended |
0x0044 | Digital Read Pulse Width | Recommended |
0x0045 - 0x005F | Reserved | |
Analog I/O (0x0060- 0x007F) | ||
0x0060 | Analog Set Reference Voltage | Optional |
0x0061 | Get AI Reference | Optional |
0x0062 | analog_set_resolution | Optional |
0x0063 | analog_get_resolution | Optional |
0x0064 | Analog Read | Recommended |
0x0065 | Analog Write | Optional |
0x0066- 0x007F | Reserved | |
PWM (0x0080 - 0x009F) | ||
0x0080 | pwm_open | Optional |
0x0081 | pwm_set_mode | Optional |
0x0082 | PWM Set Frequency | Recommended |
0x0083 | PWM Set Duty Cylce | Recommended |
0x0084 | pwm_close | Optional |
0x0085- 0x009F | Reserved | |
Quadrature Encoder (0x00A0- 0x00BF) | ||
0x00A0- 0x00BF | Reserved | |
UART (0x00C0- 0x00DF) | ||
0x00C0 | UART Open | Recommended |
0x00C1 | UART Set Baud Rate | Recommended |
0x00C2 | UART Get Bytes Available | Recommended |
0x00C3 | UART Read | Recommended |
0x00C4 | UART Write | Recommended |
0x00C5 | UART Close | Recommended |
0x00C6- 0x0DF | Reserved | |
I2C (0x00E0 - 0x00FF) | ||
0x00E0 | I2C Open Master | Recommended |
0x00E1 | I2C Set Speed | Optional |
0x00E2 | I2C Write | Recommended |
0x00E3 | I2C Read | Recommended |
0x00E4 | I2C Close | Recommended |
0x00E5 - 0x00FF | Reserved | |
SPI (0x0100- 0x011F) | ||
0x0100 | SPI Open Master | Recommended |
0x0101 | SPI Bit order | Recommended |
0x0102 | SPI Set Clock Frequency | Recommended |
0x0103 | SPI Set Mode | Recommended |
0x0104 | SPI Set Frame Size | Legacy |
0x0105 | SPI Set CS Logic Level | Legacy |
0x0106 | SPI Set CS Pin | Legacy |
0x0107 | SPI Write/Read | Recommended |
0x0108 - 0x011F | Reserved | |
CAN (0x0120 - 0x013F ) | ||
0x0120- 0x013F | Reserved | Optional |
Servo (0x0140 - 0x015F) | ||
0x0140 | Servo Open | Recommended |
0x0141 | Servo Set Pulse Width | Recommended |
0x0142 | Servo Close | Recommended |
WS2812(0x0160 - 0x0167) | ||
0x0160 | WS2812 Open | Optional |
0x0161 | WS2812 Write One Pixel | Optional |
0x0162 | WS2812 Write N Pixels | Optional |
0x0163 | WS2812 Refresh | Optional |
0x0164 | WS2812 Close | Optional |
Reserved (0x0140- 0xFBFF) | ||
320 - 64511 | Reserved | N/A |
User Commands (0xFC00- 0xFFFF) | ||
0xFC00- 0xFFFF | These values are reserve for custom user commands and will never be used in official LINX packets. | N/A |